2013-04-25 Miguel de Dios <miguel.dedios@artica.es>

* godmode/alerts/alert_list.list.php,
	godmode/setup/setup_general.php, extensions/pandora_logs.php: some
	fixes in the source code from the indications of bug in the tracker.
	
	Fixes: #3611333




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8063 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-25 17:10:00 +00:00
parent b378efc27e
commit 0da662bac6
4 changed files with 33 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/alert_list.list.php,
godmode/setup/setup_general.php, extensions/pandora_logs.php: some
fixes in the source code from the indications of bug in the tracker.
Fixes: #3611333
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_modules.php: changed the header of the table

View File

@ -17,13 +17,29 @@
function view_logfile ($file_name) {
global $config;
$memory_limit = ini_get("memory_limit");
if (strstr("M", $memory_limit) !== false) {
$memory_limit = str_replace("M", "", $memory_limit);
$memory_limit = $memory_limit * 1024 * 1024;
//Arbitrary size for the PHP program
$memory_limit = $memory_limit - (8 * 1024 * 1024);
}
if (!file_exists($file_name)) {
echo "<h2 class='error'>".__("Cannot find file"). "(".$file_name;
echo ")</h2>";
}
else {
$file_size = filesize($file_name);
if ($file_size > 512000) {
if ($memory_limit < $file_size) {
echo "<h2>$file_name (" . __("File is too large than PHP memory allocated in the system.") . ")</h2>";
echo "<h2>" . __("The preview file is imposible.") . "</h2>";
}
else if ($file_size > 512000) {
$data = file_get_contents ($file_name, false, NULL, $file_size - 512000);
echo "<h2>$file_name (".__("File is too large (> 500KB)").")</h2>";

View File

@ -41,7 +41,7 @@ else {
}
// Table for filter controls
$form_filter = '<form method="post" action="index.php?sec='.$sec.'&amp;sec2=godmode/alerts/alert_list&amp;refr='.$config["refr"].'&amp;pure='.$config["pure"].'">';
$form_filter = '<form method="post" action="index.php?sec='.$sec.'&amp;sec2=godmode/alerts/alert_list&amp;refr=' . ((int)get_parameter('refr', 0)) . '&amp;pure='.$config["pure"].'">';
$form_filter .= "<input type='hidden' name='search' value='1' />\n";
$form_filter .= '<table style="width: 98%;" cellpadding="4" cellspacing="4" class="databox">'."\n";
$form_filter .= "<tr>\n";

View File

@ -150,6 +150,7 @@ if ($config["integria_enabled"]) {
continue;
}
$invexp = explode(',',$inv);
if (count($invexp) > 2) {
if (substr($invexp[1], 0, 1) == '"'
&& substr($invexp[1], strlen($invexp[1])-1, 1) == '"') {
$invexp[1] = substr($invexp[1], 1, strlen($invexp[1])-2);
@ -158,6 +159,7 @@ if ($config["integria_enabled"]) {
$inventories[$invexp[0]] = $invexp[1];
}
}
}
$table->data[22][0] = __('Integria inventory');
$table->data[22][1] = html_print_select($inventories, 'integria_inventory', $config["integria_inventory"], '', '', '', true);
}