Fixed PHP Warnings and PHP notices (The PHP version 5.3.4 (the PHP version in new CentOS) and uppers are very noisy.)

This commit is contained in:
mdtrooper 2015-05-21 12:18:40 +02:00
parent bb934257e6
commit 1cb3399425
9 changed files with 16 additions and 6 deletions

View File

@ -47,6 +47,7 @@ config_check();
</td>
<td style="min-width:200px;">
<?php
$table = new stdClass();
$table->id = "header_table";
$table->class = "none";
$table->cellpadding = 0;

View File

@ -49,6 +49,7 @@ if (tags_has_user_acl_tags()) {
// Overview Table
///////////////
$table = new stdClass();
$table->class = "databox";
$table->cellpadding = 4;
$table->cellspacing = 4;
@ -154,6 +155,7 @@ if (tags_has_user_acl_tags()) {
// Show last activity from this user
echo '<div id="activity">';
$table = new stdClass();
$table->width = '100%'; //Don't specify px
$table->data = array ();
$table->size = array ();

View File

@ -149,7 +149,7 @@ if (!defined("METACONSOLE"))
"id" => 'image_form_filter')) . '</a>';
if (!defined("METACONSOLE")){
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->data[0][0] = __('Agents');
$table->data[0][1] = html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
@ -460,7 +460,7 @@ if (defined("METACONSOLE")){
echo "</div>";
echo "</form>";
}
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->colspan[0][0] = 3;
$table->size = array();
@ -491,7 +491,7 @@ echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_bui
html_print_table($table);
echo "</form>";
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->colspan[0][0] = 3;
$table->size = array();

View File

@ -41,6 +41,7 @@ switch ($action) {
break;
}
$table = new stdClass();
$table->width = '98%';
$table->id = 'add_alert_table';
$table->class = 'databox';

View File

@ -369,6 +369,7 @@ switch ($action) {
$search_name = "%$search%' OR description LIKE '%$search%";
}
$table_aux = new stdClass();
$table_aux->width = '100%';
$table_aux->class = 'databox filters';
$table_aux->cellpadding = 0;
@ -462,6 +463,7 @@ switch ($action) {
'id_group',
'non_interactive'), $return_all_group, 'RR', $group, $strict_user);
$table = new stdClass();
$table->width = '0px';
if (sizeof ($reports)) {
$table->id = 'report_list';

1
pandora_console/include/functions_reporting_html.php Normal file → Executable file
View File

@ -101,6 +101,7 @@ function reporting_html_print_report($report, $mini = false) {
foreach ($report['contents'] as $key => $item) {
$table = new stdClass();
$table->size = array ();
$table->style = array ();
$table->width = '98%';

3
pandora_console/include/functions_users.php Normal file → Executable file
View File

@ -125,7 +125,8 @@ function users_get_groups_for_select($id_user, $privilege = "AR", $returnAllGro
}
else {
// First group it's needed to retrieve its parent group
$first_group = reset(array_slice($user_groups, 0, 1));
$first_group = array_slice($user_groups, 0, 1);
$first_group = reset($first_group);
$parent_group = $first_group['parent'];
$user_groups_tree = groups_get_groups_tree_recursive($user_groups, $parent_group);

5
pandora_console/operation/agentes/tactical.php Normal file → Executable file
View File

@ -163,6 +163,7 @@ echo '<td style="vertical-align: top; min-width: 180px; width:25%; padding-right
// ---------------------------------------------------------------------
// The status horizontal bars (Global health, Monitor sanity...
// ---------------------------------------------------------------------
$table = new stdClass();
$table->width = "100%";
$table->class = "";
$table->cellpadding = 2;
@ -195,8 +196,8 @@ $data_agents = array(
);
$table->data[1][0] = reporting_get_stats_alerts($data);
$table->data[2][0] .= reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
$table->data[3][0] .= reporting_get_stats_agents_monitors($data);
$table->data[2][0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
$table->data[3][0] = reporting_get_stats_agents_monitors($data);
$table->rowclass[] = '';

View File

@ -141,6 +141,7 @@ else {
//------------------------ INIT FORM -----------------------------------
$table = new stdClass();
$table->id = 'controls_table';
$table->width = '99%';
$table->class = 'databox';