diff --git a/application/controllers/system/extensions/Manager.php b/application/controllers/system/extensions/Manager.php index 115fdba29..7bc0bc817 100644 --- a/application/controllers/system/extensions/Manager.php +++ b/application/controllers/system/extensions/Manager.php @@ -44,11 +44,7 @@ class Manager extends Auth_Controller */ public function index() { - $viewData = array( - 'extensions' => $this->extensionslib->getInstalledExtensions() - ); - - $this->load->view('system/extensions/manager.php', $viewData); + $this->load->view('system/extensions/manager.php'); } /** diff --git a/application/libraries/ExtensionsLib.php b/application/libraries/ExtensionsLib.php index 42a54c4f3..09ba43c45 100644 --- a/application/libraries/ExtensionsLib.php +++ b/application/libraries/ExtensionsLib.php @@ -111,11 +111,15 @@ class ExtensionsLib $uploadData = $this->_uploadExtension(); // perform the upload of the file and returns info about it } - // If the given filename is the upper directory or the current one - if (trim($uploadData->fullPath) == '..' || trim($uploadData->fullPath) == '.') + // If a file has been uploaded + if (isset($uploadData)) { - $this->_printFailure('wrong file name: / has to be escaped with %2F'); - $uploadData = null; // then it is a wrong one! + // If the given filename is the upper directory or the current one + if (trim($uploadData->fullPath) == '..' || trim($uploadData->fullPath) == '.') + { + $this->_printFailure('wrong file name: / has to be escaped with %2F'); + $uploadData = null; // then it is a wrong one! + } } // If the no error occurred @@ -177,7 +181,8 @@ class ExtensionsLib if ($this->_errorOccurred === false) // if no errors occurred { - if (!$this->_rrm($uploadData->fullPath)) // removes uploaded file + // If a file has been uploaded then remove them + if (isset($uploadData) && !$this->_rrm($uploadData->fullPath)) { $this->_printInfo('Error while cleaning upload directory. Not a blocking error'); } @@ -243,7 +248,7 @@ class ExtensionsLib $this->_ci->ExtensionsModel->addOrder('server_kurzbz', 'ASC'); $this->_ci->ExtensionsModel->addOrder('version', 'ASC'); - return $this->_ci->ExtensionsModel->load(); + return $this->_ci->ExtensionsModel->loadWhere(array('server_kurzbz' => SERVER_NAME)); } /**