mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-17 07:10:48 +03:00
Fix автоматического чтения readme.txt файла плагинов
This commit is contained in:
parent
39c2efaaeb
commit
3559678893
|
@ -32,7 +32,12 @@ class LsPlugin extends Module {
|
|||
* @var string
|
||||
*/
|
||||
const PLUGIN_README_FILE = 'readme.txt';
|
||||
|
||||
/**
|
||||
* Список параметров плагина в readme.txt файле
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $aReadmeParams = array('name','author','homepage','version','requires','description','delegate');
|
||||
/**
|
||||
* Путь к директории с плагинами
|
||||
*
|
||||
|
@ -92,11 +97,11 @@ class LsPlugin extends Module {
|
|||
if(is_file($sReadme)) {
|
||||
$aInfo = file($sReadme);
|
||||
foreach ($aInfo as $sParam) {
|
||||
list($sKey,$sValue) = explode(':',trim($sParam),2);
|
||||
$sKey=strtolower($sKey);
|
||||
$sValue=$this->Text_Parser(trim($sValue));
|
||||
|
||||
$this->aPluginsList[$sPlugin][$sKey]=$sValue;
|
||||
@list($sKey,$sValue) = explode(':',trim($sParam),2);
|
||||
if($sKey and $sValue and in_array(strtolower($sKey),$this->aReadmeParams)) {
|
||||
$sValue=$this->Text_Parser(trim($sValue));
|
||||
$this->aPluginsList[$sPlugin][strtolower($sKey)]=$sValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue