1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

e_parse replaceConstants refined - need speed test and eventually more work; generic checkvalidtheme() minor cleanup

This commit is contained in:
secretr
2011-01-03 10:54:08 +00:00
parent da7a567c51
commit ca8b648818
4 changed files with 48 additions and 16 deletions

View File

@@ -630,8 +630,11 @@ if (!function_exists('checkvalidtheme'))
function checkvalidtheme($theme_check)
{
// arg1 = theme to check
global $ADMIN_DIRECTORY, $tp, $e107;
//global $ADMIN_DIRECTORY, $tp, $e107;
$e107 = e107::getInstance();
$tp = e107::getParser();
$ADMIN_DIRECTORY = $e107->getFolder('admin');
if (ADMIN && strpos(e_QUERY, 'themepreview') !== false)
{
list($action, $id) = explode('.', e_QUERY);
@@ -659,7 +662,7 @@ if (!function_exists('checkvalidtheme'))
{
function search_validtheme()
{
global $e107;
$e107 = e107::getInstance();
$th = substr(e_THEME, 0, -1);
$handle = opendir($th);
while ($file = readdir($handle))
@@ -681,7 +684,7 @@ if (!function_exists('checkvalidtheme'))
echo '<script>alert("'.$tp->toJS(CORE_LAN1).'")</script>';
}
}
$themes_dir = $e107->e107_dirs['THEMES_DIRECTORY'];
$themes_dir = $e107->getFolder('themes');
$e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/";
}
}