do not use global variable
parent
098c5338e3
commit
cfa4bf8119
|
@ -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 New Issue