~spreadubuntu/spreadubuntu/devel-drupal6

« back to all changes in this revision

Viewing changes to sites/all/modules/views/modules/aggregator/views_handler_argument_aggregator_fid.inc

  • Committer: ruben
  • Date: 2009-06-08 09:38:49 UTC
  • Revision ID: ruben@captive-20090608093849-s1qtsyctv2vwp1x1
SpreadUbuntu moving to Drupal6. Based on ubuntu-drupal theme and adding our modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// $Id: views_handler_argument_aggregator_fid.inc,v 1.1 2009/01/07 19:38:08 merlinofchaos Exp $
 
3
 
 
4
/**
 
5
 * Argument handler to accept an aggregator feed id.
 
6
 */
 
7
class views_handler_argument_aggregator_fid extends views_handler_argument_numeric {
 
8
  /**
 
9
   * Override the behavior of title(). Get the title of the feed.
 
10
   */
 
11
  function title_query() {
 
12
    $titles = array();
 
13
    $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
 
14
 
 
15
    $result = db_query("SELECT f.title FROM {aggregator_feed} f WHERE f.fid IN ($placeholders)", $this->value);
 
16
    while ($term = db_fetch_object($result)) {
 
17
      $titles[] = check_plain($term->title);
 
18
    }
 
19
    return $titles;
 
20
  }
 
21
}
 
22