@@ -174,7 +173,7 @@ public function feedRefresh(FeedInterface $aggregator_feed, Request $request) {
* A render array as expected by drupal_render().
*/
publicfunctionadminOverview(){
$result=$this->database->query('SELECT f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, f.block, COUNT(i.iid) AS items FROM {aggregator_feed} f LEFT JOIN {aggregator_item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, f.block ORDER BY f.title');
$result=$this->database->query('SELECT f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image, COUNT(i.iid) AS items FROM {aggregator_feed} f LEFT JOIN {aggregator_item} i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.hash, f.etag, f.modified, f.image ORDER BY f.title');
@@ -54,12 +54,6 @@ public function form(array $form, array &$form_state) {
'#options'=>$period,
'#description'=>$this->t('The length of time between feed updates. Requires a correctly configured <a href="@cron">cron maintenance task</a>.',array('@cron'=>url('admin/reports/status'))),
'#description'=>$this->t("Drupal can make a block with the most recent news items of this feed. You can <a href=\"@block-admin\">configure blocks</a> to be displayed in the sidebar of your page. This setting lets you configure the number of news items to show in this feed's block. If you choose '0' this feed's block will be disabled.",array('@block-admin'=>url('admin/structure/block'))),
@@ -113,13 +113,6 @@ public function buildForm(array $form, array &$form_state) {
'#options'=>$period,
'#description'=>$this->t('The length of time between feed updates. Requires a correctly configured <a href="@cron">cron maintenance task</a>.',array('@cron'=>url('admin/reports/status'))),
'#description'=>$this->t("Drupal can make a block with the most recent news items of a feed. You can <a href=\"@block-admin\">configure blocks</a> to be displayed in the sidebar of your page. This setting lets you configure the number of news items to show in a feed's block. If you choose '0' these feeds' blocks will be disabled.",array('@block-admin'=>url('admin/structure/block'))),
);
// Handling of categories.
$options=array_map('check_plain',$this->database->query("SELECT cid, title FROM {aggregator_category} ORDER BY title")->fetchAllKeyed());
...
...
@@ -215,7 +208,6 @@ public function submitForm(array &$form, array &$form_state) {
@@ -64,9 +127,9 @@ public function blockSubmit($form, &$form_state) {
* {@inheritdoc}
*/
publicfunctionbuild(){
$id=$this->getPluginId();
if($category=db_query('SELECT cid, title, block FROM {aggregator_category} WHERE cid = :cid',array(':cid'=>$id))->fetchObject()){
$result=db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC',0,$this->configuration['block_count'],array(':cid'=>$category->cid));
$result=$this->connection->queryRange('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC',0,$this->configuration['block_count'],array(':cid'=>$category->cid));
// Plugin IDs look something like this: aggregator_feed_block:1.
list(,$id)=explode(':',$this->getPluginId());
if($feed=db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid',array(':fid'=>$id))->fetchObject()){
$result=db_query_range("SELECT * FROM {aggregator_item} WHERE fid = :fid ORDER BY timestamp DESC, iid DESC",0,$this->configuration['block_count'],array(':fid'=>$id));
$result=$this->connection->queryRange("SELECT * FROM {aggregator_item} WHERE fid = :fid ORDER BY timestamp DESC, iid DESC",0,$this->configuration['block_count'],array(':fid'=>$feed->id()));
$result=$this->connection->query('SELECT cid, title FROM {aggregator_category} ORDER BY title WHERE cid = :cid',array(':cid'=>$derivative_id))->fetchObject();
$result=$this->connection->query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid',array(':fid'=>$derivative_id))->fetchObject();