do not use global variable
This commit is contained in:
parent
098c5338e3
commit
cfa4bf8119
2 changed files with 4 additions and 3 deletions
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue