mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-05 17:41:04 +00:00
use ExtensionMgr created in inc.Extension.php, use proxy settings
This commit is contained in:
parent
25fd07a945
commit
b9de849ab8
|
@ -39,8 +39,14 @@ if (!$user->isAdmin()) {
|
|||
|
||||
$v = new SeedDMS_Version;
|
||||
$versions = array();
|
||||
|
||||
if($settings->_proxyUrl)
|
||||
$context = getStreamContext($settings->_proxyUrl, $settings->_proxyUser, $settings->_proxyPassword);
|
||||
else
|
||||
$context = null;
|
||||
|
||||
if(@ini_get('allow_url_fopen') == '1') {
|
||||
$lines = @file('http://www.seeddms.org/latest?version='.$v->version(), FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
||||
$lines = @file('http://www.seeddms.org/latest?version='.$v->version(), FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES, $context);
|
||||
if($lines) {
|
||||
foreach($lines as $line) {
|
||||
$versions[] = explode(':', $line);
|
||||
|
@ -48,14 +54,14 @@ if(@ini_get('allow_url_fopen') == '1') {
|
|||
}
|
||||
}
|
||||
|
||||
$reposurl = $settings->_repositoryUrl;
|
||||
$extmgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $reposurl);
|
||||
//$reposurl = $settings->_repositoryUrl;
|
||||
//$extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $reposurl);
|
||||
|
||||
if($view) {
|
||||
$view->setParam('version', $v);
|
||||
$view->setParam('availversions', $versions);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('extmgr', $extmgr);
|
||||
$view->setParam('extmgr', $extMgr);
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user