summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-28 22:53:40 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-10-28 22:53:40 +0000
commit5328c11135888671be7b952ab76069f8d34dbb78 (patch)
treef489a4aaf2c9b2691086cf663e0e7c16ccdf1a06 /roundcubemail/program/include
parentd6c77ae7a1b31462b57d2b06d79167970040ab52 (diff)
Add fallback to default skin if the selected one is not available in plugin directory
git-svn-id: https://svn.roundcube.net/trunk@3076 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_plugin.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_plugin.php b/roundcubemail/program/include/rcube_plugin.php
index 5e37764c4..ed30e8f17 100644
--- a/roundcubemail/program/include/rcube_plugin.php
+++ b/roundcubemail/program/include/rcube_plugin.php
@@ -231,6 +231,20 @@ abstract class rcube_plugin
else
return $fn;
}
+
+ /**
+ * Provide path to the currently selected skin folder within the plugin directory
+ * with a fallback to the default skin folder.
+ *
+ * @return string Skin path relative to plugins directory
+ */
+ protected function local_skin_path()
+ {
+ $skin_path = 'skins/'.$this->api->output->config['skin'];
+ if (!is_dir(realpath(slashify($this->home) . $skin_path)))
+ $skin_path = 'skins/default';
+ return $skin_path;
+ }
/**
* Callback function for array_map