]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/deletegroupform.php
Merge remote-tracking branch 'upstream/nightly' into nightly
[quix0rs-gnu-social.git] / lib / deletegroupform.php
index 9d8012d33bb3e74b771b5b0ef15baccefa01e086..97534905e4feb003d7ce55e1687262dcb8e3050b 100644 (file)
@@ -29,9 +29,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Form for deleting a group
@@ -47,23 +45,20 @@ if (!defined('STATUSNET')) {
  * @see      UnsubscribeForm
  * @fixme    merge a bunch of this stuff with similar form types to reduce boilerplate
  */
-
 class DeleteGroupForm extends Form
 {
     /**
      * group for user to delete
      */
-
     var $group = null;
 
     /**
      * Constructor
      *
      * @param HTMLOutputter $out   output channel
-     * @param group         $group group to join
+     * @param User_group    $group group to join
      */
-
-    function __construct($out=null, $group=null)
+    function __construct(HTMLOutputter $out=null, User_group $group=null)
     {
         parent::__construct($out);
 
@@ -75,10 +70,9 @@ class DeleteGroupForm extends Form
      *
      * @return string ID of the form
      */
-
     function id()
     {
-        return 'group-delete-' . $this->group->id;
+        return 'group-delete-' . $this->group->getID();
     }
 
     /**
@@ -86,7 +80,6 @@ class DeleteGroupForm extends Form
      *
      * @return string of the form class
      */
-
     function formClass()
     {
         return 'form_group_delete';
@@ -97,17 +90,15 @@ class DeleteGroupForm extends Form
      *
      * @return string URL of the action
      */
-
     function action()
     {
-        return common_local_url('deletegroup',
-                                array('id' => $this->group->id));
+        return common_local_url('deletegroup', array('id' => $this->group->getID()));
     }
 
     function formData()
     {
         $this->out->hidden($this->id() . '-returnto-action', 'groupbyid', 'returnto-action');
-        $this->out->hidden($this->id() . '-returnto-id', $this->group->id, 'returnto-id');
+        $this->out->hidden($this->id() . '-returnto-id', $this->group->getID(), 'returnto-id');
     }
 
     /**
@@ -115,9 +106,9 @@ class DeleteGroupForm extends Form
      *
      * @return void
      */
-
     function formActions()
     {
-        $this->out->submit('submit', _('Delete'));
+        // TRANS: Button text for deleting a group.
+        $this->out->submit('submit', _m('BUTTON','Delete'));
     }
 }