summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-12-04 12:23:33 -0800
committerBrion Vibber <brion@pobox.com>2009-12-04 12:23:33 -0800
commit4afe07f0c3ab20d4007e94f9e4e9b35629b5f63e (patch)
treeb2a68cbdb9afb3e17197b8c4ec34b55afc2114ee /lib
parent0177b386d8384816ff2425cc6604b8debfb5c056 (diff)
parent40afc7e9877855272caa5c65fb3575e4420b2966 (diff)
Merge commit 'refs/merge-requests/108' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/htmloutputter.php42
1 files changed, 24 insertions, 18 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index 3fabc4037..a0066594f 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -350,14 +350,17 @@ class HTMLOutputter extends XMLOutputter
*/
function script($src, $type='text/javascript')
{
- $url = parse_url($src);
- if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
- {
- $src = common_path($src) . '?version=' . STATUSNET_VERSION;
+ if(Event::handle('StartScriptElement', array($this,&$src,&$type))) {
+ $url = parse_url($src);
+ if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
+ {
+ $src = common_path($src) . '?version=' . STATUSNET_VERSION;
+ }
+ $this->element('script', array('type' => $type,
+ 'src' => $src),
+ ' ');
+ Event::handle('EndScriptElement', array($this,$src,$type));
}
- $this->element('script', array('type' => $type,
- 'src' => $src),
- ' ');
}
/**
@@ -390,19 +393,22 @@ class HTMLOutputter extends XMLOutputter
*/
function cssLink($src,$theme=null,$media=null)
{
- $url = parse_url($src);
- if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
- {
- if(file_exists(Theme::file($src,$theme))){
- $src = Theme::path($src, $theme) . '?version=' . STATUSNET_VERSION;
- }else{
- $src = common_path($src);
+ if(Event::handle('StartCssLinkElement', array($this,&$src,&$theme,&$media))) {
+ $url = parse_url($src);
+ if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
+ {
+ if(file_exists(Theme::file($src,$theme))){
+ $src = Theme::path($src, $theme) . '?version=' . STATUSNET_VERSION;
+ }else{
+ $src = common_path($src);
+ }
}
+ $this->element('link', array('rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => $src,
+ 'media' => $media));
+ Event::handle('EndCssLinkElement', array($this,$src,$theme,$media));
}
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => $src,
- 'media' => $media));
}
/**