aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-05 03:03:30 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-05 03:03:30 +0000
commite34c68cb891bf7382958056d4d3c9e56cf6f4a43 (patch)
treef9e92716b4729704b8a4e57c09eb182ab16f1436 /include/functions_user.inc.php
parente71d84ebfbb3659a08ff4034f0f35113d7243a6d (diff)
- 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/trunk@3126 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'];
}
}