summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-12-16 21:42:52 +0000
committerDries Buytaert <dries@buytaert.net>2000-12-16 21:42:52 +0000
commitdcfcd99c6c55ddab797c31f7a544b7c1d0d9953e (patch)
tree59884a0f3afa0de6ccaede807dcb00174fdee20a /includes
parent62588af9cefda10fbde2a7293095613ae3e1a224 (diff)
downloadbrdo-dcfcd99c6c55ddab797c31f7a544b7c1d0d9953e.tar.gz
brdo-dcfcd99c6c55ddab797c31f7a544b7c1d0d9953e.tar.bz2
- improved web interface of cron module.
- improved web interface of account module. - added simple permission system with both administrators and regular users. It can be made more fine-grained but it will do for now. - various small enhancements to the other modules, but nothing big.
Diffstat (limited to 'includes')
-rw-r--r--includes/function.inc6
-rw-r--r--includes/user.inc2
2 files changed, 4 insertions, 4 deletions
diff --git a/includes/function.inc b/includes/function.inc
index 90a1179db..dc013683e 100644
--- a/includes/function.inc
+++ b/includes/function.inc
@@ -62,15 +62,15 @@ function format_plural($count, $singular, $plural) {
}
function format_interval($timestamp) {
- if ($timestamp > 86400) {
+ if ($timestamp >= 86400) {
$output .= format_plural(floor($timestamp / 86400), "day ", "days ");
$timestamp = $timestamp % 86400;
}
- if ($timestamp > 3600) {
+ if ($timestamp >= 3600) {
$output .= format_plural(floor($timestamp / 3600), "hour ", "hours ");
$timestamp = $timestamp % 3600;
}
- if ($timestamp > 60) {
+ if ($timestamp >= 60) {
$output .= floor($timestamp / 60) ." min ";
$timestamp = $timestamp % 60;
}
diff --git a/includes/user.inc b/includes/user.inc
index 75bd5cfaf..7d04c785f 100644
--- a/includes/user.inc
+++ b/includes/user.inc
@@ -15,7 +15,7 @@ function user_save($data, $id = 0) {
foreach ($data as $key=>$value) {
if ($key == "passwd") $query .= "$key = PASSWORD('". addslashes($value) ."'), ";
- else $query .= "$key='". addslashes($value) ."', ";
+ else $query .= "$key = '". addslashes($value) ."', ";
}
if (empty($id)) {