/[drupal]/contributions/modules/citizenspeak/citizenspeak.module
ViewVC logotype

Diff of /contributions/modules/citizenspeak/citizenspeak.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15.2.2, Mon Aug 25 20:47:16 2008 UTC revision 1.15.2.3, Mon Oct 13 06:34:33 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: citizenspeak.module,v 1.15 2006/03/18 16:41:31 georgehotelling Exp $  // $Id: citizenspeak.module,v 1.15.2.2 2008/08/25 20:47:16 matt2000 Exp $
3    
4  /**  /**
5   * @file The main CitizenSpeak module file   * @file The main CitizenSpeak module file
# Line 238  function citizenspeak_block($op = 'list' Line 238  function citizenspeak_block($op = 'list'
238      return $block;      return $block;
239    }    }
240    else {    else {
241      $most_popular = db_query(db_rewrite_sql('SELECT n.nid, n.title, COUNT(*) AS participants FROM {node} n LEFT JOIN citizenspeak_participants AS cp ON n.nid = cp.nid WHERE n.type = \'citizenspeak\' AND DATE_SUB(CURDATE(), INTERVAL 1 MONTH) < cp.sent_at AND n.promote = 1 AND n.status = 1 GROUP BY n.nid ORDER BY participants DESC LIMIT 5'));      $most_popular = db_query(db_rewrite_sql('SELECT n.nid, n.title, COUNT(*) AS participants FROM {node} n LEFT JOIN {citizenspeak_participants} AS cp ON n.nid = cp.nid WHERE n.type = \'citizenspeak\' AND DATE_SUB(CURDATE(), INTERVAL 1 MONTH) < cp.sent_at AND n.promote = 1 AND n.status = 1 GROUP BY n.nid ORDER BY participants DESC LIMIT 5'));
242      if (db_num_rows($most_popular)) {      if (db_num_rows($most_popular)) {
243        $block['subject'] = t('popular campaigns');        $block['subject'] = t('popular campaigns');
244    

Legend:
Removed from v.1.15.2.2  
changed lines
  Added in v.1.15.2.3

  ViewVC Help
Powered by ViewVC 1.1.2