调整扩展数据源地址
This commit is contained in:
parent
ccfbe9aa9d
commit
a141593aef
|
@ -29,7 +29,7 @@ class Extension extends Controller
|
|||
|
||||
protected $extensions = [];
|
||||
|
||||
protected $remoteUrl = 'https://gitee.com/tpext/extensions/raw/main/extensions.json';
|
||||
protected $remoteUrl = 'https://codeberg.org/hi-tpext/extensions/raw/branch/main/extensions.json';
|
||||
|
||||
protected $remote = 0;
|
||||
|
||||
|
|
|
@ -202,11 +202,16 @@ class ExtensionLogic
|
|||
$content = file_get_contents($sonDir); //通过文件内容判断是否为扩展。class_exists方式的$autoload有点问题
|
||||
|
||||
if (
|
||||
preg_match('/\$version\s*=/i', $content)
|
||||
&& preg_match('/\$name\s*=/i', $content)
|
||||
&& preg_match('/\$title\s*=/i', $content)
|
||||
&& preg_match('/\$description\s*=/i', $content)
|
||||
&& preg_match('/\$root\s*=/i', $content)
|
||||
preg_match('/is_tpext_extension/i', $content) //在扩展中加个注释表明是扩展。如下:
|
||||
//is_tpext_extension
|
||||
/*is_tpext_extension*/
|
||||
||
|
||||
(preg_match('/\$version\s*=/i', $content)
|
||||
&& preg_match('/\$name\s*=/i', $content)
|
||||
&& preg_match('/\$title\s*=/i', $content)
|
||||
&& preg_match('/\$description\s*=/i', $content)
|
||||
&& preg_match('/\$root\s*=/i', $content)
|
||||
)
|
||||
) {
|
||||
$extends[] = $mtches[1];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue