diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-17 15:39:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-17 15:39:07 +0000 |
commit | e41e8acda3fd0d2f5c22f363a87652d0c3d07334 (patch) | |
tree | 35dc7a1633569adfee61d13a72f73150db2f3fe0 /includes/common.inc | |
parent | a50eb34bda8adcb7fc32a7fd8943e4d4b1467939 (diff) | |
download | brdo-e41e8acda3fd0d2f5c22f363a87652d0c3d07334.tar.gz brdo-e41e8acda3fd0d2f5c22f363a87652d0c3d07334.tar.bz2 |
- Patch #45107 by chx: minor code speedups.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2eb3693da..198163900 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -827,7 +827,7 @@ function format_interval($timestamp, $granularity = 2) { * A translated date string in the requested format. */ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL) { - if ($timezone === NULL) { + if (!isset($timezone)) { global $user; if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) { $timezone = $user->timezone; @@ -945,8 +945,8 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) { } // Cache the clean_url variable to improve performance. - if ($clean_url === NULL) { - $clean_url = (variable_get('clean_url', '0') == '0') ? false : true; + if (!isset($clean_url)) { + $clean_url = (bool)variable_get('clean_url', '0'); } $base = ($absolute ? $base_url .'/' : ''); |