mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2012-04-26 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/exportdata.php, operation/events/events_list.php: cleaned source code style. * include/functions_events.php, include/functions_network_components.php, include/functions_api.php: fixed some things, the function "events_validate_event" when can't update as validate any event return false, into the file "functions_network_components" added $config['homedir'] for situations where include in a other path that index. And show error when make a bad validate event. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6197 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
da5f54ffd8
commit
c440b53603
@ -1,3 +1,18 @@
|
||||
2012-04-26 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/agentes/exportdata.php,
|
||||
operation/events/events_list.php: cleaned source code style.
|
||||
|
||||
* include/functions_events.php,
|
||||
include/functions_network_components.php,
|
||||
include/functions_api.php: fixed some things, the function
|
||||
"events_validate_event" when can't update as validate any event
|
||||
return false, into the file "functions_network_components" added
|
||||
$config['homedir'] for situations where include in a other path that
|
||||
index. And show error when make a bad validate event.
|
||||
|
||||
MERGED FROM 4.0.2
|
||||
|
||||
2012-04-26 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/styles/pandora_forms.css
|
||||
|
@ -14,6 +14,8 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
global $config;
|
||||
|
||||
//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
|
||||
|
||||
require_once('functions_agents.php');
|
||||
@ -4410,7 +4412,7 @@ function set_validate_events($id_event, $trash1, $other, $return_type, $user_in_
|
||||
returnData('string', array('type' => 'string', 'data' => 'Correct validation'));
|
||||
}
|
||||
else {
|
||||
returnError('error_validate_event', 'Error in validation operation.');
|
||||
returnError('Error in validation operation.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -4652,7 +4654,7 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
||||
}
|
||||
//html_debug_print($filter, true);
|
||||
$result = db_get_all_rows_sql ($sql);
|
||||
//html_debug_print($sql);
|
||||
//html_debug_print($sql, true);
|
||||
|
||||
if (($result !== false) && (!$filter['total']) && (!$filter['more_criticity'])) {
|
||||
//Add the description and image
|
||||
|
@ -185,7 +185,8 @@ function events_validate_event ($id_event, $similars = true, $comment = '', $new
|
||||
|
||||
if ($comment != '') {
|
||||
$commentbox = '<div style="border:1px dotted #CCC; min-height: 10px;">'.$comment.'</div>';
|
||||
}else {
|
||||
}
|
||||
else {
|
||||
$commentbox = '';
|
||||
}
|
||||
|
||||
@ -209,9 +210,11 @@ function events_validate_event ($id_event, $similars = true, $comment = '', $new
|
||||
'id_usuario' => $config['id_user'],
|
||||
'user_comment' => $comment);
|
||||
|
||||
$ret = db_process_sql_update('tevento', $values, array('id_evento' => $event), 'AND', false);
|
||||
if ($ret === false) {
|
||||
process_sql_rollback ();
|
||||
$ret = db_process_sql_update('tevento', $values,
|
||||
array('id_evento' => $event), 'AND', false);
|
||||
|
||||
if (($ret === false) || ($ret === 0)) {
|
||||
db_process_sql_rollback ();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -222,6 +225,7 @@ function events_validate_event ($id_event, $similars = true, $comment = '', $new
|
||||
}
|
||||
*/
|
||||
db_process_sql_commit ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,14 @@
|
||||
* @subpackage Network components
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
||||
/**
|
||||
* Include modules functions
|
||||
*/
|
||||
include_once ($config['homedir'].'/include/functions_modules.php');
|
||||
include_once ($config['homedir'].'/include/functions_agents.php');
|
||||
include_once ($config['homedir'].'/include/functions_users.php');
|
||||
include_once ($config['homedir'] . 'include/functions_modules.php');
|
||||
include_once ($config['homedir'] . 'include/functions_agents.php');
|
||||
include_once ($config['homedir'] . 'include/functions_users.php');
|
||||
|
||||
/**
|
||||
* Get a list of network components.
|
||||
@ -62,7 +64,6 @@ function network_components_get_network_components ($id_module, $filter = false,
|
||||
if (isset($filter['offset'])) {
|
||||
$components = oracle_recode_query ('SELECT ' . $fields . ' FROM tnetwork_component', $filter, 'AND', false);
|
||||
if ($components != false) {
|
||||
|
||||
for ($i=0; $i < count($components); $i++) {
|
||||
unset($components[$i]['rnum']);
|
||||
}
|
||||
@ -76,6 +77,7 @@ function network_components_get_network_components ($id_module, $filter = false,
|
||||
}
|
||||
if ($components === false)
|
||||
return array ();
|
||||
|
||||
return $components;
|
||||
}
|
||||
|
||||
@ -241,6 +243,7 @@ function network_components_create_network_component ($name, $type, $id_group, $
|
||||
if (empty($values['tcp_rcv']))
|
||||
$values['tcp_rcv'] = " ";
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if (empty ($name))
|
||||
|
@ -462,7 +462,6 @@ $(document).ready (function () {
|
||||
}
|
||||
|
||||
$("select#export_type").trigger('change');
|
||||
|
||||
});
|
||||
|
||||
$("select#export_type").change (function () {
|
||||
@ -487,6 +486,5 @@ function submit_group() {
|
||||
f.action = "index.php?sec=reporting&sec2=operation/agentes/exportdata";
|
||||
f.form.submit();
|
||||
}
|
||||
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
@ -968,7 +968,8 @@ foreach ($result as $event) {
|
||||
$string .= '</a></td></tr><tr class="' . $odd . '">';
|
||||
|
||||
$odd = ($odd == '')? 'rowOdd' : '';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$string .= '<td align="left" valign="top" width="15%">';
|
||||
$string .= '<b>' . __('Agent module') . '</b></td><td align="left">';
|
||||
$string .= '<i>- ' . __('Empty') . ' -</i>';
|
||||
@ -1122,7 +1123,6 @@ if (!empty ($table->data)) {
|
||||
html_print_submit_button (__('Update'), 'validate_btn', false, 'class="sub ok"');
|
||||
}
|
||||
if (check_acl ($config["id_user"], 0,"IM") == 1) {
|
||||
|
||||
html_print_button(__('Delete'), 'delete_button', false, 'submit_delete();', 'class="sub delete"');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
@ -1134,7 +1134,6 @@ if (!empty ($table->data)) {
|
||||
<?php
|
||||
}
|
||||
echo '</div></form>';
|
||||
|
||||
}
|
||||
else {
|
||||
echo '<div class="nf">'.__('No events').'</div>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user