| 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 |
| 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 |
} |
} |