aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-05 03:04:27 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-05 03:04:27 +0000
commitb019ad9b5556b96342aa4c271143219261432229 (patch)
tree7c917eca8d78af02fa915909efa8fec0039b7aee /include/functions_user.inc.php
parenta44e905d0ba68c995ebe066792b9b348c45599cc (diff)
merge r 3126 from trunk
- embellish_url compacts now .. - some trigger improvements (render_category_description) - improved perf of duplicate_xxx_url ( rewrote func params_for_duplication and remove some vars from $page ) git-svn-id: http://piwigo.org/svn/branches/2.0@3127 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index d82da2213..1b85ba44f 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -760,28 +760,28 @@ SELECT COUNT(*)
*/
function get_default_user_info($convert_str = true)
{
- global $page, $conf;
+ global $cache, $conf;
- if (!isset($page['cache_default_user']))
+ if (!isset($cache['default_user']))
{
- $query = 'select * from '.USER_INFOS_TABLE.
- ' where user_id = '.$conf['default_user_id'].';';
+ $query = 'SELECT * FROM '.USER_INFOS_TABLE.
+ ' WHERE user_id = '.$conf['default_user_id'].';';
$result = pwg_query($query);
- $page['cache_default_user'] = mysql_fetch_assoc($result);
+ $cache['default_user'] = mysql_fetch_assoc($result);
- if ($page['cache_default_user'] !== false)
+ if ($cache['default_user'] !== false)
{
- unset($page['cache_default_user']['user_id']);
- unset($page['cache_default_user']['status']);
- unset($page['cache_default_user']['registration_date']);
+ unset($cache['default_user']['user_id']);
+ unset($cache['default_user']['status']);
+ unset($cache['default_user']['registration_date']);
}
}
- if (is_array($page['cache_default_user']) and $convert_str)
+ if (is_array($cache['default_user']) and $convert_str)
{
$default_user = array();
- foreach ($page['cache_default_user'] as $name => $value)
+ foreach ($cache['default_user'] as $name => $value)
{
// If the field is true or false, the variable is transformed into a
// boolean value.
@@ -798,7 +798,7 @@ function get_default_user_info($convert_str = true)
}
else
{
- return $page['cache_default_user'];
+ return $cache['default_user'];
}
}