Move hook-related methods from Core\Addon to Core\Hook

This commit is contained in:
Hypolite Petovan 2018-10-21 01:15:02 -04:00
parent 0aa7671119
commit ca9cad3491
9 changed files with 153 additions and 242 deletions

View file

@ -771,7 +771,7 @@ class Post extends BaseObject
* Hmmm, code depending on the presence of a particular addon?
* This should be better if done by a hook
*/
if (in_array('qcomment', $a->addons)) {
if (Addon::isEnabled('qcomment')) {
$qc = ((local_user()) ? PConfig::get(local_user(), 'qcomment', 'words') : null);
$qcomment = (($qc) ? explode("\n", $qc) : null);
}