mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 22:47:19 +00:00
better error handling if repository doesn't deliver an extension list
This commit is contained in:
parent
dbce942bb5
commit
9db82f71c2
|
@ -465,7 +465,7 @@ class SeedDMS_Extension_Mgr {
|
||||||
public function updateExtensionList($version='', $force=false) { /* {{{ */
|
public function updateExtensionList($version='', $force=false) { /* {{{ */
|
||||||
if($this->reposurl) {
|
if($this->reposurl) {
|
||||||
if(!file_exists($this->cachedir."/".self::repos_list_file) || $force) {
|
if(!file_exists($this->cachedir."/".self::repos_list_file) || $force) {
|
||||||
$file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : ''));
|
if($file = @file_get_contents($this->reposurl.($version ? '?seeddms_version='.$version : ''))) {
|
||||||
if(is_array($http_response_header)) {
|
if(is_array($http_response_header)) {
|
||||||
$parts=explode(' ',$http_response_header[0]);
|
$parts=explode(' ',$http_response_header[0]);
|
||||||
if(count($parts)>1) //HTTP/1.0 <code> <text>
|
if(count($parts)>1) //HTTP/1.0 <code> <text>
|
||||||
|
@ -475,6 +475,9 @@ class SeedDMS_Extension_Mgr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_put_contents($this->cachedir."/".self::repos_list_file, $file);
|
file_put_contents($this->cachedir."/".self::repos_list_file, $file);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user