diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-06-01 21:57:29 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-06-01 21:57:29 +0000 |
commit | 4a28077f468f0a688cd70f3b43e5ffc242bcb49a (patch) | |
tree | 8913da6bf5a92e28d06f04db9635c1b93c4c8fe3 /modules/cloud.module | |
parent | 59082a5f19aded411f474fcd88220a06a02f06f4 (diff) | |
download | brdo-4a28077f468f0a688cd70f3b43e5ffc242bcb49a.tar.gz brdo-4a28077f468f0a688cd70f3b43e5ffc242bcb49a.tar.bz2 |
- adding descriptions to modules (thanks Joe + Scott).
- fixed comment flat list view missing 1 comment.
- changed update.php around a bit.
* security check isn't in effect if the db hasn't been updated.
* instructions re-organized.
* fixed some minor updates.
- updated database.mysql done by UnConeD.
- changelog update.
Diffstat (limited to 'modules/cloud.module')
-rw-r--r-- | modules/cloud.module | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/cloud.module b/modules/cloud.module index add484759..77817ba8b 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -17,6 +17,11 @@ function cloud_help($type = "administrator") { return $output; } +function cloud_system($field){ + $system["description"] = t("Tracks other sites and displays last date changed."); + return $system[$field]; +} + function cloud_cron() { $result = db_query("SELECT * FROM site WHERE timestamp = 0 OR timestamp + refresh < ". time()); @@ -64,7 +69,7 @@ function cloud_update($site) { $data .= fgets($fp, 128); } - if (abs($site["size"] - strlen($data)) > $site["threshold"]) { + if (abs($site["size"] - strlen($data)) >= $site["threshold"]) { db_query("UPDATE site SET size = '". strlen($data) ."', timestamp = '". time() ."' WHERE link = '%s'", $site["link"]); } @@ -78,7 +83,7 @@ function cloud_update($site) { function cloud_form($edit = array()) { $period = array(900 => format_interval(900), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 64800 => format_interval(64800), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200)); - $threshold = array(0 => "0 bytes", 10 => "10 bytes", 20 => "20 bytes", 40 => "40 bytes", 60 => "60 bytes", 80 => "80 bytes", 160 => "160 bytes", 320 => "320 bytes", 640 => "640 bytes"); + $threshold = array(1 => "1 byte", 10 => "10 bytes", 20 => "20 bytes", 40 => "40 bytes", 60 => "60 bytes", 80 => "80 bytes", 100 => "100 bytes", 120 => "120 bytes", 140 => "140 bytes", 160 => "160 bytes", 320 => "320 bytes", 640 => "640 bytes"); $form .= form_textfield("Site name", "name", $edit["name"], 50, 128, "The name of the website you want to monitor for updates."); $form .= form_textfield("Site URL", "link", $edit["link"], 50, 255, "The URL of the website you want to monitor for updates."); |