summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-08-07 16:10:24 +0000
committerthomascube <thomas@roundcube.net>2009-08-07 16:10:24 +0000
commit24e219d1cca405a554156d1d195437b930ef919a (patch)
tree3934c144e4d9383a064198c7086499e5ed751bc2 /program/include
parent0ddf59aeb4ff1caf7d578336f1493aec09f385a6 (diff)
New utility function for plugins to create urls
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_plugin.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php
index d3ab7afba..5e37764c4 100644
--- a/program/include/rcube_plugin.php
+++ b/program/include/rcube_plugin.php
@@ -208,6 +208,18 @@ abstract class rcube_plugin
$this->api->add_content($this->api->output->button($p), $container);
}
}
+
+ /**
+ * Generate an absolute URL to the given resource within the current
+ * plugin directory
+ *
+ * @param string The file name
+ * @return string Absolute URL to the given resource
+ */
+ public function url($fn)
+ {
+ return $this->api->url . $this->resource_url($fn);
+ }
/**
* Make the given file name link into the plugin directory