mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 10:13:00 +02:00
- 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
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user