1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 23:00:51 +03:00

Fix загрузки файлов хуков, конфигов и языковых файлов из директорий активных плагинов

This commit is contained in:
Alexey Kachayev 2010-01-27 15:14:00 +00:00
parent b1ac96aee9
commit 6ec45fdc8e
3 changed files with 7 additions and 1 deletions

View file

@ -133,6 +133,7 @@ if(file_exists(Config::Get('path.root.server').'/config/config.stable.php')) {
$sPluginsDir = Config::Get('path.root.server').'/plugins';
$sPluginsListFile = $sPluginsDir.'/plugins.dat';
if($aPluginsList=@file($sPluginsListFile)) {
$aPluginsList=array_map('trim',$aPluginsList);
foreach ($aPluginsList as $sPlugin) {
$aConfigFiles = glob($sPluginsDir.'/'.$sPlugin.'/config/*.php');
if(count($aConfigFiles)>0) {

View file

@ -248,6 +248,8 @@ class Engine extends Object {
*/
protected function InitPluginHooks() {
if($aPluginList = @file(Config::Get('path.root.server').'/plugins/plugins.dat')) {
$aPluginList=array_map('trim',$aPluginList);
$aFiles=array();
$sDirHooks=Config::Get('path.root.server').'/plugins/';
@ -272,7 +274,9 @@ class Engine extends Object {
*
*/
protected function InitPlugins() {
if($aPluginList = @file(Config::Get('path.root.server').'/plugins/plugins.dat')) {
if($aPluginList = @file(Config::Get('path.root.server').'/plugins/plugins.dat')) {
$aPluginList=array_map('trim',$aPluginList);
foreach ($aPluginList as $sPluginName) {
$sDirPlugins=Config::Get('path.root.server').'/plugins/';
$sFile="{$sDirPlugins}{$sPluginName}/Plugin{$sPluginName}.class.php";

View file

@ -114,6 +114,7 @@ class LsLang extends Module {
* Ищет языковые файлы актвиированных плагинов
*/
if($aPluginList = @file(Config::Get('path.root.server').'/plugins/plugins.dat')) {
$aPluginList=array_map('trim',$aPluginList);
$sDir=Config::Get('path.root.server').'/plugins/';
foreach ($aPluginList as $sPluginName) {