summaryrefslogtreecommitdiff
path: root/lib/facebookaction.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-05 19:45:12 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-05 19:45:12 -0400
commit304db1d30b4ad96f8a2ca500d224bb1609588fed (patch)
treed5469aad37b0f8cc0826053f963332f1af96ae14 /lib/facebookaction.php
parent6a76addbe8bbfafd1a1dd6ed7ffbf8afebff5abe (diff)
Use script() and cssLink() methods everywhere instead of manually writing out javascript and css each time
Diffstat (limited to 'lib/facebookaction.php')
-rw-r--r--lib/facebookaction.php27
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index 5be2f2fe6..ab11b613e 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -95,34 +95,13 @@ class FacebookAction extends Action
function showStylesheets()
{
- // Add a timestamp to the file so Facebook cache wont ignore our changes
- $ts = filemtime(INSTALLDIR.'/theme/base/css/display.css');
-
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => theme_path('css/display.css', 'base') . '?ts=' . $ts));
-
- $theme = common_config('site', 'theme');
-
- $ts = filemtime(INSTALLDIR. '/theme/' . $theme .'/css/display.css');
-
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => theme_path('css/display.css', null) . '?ts=' . $ts));
-
- $ts = filemtime(INSTALLDIR.'/theme/base/css/facebookapp.css');
-
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => theme_path('css/facebookapp.css', 'base') . '?ts=' . $ts));
+ $this->cssLink('css/display.css', 'base');
+ $this->cssLink('css/facebookapp.css', 'base');
}
function showScripts()
{
- // Add a timestamp to the file so Facebook cache wont ignore our changes
- $ts = filemtime(INSTALLDIR.'/js/facebookapp.js');
-
- $this->element('script', array('src' => common_path('js/facebookapp.js') . '?ts=' . $ts));
+ $this->script('js/facebookapp.js');
}
/**