summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-05 20:15:00 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-05 20:15:00 -0400
commit5ba33836654e7e09098880fe9e6e9d3593f23b40 (patch)
treea9d52922735fe5c87e16b88bdde3c998b65f40ae
parent9a9195ecd8eea36943dbb5e46adf685aef9edc4e (diff)
Use script() to write out javascript <script> tags
-rw-r--r--plugins/FBConnect/FBC_XDReceiver.php5
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php6
-rw-r--r--plugins/Realtime/RealtimePlugin.php8
3 files changed, 5 insertions, 14 deletions
diff --git a/plugins/FBConnect/FBC_XDReceiver.php b/plugins/FBConnect/FBC_XDReceiver.php
index d9677fca7..19251cca4 100644
--- a/plugins/FBConnect/FBC_XDReceiver.php
+++ b/plugins/FBConnect/FBC_XDReceiver.php
@@ -56,10 +56,7 @@ class FBC_XDReceiverAction extends Action
'lang' => $language));
$this->elementStart('head');
$this->element('title', null, 'cross domain receiver page');
- $this->element('script',
- array('src' =>
- 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js',
- 'type' => 'text/javascript'), '');
+ $this->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js');
$this->elementEnd('head');
$this->elementStart('body');
$this->elementEnd('body');
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 2fb10a675..9aa96c59d 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -144,11 +144,7 @@ class FBConnectPlugin extends Plugin
function onEndShowFooter($action)
{
if ($this->reqFbScripts($action)) {
-
- $action->element('script',
- array('type' => 'text/javascript',
- 'src' => 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'),
- '');
+ $action->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php');
}
}
diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php
index 507f0194d..75bb8a91e 100644
--- a/plugins/Realtime/RealtimePlugin.php
+++ b/plugins/Realtime/RealtimePlugin.php
@@ -84,9 +84,7 @@ class RealtimePlugin extends Plugin
$scripts = $this->_getScripts();
foreach ($scripts as $script) {
- $action->element('script', array('type' => 'text/javascript',
- 'src' => $script),
- ' ');
+ $action->script($script);
}
$user = common_current_user();
@@ -201,8 +199,8 @@ class RealtimePlugin extends Plugin
function _getScripts()
{
- return array(common_path('plugins/Realtime/realtimeupdate.js'),
- common_path('plugins/Realtime/json2.js'));
+ return array('plugins/Realtime/realtimeupdate.js',
+ 'plugins/Realtime/json2.js');
}
function _updateInitialize($timeline, $user_id)