From: garvinhicking Date: Sat, 3 Jun 2006 21:24:25 +0000 (+0000) Subject: fix bug with default theme. Only use Carl's theme for the backend. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c99249d7c6fb7caaa9d1c84cc86193c50de2d671;p=s9y.git fix bug with default theme. Only use Carl's theme for the backend. --- diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 30411de..fc6a4b9 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -256,7 +256,7 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath') { $directories = array(); $directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : ''; - if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != 'default') { + if (isset($serendipity['template_engine']) && (stristr($file, 'admin/') === false || $serendipity['template_engine'] != 'default')) { $directories[] = $serendipity['template_engine'] . '/'; } @@ -377,7 +377,7 @@ function serendipity_issueAutologin($array) { global $serendipity; $package = serialize($array); - + if (function_exists('mcrypt_encrypt')) { // Secure the package data when being stored inside the Database $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC), MCRYPT_RAND); @@ -388,10 +388,10 @@ function serendipity_issueAutologin($array) { $package = base64_encode($package); $rnd = md5(time() . $_SERVER['REMOTE_ADDR']); - + // Delete possible current cookie serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options WHERE okey = '" . serendipity_db_escape_string($serendipity['COOKIE']['author_information']) . "'"); - + // Issue new autologin cookie serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (name, value, okey) VALUES ('" . time() . "', '" . serendipity_db_escape_string($package) . "', '" . $rnd . "')"); serendipity_setCookie('author_information', $rnd); @@ -409,7 +409,7 @@ function serendipity_checkAutologin($ident, $iv) { if (!is_array($autologin)) { return false; } - + if (function_exists('mcrypt_decrypt') && !empty($iv)) { $key = $iv; $iv = base64_decode($iv); @@ -423,7 +423,7 @@ function serendipity_checkAutologin($ident, $iv) { serendipity_header('X-ReIssue-Cookie: +' . (time() - $autologin['name']) . 's'); serendipity_issueAutologin($cookie); } - + return $cookie; }