From 122942933d9132d6b6e40115057b52e7673ca000 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 6 Sep 2011 09:30:09 +0000 Subject: [PATCH] fixed foreach warning, fixed category when first enter git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9056 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/autoinstall/autoinstall.admin.view.php | 2 ++ modules/autoinstall/autoinstall.model.php | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/autoinstall/autoinstall.admin.view.php b/modules/autoinstall/autoinstall.admin.view.php index f3145fcc2..7a886ff03 100644 --- a/modules/autoinstall/autoinstall.admin.view.php +++ b/modules/autoinstall/autoinstall.admin.view.php @@ -240,6 +240,8 @@ { $oController = &getAdminController('autoinstall'); $oController->_updateinfo(); + header('location: ' . getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminIndex')); + return; } $page = Context::get('page'); diff --git a/modules/autoinstall/autoinstall.model.php b/modules/autoinstall/autoinstall.model.php index 753f1801d..4630a7f69 100644 --- a/modules/autoinstall/autoinstall.model.php +++ b/modules/autoinstall/autoinstall.model.php @@ -127,10 +127,13 @@ $args->page_count = 5; $output = executeQueryArray("autoinstall.getInstalledPackageList", $args); $res = array(); - foreach($output->data as $val) - { - $res[$val->package_srl] = $val; - } + if ($output->data) + { + foreach($output->data as $val) + { + $res[$val->package_srl] = $val; + } + } $output->data = $res; return $output; }