2010-10-11 Miguel de Dios <miguel.dedios@artica.es>
* include/config_process.php: fixed the execution in as script. * include/fgraph.php: fixed in the "graphic_combined_module" when is empty. And cleaned source code style. * include/functions_extensions.php: cleaned source code style. * extensions/pandora_logs.php: cleaned source code style. And set to translation a string. * extras/pandora_diag.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3382 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
47aed1bfc1
commit
fb5e20eced
|
@ -1,3 +1,17 @@
|
|||
2010-10-11 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/config_process.php: fixed the execution in as script.
|
||||
|
||||
* include/fgraph.php: fixed in the "graphic_combined_module" when is empty.
|
||||
And cleaned source code style.
|
||||
|
||||
* include/functions_extensions.php: cleaned source code style.
|
||||
|
||||
* extensions/pandora_logs.php: cleaned source code style. And set to
|
||||
translation a string.
|
||||
|
||||
* extras/pandora_diag.php: cleaned source code style.
|
||||
|
||||
2010-10-11 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/functions_reporting.php: Fixed problem with SQL custom reports
|
||||
|
|
|
@ -36,7 +36,6 @@ function view_logfile ($file_name) {
|
|||
function pandoralogs_extension_main () {
|
||||
global $config;
|
||||
|
||||
global $config;
|
||||
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
|
||||
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Setup Management");
|
||||
require ("general/noaccess.php");
|
||||
|
@ -46,7 +45,7 @@ function pandoralogs_extension_main () {
|
|||
|
||||
print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
|
||||
|
||||
echo "<p>This tool is used just to view your Pandora FMS system logfiles directly from console</p>";
|
||||
echo "<p>" . __('This tool is used just to view your Pandora FMS system logfiles directly from console') . "</p>";
|
||||
|
||||
view_logfile ($config["homedir"]."/pandora_console.log");
|
||||
view_logfile ("/var/log/pandora/pandora_server.log");
|
||||
|
|
|
@ -32,7 +32,8 @@ function render_row ($data, $label){
|
|||
echo "|";
|
||||
echo $data;
|
||||
echo "\n";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo "<tr>";
|
||||
echo "<td>" . $label;
|
||||
echo "<td>" . $data;
|
||||
|
@ -45,7 +46,7 @@ function render_row ($data, $label){
|
|||
$console_mode = 1;
|
||||
if (!isset($argc))
|
||||
$console_mode = 0;
|
||||
|
||||
|
||||
if ($console_mode == 1) {
|
||||
echo "\nPandora FMS PHP diagnostic tool v3.1 (c) Artica ST 2009-2010 \n";
|
||||
|
||||
|
@ -68,9 +69,8 @@ full path to Pandora FMS 'config.php' file.
|
|||
exit;
|
||||
}
|
||||
include $argv[1]."/include/config.php";
|
||||
} else {
|
||||
|
||||
session_start ();
|
||||
}
|
||||
else {
|
||||
if (file_exists("../include/config.php"))
|
||||
include "../include/config.php";
|
||||
|
||||
|
|
|
@ -85,7 +85,12 @@ process_config ();
|
|||
require_once ($ownDir . 'streams.php');
|
||||
require_once ($ownDir . 'gettext.php');
|
||||
|
||||
$config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
|
||||
if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
$config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
else {
|
||||
$config["remote_addr"] = null;
|
||||
}
|
||||
$config['user_language'] = $config["language"];
|
||||
|
||||
// Set a the system timezone default
|
||||
|
|
|
@ -243,6 +243,8 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||
// Event iterator
|
||||
$k = 0;
|
||||
|
||||
// Set initial conditions
|
||||
$graph_values[$i] = array();
|
||||
if ($data[0]['utimestamp'] == $datelimit) {
|
||||
$previous_data = $data[0]['datos'];
|
||||
$j++;
|
||||
|
@ -325,7 +327,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||
$title_period = __('Last %s days', format_numeric (($period / (3600 * 24)), 2));
|
||||
$time_format = 'M j';
|
||||
}
|
||||
|
||||
|
||||
if (! $graphic_type) {
|
||||
return fs_combined_chart ($graph_values, $graph, $module_name_list, $width, $height, $stacked, $resolution / 10, $time_format);
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ function add_operation_menu_option ($name, $fatherId = null, $icon = null) {
|
|||
* @param string fatherId
|
||||
* @param string icon
|
||||
*/
|
||||
function add_godmode_menu_option ($name, $acl,$fatherId = null, $icon = null) {
|
||||
function add_godmode_menu_option ($name, $acl, $fatherId = null, $icon = null) {
|
||||
global $config;
|
||||
global $extension_file;
|
||||
|
||||
|
|
Loading…
Reference in New Issue