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

* general/shortcut_bar.php, general/main_menu.php,
	extensions/update_manager/update_pandora.php,
	extensions/plugin_registration.php, godmode/setup/gis_step_2.php,
	godmode/massive/massive_delete_alerts.php,
	godmode/alerts/alert_actions.php, godmode/tag/edit_tag.php,
	godmode/category/edit_category.php,
	godmode/agentes/configurar_agente.php,
	operation/snmpconsole/snmp_view.php,
	operation/search_graphs.getdata.php,
	operation/agentes/status_monitor.php: cleaned source code style.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8053 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-25 09:01:28 +00:00
parent edff3417ed
commit bc0d3dc06d
14 changed files with 41 additions and 27 deletions

View File

@ -1,3 +1,16 @@
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* general/shortcut_bar.php, general/main_menu.php,
extensions/update_manager/update_pandora.php,
extensions/plugin_registration.php, godmode/setup/gis_step_2.php,
godmode/massive/massive_delete_alerts.php,
godmode/alerts/alert_actions.php, godmode/tag/edit_tag.php,
godmode/category/edit_category.php,
godmode/agentes/configurar_agente.php,
operation/snmpconsole/snmp_view.php,
operation/search_graphs.getdata.php,
operation/agentes/status_monitor.php: cleaned source code style.
2013-04-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/users/user_edit.php: fixed the call to function from

View File

@ -31,7 +31,7 @@ function pluginreg_extension_main () {
echo "<br><br>";
if (!isset ($_FILES['plugin_upload']['tmp_name'])){
if (!isset ($_FILES['plugin_upload']['tmp_name'])) {
// Upload form
echo "<form name='submit_plugin' method='post' enctype='multipart/form-data'>";
echo '<table class="databox" id="table1" width="98%" border="0" cellpadding="4" cellspacing="4">';
@ -67,7 +67,7 @@ function pluginreg_extension_main () {
}
// Parse with sections
if (! $ini_array = parse_ini_file($config["attachment_store"] . "/plugin_definition.ini", true)){
if (! $ini_array = parse_ini_file($config["attachment_store"] . "/plugin_definition.ini", true)) {
echo "<h2 class=error>".__("Cannot load INI file")."</h2>";
return;
}
@ -77,7 +77,7 @@ function pluginreg_extension_main () {
// Version 2: From 5.0
$version = isset($ini_array["plugin_definition"]["version"]) ? $ini_array["plugin_definition"]["version"] : 1;
if(!isset($ini_array["plugin_definition"]["execution_postcommand"])) {
if (!isset($ini_array["plugin_definition"]["execution_postcommand"])) {
$ini_array["plugin_definition"]["execution_postcommand"] = '';
}
@ -92,11 +92,12 @@ function pluginreg_extension_main () {
$file_exec_path = $exec_path;
if (isset($ini_array["plugin_definition"]["execution_command"]) && ($ini_array["plugin_definition"]["execution_command"] != "")){
if (isset($ini_array["plugin_definition"]["execution_command"]) &&
($ini_array["plugin_definition"]["execution_command"] != "")) {
$exec_path = $ini_array["plugin_definition"]["execution_command"] . " " . $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"];
}
if (!file_exists($file_exec_path)){
if (!file_exists($file_exec_path)) {
echo "<h2 class=error>".__("Plugin exec not found. Aborting!")."</h2>";
unlink ($config["attachment_store"] . "/plugin_definition.ini");
return;
@ -148,7 +149,7 @@ function pluginreg_extension_main () {
$create_id = db_process_sql_insert('tplugin', $values);
for ($ax=1; $ax <= $ini_array["plugin_definition"]["total_modules_provided"]; $ax++){
for ($ax = 1; $ax <= $ini_array["plugin_definition"]["total_modules_provided"]; $ax++) {
$label = "module".$ax;
$values = array(

View File

@ -79,7 +79,7 @@ function update_pandora_administration($settings, $user_key) {
$conf_update_pandora = update_pandora_get_conf();
if (!empty($conf_update_pandora['last_installed'])){
if (!empty($conf_update_pandora['last_installed'])) {
echo '<h4>';
echo __('Your Pandora FMS open source package installed is') .
' ' . $conf_update_pandora['last_installed'];

View File

@ -67,7 +67,7 @@ $(document).ready( function() {
openTime = new Date().getTime();
// Close in 1 second if is not closed manually
setTimeout(function(){
setTimeout(function() {
if(openTime > 0 && handsIn == 0) {
$('#menu_container').animate({"left": "-=140px"}, 100);
openTime = 0;

View File

@ -296,8 +296,8 @@ echo "</div>";
}
$('#shortcut_button').click (function () {
if ($('#shotcut_bar').css('height') == '0px'){
$('#shotcut_bar').css({height: 0}).animate({ height: '20' }, 900);
if ($('#shotcut_bar').css('height') == '0px') {
$('#shotcut_bar').css({height: 0}).animate({ height: '20' }, 900);
$('#shortcut_button').css({height: 22}).animate({ height: '40' }, 900);
jQuery.post ("ajax.php",
{"page" : "general/shortcut_bar",

View File

@ -1177,7 +1177,7 @@ if ($delete_module) { // DELETE agent module !
// Get number of components pending to delete to know when it's needed to update orders
$num_components = count($result_components);
$last_target_module = 0;
foreach ($result_components as $id_target_module){
foreach ($result_components as $id_target_module) {
// Detects change of component or last component to update orders
if (($count_components == $num_components) or
($last_target_module != $id_target_module)) {

View File

@ -185,8 +185,8 @@ if ($update_action) {
$al_action = alerts_get_alert_action ($id);
if ($al_action !== false){
if ($al_action['id_group'] == 0){
if ($al_action !== false) {
if ($al_action['id_group'] == 0) {
if (! check_acl ($config['id_user'], 0, "PM")) {
db_pandora_audit("ACL Violation",
"Trying to access Alert Management");

View File

@ -99,7 +99,7 @@ if ($create_category) {
// Form fields are filled here
// Get results when update action is performed
if ($action == "update" && $id_category != 0){
if ($action == "update" && $id_category != 0) {
$result_category = db_get_row_filter('tcategory', array('id' => $id_category));
$name_category = $result_category["name"];
} // If current action is create (new) or somethig goes wrong fields are filled with void value
@ -122,7 +122,7 @@ echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=98%>";
echo "</td>";
echo "</tr>";
echo "<tr>";
if ($action == "update"){
if ($action == "update") {
echo "<td align=center>";
html_print_input_hidden ('update_category', 1);
echo "</td>";
@ -130,7 +130,7 @@ echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=98%>";
html_print_submit_button (__('Update'), 'update_button', false, 'class="sub next"');
echo "</td>";
}
if ($action == "new"){
if ($action == "new") {
echo "<td align=center>";
html_print_input_hidden ('create_category', 1);
echo "</td>";

View File

@ -250,7 +250,7 @@ $(document).ready (function () {
);
});
$("#checkbox-recursion").click(function (){
$("#checkbox-recursion").click(function () {
$("#id_group").trigger("change");
});

View File

@ -124,9 +124,9 @@ switch ($action) {
);
break;
}
//TODO VALIDATE PARAMETERS
if ($mapConnection_name != "" && $mapConnection_type != ""){
if ($mapConnection_name != "" && $mapConnection_type != "") {
gis_save_map_connection($mapConnection_name, $mapConnection_group,
$mapConnection_numLevelsZoom, $mapConnection_defaultZoom,
$mapConnection_defaultLatitude, $mapConnection_defaultLongitude,

View File

@ -123,7 +123,7 @@ if ($create_tag) {
// Form fields are filled here
// Get results when update action is performed
if ($action == "update" && $id_tag != 0){
if ($action == "update" && $id_tag != 0) {
$result_tag = tags_search_tag_id($id_tag);
$name_tag = $result_tag["name"];
$description_tag = $result_tag["description"];
@ -179,7 +179,7 @@ echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=98%>";
echo "</td>";
echo "</tr>";
echo "<tr>";
if ($action == "update"){
if ($action == "update") {
echo "<td align='center'>";
html_print_input_hidden ('update_tag', 1);
echo "</td>";
@ -187,7 +187,7 @@ echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=98%>";
html_print_submit_button (__('Update'), 'update_button', false, 'class="sub next"');
echo "</td>";
}
if ($action == "new"){
if ($action == "new") {
echo "<td align=center>";
html_print_input_hidden ('create_tag', 1);
echo "</td>";

View File

@ -260,7 +260,7 @@ if (defined('METACONSOLE')) {
$result = array();
foreach($servers as $server) {
// If connection was good then retrieve all data server
if (metaconsole_connect($server) == NOERR){
if (metaconsole_connect($server) == NOERR) {
$connection = true;
}
else {

View File

@ -28,7 +28,7 @@ if ($searchGraphs) {
$usergraphs_id = array_keys($usergraphs);
if(!$usergraphs_id){
if (!$usergraphs_id) {
$graphs_condition = " AND 1<>1";
}
else {
@ -41,7 +41,7 @@ if ($searchGraphs) {
$sql_count = "SELECT COUNT(id_graph) AS count $fromwhere";
if($only_count) {
if ($only_count) {
$totalGraphs = db_get_value_sql($sql_count);
}
else {

View File

@ -641,8 +641,8 @@ function CheckAll() {
}
}
function toggleDiv (divid){
if (document.getElementById(divid).style.display == 'none'){
function toggleDiv (divid) {
if (document.getElementById(divid).style.display == 'none') {
document.getElementById(divid).style.display = 'block';
}
else {