2012-05-11 Miguel de Dios <miguel.dedios@artica.es>

* extensions/update_manager/lib/functions.php: fixed into the
	function "update_pandora_installation" lost var,  and into the
	function "update_pandora_get_list_downloaded_packages" check fail
	dir.
	
	* extensions/update_manager/update_pandora.php: fixed foreach a non
	array in list download packages when fail.
	
	MERGED FROM 4.0.2




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6293 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-05-11 11:39:50 +00:00
parent e27f160c90
commit 2be7256a85
3 changed files with 34 additions and 14 deletions

View File

@ -1,3 +1,15 @@
2012-05-11 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/lib/functions.php: fixed into the
function "update_pandora_installation" lost var, and into the
function "update_pandora_get_list_downloaded_packages" check fail
dir.
* extensions/update_manager/update_pandora.php: fixed foreach a non
array in list download packages when fail.
MERGED FROM 4.0.2
2012-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* general/login_help_dialog.php: Removed variable due to

View File

@ -79,8 +79,9 @@ function update_pandora_installation() {
}
$dir = $config['attachment_store'] . '/update_pandora/';
if (!is_dir($dir)) {
$result = mkdir($dir);
$return = mkdir($dir);
if (!$return) {
$return_var['return'] = false;
@ -113,13 +114,17 @@ function update_pandora_get_list_downloaded_packages($mode = 'operation') {
global $conf_update_pandora;
$dir = dir($conf_update_pandora['dir']);
if ($dir === false) {
ui_print_error_message(sprintf(
__('Error reading the dir of packages in "%s".'), $conf_update_pandora['dir']));
return;
}
$packages = array();
while (false !== ($entry = $dir->read())) {
if (is_file($conf_update_pandora['dir'] . $entry)
&& is_readable($conf_update_pandora['dir'] . $entry)) {
if (strstr($entry, '.tar.gz') !== false) {
if ($mode == 'operation') {
$packages[] = $entry;
}

View File

@ -84,7 +84,8 @@ function update_pandora_administration($settings, $user_key) {
echo __('Your Pandora FMS open source package installed is') .
' ' . $conf_update_pandora['last_installed'];
echo "</h4>";
} else {
}
else {
echo '<h4>';
echo __('Your Pandora FMS does not have any update installed yet');
echo "</h4>";
@ -158,6 +159,8 @@ function update_pandora_administration($settings, $user_key) {
$tableMain->data = array();
$list_downloaded_packages = update_pandora_get_list_downloaded_packages('administration');
if (empty($list_downloaded_packages))
$list_downloaded_packages = array();
$table = null;
$table->width = '100%';
$table->size = array('50%', '25%', '25%');