summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-04-15 13:45:45 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-04-15 13:45:45 +0200
commitae7c596cf4e6a0a09ebcf01fe8ae98789360c5be (patch)
treef156252e404e9893922cb5d984fdc646644b6c17 /inc/common.php
parentf41c79d730286e8e8c95deb88a4c876e08e278a2 (diff)
parent026b314868ee80aca644bf4107f78d8e8052b43e (diff)
downloadrpg-ae7c596cf4e6a0a09ebcf01fe8ae98789360c5be.tar.gz
rpg-ae7c596cf4e6a0a09ebcf01fe8ae98789360c5be.tar.bz2
Merge branch 'master' into htmlmail
* master: (382 commits) Romanian language update Marathi language update Arabic Language Update when there's not enough space for images, make sure they stay proportional (might be FS#2480) added minimal RTL print styles (part of FS#2185) moved plugins' rtl.css to their style.css counterpart (part of FS#2185) removed all browser-specific gradients as the recently (in 42ff6730) introduced svg makes them unnecessary removed comments from accidentally commented lines in tpl_includeFile() removed obsolete template file added tpl_includeFile() to core Make getTitle method in remote interface public Changed an error code in XML-RPC interface. This error hasn't anything to do with the rest of the -32600 errors. BG: language update Korean language update fixed performance issues with gradient in Firefox (which also added gradient support for IE9) (FS#2447) deleted very old (and unused) images added accidentally removed '<?php' back in (was in 57fc5edd) wrapped X-UA-Compatible meta tag with conditional comments added explanation to todo in _forms.css removed problematic 'overflow: hidden' from lists again ('unfixes' FS#1950) ... Conflicts: inc/auth.php inc/load.php
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/inc/common.php b/inc/common.php
index d19147387..22a315901 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1296,14 +1296,14 @@ function dformat($dt=null,$format=''){
*
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
+ * @param int $int_date: current date in UNIX timestamp
*/
function date_iso8601($int_date) {
- //$int_date: current date in UNIX timestamp
- $date_mod = date('Y-m-d\TH:i:s', $int_date);
- $pre_timezone = date('O', $int_date);
- $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
- $date_mod .= $time_zone;
- return $date_mod;
+ $date_mod = date('Y-m-d\TH:i:s', $int_date);
+ $pre_timezone = date('O', $int_date);
+ $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
+ $date_mod .= $time_zone;
+ return $date_mod;
}
/**
@@ -1564,10 +1564,14 @@ function valid_input_set($param, $valid_values, $array, $exc = '') {
}
}
+/**
+ * Read a preference from the DokuWiki cookie
+ */
function get_doku_pref($pref, $default) {
if (strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) {
$parts = explode('#', $_COOKIE['DOKU_PREFS']);
- for ($i = 0; $i < count($parts); $i+=2){
+ $cnt = count($parts);
+ for ($i = 0; $i < $cnt; $i+=2){
if ($parts[$i] == $pref) {
return $parts[$i+1];
}