diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-08-07 16:10:24 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-08-07 16:10:24 +0000 |
| commit | 8081b788c46051fcad80bf76e912c7e7c52dd90a (patch) | |
| tree | 05612800a49c52db7fa3e7d5296caa3e74efd449 /roundcubemail/program/include/rcube_plugin.php | |
| parent | 182b4a10fac14ef0c9427b8c69b1970a564018c0 (diff) | |
New utility function for plugins to create urls
git-svn-id: https://svn.roundcube.net/trunk@2846 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_plugin.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_plugin.php | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
