do not use global variable
This commit is contained in:
parent
098c5338e3
commit
cfa4bf8119
@ -28,7 +28,7 @@ class zcfsPublicBehaviors
|
|||||||
*/
|
*/
|
||||||
public static function coreBlogGetPosts(dcRecord $rs)
|
public static function coreBlogGetPosts(dcRecord $rs)
|
||||||
{
|
{
|
||||||
$GLOBALS['beforeZcFeedRsExt'] = $rs->extensions();
|
dcCore::app()->__set('beforeZcFeedRsExt', $rs->extensions());
|
||||||
$rs->extend('zcfsRsExtPosts');
|
$rs->extend('zcfsRsExtPosts');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,8 +53,9 @@ class zcfsRsExtPosts extends rsExtPost
|
|||||||
*/
|
*/
|
||||||
public static function zcFeedBrother($type, $args)
|
public static function zcFeedBrother($type, $args)
|
||||||
{
|
{
|
||||||
if (!empty($GLOBALS['beforeZcFeedRsExt'][$type])) {
|
$ext = dcCore::app()->__get('beforeZcFeedRsExt');
|
||||||
$func = $GLOBALS['beforeZcFeedRsExt'][$type];
|
if (null !== $ext && !empty($ext[$type])) {
|
||||||
|
$func = $ext[$type];
|
||||||
} elseif (is_callable('rsExtPostPublic', $type)) {
|
} elseif (is_callable('rsExtPostPublic', $type)) {
|
||||||
$func = ['rsExtPostPublic', $type];
|
$func = ['rsExtPostPublic', $type];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user