/[drupal]/drupal/modules/ping/ping.module
ViewVC logotype

Diff of /drupal/modules/ping/ping.module

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

revision 1.52, Wed Dec 19 17:45:42 2007 UTC revision 1.52.2.1, Fri Nov 6 07:46:22 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: ping.module,v 1.51 2007/12/14 18:08:47 goba Exp $  // $Id: ping.module,v 1.52 2007/12/19 17:45:42 goba Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 28  function ping_cron() { Line 28  function ping_cron() {
28    global $base_url;    global $base_url;
29    
30    if (variable_get('site_name', 0)) {    if (variable_get('site_name', 0)) {
31      if (db_result(db_query("SELECT COUNT(*) FROM {node} WHERE status = 1 AND (created > '". variable_get('cron_last', time()) ."' OR changed > '". variable_get('cron_last', time()) ."')"))) {      $cron_last = variable_get('cron_last', time());
32        // Query changed first since usually changed >= created.
33        if (db_result(db_query('SELECT COUNT(*) FROM {node} WHERE status = 1 AND changed > %d', $cron_last)) || db_result(db_query('SELECT COUNT(*) FROM {node} WHERE status = 1 AND created > %d', $cron_last))) {
34        _ping_notify(variable_get('site_name', ''), $base_url);        _ping_notify(variable_get('site_name', ''), $base_url);
35      }      }
36    }    }

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.52.2.1

  ViewVC Help
Powered by ViewVC 1.1.2