diff --git a/inc/class.zoneclear.feed.server.php b/inc/class.zoneclear.feed.server.php index b401182..b3b4cc9 100644 --- a/inc/class.zoneclear.feed.server.php +++ b/inc/class.zoneclear.feed.server.php @@ -39,9 +39,9 @@ class zoneclearFeedServer */ public function __construct(dcCore $core) { - $this->core = $core; - $this->con = $core->con; - $this->blog = $core->con->escape($core->blog->id); + $this->core = $core; + $this->con = $core->con; + $this->blog = $core->con->escape($core->blog->id); $this->table = $core->prefix . 'zc_feed'; } @@ -87,11 +87,7 @@ class zoneclearFeedServer } # --BEHAVIOR-- zoneclearFeedServerAfterUpdFeed - $this->core->callBehavior( - 'zoneclearFeedServerAfterUpdFeed', - $cur, - $id - ); + $this->core->callBehavior('zoneclearFeedServerAfterUpdFeed', $cur, $id); } /** @@ -120,10 +116,7 @@ class zoneclearFeedServer } # --BEHAVIOR-- zoneclearFeedServerAfterAddFeed - $this->core->callBehavior( - 'zoneclearFeedServerAfterAddFeed', - $cur - ); + $this->core->callBehavior('zoneclearFeedServerAfterAddFeed', $cur); return $cur->feed_id; } @@ -166,12 +159,7 @@ class zoneclearFeedServer } # --BEHAVIOR-- zoneclearFeedServerAfterEnableFeed - $this->core->callBehavior( - 'zoneclearFeedServerAfterEnableFeed', - $id, - $enable, - $time - ); + $this->core->callBehavior('zoneclearFeedServerAfterEnableFeed', $id, $enable, $time); } # @@ -189,10 +177,7 @@ class zoneclearFeedServer } # --BEHAVIOR-- zoneclearFeedServerBeforeDelFeed - $this->core->callBehavior( - 'zoneclearFeedServerBeforeDelFeed', - $id - ); + $this->core->callBehavior('zoneclearFeedServerBeforeDelFeed', $id); $this->con->execute(sprintf( "DELETE FROM %s WHERE feed_id = %s AND blog_id = '%s' ", @@ -293,6 +278,11 @@ class zoneclearFeedServer $strReq .= "AND Z.feed_status = " . ((integer) $params['feed_status']) . " "; } + if (!empty($params['q'])) { + $q = $this->con->escape(str_replace('*', '%', strtolower($params['q']))); + $strReq .= "AND LOWER(Z.feed_name) LIKE '" . $q . "' "; + } + if (!empty($params['sql'])) { $strReq .= $params['sql'] . ' '; } diff --git a/index.php b/index.php index d897817..d91d76d 100644 --- a/index.php +++ b/index.php @@ -470,6 +470,7 @@ if (isset($_REQUEST['part']) && $_REQUEST['part'] == 'feed') { $feeds_filter = new adminGenericFilter($core, 'zcfs_feeds'); $feeds_filter->add('part', 'feeds'); $feeds_filter->add(dcAdminFilters::getPageFilter()); + $feeds_filter->add(dcAdminFilters::getSearchFilter()); $params = $feeds_filter->params(); # feeds @@ -514,7 +515,7 @@ if (isset($_REQUEST['part']) && $_REQUEST['part'] == 'feed') { ); $feeds_list->feedsDisplay($feeds_filter->page, $feeds_filter->nb, - '
' . + '' . '%s' . '
' . '

' .