summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@csarven-laptop.(none)>2009-11-28 20:54:32 +0100
committerSarven Capadisli <csarven@csarven-laptop.(none)>2009-11-28 20:54:32 +0100
commit6d29f3f2de58e4552942718ddef7ce67dcb99c5b (patch)
treea450e9b4ccb9764e9b74772f535b28d74142bc78
parente20a54fb8cb1d69fb6be7a414f2699c1958f053e (diff)
Bind for UserFlag only if there is a form for it
-rw-r--r--plugins/UserFlag/UserFlagPlugin.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php
index 1c58a6916..4717a63dd 100644
--- a/plugins/UserFlag/UserFlagPlugin.php
+++ b/plugins/UserFlag/UserFlagPlugin.php
@@ -146,7 +146,7 @@ class UserFlagPlugin extends Plugin
function onEndShowScripts($action)
{
$action->elementStart('script', array('type' => 'text/javascript'));
- $action->raw('/*<![CDATA[*/ SN.U.FormXHR($(".form_entity_flag")); /*]]>*/');
+ $action->raw('/*<![CDATA[*/ if ($(".form_entity_flag").length > 0) { SN.U.FormXHR($(".form_entity_flag")); } /*]]>*/');
$action->elementEnd('script');
return true;
}