mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
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:
parent
e27f160c90
commit
2be7256a85
@ -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>
|
2012-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* general/login_help_dialog.php: Removed variable due to
|
* general/login_help_dialog.php: Removed variable due to
|
||||||
|
@ -79,8 +79,9 @@ function update_pandora_installation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dir = $config['attachment_store'] . '/update_pandora/';
|
$dir = $config['attachment_store'] . '/update_pandora/';
|
||||||
|
|
||||||
if (!is_dir($dir)) {
|
if (!is_dir($dir)) {
|
||||||
$result = mkdir($dir);
|
$return = mkdir($dir);
|
||||||
|
|
||||||
if (!$return) {
|
if (!$return) {
|
||||||
$return_var['return'] = false;
|
$return_var['return'] = false;
|
||||||
@ -113,13 +114,17 @@ function update_pandora_get_list_downloaded_packages($mode = 'operation') {
|
|||||||
global $conf_update_pandora;
|
global $conf_update_pandora;
|
||||||
|
|
||||||
$dir = dir($conf_update_pandora['dir']);
|
$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();
|
$packages = array();
|
||||||
while (false !== ($entry = $dir->read())) {
|
while (false !== ($entry = $dir->read())) {
|
||||||
if (is_file($conf_update_pandora['dir'] . $entry)
|
if (is_file($conf_update_pandora['dir'] . $entry)
|
||||||
&& is_readable($conf_update_pandora['dir'] . $entry)) {
|
&& is_readable($conf_update_pandora['dir'] . $entry)) {
|
||||||
if (strstr($entry, '.tar.gz') !== false) {
|
if (strstr($entry, '.tar.gz') !== false) {
|
||||||
|
|
||||||
if ($mode == 'operation') {
|
if ($mode == 'operation') {
|
||||||
$packages[] = $entry;
|
$packages[] = $entry;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,8 @@ function update_pandora_administration($settings, $user_key) {
|
|||||||
echo __('Your Pandora FMS open source package installed is') .
|
echo __('Your Pandora FMS open source package installed is') .
|
||||||
' ' . $conf_update_pandora['last_installed'];
|
' ' . $conf_update_pandora['last_installed'];
|
||||||
echo "</h4>";
|
echo "</h4>";
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
echo '<h4>';
|
echo '<h4>';
|
||||||
echo __('Your Pandora FMS does not have any update installed yet');
|
echo __('Your Pandora FMS does not have any update installed yet');
|
||||||
echo "</h4>";
|
echo "</h4>";
|
||||||
@ -158,6 +159,8 @@ function update_pandora_administration($settings, $user_key) {
|
|||||||
$tableMain->data = array();
|
$tableMain->data = array();
|
||||||
|
|
||||||
$list_downloaded_packages = update_pandora_get_list_downloaded_packages('administration');
|
$list_downloaded_packages = update_pandora_get_list_downloaded_packages('administration');
|
||||||
|
if (empty($list_downloaded_packages))
|
||||||
|
$list_downloaded_packages = array();
|
||||||
$table = null;
|
$table = null;
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->size = array('50%', '25%', '25%');
|
$table->size = array('50%', '25%', '25%');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user