]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/repeatform.php
Introduced isCurrentProfileInScope() which shall check if current profile is
[quix0rs-gnu-social.git] / lib / repeatform.php
index 2052856ae67a5a8b65d9242ac5ed5da50e876c77..f0ce37fb62db07fc0798400d9cbb051c0917ba4c 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * StatusNet, the distributed open-source microblogging tool
  *
- * Form for forwarding a notice
+ * Form for repeating a notice
  *
  * PHP version 5
  *
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
+if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/form.php';
-
 /**
- * Form for forwarding a notice
+ * Form for repeating a notice
  *
  * @category Form
  * @package  StatusNet
@@ -42,22 +40,19 @@ require_once INSTALLDIR.'/lib/form.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
-class ForwardForm extends Form
+class RepeatForm extends Form
 {
     /**
-     * Notice to forward
+     * Notice to repeat
      */
-
     var $notice = null;
 
     /**
      * Constructor
      *
      * @param HTMLOutputter $out    output channel
-     * @param Notice        $notice notice to forward
+     * @param Notice        $notice notice to repeat
      */
-
     function __construct($out=null, $notice=null)
     {
         parent::__construct($out);
@@ -70,10 +65,9 @@ class ForwardForm extends Form
      *
      * @return int ID of the form
      */
-
     function id()
     {
-        return 'forward-' . $this->notice->id;
+        return 'repeat-' . $this->notice->id;
     }
 
     /**
@@ -81,22 +75,9 @@ class ForwardForm extends Form
      *
      * @return string URL of the action
      */
-
     function action()
     {
-        return common_local_url('forward');
-    }
-
-    /**
-     * Include a session token for CSRF protection
-     *
-     * @return void
-     */
-
-    function sessionToken()
-    {
-        $this->out->hidden('token-' . $this->notice->id,
-                           common_session_token());
+        return common_local_url('repeat');
     }
 
     /**
@@ -106,7 +87,8 @@ class ForwardForm extends Form
      */
     function formLegend()
     {
-        $this->out->element('legend', null, _('Forward this notice'));
+        // TRANS: For legend for notice repeat form.
+        $this->out->element('legend', null, _('Repeat this notice?'));
     }
 
     /**
@@ -114,7 +96,6 @@ class ForwardForm extends Form
      *
      * @return void
      */
-
     function formData()
     {
         $this->out->hidden('notice-n'.$this->notice->id,
@@ -127,11 +108,13 @@ class ForwardForm extends Form
      *
      * @return void
      */
-
     function formActions()
     {
-        $this->out->submit('forward-submit-' . $this->notice->id,
-                           _('Forward'), 'submit', null, _('Forward this notice'));
+        $this->out->submit('repeat-submit-' . $this->notice->id,
+                           // TRANS: Button text to repeat a notice on notice repeat form.
+                           _m('BUTTON','Yes'), 'submit', null,
+                           // TRANS: Button title to repeat a notice on notice repeat form.
+                           _('Repeat this notice.'));
     }
 
     /**
@@ -139,9 +122,8 @@ class ForwardForm extends Form
      *
      * @return string the form's class
      */
-
     function formClass()
     {
-        return 'form_forward';
+        return 'form_repeat';
     }
 }