diff options
author | Evan Prodromou <evan@status.net> | 2009-11-14 17:14:35 +0100 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-14 17:14:35 +0100 |
commit | 959d278c347fdf90e0227adc57c0215f5d82404a (patch) | |
tree | 16eb3b0155b446ada520566e187b4c47b0b9e76b /plugins/UserFlag | |
parent | 093857c582a68b39e0d65523d27f25ede7b7fed6 (diff) | |
parent | 2147ac510f5489c860a4bebf3ab48a069b89ecfb (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r-- | plugins/UserFlag/UserFlagPlugin.php | 8 | ||||
-rw-r--r-- | plugins/UserFlag/flagprofile.php | 16 | ||||
-rw-r--r-- | plugins/UserFlag/flagprofileform.php | 2 |
3 files changed, 24 insertions, 2 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index fe4a74869..6410ee1ce 100644 --- a/plugins/UserFlag/UserFlagPlugin.php +++ b/plugins/UserFlag/UserFlagPlugin.php @@ -140,4 +140,12 @@ class UserFlagPlugin extends Plugin return true; } + + function onEndShowScripts($action) + { + $action->elementStart('script', array('type' => 'text/javascript')); + $action->raw('/*<![CDATA[*/ SN.U.FormXHR($(".form_entity_flag")); /*]]>*/'); + $action->elementEnd('script'); + return true; + } } diff --git a/plugins/UserFlag/flagprofile.php b/plugins/UserFlag/flagprofile.php index c72b74c6a..77c86b233 100644 --- a/plugins/UserFlag/flagprofile.php +++ b/plugins/UserFlag/flagprofile.php @@ -108,7 +108,21 @@ class FlagprofileAction extends Action parent::handle($args); $this->flagProfile(); - $this->returnTo(); + + if ($this->boolean('ajax')) { + header('Content-Type: text/xml;charset=utf-8'); + $this->xw->startDocument('1.0', 'UTF-8'); + $this->elementStart('html'); + $this->elementStart('head'); + $this->element('title', null, _('Flagged for review')); + $this->elementEnd('head'); + $this->elementStart('body'); + $this->element('p', 'flagged', _('Flagged')); + $this->elementEnd('body'); + $this->elementEnd('html'); + } else { + $this->returnTo(); + } } function title() { diff --git a/plugins/UserFlag/flagprofileform.php b/plugins/UserFlag/flagprofileform.php index 0811dbb9d..a8396e2d5 100644 --- a/plugins/UserFlag/flagprofileform.php +++ b/plugins/UserFlag/flagprofileform.php @@ -94,7 +94,7 @@ class FlagProfileForm extends Form function formClass() { - return 'form_profile_flag'; + return 'form_entity_flag'; } /** |