From 8081b788c46051fcad80bf76e912c7e7c52dd90a Mon Sep 17 00:00:00 2001 From: thomasb Date: Fri, 7 Aug 2009 16:10:24 +0000 Subject: New utility function for plugins to create urls git-svn-id: https://svn.roundcube.net/trunk@2846 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_plugin.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'roundcubemail/program/include/rcube_plugin.php') diff --git a/roundcubemail/program/include/rcube_plugin.php b/roundcubemail/program/include/rcube_plugin.php index d3ab7afba..5e37764c4 100644 --- a/roundcubemail/program/include/rcube_plugin.php +++ b/roundcubemail/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 -- cgit v1.2.3