diff --git a/inc/class.zcfspublicbehaviors.php b/inc/class.zcfspublicbehaviors.php index a9f11ec..0a4bf10 100644 --- a/inc/class.zcfspublicbehaviors.php +++ b/inc/class.zcfspublicbehaviors.php @@ -28,7 +28,7 @@ class zcfsPublicBehaviors */ public static function coreBlogGetPosts(dcRecord $rs) { - $GLOBALS['beforeZcFeedRsExt'] = $rs->extensions(); + dcCore::app()->__set('beforeZcFeedRsExt', $rs->extensions()); $rs->extend('zcfsRsExtPosts'); } diff --git a/inc/class.zcfsrsextposts.php b/inc/class.zcfsrsextposts.php index 877541a..894952a 100644 --- a/inc/class.zcfsrsextposts.php +++ b/inc/class.zcfsrsextposts.php @@ -53,8 +53,9 @@ class zcfsRsExtPosts extends rsExtPost */ public static function zcFeedBrother($type, $args) { - if (!empty($GLOBALS['beforeZcFeedRsExt'][$type])) { - $func = $GLOBALS['beforeZcFeedRsExt'][$type]; + $ext = dcCore::app()->__get('beforeZcFeedRsExt'); + if (null !== $ext && !empty($ext[$type])) { + $func = $ext[$type]; } elseif (is_callable('rsExtPostPublic', $type)) { $func = ['rsExtPostPublic', $type]; } else {