move code for downloading new extension list into controller

This commit is contained in:
Uwe Steinmann 2018-03-21 13:39:38 +01:00
parent 7733da5133
commit 16d9cb5c1e
2 changed files with 13 additions and 5 deletions

View File

@ -113,6 +113,19 @@ elseif ($action == "import") { /* {{{ */
add_log_line();
header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab);
} /* }}} */
elseif ($action == "getlist") { /* {{{ */
$v = new SeedDMS_Version();
$controller->setParam('extmgr', $extMgr);
$controller->setParam('forceupdate', (isset($_POST['forceupdate']) && $_POST['forceupdate']) ? true : false);
$controller->setParam('version', $v->version());
if (!$controller($_POST)) {
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_extension_getlist').$controller->getErrorMsg(), 'timeout'=>5000));
} else {
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_getlist')));
}
add_log_line();
header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab);
} /* }}} */
?>

View File

@ -41,11 +41,6 @@ if(isset($_GET['currenttab']))
else
$currenttab = 'installed';
if(isset($_GET['forceupdate']) && $_GET['forceupdate']==1)
$extmgr->updateExtensionList(true);
else
$extmgr->updateExtensionList();
if($view) {
$view->setParam('httproot', $settings->_httpRoot);
$view->setParam('extdir', $settings->_rootDir."/ext");