| 1 |
<?php |
<?php |
| 2 |
// $Id: update_status_aggregator.module,v 1.13 2008/03/25 19:13:09 yrocq Exp $ |
// $Id: update_status_aggregator.module,v 1.13.2.1 2008/03/28 19:57:08 yrocq Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 6 |
* Lets users check a remote site if some module are not up-to-date. |
* Lets users check a remote site if some module are not up-to-date. |
| 7 |
* |
* |
|
* Adds a text field when a node is displayed |
|
|
* so that authenticated users may make notes. |
|
|
|
|
|
TODO: |
|
|
* add filter question related to the view |
|
|
* export view definition to be included with the release |
|
|
* make views of list of sites that use any particular module |
|
|
* make it so that it runs cron on the remote site when config page is saved. |
|
|
* Add permission |
|
| 8 |
*/ |
*/ |
| 9 |
|
|
| 10 |
/** |
/** |
| 284 |
|
|
| 285 |
function update_status_aggregator_load($node) { |
function update_status_aggregator_load($node) { |
| 286 |
if ($node->type == "update_status_aggregator_module") { |
if ($node->type == "update_status_aggregator_module") { |
| 287 |
return db_fetch_object(db_query('SELECT module, usa.status, n.title as site FROM {update_status_aggregator} usa INNER JOIN {node} n ON n.nid = usa.site WHERE usa.vid = %d', $node->vid)); |
return db_fetch_object(db_query('SELECT module, usa.status, n.title AS site, n.nid AS site_id FROM {update_status_aggregator} usa INNER JOIN {node} n ON n.nid = usa.site WHERE usa.vid = %d', $node->vid)); |
| 288 |
} |
} |
| 289 |
elseif ($node->type == "update_status_aggregator_site") { |
elseif ($node->type == "update_status_aggregator_site") { |
| 290 |
return db_fetch_object(db_query('SELECT drupal_key FROM {update_status_aggregator_keys} WHERE vid = %d', $node->vid)); |
return db_fetch_object(db_query('SELECT drupal_key FROM {update_status_aggregator_keys} WHERE vid = %d', $node->vid)); |
| 405 |
'#title' => t("Remote Drupal website's name"), |
'#title' => t("Remote Drupal website's name"), |
| 406 |
'#size' => 60, |
'#size' => 60, |
| 407 |
'#maxlength' => 128, |
'#maxlength' => 128, |
| 408 |
'#default_value' => $node->site, |
'#default_value' => $node->site_id, |
| 409 |
'#required' => TRUE, |
'#required' => TRUE, |
| 410 |
); |
); |
| 411 |
$form['status'] = array( |
$form['status'] = array( |