mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Lancheck support for theme folders.
This commit is contained in:
@@ -302,7 +302,7 @@ class lancheck
|
|||||||
|
|
||||||
var $core_plugins = array();
|
var $core_plugins = array();
|
||||||
|
|
||||||
var $core_themes = array("bootstrap3");
|
var $core_themes = array("bootstrap3", "voux", "landingzero");
|
||||||
|
|
||||||
private $errorsOnly = false;
|
private $errorsOnly = false;
|
||||||
|
|
||||||
@@ -1460,6 +1460,12 @@ class lancheck
|
|||||||
$regexp = "#.php#";
|
$regexp = "#.php#";
|
||||||
$mode = 'core';
|
$mode = 'core';
|
||||||
}
|
}
|
||||||
|
elseif(strpos($comp_dir,e_THEME) !== false)
|
||||||
|
{
|
||||||
|
$regexp = "#".$lang."#";
|
||||||
|
$mode = 'themes';
|
||||||
|
// var_dump($lang_array);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$regexp = "#".$lang."#";
|
$regexp = "#".$lang."#";
|
||||||
@@ -1467,7 +1473,9 @@ class lancheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $regexp = (strpos($comp_dir,e_LANGUAGEDIR) !== FALSE) ? "#.php#" : "#".$lang."#";
|
// $regexp = (strpos($comp_dir,e_LANGUAGEDIR) !== FALSE) ? "#.php#" : "#".$lang."#";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach($lang_array as $f)
|
foreach($lang_array as $f)
|
||||||
{
|
{
|
||||||
if($mode == 'plugins')
|
if($mode == 'plugins')
|
||||||
@@ -1483,6 +1491,19 @@ class lancheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($mode == 'themes')
|
||||||
|
{
|
||||||
|
$tmpDir = str_replace($comp_dir,'',$f['path']);
|
||||||
|
// echo "<br />".$tmpDir;
|
||||||
|
list($themeDirectory, $other) = explode("/",$tmpDir, 2);
|
||||||
|
|
||||||
|
|
||||||
|
if($mode == 'themes' && ($this->thirdPartyPlugins !== true) && !in_array($themeDirectory, $this->core_themes))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(preg_match($regexp,$f['path'].$f['fname']) && is_file($f['path'].$f['fname']))
|
if(preg_match($regexp,$f['path'].$f['fname']) && is_file($f['path'].$f['fname']))
|
||||||
{
|
{
|
||||||
$allData = file_get_contents($f['path'].$f['fname']);
|
$allData = file_get_contents($f['path'].$f['fname']);
|
||||||
|
Reference in New Issue
Block a user