'."\n".
- $msg."\n".
+ ' ' . "\n" .
+ '' . "\n" .
+ $msg . "\n" .
'';
exit(1);
- }
+
# Server js
- elseif ($args == '/zcfsupd.js'
- && 3 == $s->zoneclearFeedServer_bhv_pub_upd
- ) {
- $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates');
+ } elseif ($args == '/zcfsupd.js' && 3 == $s->zoneclearFeedServer_bhv_pub_upd) {
+ $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__) . '/default-templates');
self::serveDocument(
'zcfsupd.js',
'text/javascript',
false,
false
);
- }
+
# Server feeds description page
- elseif (in_array($args, array('', '/'))
- && $s->zoneclearFeedServer_pub_active
- ) {
- $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme,'tplset');
- if (!empty($tplset) && is_dir(dirname(__FILE__).'/default-templates/'.$tplset)) {
- $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.$tplset);
- } else {
- $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates/'.DC_DEFAULT_TPLSET);
- }
+ } elseif (in_array($args, ['', '/']) && $s->zoneclearFeedServer_pub_active) {
+ $tplset = $core->themes->moduleInfo($core->blog->settings->system->theme, 'tplset');
+ $path = dirname(__FILE__) . '/default-templates/';
+ if (!empty($tplset) && is_dir($path . $tplset)) {
+ $core->tpl->setPath($core->tpl->getPath(), $path . $tplset);
+ } else {
+ $core->tpl->setPath($core->tpl->getPath(), $path . DC_DEFAULT_TPLSET);
+ }
self::serveDocument('zcfeeds.html');
}
# Unknow
@@ -420,120 +389,114 @@ class zcfsTemplate
$lastn = -1;
$p = '';
if (isset($a['lastn'])) {
- $lastn = abs((integer) $a['lastn'])+0;
- $p .= "\$zcfs_params['limit'] = ".$lastn.";\n";
+ $lastn = abs((integer) $a['lastn']) +0;
+ $p .= "\$zcfs_params['limit'] = " . $lastn . ";\n";
}
if (isset($a['cat_id'])) {
- $p .= "@\$zcfs_params['sql'] .= 'AND Z.cat_id = ".addslashes($a['cat_id'])." ';\n";
+ $p .= "@\$zcfs_params['sql'] .= 'AND Z.cat_id = " . addslashes($a['cat_id']) . " ';\n";
}
if (isset($a['no_category'])) {
$p .= "@\$zcfs_params['sql'] .= 'AND Z.cat_id IS NULL ';\n";
}
if (!empty($a['site_url'])) {
- $p .= "\$zcfs_params['feed_url'] = '".addslashes($a['site_url'])."';\n";
+ $p .= "\$zcfs_params['feed_url'] = '" . addslashes($a['site_url']) . "';\n";
}
if (isset($a['feed_status'])) {
- $p .= "\$zcfs_params['feed_status'] = ".((integer) $a['feed_status']).";\n";
- }
- else {
+ $p .= "\$zcfs_params['feed_status'] = " . ((integer) $a['feed_status']) . ";\n";
+ } else {
$p .= "\$zcfs_params['feed_status'] = 1;\n";
}
if (!empty($a['feed_url'])) {
- $p .= "\$zcfs_params['feed_feed'] = '".addslashes($a['feed_url'])."';\n";
+ $p .= "\$zcfs_params['feed_feed'] = '" . addslashes($a['feed_url']) . "';\n";
}
if (isset($a['feed_owner'])) {
- $p .= "@\$zcfs_params['sql'] .= \"AND Z.feed_owner = '".addslashes($a['author'])."' \";\n";
+ $p .= "@\$zcfs_params['sql'] .= \"AND Z.feed_owner = '" . addslashes($a['author']) . "' \";\n";
}
$sortby = 'feed_creadt';
$order = 'desc';
if (isset($a['sortby'])) {
switch ($a['sortby']) {
- case 'name': $sortby = 'lowername'; break;
- case 'owner' : $sortby = 'feed_owner'; break;
- case 'date' : $sortby = 'feed_dt'; break;
- case 'update' : $sortby = 'feed_upddt'; break;
- case 'id' : $sortby = 'feed_id'; break;
+ case 'name': $sortby = 'lowername'; break;
+ case 'owner' : $sortby = 'feed_owner'; break;
+ case 'date' : $sortby = 'feed_dt'; break;
+ case 'update' : $sortby = 'feed_upddt'; break;
+ case 'id' : $sortby = 'feed_id'; break;
}
}
- if (isset($a['order'])
- && preg_match('/^(desc|asc)$/i', $a['order'])
- ) {
+ if (isset($a['order']) && preg_match('/^(desc|asc)$/i', $a['order'])) {
$order = $a['order'];
}
- $p .= "\$zcfs_params['order'] = '".$sortby." ".$order."';\n";
+ $p .= "\$zcfs_params['order'] = '" . $sortby . " " . $order . "';\n";
return
- 'feeds_params = $zcfs_params;'."\n".
- '$zcfs = new zoneclearFeedServer($core);'."\n".
- '$_ctx->feeds = $zcfs->getFeeds($zcfs_params); unset($zcfs_params,$zcfs);'."\n".
- "?>\n".
- 'feeds->fetch()) : ?>'.$c.'feeds_params = $zcfs_params;' . "\n" .
+ '$zcfs = new zoneclearFeedServer($core);' . "\n" .
+ '$_ctx->feeds = $zcfs->getFeeds($zcfs_params); unset($zcfs_params,$zcfs);' . "\n" .
+ "?>\n" .
+ 'feeds->fetch()) : ?>' . $c . 'feeds = null; $_ctx->feeds_params = null; ?>';
}
- public static function FeedIf($a,$c)
+ public static function FeedIf($a, $c)
{
- $if = array();
+ $if = [];
$operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&';
if (isset($a['type'])) {
$type = trim($a['type']);
$type = !empty($type) ? $type : 'feed';
- $if[] = '$_ctx->feeds->feed_type == "'.addslashes($type).'"';
+ $if[] = '$_ctx->feeds->feed_type == "' . addslashes($type) . '"';
}
if (isset($a['site_url'])) {
$url = trim($a['feed_url']);
if (substr($url, 0, 1) == '!') {
$url = substr($url, 1);
- $if[] = '$_ctx->feeds->feed_url != "'.addslashes($url).'"';
- }
- else {
- $if[] = '$_ctx->feeds->feed_url == "'.addslashes($url).'"';
+ $if[] = '$_ctx->feeds->feed_url != "' . addslashes($url) . '"';
+ } else {
+ $if[] = '$_ctx->feeds->feed_url == "' . addslashes($url) . '"';
}
}
if (isset($a['feed_url'])) {
$url = trim($a['feed_feed']);
if (substr($url, 0, 1) == '!') {
$url = substr($url, 1);
- $if[] = '$_ctx->feeds->feed_feed != "'.addslashes($url).'"';
- }
- else {
- $if[] = '$_ctx->feeds->feed_feed == "'.addslashes($url).'"';
+ $if[] = '$_ctx->feeds->feed_feed != "' . addslashes($url) . '"';
+ } else {
+ $if[] = '$_ctx->feeds->feed_feed == "' . addslashes($url) . '"';
}
}
if (isset($a['category'])) {
$category = addslashes(trim($a['category']));
if (substr($category, 0, 1) == '!') {
$category = substr($category, 1);
- $if[] = '($_ctx->feeds->cat_url != "'.$category.'")';
- }
- else {
- $if[] = '($_ctx->feeds->cat_url == "'.$category.'")';
+ $if[] = '($_ctx->feeds->cat_url != "' . $category . '")';
+ } else {
+ $if[] = '($_ctx->feeds->cat_url == "' . $category . '")';
}
}
if (isset($a['first'])) {
$sign = (boolean) $a['first'] ? '=' : '!';
- $if[] = '$_ctx->feeds->index() '.$sign.'= 0';
+ $if[] = '$_ctx->feeds->index() ' . $sign . '= 0';
}
if (isset($a['odd'])) {
$sign = (boolean) $a['odd'] ? '=' : '!';
- $if[] = '($_ctx->feeds->index()+1)%2 '.$sign.'= 1';
+ $if[] = '($_ctx->feeds->index()+1)%2 ' .$sign. ' = 1';
}
if (isset($a['has_category'])) {
$sign = (boolean) $a['has_category'] ? '' : '!';
- $if[] = $sign.'$_ctx->feeds->cat_id';
+ $if[] = $sign . '$_ctx->feeds->cat_id';
}
if (isset($a['has_description'])) {
$sign = (boolean) $a['has_description'] ? '' : '!';
- $if[] = $sign.'$_ctx->feeds->feed_desc';
+ $if[] = $sign . '$_ctx->feeds->feed_desc';
}
return empty($if) ?
$c :
- ''.$c.'';
+ '' . $c . '';
}
public static function FeedIfFirst($a)
@@ -542,8 +505,8 @@ class zcfsTemplate
$ret = html::escapeHTML($ret);
return
- 'feeds->index() == 0) { '.
- "echo '".addslashes($ret)."'; } ?>";
+ 'feeds->index() == 0) { ' .
+ "echo '" . addslashes($ret) . "'; } ?>";
}
public static function FeedIfOdd($a)
@@ -552,8 +515,8 @@ class zcfsTemplate
$ret = html::escapeHTML($ret);
return
- 'feeds->index()+1)%2 == 1) { '.
- "echo '".addslashes($ret)."'; } ?>";
+ 'feeds->index()+1)%2 == 1) { ' .
+ "echo '" . addslashes($ret) . "'; } ?>";
}
public static function FeedDesc($a)
@@ -596,9 +559,10 @@ class zcfsTemplate
$f = $GLOBALS['core']->tpl->getFilters($a);
return empty($a['full']) ?
- 'feeds->feed_lang').'; ?>'
- :
- 'feeds->feed_lang])) { echo '.sprintf($f, '$langs[$_ctx->feeds->feed_lang]').'; } else { echo '.sprintf($f, '$_ctx->feeds->feed_lang').'; } unset($langs); ?>';
+ 'feeds->feed_lang') . '; ?>' :
+ 'feeds->feed_lang])) { echo ' .
+ sprintf($f, '$langs[$_ctx->feeds->feed_lang]') .'; } else { echo ' .
+ sprintf($f, '$_ctx->feeds->feed_lang') . '; } unset($langs); ?>';
}
public static function FeedName($a)
@@ -618,12 +582,12 @@ class zcfsTemplate
public static function FeedsHeader($a, $c)
{
- return "feeds->isStart()) : ?>".$c."";
+ return "feeds->isStart()) : ?>" . $c . "";
}
public static function FeedsFooter($a, $c)
{
- return "feeds->isEnd()) : ?>".$c."";
+ return "feeds->isEnd()) : ?>" . $c . "";
}
public static function FeedsCount($a)
@@ -643,13 +607,13 @@ class zcfsTemplate
}
return
- "feeds->count(); \n".
- "if (\$fcount == 0) {\n".
- " printf(__('".$none."'),\$fcount);\n".
- "} elseif (\$fcount == 1) {\n".
- " printf(__('".$one."'),\$fcount);\n".
- "} else {\n".
- " printf(__('".$more."'),\$fcount);\n".
+ "feeds->count(); \n" .
+ "if (\$fcount == 0) {\n" .
+ " printf(__('" . $none . "'),\$fcount);\n" .
+ "} elseif (\$fcount == 1) {\n" .
+ " printf(__('" . $one . "'),\$fcount);\n" .
+ "} else {\n" .
+ " printf(__('" . $more . "'),\$fcount);\n" .
"} unset(\$fcount); ?>";
}
@@ -670,18 +634,18 @@ class zcfsTemplate
}
return
- "feeds->zc->getFeeds(); \n".
- "if (!\$allfeeds->isEmpty()) { \n".
- " while (\$allfeeds->fetch()) { ".
- " \$fcount += (integer) \$_ctx->feeds->zc->getPostsByFeed(array('feed_id'=>\$allfeeds->feed_id),true)->f(0); ".
- " } \n".
- "} \n".
- "if (\$fcount == 0) {\n".
- " printf(__('".$none."'),\$fcount);\n".
- "} elseif (\$fcount == 1) {\n".
- " printf(__('".$one."'),\$fcount);\n".
- "} else {\n".
- " printf(__('".$more."'),\$fcount);\n".
+ "feeds->zc->getFeeds(); \n" .
+ "if (!\$allfeeds->isEmpty()) { \n" .
+ " while (\$allfeeds->fetch()) { " .
+ " \$fcount += (integer) \$_ctx->feeds->zc->getPostsByFeed(array('feed_id'=>\$allfeeds->feed_id),true)->f(0); " .
+ " } \n" .
+ "} \n" .
+ "if (\$fcount == 0) {\n" .
+ " printf(__('" . $none . "'),\$fcount);\n" .
+ "} elseif (\$fcount == 1) {\n" .
+ " printf(__('" . $one . "'),\$fcount);\n" .
+ "} else {\n" .
+ " printf(__('" . $more . "'),\$fcount);\n" .
"} unset(\$allfeeds,\$fcount); ?>";
}
@@ -703,18 +667,18 @@ class zcfsTemplate
return
"feeds->zc->getPostsByFeed(array('feed_id'=>\$_ctx->feeds->feed_id),true)->f(0); \n".
- "if (\$fcount == 0) {\n".
- " printf(__('".$none."'),\$fcount);\n".
- "} elseif (\$fcount == 1) {\n".
- " printf(__('".$one."'),\$fcount);\n".
- "} else {\n".
- " printf(__('".$more."'),\$fcount);\n".
+ "if (\$fcount == 0) {\n" .
+ " printf(__('" . $none . "'),\$fcount);\n" .
+ "} elseif (\$fcount == 1) {\n" .
+ " printf(__('" . $one . "'),\$fcount);\n" .
+ "} else {\n" .
+ " printf(__('" . $more . "'),\$fcount);\n" .
"} unset(\$fcount); ?>";
}
- protected static function getValue($a,$v)
+ protected static function getValue($a, $v)
{
- return 'tpl->getFilters($a), $v).'; ?>';
+ return 'tpl->getFilters($a), $v) . '; ?>';
}
protected static function getOperator($op)
@@ -732,11 +696,11 @@ class zcfsTemplate
}
}
-$core->addBehavior('publicBreadcrumb',array('extZcfeeds','publicBreadcrumb'));
+$core->addBehavior('publicBreadcrumb', ['extZcfeeds', 'publicBreadcrumb']);
class extZcfeeds
{
- public static function publicBreadcrumb($context,$separator)
+ public static function publicBreadcrumb($context, $separator)
{
if ($context == 'zoneclearFeedsPage') {
return __('List of feeds');
diff --git a/inc/class.zcfs.feedsactions.php b/inc/class.zcfs.feedsactions.php
index 06c54ae..b6555c0 100644
--- a/inc/class.zcfs.feedsactions.php
+++ b/inc/class.zcfs.feedsactions.php
@@ -15,14 +15,14 @@ class zcfsFeedsActionsPage extends dcActionsPage
{
public $zcfs;
- public function __construct(dcCore $core, $uri, $redirect_args=array())
+ public function __construct(dcCore $core, $uri, $redirect_args = [])
{
$this->zcfs = new zoneclearFeedServer($core);
parent::__construct($core, $uri, $redirect_args);
- $this->redirect_fields = array(
+ $this->redirect_fields = [
'sortby', 'order', 'page', 'nb'
- );
+ ];
$this->field_entries = 'feeds';
$this->caller_title = __('Feeds');
$this->loadDefaults();
@@ -34,39 +34,39 @@ class zcfsFeedsActionsPage extends dcActionsPage
$this->core->callBehavior('zcfsFeedsActionsPage', $this->core, $this);
}
- public function beginPage($breadcrumb='', $head='')
+ public function beginPage($breadcrumb = '', $head = '')
{
echo
- ''.__('Feeds server').''.
- dcPage::jsLoad('js/_posts_actions.js').
- $head.
- ''.
- $breadcrumb.
- ''.
- __('Back to feeds list').'
';
+ '' . __('Feeds server') . '' .
+ dcPage::jsLoad('js/_posts_actions.js') .
+ $head .
+ '' .
+ $breadcrumb .
+ '' .
+ __('Back to feeds list') . '
';
}
public function endPage()
{
- echo
- '';
+ echo '';
}
public function error(Exception $e)
{
$this->core->error->add($e->getMessage());
- $this->beginPage(dcPage::breadcrumb(array(
- html::escapeHTML($this->core->blog->name) => '',
- $this->getCallerTitle() => $this->getRedirection(true),
- __('Feeds actions') => ''
- )));
+ $this->beginPage(
+ dcPage::breadcrumb([
+ html::escapeHTML($this->core->blog->name) => '',
+ $this->getCallerTitle() => $this->getRedirection(true),
+ __('Feeds actions') => ''
+ ])
+ );
$this->endPage();
}
protected function fetchEntries($from)
{
if (!empty($from['feeds'])) {
-
$params['feed_id'] = $from['feeds'];
$feeds = $this->zcfs->getFeeds($params);
@@ -74,11 +74,9 @@ class zcfsFeedsActionsPage extends dcActionsPage
$this->entries[$feeds->feed_id] = $feeds->feed_name;
}
$this->rs = $feeds;
- }
- else {
+ } else {
$this->rs = $this->core->con->select(
- "SELECT blog_id FROM ".
- $this->core->prefix."blog WHERE false"
+ "SELECT blog_id FROM " . $this->core->prefix . "blog WHERE false"
);
}
}
@@ -95,36 +93,36 @@ class zcfsDefaultFeedsActions
public static function zcfsFeedsActionsPage(dcCore $core, zcfsFeedsActionsPage $ap)
{
$ap->addAction(
- array(__('Change category') => 'changecat'),
- array('zcfsDefaultFeedsActions', 'doChangeCategory')
+ [__('Change category') => 'changecat'],
+ ['zcfsDefaultFeedsActions', 'doChangeCategory']
);
$ap->addAction(
- array(__('Change update interval') => 'changeint'),
- array('zcfsDefaultFeedsActions', 'doChangeInterval')
+ [__('Change update interval') => 'changeint'],
+ ['zcfsDefaultFeedsActions', 'doChangeInterval']
);
$ap->addAction(
- array(__('Disable feed update') => 'disablefeed'),
- array('zcfsDefaultFeedsActions', 'doEnableFeed')
+ [__('Disable feed update') => 'disablefeed'],
+ ['zcfsDefaultFeedsActions', 'doEnableFeed']
);
$ap->addAction(
- array(__('Enable feed update') => 'enablefeed'),
- array('zcfsDefaultFeedsActions', 'doEnableFeed')
+ [__('Enable feed update') => 'enablefeed'],
+ ['zcfsDefaultFeedsActions', 'doEnableFeed']
);
$ap->addAction(
- array(__('Reset last update') => 'resetupdlast'),
- array('zcfsDefaultFeedsActions', 'doResetUpdate')
+ [__('Reset last update') => 'resetupdlast'],
+ ['zcfsDefaultFeedsActions', 'doResetUpdate']
);
$ap->addAction(
- array(__('Update (check) feed') => 'updatefeed'),
- array('zcfsDefaultFeedsActions', 'doUpdateFeed')
+ [__('Update (check) feed') => 'updatefeed'],
+ ['zcfsDefaultFeedsActions', 'doUpdateFeed']
);
$ap->addAction(
- array(__('Delete related posts') => 'deletepost'),
- array('zcfsDefaultFeedsActions', 'doDeletePost')
+ [__('Delete related posts') => 'deletepost'],
+ ['zcfsDefaultFeedsActions', 'doDeletePost']
);
$ap->addAction(
- array(__('Delete feed (without related posts)') => 'deletefeed'),
- array('zcfsDefaultFeedsActions', 'doDeleteFeed')
+ [__('Delete feed (without related posts)') => 'deletefeed'],
+ ['zcfsDefaultFeedsActions', 'doDeleteFeed']
);
}
@@ -162,13 +160,13 @@ class zcfsDefaultFeedsActions
public static function doDeletePost(dcCore $core, zcfsFeedsActionsPage $ap, $post)
{
- $types = array(
+ $types = [
'zoneclearfeed_url',
'zoneclearfeed_author',
'zoneclearfeed_site',
'zoneclearfeed_sitename',
'zoneclearfeed_id'
- );
+ ];
$ids = $ap->getIDs();
@@ -178,17 +176,17 @@ class zcfsDefaultFeedsActions
foreach($ids as $id) {
- $posts = $ap->zcfs->getPostsByFeed(array(
+ $posts = $ap->zcfs->getPostsByFeed([
'feed_id' => $id
- ));
+ ]);
while($posts->fetch()) {
$core->blog->delPost($posts->post_id);
$core->con->execute(
- 'DELETE FROM '.$core->prefix.'meta '.
- 'WHERE post_id = '.$posts->post_id.' '.
- 'AND meta_type '.$core->con->in($types).' '
+ 'DELETE FROM ' . $core->prefix . 'meta ' .
+ 'WHERE post_id = ' . $posts->post_id . ' ' .
+ 'AND meta_type ' . $core->con->in($types) . ' '
);
}
}
@@ -297,31 +295,28 @@ class zcfsDefaultFeedsActions
count($ids)
));
$ap->redirect(true);
- }
- else {
-
+ } else {
$categories_combo = dcAdminCombos::getCategoriesCombo(
$core->blog->getCategories()
);
$ap->beginPage(
- dcPage::breadcrumb(
- array(
+ dcPage::breadcrumb([
html::escapeHTML($core->blog->name) => '',
__('Feeds server') => '',
$ap->getCallerTitle() => $ap->getRedirection(true),
__('Change category for this selection') => ''
- )));
+ ]));
echo
- '';
$ap->endPage();
@@ -359,22 +354,22 @@ class zcfsDefaultFeedsActions
$ap->beginPage(
dcPage::breadcrumb(
- array(
+ [
html::escapeHTML($core->blog->name) => '',
__('Feeds server') => '',
$ap->getCallerTitle() => $ap->getRedirection(true),
__('Change update frequency for this selection') => ''
- )));
+ ]));
echo
- '';
$ap->endPage();
diff --git a/inc/lib.zcfs.activityreport.php b/inc/lib.zcfs.activityreport.php
index e1bcae2..7267444 100644
--- a/inc/lib.zcfs.activityreport.php
+++ b/inc/lib.zcfs.activityreport.php
@@ -12,7 +12,6 @@
*/
if (!defined('DC_RC_PATH')) {
-
return null;
}
@@ -29,7 +28,7 @@ $core->activityReport->addAction(
__('feed creation'),
__('A new feed named "%s" point to "%s" was added by "%s"'),
'zoneclearFeedServerAfterAddFeed',
- array('zoneclearFeedServerActivityReportBehaviors', 'addFeed')
+ ['zoneclearFeedServerActivityReportBehaviors', 'addFeed']
);
# from BEHAVIOR zoneclearFeedServerAfterUpdFeed in in zoneclearFeedServer/inc/class.zoneclear.feed.server.php
$core->activityReport->addAction(
@@ -38,7 +37,7 @@ $core->activityReport->addAction(
__('updating feed info'),
__('Feed named "%s" point to "%s" has been updated by "%s"'),
'zoneclearFeedServerAfterUpdFeed',
- array('zoneclearFeedServerActivityReportBehaviors', 'updFeedInfo')
+ ['zoneclearFeedServerActivityReportBehaviors', 'updFeedInfo']
);
# from BEHAVIOR zoneclearFeedServerAfterUpdFeed in in zoneclearFeedServer/inc/class.zoneclear.feed.server.php
$core->activityReport->addAction(
@@ -47,7 +46,7 @@ $core->activityReport->addAction(
__('updating feed records'),
__('Records of the feed named "%s" have been updated automatically'),
'zoneclearFeedServerAfterUpdFeed',
- array('zoneclearFeedServerActivityReportBehaviors', 'updFeedRecord')
+ ['zoneclearFeedServerActivityReportBehaviors', 'updFeedRecord']
);
# from BEHAVIOR zoneclearFeedServerAfterDelFeed in in zoneclearFeedServer/inc/class.zoneclear.feed.server.php
$core->activityReport->addAction(
@@ -56,7 +55,7 @@ $core->activityReport->addAction(
__('feed deletion'),
__('Feed named "%s" point to "%s" has been deleted by "%s"'),
'zoneclearFeedServerAfterDelFeed',
- array('zoneclearFeedServerActivityReportBehaviors', 'delFeed')
+ ['zoneclearFeedServerActivityReportBehaviors', 'delFeed']
);
# from BEHAVIOR zoneclearFeedServerAfterEnableFeed in in zoneclearFeedServer/inc/class.zoneclear.feed.server.php
$core->activityReport->addAction(
@@ -65,7 +64,7 @@ $core->activityReport->addAction(
__('feed status'),
__('Feed named "%s" point to "%s" has been set to "%s"'),
'zoneclearFeedServerAfterEnableFeed',
- array('zoneclearFeedServerActivityReportBehaviors', 'enableFeed')
+ ['zoneclearFeedServerActivityReportBehaviors', 'enableFeed']
);
class zoneclearFeedServerActivityReportBehaviors
@@ -74,11 +73,11 @@ class zoneclearFeedServerActivityReportBehaviors
{
global $core;
- $logs = array(
+ $logs = [
$cur->feed_name,
$cur->feed_feed,
$core->auth->getInfo('user_cn')
- );
+ ];
$core->activityReport->addLog(
'zoneclearFeedServer',
@@ -92,13 +91,13 @@ class zoneclearFeedServerActivityReportBehaviors
if (defined('DC_CONTEXT_ADMIN')) {
global $core;
$zc = new zoneclearFeedServer($core);
- $rs = $zc->getFeeds(array('feed_id' => $id));
+ $rs = $zc->getFeeds(['feed_id' => $id]);
- $logs = array(
+ $logs = [
$rs->feed_name,
$rs->feed_feed,
$core->auth->getInfo('user_cn')
- );
+ ];
$core->activityReport->addLog(
'zoneclearFeedServer',
@@ -113,11 +112,11 @@ class zoneclearFeedServerActivityReportBehaviors
if (!defined('DC_CONTEXT_ADMIN')) {
global $core;
$zc = new zoneclearFeedServer($core);
- $rs = $zc->getFeeds(array('feed_id' => $id));
+ $rs = $zc->getFeeds(['feed_id' => $id]);
- $logs = array(
+ $logs = [
$rs->feed_name
- );
+ ];
$core->activityReport->addLog(
'zoneclearFeedServer',
@@ -132,13 +131,13 @@ class zoneclearFeedServerActivityReportBehaviors
global $core;
$zc = new zoneclearFeedServer($core);
- $rs = $zc->getFeeds(array('feed_id' => $id));
+ $rs = $zc->getFeeds(['feed_id' => $id]);
- $logs = array(
+ $logs = [
$rs->feed_name,
$rs->feed_feed,
$core->auth->getInfo('user_cn')
- );
+ ];
$core->activityReport->addLog(
'zoneclearFeedServer',
@@ -152,13 +151,13 @@ class zoneclearFeedServerActivityReportBehaviors
global $core;
$zc = new zoneclearFeedServer($core);
- $rs = $zc->getFeeds(array('feed_id' => $id));
+ $rs = $zc->getFeeds(['feed_id' => $id]);
- $logs = array(
+ $logs = [
$rs->feed_name,
$rs->feed_feed,
$enable ? 'enable' : 'disable'
- );
+ ];
$core->activityReport->addLog(
'zoneclearFeedServer',