X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fleaveform.php;h=a32af18eda07083beae4a75c2af0a48187cb455c;hb=b24d711f552854d88f2df2120672bdaf173335fc;hp=1dab6d99e3edd0f8289c55806ca3072855b67a63;hpb=ae883ceb9b4689f6c1dd3aecdc4a844eda7d179a;p=quix0rs-gnu-social.git diff --git a/lib/leaveform.php b/lib/leaveform.php index 1dab6d99e3..a32af18eda 100644 --- a/lib/leaveform.php +++ b/lib/leaveform.php @@ -28,7 +28,7 @@ * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -46,7 +46,6 @@ require_once INSTALLDIR.'/lib/form.php'; * * @see UnsubscribeForm */ - class LeaveForm extends Form { /** @@ -61,7 +60,6 @@ class LeaveForm extends Form * @param HTMLOutputter $out output channel * @param group $group group to leave */ - function __construct($out=null, $group=null) { parent::__construct($out); @@ -74,7 +72,6 @@ class LeaveForm extends Form * * @return string ID of the form */ - function id() { return 'group-leave-' . $this->group->id; @@ -85,10 +82,9 @@ class LeaveForm extends Form * * @return string of the form class */ - function formClass() { - return 'form_group_leave'; + return 'form_group_leave ajax'; } /** @@ -96,11 +92,10 @@ class LeaveForm extends Form * * @return string URL of the action */ - function action() { return common_local_url('leavegroup', - array('nickname' => $this->group->nickname)); + array('id' => $this->group->id)); } /** @@ -108,9 +103,9 @@ class LeaveForm extends Form * * @return void */ - function formActions() { - $this->out->submit('submit', _('Leave')); + // TRANS: Button text on form to leave a group. + $this->out->submit('submit', _m('BUTTON','Leave')); } }