aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-12-20 19:26:43 +0000
committerplegall <plg@piwigo.org>2004-12-20 19:26:43 +0000
commitc19f01d77c990962baef1906ac0ed60280324b77 (patch)
tree3adbc0c836875d77d06feb987773030e36646c86 /include/functions_user.inc.php
parent1d46ea86e9d3925a60f1d126d4b1bd642630741a (diff)
- replacement of PREFIX_TABLE constant in delete_user function
- deletion of $isadmin variable, replaced by constant IN_ADMIN - small refactoring - in include/common.inc.php, deletion of useless part "Obtain and encode users IP" and corresponding functions encode_ip and decode_ip - definition of $conf['default_language'] deleted from include/config.inc.php : it is already present in database table config - function init_userprefs deleted (useless), all its content moved to include/user.inc.php - admin.lang.php and faq.lang.php are loaded only if current user is in administrative section git-svn-id: http://piwigo.org/svn/trunk@650 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 474fa8154..8b71cf660 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -171,44 +171,6 @@ function check_login_authorization($guest_allowed = true)
}
}
-//
-// Initialise user settings on page load
-function init_userprefs($userdata)
-{
- global $conf, $template, $lang, $lang_info;
-
- $language = (!empty($userdata['language']) && !$userdata['is_the_guest'] )?$userdata['language']:$conf['default_language'];
-
- if (!empty($userdata['template']) and !$userdata['is_the_guest'])
- {
- $template = $userdata['template'];
- }
- else
- {
- $template = $conf['default_template'];
- }
-
- if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
- {
- $language = $conf['default_language'];
- }
- include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php');
-
-
- if ($userdata['status'] == 'admin')
- {
- if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language. '/admin.lang.php')) )
- {
- $language = $conf['default_language'];
- }
- include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
- include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/faq.lang.php');
- }
-
- $template = setup_style($template);
- return;
-}
-
function setup_style($style)
{
$template_path = 'template/' ;
@@ -217,18 +179,6 @@ function setup_style($style)
return $template;
}
-function encode_ip($dotquad_ip)
-{
- $ip_sep = explode('.', $dotquad_ip);
- return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]);
-}
-
-function decode_ip($int_ip)
-{
- $hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
- return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
-}
-
function getuserdata($user)
{
$sql = "SELECT * FROM " . USERS_TABLE;