summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-01-07 19:21:28 +0000
committerDries Buytaert <dries@buytaert.net>2001-01-07 19:21:28 +0000
commit554d9b080b4be1c3ddfae75d79a0789da8c80cf2 (patch)
tree63db7660753774f5faccf8e095afb24c9e3fa14b /includes
parent63a335e1ed034d99ab34c6d80a56453175a18202 (diff)
downloadbrdo-554d9b080b4be1c3ddfae75d79a0789da8c80cf2.tar.gz
brdo-554d9b080b4be1c3ddfae75d79a0789da8c80cf2.tar.bz2
- fixed 2 small bugs in account.php
- drastically improved administration section - drastically revamped story administration: added new feature to schedule the publishing of stories - applied correct naming conventions to submission.php - fixed 1 small glitch in boxes - somewhat expanded the documentation = changed one SQL table - updated the faq with info on drupal - ... and more things I forgot about
Diffstat (limited to 'includes')
-rw-r--r--includes/function.inc4
-rw-r--r--includes/watchdog.inc2
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/function.inc b/includes/function.inc
index a92d349d5..adcb4c518 100644
--- a/includes/function.inc
+++ b/includes/function.inc
@@ -68,10 +68,10 @@ function format_interval($timestamp) {
$output .= floor($timestamp / 60) ." min ";
$timestamp = $timestamp % 60;
}
- if ($timestamp >= 0) {
+ if ($timestamp > 0) {
$output .= "$timestamp sec";
}
- return $output;
+ return ($output) ? $output : "0 sec";
}
function format_date($timestamp, $type = "medium") {
diff --git a/includes/watchdog.inc b/includes/watchdog.inc
index 2a007e3ce..4de8210db 100644
--- a/includes/watchdog.inc
+++ b/includes/watchdog.inc
@@ -10,7 +10,7 @@ $watchdog = array("comment" => array("0", $submission_rate["comment"]),
function watchdog($id, $message) {
global $user, $watchdog, $watchdog_history;
- if ($watchdog[$id][1]) {
+ if ($watchdog[$id][1] && !($user->permissions == 1 || $user->id == 1)) {
if ($log = db_fetch_object(db_query("SELECT * FROM watchdog WHERE hostname = '". getenv("REMOTE_ADDR") ."' AND level = '". $watchdog[$id][0] ."'"))) {
if (time() - $log->timestamp < $watchdog[$id][1]) {
watchdog("warning", "'". getenv("REMOTE_ADDR") ."' exceeded '$id' submission rate");