regex thing in index in 2.2 too
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@778 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
f7d1df2727
commit
d47fd5f25c
@ -55,10 +55,11 @@ foreach($themelets as $filename) {
|
|||||||
|
|
||||||
$custom_themelets = glob("themes/$_theme/*.theme.php");
|
$custom_themelets = glob("themes/$_theme/*.theme.php");
|
||||||
if($custom_themelets) {
|
if($custom_themelets) {
|
||||||
|
$m = array();
|
||||||
foreach($custom_themelets as $filename) {
|
foreach($custom_themelets as $filename) {
|
||||||
$basename = str_replace($filename, "themes/$_theme/", "");
|
if(preg_match("/themes\/$_theme\/(.*)\.theme\.php/",$filename,$m)
|
||||||
$basename = str_replace($basename, ".theme.php", "");
|
&& array_contains($themelets, "ext/{$m[1]}/theme.php"))
|
||||||
if(array_contains($themelets, "ext/$basename/theme.php")) {
|
{
|
||||||
require_once $filename;
|
require_once $filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user