Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replace some forgotten references to skins/default (#1488591)

Conflicts:

	program/include/rcube_config.php
	program/include/rcube_template.php
  • Loading branch information...
commit 68b9f365b38fe68848eedf81a9eaad7810f51b0b 1 parent cf8bac1
Thomas B. authored August 09, 2012
2  .htaccess
@@ -28,7 +28,7 @@ php_value	mbstring.func_overload	0
28 28
 
29 29
 <IfModule mod_rewrite.c>
30 30
 RewriteEngine On
31  
-RewriteRule ^favicon\.ico$ skins/default/images/favicon.ico
  31
+RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico
32 32
 # security rules
33 33
 RewriteRule .git - [F]
34 34
 RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|SQL|bin|CHANGELOG)$ - [F]
1  CHANGELOG
... ...
@@ -1,6 +1,7 @@
1 1
 CHANGELOG Roundcube Webmail
2 2
 ===========================
3 3
 
  4
+- Fix fallback to Larry skin when configured skin isn't available (#1488591)
4 5
 - Fix (workaround) delete operations with some versions of memcache (#1488592)
5 6
 - Fix (disable) request validation for spell and spell_html actions
6 7
 
10  program/include/rcube_config.php
@@ -29,6 +29,8 @@
29 29
  */
30 30
 class rcube_config
31 31
 {
  32
+    const DEFAULT_SKIN = 'larry';
  33
+
32 34
     private $prop = array();
33 35
     private $errors = array();
34 36
     private $userprefs = array();
@@ -74,14 +76,15 @@ private function load()
74 76
         $this->load_host_config();
75 77
 
76 78
         // set skin (with fallback to old 'skin_path' property)
  79
+
77 80
         if (empty($this->prop['skin']) && !empty($this->prop['skin_path']))
78 81
             $this->prop['skin'] = str_replace('skins/', '', unslashify($this->prop['skin_path']));
79 82
         else if (empty($this->prop['skin']))
80  
-            $this->prop['skin'] = 'larry';
  83
+            $this->prop['skin'] = self::DEFAULT_SKIN;
81 84
 
82 85
         // larry is the new default skin :-)
83 86
         if ($this->prop['skin'] == 'default')
84  
-            $this->prop['skin'] = 'larry';
  87
+            $this->prop['skin'] = self::DEFAULT_SKIN;
85 88
 
86 89
         // fix paths
87 90
         $this->prop['log_dir'] = $this->prop['log_dir'] ? realpath(unslashify($this->prop['log_dir'])) : INSTALL_PATH . 'logs';
@@ -251,8 +254,9 @@ public function set_user_prefs($prefs)
251 254
         }
252 255
 
253 256
         // larry is the new default skin :-)
  257
+
254 258
         if ($prefs['skin'] == 'default')
255  
-            $prefs['skin'] = 'larry';
  259
+            $prefs['skin'] = self::DEFAULT_SKIN;
256 260
 
257 261
         $this->userprefs = $prefs;
258 262
         $this->prop      = array_merge($this->prop, $prefs);
2  program/include/rcube_template.php
@@ -158,7 +158,7 @@ public function set_skin($skin)
158 158
             $valid = true;
159 159
         }
160 160
         else {
161  
-            $skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : 'skins/default';
  161
+            $skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : rcube_config::DEFAULT_SKIN;
162 162
             $valid = !$skin;
163 163
         }
164 164
 
2  skins/classic/ie6hacks.css
@@ -7,7 +7,7 @@
7 7
 
8 8
 img
9 9
 {
10  
-  behavior: url(skins/default/pngbehavior.htc);
  10
+  behavior: url(skins/classic/pngbehavior.htc);
11 11
 }
12 12
 
13 13
 #logo

1 note on commit 68b9f36

Raoul Bhatia

this should read:
$skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : 'skins/'.rcube_config::DEFAULT_SKIN;

Raoul Bhatia

this commit is incomplete - please see 5fb6990

Please sign in to comment.
Something went wrong with that request. Please try again.