Revert "Fixed problems with double pandora in servers. Ticket: #3557"
This reverts commit e7021d8a0f
.
This commit is contained in:
parent
4a7a8a4d99
commit
3b0344298c
|
@ -35,7 +35,7 @@ if (isset ($_GET["loginhash"])) {
|
|||
if ($config["loginhash_pwd"] != ""
|
||||
&& $loginhash_data == md5($loginhash_user.io_output_password($config["loginhash_pwd"]))) {
|
||||
db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']);
|
||||
$_SESSION[$config['homeurl_static']]['id_usuario'] = $loginhash_user;
|
||||
$_SESSION['id_usuario'] = $loginhash_user;
|
||||
$config["id_user"] = $loginhash_user;
|
||||
}
|
||||
else {
|
||||
|
@ -61,7 +61,7 @@ $config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
|
|||
$page = (string) get_parameter ('page');
|
||||
$page = safe_url_extraclean ($page);
|
||||
$page .= '.php';
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK)
|
||||
$config["relative_path"] = enterprise_hook('skins_set_image_skin_path',array($config['id_user']));
|
||||
|
|
|
@ -25,11 +25,11 @@ if (isset($_GET['get_ptr'])) {
|
|||
require_once ($ownDir.'../include/config.php');
|
||||
|
||||
// Login check
|
||||
if (!isset($_SESSION[$config['homeurl_static']]["id_usuario"])) {
|
||||
if (!isset($_SESSION["id_usuario"])) {
|
||||
$config['id_user'] = null;
|
||||
}
|
||||
else {
|
||||
$config['id_user'] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config['id_user'] = $_SESSION["id_usuario"];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ require_once ("../../include/functions_users.php");
|
|||
require_once ("../../include/functions_groups.php");
|
||||
require_once ("../../include/functions_reporting.php");
|
||||
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
if (! check_acl ($config['id_user'], 0, "AR")) {
|
||||
db_pandora_audit("ACL Violation", "Trying to access downtime scheduler");
|
||||
require ("general/noaccess.php");
|
||||
|
|
|
@ -22,18 +22,18 @@ require_once ($config["homedir"]."/include/auth/mysql.php");
|
|||
error_reporting(E_ALL);
|
||||
ini_set("display_errors", 1);
|
||||
|
||||
if (! isset ($_SESSION[$config['homeurl_static']]["id_usuario"])) {
|
||||
if (! isset ($_SESSION["id_usuario"])) {
|
||||
session_start ();
|
||||
session_write_close ();
|
||||
}
|
||||
|
||||
|
||||
// Login check
|
||||
if (!isset($_SESSION[$config['homeurl_static']]["id_usuario"])) {
|
||||
if (!isset($_SESSION["id_usuario"])) {
|
||||
$config['id_user'] = null;
|
||||
}
|
||||
else {
|
||||
$config['id_user'] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config['id_user'] = $_SESSION["id_usuario"];
|
||||
}
|
||||
|
||||
if (!check_login()) {
|
||||
|
|
|
@ -1730,9 +1730,9 @@ function check_login ($output = true) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if ((isset($_SESSION[$config['homeurl_static']]["id_usuario"])) AND ($_SESSION[$config['homeurl_static']]["id_usuario"] != "")) {
|
||||
if (is_user ($_SESSION[$config['homeurl_static']]["id_usuario"])) {
|
||||
$config['id_user'] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
if ((isset($_SESSION["id_usuario"])) AND ($_SESSION["id_usuario"] != "")) {
|
||||
if (is_user ($_SESSION["id_usuario"])) {
|
||||
$config['id_user'] = $_SESSION["id_usuario"];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -810,8 +810,8 @@ function config_process_config () {
|
|||
config_update_value ('autorefresh_white_list', '');
|
||||
}
|
||||
// Load user session
|
||||
if (isset ($_SESSION[$config['homeurl_static']]['id_usuario']))
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
if (isset ($_SESSION['id_usuario']))
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
|
||||
if (!isset ($config["round_corner"])) {
|
||||
config_update_value ('round_corner', false);
|
||||
|
|
|
@ -13,15 +13,15 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
if (! isset($_SESSION['id_usuario'])) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
require_once('functions.php');
|
||||
require_once('functions_filemanager.php');
|
||||
require_once ("config.php");
|
||||
global $config;
|
||||
|
||||
if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
check_login ();
|
||||
|
||||
$auth_method = db_get_value('value', 'tconfig', 'token', 'auth');
|
||||
|
|
|
@ -440,11 +440,9 @@ if (! isset ($config['id_user'])) {
|
|||
}
|
||||
|
||||
db_logon ($nick_in_db, $_SERVER['REMOTE_ADDR']);
|
||||
$path = $config['homeurl_static'];
|
||||
$_SESSION[$path]['id_usuario'] = $nick_in_db;
|
||||
$_SESSION[$path]['status'] = 'logged';
|
||||
$_SESSION['id_usuario'] = $nick_in_db;
|
||||
$config['id_user'] = $nick_in_db;
|
||||
|
||||
|
||||
//==========================================================
|
||||
//-------- SET THE CUSTOM CONFIGS OF USER ------------------
|
||||
|
||||
|
@ -494,7 +492,7 @@ if (! isset ($config['id_user'])) {
|
|||
|
||||
if ($config["loginhash_pwd"] != "" && $loginhash_data == md5($loginhash_user.io_output_password($config["loginhash_pwd"]))) {
|
||||
db_logon ($loginhash_user, $_SERVER['REMOTE_ADDR']);
|
||||
$_SESSION[$config['homeurl_static']]['id_usuario'] = $loginhash_user;
|
||||
$_SESSION['id_usuario'] = $loginhash_user;
|
||||
$config["id_user"] = $loginhash_user;
|
||||
}
|
||||
else {
|
||||
|
@ -515,10 +513,10 @@ if (! isset ($config['id_user'])) {
|
|||
// Log off
|
||||
if (isset ($_GET["bye"])) {
|
||||
include ("general/logoff.php");
|
||||
$iduser = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$iduser = $_SESSION["id_usuario"];
|
||||
db_logoff ($iduser, $_SERVER['REMOTE_ADDR']);
|
||||
// Unregister Session (compatible with 5.2 and 6.x, old code was deprecated
|
||||
unset($_SESSION[$config['homeurl_static']]['id_usuario']);
|
||||
unset($_SESSION['id_usuario']);
|
||||
unset($iduser);
|
||||
if ($config['auth'] == 'saml') {
|
||||
require_once($config['saml_path'] . 'simplesamlphp/lib/_autoload.php');
|
||||
|
|
|
@ -14,13 +14,12 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
|
||||
if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
|
||||
if (! isset($_SESSION['id_usuario'])) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
require_once ($config['homedir'] . '/include/functions.php');
|
||||
|
||||
check_login();
|
||||
|
|
|
@ -21,7 +21,7 @@ require_once ("../../include/functions_db.php");
|
|||
require_once ("../../include/functions_modules.php");
|
||||
require_once ("../../include/functions_agents.php");
|
||||
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
if (! check_acl ($config['id_user'], 0, "AR") && ! check_acl ($config['id_user'], 0, "AW")) {
|
||||
require ("../../general/noaccess.php");
|
||||
return;
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
|
||||
if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
|
||||
if (! isset($_SESSION['id_usuario'])) {
|
||||
session_start();
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
require_once ($config['homedir'] . '/include/auth/mysql.php');
|
||||
require_once ($config['homedir'] . '/include/functions.php');
|
||||
require_once ($config['homedir'] . '/include/functions_db.php');
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
require_once ('../../include/config.php');
|
||||
|
||||
if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
|
||||
if (! isset($_SESSION['id_usuario'])) {
|
||||
session_start();
|
||||
//session_write_close();
|
||||
}
|
||||
|
||||
require_once ('../../include/config.php');
|
||||
require_once ($config['homedir'] . '/include/auth/mysql.php');
|
||||
require_once ($config['homedir'] . '/include/functions.php');
|
||||
require_once ($config['homedir'] . '/include/functions_db.php');
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
|
||||
if (! isset($_SESSION[$config['homeurl_static']]['id_usuario'])) {
|
||||
if (! isset($_SESSION['id_usuario'])) {
|
||||
session_start();
|
||||
//session_write_close();
|
||||
}
|
||||
|
||||
// Global & session management
|
||||
require_once ('../../include/config.php');
|
||||
require_once ($config['homedir'] . '/include/auth/mysql.php');
|
||||
require_once ($config['homedir'] . '/include/functions.php');
|
||||
require_once ($config['homedir'] . '/include/functions_db.php');
|
||||
|
|
|
@ -34,7 +34,7 @@ require_once ('../../include/functions_users.php');
|
|||
global $config;
|
||||
|
||||
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
|
||||
// http://es2.php.net/manual/en/ref.session.php#64525
|
||||
// Session locking concurrency speedup!
|
||||
|
|
|
@ -25,7 +25,7 @@ require_once ('../../include/functions_groups.php');
|
|||
|
||||
session_write_close ();
|
||||
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
|
||||
if (! check_acl ($config["id_user"], 0, "ER") && ! check_acl ($config["id_user"], 0, "EW") && ! check_acl ($config["id_user"], 0, "EM")) {
|
||||
exit;
|
||||
|
|
|
@ -30,7 +30,7 @@ global $config;
|
|||
|
||||
// Check user
|
||||
check_login ();
|
||||
$config["id_user"] = $_SESSION[$config['homeurl_static']]["id_usuario"];
|
||||
$config["id_user"] = $_SESSION["id_usuario"];
|
||||
|
||||
$event_a = check_acl ($config['id_user'], 0, "ER");
|
||||
$event_w = check_acl ($config['id_user'], 0, "EW");
|
||||
|
|
|
@ -68,7 +68,7 @@ if (isset ($_GET["direct"]) && $_GET["direct"]) {
|
|||
unset ($_GET["sec2"]);
|
||||
$_GET["sec"] = "general/logon_ok";
|
||||
db_logon ($nick, $_SERVER['REMOTE_ADDR']);
|
||||
$_SESSION[$config['homeurl_static']]['id_usuario'] = $nick;
|
||||
$_SESSION['id_usuario'] = $nick;
|
||||
$config['id_user'] = $nick;
|
||||
//Remove everything that might have to do with people's passwords or logins
|
||||
unset ($_GET['pass'], $pass, $_POST['pass'], $_REQUEST['pass'], $login_good);
|
||||
|
|
|
@ -24,7 +24,7 @@ if ($searchHelps) {
|
|||
|
||||
$help_directory = $config['homedir'] . "/include/help";
|
||||
|
||||
$user_language = get_user_language ($_SESSION[$config['homeurl_static']]['id_usuario']);
|
||||
$user_language = get_user_language ($_SESSION['id_usuario']);
|
||||
if ($user_language === 'en_GB') {
|
||||
$user_language = 'en';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue