From b7fe1322bc82a39d73ab9ccf6f54a3bebe63ece5 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 14 Oct 2017 13:05:59 -0700 Subject: [PATCH] Lancheck support for theme folders. --- e107_admin/lancheck.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php index 2344567fd..1a4c51a3c 100644 --- a/e107_admin/lancheck.php +++ b/e107_admin/lancheck.php @@ -302,7 +302,7 @@ class lancheck var $core_plugins = array(); - var $core_themes = array("bootstrap3"); + var $core_themes = array("bootstrap3", "voux", "landingzero"); private $errorsOnly = false; @@ -1460,6 +1460,12 @@ class lancheck $regexp = "#.php#"; $mode = 'core'; } + elseif(strpos($comp_dir,e_THEME) !== false) + { + $regexp = "#".$lang."#"; + $mode = 'themes'; + // var_dump($lang_array); + } else { $regexp = "#".$lang."#"; @@ -1467,7 +1473,9 @@ class lancheck } // $regexp = (strpos($comp_dir,e_LANGUAGEDIR) !== FALSE) ? "#.php#" : "#".$lang."#"; - + + + foreach($lang_array as $f) { if($mode == 'plugins') @@ -1483,6 +1491,19 @@ class lancheck } } + if($mode == 'themes') + { + $tmpDir = str_replace($comp_dir,'',$f['path']); + // echo "
".$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'])) { $allData = file_get_contents($f['path'].$f['fname']);