diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index f97fb8241..018847491 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -375,7 +375,7 @@ class SeedDMS_Extension_Mgr { public function updateExtensionList($force=false) { /* {{{ */ if($this->reposurl) { if(!file_exists($this->cachedir."/repository.json") || $force) { - $file = file_get_contents($this->reposurl."/repository.json"); + $file = file_get_contents($this->reposurl); file_put_contents($this->cachedir."/repository.json", $file); } return true; diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index eacea6cf3..4ed021451 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -91,6 +91,8 @@ class Settings { /* {{{ */ var $_dropFolderDir = null; // Where the backup directory is located var $_backupDir = null; + // Where the repository for extensions is located + var $_repositoryUrl = null; // enable removal of file from dropfolder after success import var $_removeFromDropFolder = false; // Where the stop word file is located @@ -483,6 +485,7 @@ class Settings { /* {{{ */ $this->_luceneDir = strval($tab["luceneDir"]); $this->_dropFolderDir = strval($tab["dropFolderDir"]); $this->_backupDir = strval($tab["backupDir"]); + $this->_repositoryUrl = strval($tab["repositoryUrl"]); $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); $this->_logFileRotation = strval($tab["logFileRotation"]); $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); @@ -800,6 +803,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "luceneDir", $this->_luceneDir); $this->setXMLAttributValue($node, "dropFolderDir", $this->_dropFolderDir); $this->setXMLAttributValue($node, "backupDir", $this->_backupDir); + $this->setXMLAttributValue($node, "repositoryUrl", $this->_repositoryUrl); $this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable); $this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation); $this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload); diff --git a/op/op.Settings.php b/op/op.Settings.php index 9ee82fba5..2ddce04ed 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -118,6 +118,7 @@ if ($action == "saveSettings") $settings->_extraPath = addDirSep($_POST["extraPath"]); $settings->_dropFolderDir = addDirSep($_POST["dropFolderDir"]); $settings->_backupDir = addDirSep($_POST["backupDir"]); + $settings->_repositoryUrl = addDirSep($_POST["repositoryUrl"]); $settings->_logFileEnable = getBoolValue("logFileEnable"); $settings->_logFileRotation = $_POST["logFileRotation"]; $settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload"); diff --git a/out/out.ExtensionMgr.php b/out/out.ExtensionMgr.php index 565bb672a..c87a2fc43 100644 --- a/out/out.ExtensionMgr.php +++ b/out/out.ExtensionMgr.php @@ -32,7 +32,7 @@ if (!$user->isAdmin()) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } -$reposurl = 'http://seeddms.steinmann.cx/repository'; +$reposurl = $settings->_repositoryUrl; $v = new SeedDMS_Version; $extmgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $reposurl); diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index 682620875..f63a209f2 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -200,7 +200,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Bootstrap_Style { echo "".$re['author']['name']."
".$re['author']['company'].""; echo ""; echo "
"; - if($needsupdate && !$checkmsgs && $extmgr->isWritableExitDir()) + if(!$checkmsgs && $extmgr->isWritableExitDir()) echo "
".createHiddenFieldWithKey('extensionmgr')."
"; echo "
"; echo ""; diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 9c45a45c1..c36501cf8 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -434,6 +434,10 @@ if(!is_writeable($settings->_configFilePath)) { : showTextField("dropFolderDir", $settings->_dropFolderDir); ?> + "> + : + showTextField("repositoryUrl", $settings->_repositoryUrl); ?> + "> : _logFileEnable) echo "checked" ?> />