mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 22:05:41 +02:00
2011-07-28 Sergio Martin <sergio.martin@artica.es>
* include/config_process.php include/functions.php operation/agentes/stat_win.php general/pandora_help.php: Create new functions to manage pandora languages. Fix pandora_help languages to use the user language, no always the global language. Fix som SESSION index little bugs git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4641 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a02a50e695
commit
37d25ee6b6
@ -1,3 +1,14 @@
|
|||||||
|
2011-07-28 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/config_process.php
|
||||||
|
include/functions.php
|
||||||
|
operation/agentes/stat_win.php
|
||||||
|
general/pandora_help.php: Create new functions to manage pandora
|
||||||
|
languages.
|
||||||
|
Fix pandora_help languages to use the user language, no always the
|
||||||
|
global language.
|
||||||
|
Fix som SESSION index little bugs
|
||||||
|
|
||||||
2011-07-27 Ramon Novoa <rnovoa@artica.es>
|
2011-07-27 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* operation/events/events_list.php: Hide agent details unless we have
|
* operation/events/events_list.php: Hide agent details unless we have
|
||||||
|
@ -27,9 +27,15 @@ require_once ("../include/functions_html.php");
|
|||||||
<?php echo '<link rel="stylesheet" href="../include/styles/'.$config['style'].'.css" type="text/css">'; ?>
|
<?php echo '<link rel="stylesheet" href="../include/styles/'.$config['style'].'.css" type="text/css">'; ?>
|
||||||
<body style="background-color: #fff; height: 100%; margin: -10 0;">
|
<body style="background-color: #fff; height: 100%; margin: -10 0;">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$id = get_parameter ('id');
|
$id = get_parameter ('id');
|
||||||
|
|
||||||
$user_language = get_user_language ();
|
if (! isset($_SESSION['id_usuario'])) {
|
||||||
|
session_start();
|
||||||
|
session_write_close();
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_language = get_user_language ($_SESSION['id_usuario']);
|
||||||
|
|
||||||
/* Possible file locations */
|
/* Possible file locations */
|
||||||
$safe_language = safe_url_extraclean ($user_language, "en");
|
$safe_language = safe_url_extraclean ($user_language, "en");
|
||||||
|
@ -112,14 +112,7 @@ if (isset ($config['id_user'])){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$l10n = NULL;
|
set_user_language();
|
||||||
|
|
||||||
$user_language = get_user_language ();
|
|
||||||
|
|
||||||
if (file_exists ($config["homedir"] . '/include/languages/'.$user_language.'.mo')) {
|
|
||||||
$l10n = new gettext_reader (new CachedFileReader ($config["homedir"] . '/include/languages/'.$user_language.'.mo'));
|
|
||||||
$l10n->load_tables();
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once ($ownDir . 'functions_extensions.php');
|
require_once ($ownDir . 'functions_extensions.php');
|
||||||
|
|
||||||
|
@ -350,6 +350,22 @@ function get_user_language ($id_user = false) {
|
|||||||
return $config['language'];
|
return $config['language'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function get the user language and set it on the system
|
||||||
|
*/
|
||||||
|
function set_user_language() {
|
||||||
|
global $config;
|
||||||
|
global $l10n;
|
||||||
|
|
||||||
|
$l10n = NULL;
|
||||||
|
$user_language = get_user_language ();
|
||||||
|
|
||||||
|
if (file_exists ('./include/languages/'.$user_language.'.mo')) {
|
||||||
|
$l10n = new gettext_reader (new CachedFileReader ('./include/languages/'.$user_language.'.mo'));
|
||||||
|
$l10n->load_tables();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INTERNAL (use ui_print_timestamp for output): Transform an amount of time in seconds into a human readable
|
* INTERNAL (use ui_print_timestamp for output): Transform an amount of time in seconds into a human readable
|
||||||
* strings of minutes, hours or days.
|
* strings of minutes, hours or days.
|
||||||
|
@ -19,16 +19,16 @@
|
|||||||
require_once ('../../include/config.php');
|
require_once ('../../include/config.php');
|
||||||
require_once ('../../include/auth/mysql.php');
|
require_once ('../../include/auth/mysql.php');
|
||||||
|
|
||||||
if (! isset($_SESSION["id_user"])) {
|
if (! isset($_SESSION['id_usuario'])) {
|
||||||
session_start();
|
session_start();
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once ($config["homedir"] . '/include/functions.php');
|
require_once ($config['homedir'] . '/include/functions.php');
|
||||||
require_once ($config["homedir"] . '/include/functions_db.php');
|
require_once ($config['homedir'] . '/include/functions_db.php');
|
||||||
require_once ($config["homedir"] . '/include/functions_reporting.php');
|
require_once ($config['homedir'] . '/include/functions_reporting.php');
|
||||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
require_once ($config['homedir'] . '/include/functions_graph.php');
|
||||||
require_once ($config['homedir'] . "/include/functions_modules.php");
|
require_once ($config['homedir'] . '/include/functions_modules.php');
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user