mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2012-12-17 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/alert_list.php, godmode/alerts/configure_alert_template.php, godmode/alerts/alert_templates.php, godmode/alerts/alert_list.builder.php, operation/messages/message_edit.php, include/functions_api.php, operation/reporting/reporting_xml.php, godmode/reporting/graph_builder.graph_editor.php: cleaned source code style. * include/functions_io.php: improved the function "__" for to hook the translations from metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7292 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9c8d0c052e
commit
e2bb2d12de
@ -1,3 +1,17 @@
|
|||||||
|
2012-12-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/alerts/alert_list.php,
|
||||||
|
godmode/alerts/configure_alert_template.php,
|
||||||
|
godmode/alerts/alert_templates.php,
|
||||||
|
godmode/alerts/alert_list.builder.php,
|
||||||
|
operation/messages/message_edit.php, include/functions_api.php,
|
||||||
|
operation/reporting/reporting_xml.php,
|
||||||
|
godmode/reporting/graph_builder.graph_editor.php: cleaned source
|
||||||
|
code style.
|
||||||
|
|
||||||
|
* include/functions_io.php: improved the function "__" for to hook
|
||||||
|
the translations from metaconsole.
|
||||||
|
|
||||||
2012-12-17 Miguel de Dios <miguel.dedios@artica.es>
|
2012-12-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/setup/file_manager.php, include/functions_filemanager.php:
|
* godmode/setup/file_manager.php, include/functions_filemanager.php:
|
||||||
|
@ -278,7 +278,7 @@ else {
|
|||||||
$buttons[$tab]['active'] = true;
|
$buttons[$tab]['active'] = true;
|
||||||
|
|
||||||
if ($tab == 'list') {
|
if ($tab == 'list') {
|
||||||
ui_print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('List'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
ui_print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('List'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui_print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('Create'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
ui_print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('Create'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
||||||
|
@ -105,7 +105,8 @@ if ($a_template !== false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This prevents to duplicate the header in case duplicate/edit_template action is performed
|
// This prevents to duplicate the header in case duplicate/edit_template action is performed
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Header
|
// Header
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
|
|
||||||
@ -280,19 +281,19 @@ function update_template ($step) {
|
|||||||
$default_action = NULL;
|
$default_action = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = array ('monday' => $monday,
|
$values = array (
|
||||||
'tuesday' => $tuesday,
|
'monday' => $monday,
|
||||||
'wednesday' => $wednesday,
|
'tuesday' => $tuesday,
|
||||||
'thursday' => $thursday,
|
'wednesday' => $wednesday,
|
||||||
'friday' => $friday,
|
'thursday' => $thursday,
|
||||||
'saturday' => $saturday,
|
'friday' => $friday,
|
||||||
'sunday' => $sunday,
|
'saturday' => $saturday,
|
||||||
'special_day' => $special_day,
|
'sunday' => $sunday,
|
||||||
'time_threshold' => $threshold,
|
'special_day' => $special_day,
|
||||||
'id_alert_action' => $default_action,
|
'time_threshold' => $threshold,
|
||||||
'max_alerts' => $max_alerts,
|
'id_alert_action' => $default_action,
|
||||||
'min_alerts' => $min_alerts
|
'max_alerts' => $max_alerts,
|
||||||
);
|
'min_alerts' => $min_alerts);
|
||||||
|
|
||||||
$fields = array();
|
$fields = array();
|
||||||
for($i=1;$i<=10;$i++) {
|
for($i=1;$i<=10;$i++) {
|
||||||
@ -393,17 +394,17 @@ if ($create_template) {
|
|||||||
$name_check = db_get_value ('name', 'talert_templates', 'name', $name);
|
$name_check = db_get_value ('name', 'talert_templates', 'name', $name);
|
||||||
|
|
||||||
$values = array ('description' => $description,
|
$values = array ('description' => $description,
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
'max_value' => $max,
|
'max_value' => $max,
|
||||||
'min_value' => $min,
|
'min_value' => $min,
|
||||||
'id_group' => $id_group,
|
'id_group' => $id_group,
|
||||||
'matches_value' => $matches,
|
'matches_value' => $matches,
|
||||||
'priority' => $priority,
|
'priority' => $priority,
|
||||||
'wizard_level' => $wizard_level);
|
'wizard_level' => $wizard_level);
|
||||||
|
|
||||||
if($config['dbtype'] == "oracle") {
|
if($config['dbtype'] == "oracle") {
|
||||||
$values['field3'] = ' ';
|
$values['field3'] = ' ';
|
||||||
$values['field3_recovery'] = ' ';
|
$values['field3_recovery'] = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$name_check) {
|
if (!$name_check) {
|
||||||
|
@ -2681,7 +2681,7 @@ function api_set_validate_all_policy_alerts($id, $thrash1, $other, $thrash3) {
|
|||||||
foreach ($result_alerts as $result_alert){
|
foreach ($result_alerts as $result_alert){
|
||||||
$result = alerts_validate_alert_agent_module($result_alert, true);
|
$result = alerts_validate_alert_agent_module($result_alert, true);
|
||||||
|
|
||||||
if ($result){
|
if ($result) {
|
||||||
$count_results++;
|
$count_results++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -365,11 +365,21 @@ function __ ($string /*, variable arguments */) {
|
|||||||
global $l10n;
|
global $l10n;
|
||||||
|
|
||||||
$extensions = extensions_get_extensions();
|
$extensions = extensions_get_extensions();
|
||||||
if (empty($extensions)) $extensions = array();
|
if (empty($extensions))
|
||||||
|
$extensions = array();
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if ($config['enterprise_installed'] &&
|
if (defined('METACONSOLE')) {
|
||||||
|
enterprise_include_once ('meta/include/functions_meta.php');
|
||||||
|
|
||||||
|
$tranlateString = meta_get_defined_translation($string);
|
||||||
|
|
||||||
|
if ($tranlateString !== false) {
|
||||||
|
return $tranlateString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($config['enterprise_installed'] &&
|
||||||
isset($config['translate_string_extension_installed']) &&
|
isset($config['translate_string_extension_installed']) &&
|
||||||
$config['translate_string_extension_installed'] == 1 &&
|
$config['translate_string_extension_installed'] == 1 &&
|
||||||
array_key_exists('translate_string.php', $extensions)) {
|
array_key_exists('translate_string.php', $extensions)) {
|
||||||
@ -397,7 +407,7 @@ function __ ($string /*, variable arguments */) {
|
|||||||
$string = array_shift ($args);
|
$string = array_shift ($args);
|
||||||
|
|
||||||
if (is_null ($l10n))
|
if (is_null ($l10n))
|
||||||
return vsprintf ($string, $args);
|
return vsprintf ($string, $args);
|
||||||
|
|
||||||
return vsprintf ($l10n->translate ($string), $args);
|
return vsprintf ($l10n->translate ($string), $args);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user