2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* pandoradb_data.sql
	include/functions_config.php
	pandoradb.data.postgreSQL.sql
	pandoradb.data.oracle.sql
	godmode/setup/performance.php: Max recommended number of files in
	attachment directory parametrized.
	
	Merged from branches.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7423 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2013-01-10 15:23:06 +00:00
parent 8d63bcc5e6
commit cfdd08b549
6 changed files with 25 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* pandoradb_data.sql
include/functions_config.php
pandoradb.data.postgreSQL.sql
pandoradb.data.oracle.sql
godmode/setup/performance.php: Max recommended number of files in
attachment directory parametrized.
Merged from branches.
2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_networkmap.php: Fixed entity problem in

View File

@ -110,6 +110,8 @@ $table_other->data[7][0] = __('Use agent access graph') . ui_print_help_icon("ag
$table_other->data[7][1] = __('Yes').'&nbsp;'.html_print_radio_button ('agentaccess', 1, '', $config["agentaccess"], true).'&nbsp;&nbsp;';
$table_other->data[7][1] .= __('No').'&nbsp;'.html_print_radio_button ('agentaccess', 0, '', $config["agentaccess"], true);
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory') . ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
$table_other->data[8][1] = html_print_input_text ('num_files_attachment', $config["num_files_attachment"], '', 5, 5, true);
echo '<form id="form_setup" method="post">';
echo "<fieldset>";

View File

@ -211,6 +211,7 @@ function config_update_config () {
config_update_value ('stats_interval', get_parameter ('stats_interval'));
config_update_value ('agentaccess', (int) get_parameter ('agentaccess'));
config_update_value ('compact_header', (bool) get_parameter ('compact_header'));
config_update_value ('num_files_attachment', (int) get_parameter ('num_files_attachment'));
/////////////
break;
case 'godmode/setup/setup_visuals':
@ -377,6 +378,10 @@ function config_process_config () {
config_update_value ('compact_header', false);
}
if (!isset ($config["num_files_attachment"])) {
config_update_value ('num_files_attachment', 100);
}
if (!isset ($config['status_images_set'])) {
config_update_value ('status_images_set', 'default');
}
@ -882,8 +887,8 @@ function config_check () {
// Check attachment directory (too much files?)
$filecount = count(glob($config["homedir"]."/attachment/*"));
// 100 temporal files of trash should be enough for most people.
if ($filecount > 100) {
// N temporal files of trash should be enough for most people.
if ($filecount > $config['num_files_attachment']) {
$config["alert_cnt"]++;
$_SESSION["alert_msg"] .= ui_print_error_message(
array('title' => __('Too much files in your tempora/attachment directory'),

View File

@ -109,6 +109,7 @@ INSERT INTO tconfig (token, value) VALUES ('meta_style', 'meta_pandora');
INSERT INTO tconfig (token, value) VALUES ('enable_refr', 0);
INSERT INTO tconfig (token, value) VALUES ('meta_num_elements', 100);
INSERT INTO tconfig (token, value) VALUES ('update_manager_installed', 1);
INSERT INTO tconfig (token, value) VALUES ('num_files_attachment', 100);
COMMIT;
END;;

View File

@ -104,7 +104,8 @@ INSERT INTO "tconfig" ("token", "value") VALUES
('meta_style', 'meta_pandora'),
('enable_refr', '0'),
('meta_num_elements', 100),
('update_manager_installed', 1);
('update_manager_installed', 1),
('num_files_attachment', 100);
COMMIT WORK;

View File

@ -103,7 +103,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('meta_style', 'meta_pandora'),
('enable_refr', 0),
('meta_num_elements', 100),
('update_manager_installed', 1);
('update_manager_installed', 1),
('num_files_attachment', 100);
UNLOCK TABLES;