]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/include/rcube_plugin.php
Imported Upstream version 0.3.1
[roundcube.git] / program / include / rcube_plugin.php
index 5e37764c4c3a3f6f6df2987babc85884754906f0..ed30e8f175db9ecb36facf1c88b30c63edcbc230 100644 (file)
@@ -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