]> git.mjollnir.org Git - s9y.git/commitdiff
fix bug with default theme. Only use Carl's theme for the backend.
authorgarvinhicking <garvinhicking>
Sat, 3 Jun 2006 21:24:25 +0000 (21:24 +0000)
committergarvinhicking <garvinhicking>
Sat, 3 Jun 2006 21:24:25 +0000 (21:24 +0000)
include/functions_config.inc.php

index 30411de9a717e8f6d3db69fd0f9047446e88da7a..fc6a4b9deb187ead804705644ef993de3849b256 100644 (file)
@@ -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;
 }