mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 11:40:48 +03:00
Fix загрузки файлов хуков, конфигов и языковых файлов из директорий активных плагинов
This commit is contained in:
parent
b1ac96aee9
commit
6ec45fdc8e
|
@ -133,6 +133,7 @@ if(file_exists(Config::Get('path.root.server').'/config/config.stable.php')) {
|
||||||
$sPluginsDir = Config::Get('path.root.server').'/plugins';
|
$sPluginsDir = Config::Get('path.root.server').'/plugins';
|
||||||
$sPluginsListFile = $sPluginsDir.'/plugins.dat';
|
$sPluginsListFile = $sPluginsDir.'/plugins.dat';
|
||||||
if($aPluginsList=@file($sPluginsListFile)) {
|
if($aPluginsList=@file($sPluginsListFile)) {
|
||||||
|
$aPluginsList=array_map('trim',$aPluginsList);
|
||||||
foreach ($aPluginsList as $sPlugin) {
|
foreach ($aPluginsList as $sPlugin) {
|
||||||
$aConfigFiles = glob($sPluginsDir.'/'.$sPlugin.'/config/*.php');
|
$aConfigFiles = glob($sPluginsDir.'/'.$sPlugin.'/config/*.php');
|
||||||
if(count($aConfigFiles)>0) {
|
if(count($aConfigFiles)>0) {
|
||||||
|
|
|
@ -248,6 +248,8 @@ class Engine extends Object {
|
||||||
*/
|
*/
|
||||||
protected function InitPluginHooks() {
|
protected function InitPluginHooks() {
|
||||||
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);
|
||||||
|
|
||||||
$aFiles=array();
|
$aFiles=array();
|
||||||
$sDirHooks=Config::Get('path.root.server').'/plugins/';
|
$sDirHooks=Config::Get('path.root.server').'/plugins/';
|
||||||
|
|
||||||
|
@ -272,7 +274,9 @@ class Engine extends Object {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected function InitPlugins() {
|
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) {
|
foreach ($aPluginList as $sPluginName) {
|
||||||
$sDirPlugins=Config::Get('path.root.server').'/plugins/';
|
$sDirPlugins=Config::Get('path.root.server').'/plugins/';
|
||||||
$sFile="{$sDirPlugins}{$sPluginName}/Plugin{$sPluginName}.class.php";
|
$sFile="{$sDirPlugins}{$sPluginName}/Plugin{$sPluginName}.class.php";
|
||||||
|
|
|
@ -114,6 +114,7 @@ class LsLang extends Module {
|
||||||
* Ищет языковые файлы актвиированных плагинов
|
* Ищет языковые файлы актвиированных плагинов
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
$sDir=Config::Get('path.root.server').'/plugins/';
|
$sDir=Config::Get('path.root.server').'/plugins/';
|
||||||
|
|
||||||
foreach ($aPluginList as $sPluginName) {
|
foreach ($aPluginList as $sPluginName) {
|
||||||
|
|
Loading…
Reference in a new issue