diff --git a/index.php b/index.php index c7bd15a..e104bb2 100755 --- a/index.php +++ b/index.php @@ -142,28 +142,20 @@ if (!empty($_POST['saveconfig'])) { unlink($cssPreviousFileRealPath); } $custom_css = $core->blog->settings->yash3->yash3_custom_css; - if (!empty($custom_css)) { - if (strpos('/',$custom_css) === 0) { - $cssPathFile = DC_RC_PATH.$custom_css; - } - else { - $cssPathFile = DC_RC_PATH. - $core->blog->settings->system->themes_url."/". - $core->blog->settings->system->theme."/". - $custom_css; - } + if (!empty($custom_css)) { + $fContent = $custom_css; } else { $theme = (string)$core->blog->settings->yash3->yash3_theme; if ($theme == '') { - $cssPathFile = dirname(__FILE__)."/syntaxhighlighter/css/shThemeDefault.css"; + $fContent = file_get_contents(dirname(__FILE__)."/syntaxhighlighter/css/shThemeDefault.css"); } else { - $cssPathFile = dirname(__FILE__)."/syntaxhighlighter/css/shTheme".$theme.".css"; + $fContent = file_get_contents(dirname(__FILE__)."/syntaxhighlighter/css/shTheme".$theme.".css"); } } $fContent = file_get_contents(dirname(__FILE__)."/syntaxhighlighter/css/shCore.css")."\n". - file_get_contents($cssPathFile); + $fContent; // Remove comments $fContent = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $fContent); @@ -212,12 +204,12 @@ if (!empty($_POST['saveconfig'])) {