Completed
Push — 1.10.x ( 4c5f4c...61bcd5 )
by Yannick
419:40 queued 371:43
created
main/inc/lib/pear/HTML/QuickForm/Action.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@
 block discarded – undo
36 36
  */
37 37
 class HTML_QuickForm_Action
38 38
 {
39
-   /**
40
-    * Processes the request. This method should be overriden by child classes to
41
-    * provide the necessary logic.
42
-    *
43
-    * @access   public
44
-    * @param    HTML_QuickForm_Page    The current form-page
45
-    * @param    string                 Current action name, as one Action object
46
-    *                                  can serve multiple actions
47
-    * @throws   PEAR_Error
48
-    * @abstract
49
-    */
39
+    /**
40
+     * Processes the request. This method should be overriden by child classes to
41
+     * provide the necessary logic.
42
+     *
43
+     * @access   public
44
+     * @param    HTML_QuickForm_Page    The current form-page
45
+     * @param    string                 Current action name, as one Action object
46
+     *                                  can serve multiple actions
47
+     * @throws   PEAR_Error
48
+     * @abstract
49
+     */
50 50
     function perform(&$page, $actionName)
51 51
     {
52 52
     }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/image.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      * @access    public
48 48
      * @return    void
49 49
      */
50
-    function HTML_QuickForm_image($elementName=null, $src='', $attributes=null)
50
+    function HTML_QuickForm_image($elementName = null, $src = '', $attributes = null)
51 51
     {
52 52
         parent::__construct($elementName, null, $attributes);
53 53
         $this->setType('image');
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * Freeze the element so that only its value is returned
61 61
      *
62 62
      * @access    public
63
-     * @return    void
63
+     * @return    boolean
64 64
      */
65 65
     function freeze()
66 66
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@
 block discarded – undo
238 238
         if ($this->_flagFrozen) {
239 239
             return $this->getFrozenHtml();
240 240
         } else {
241
-            return '<input ' . $this->_getAttrString($this->_attributes) . ' />';
241
+            return '<input '.$this->_getAttrString($this->_attributes).' />';
242 242
         }
243 243
     }
244 244
 }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/Page.php 2 patches
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -37,59 +37,59 @@  discard block
 block discarded – undo
37 37
  */
38 38
 class HTML_QuickForm_Page extends HTML_QuickForm
39 39
 {
40
-   /**
41
-    * Contains the mapping of actions to corresponding HTML_QuickForm_Action objects
42
-    * @var array
43
-    */
40
+    /**
41
+     * Contains the mapping of actions to corresponding HTML_QuickForm_Action objects
42
+     * @var array
43
+     */
44 44
     var $_actions = array();
45 45
 
46
-   /**
47
-    * Contains a reference to a Controller object containing this page
48
-    * @var      HTML_QuickForm_Controller
49
-    * @access   public
50
-    */
46
+    /**
47
+     * Contains a reference to a Controller object containing this page
48
+     * @var      HTML_QuickForm_Controller
49
+     * @access   public
50
+     */
51 51
     var $controller = null;
52 52
 
53
-   /**
54
-    * Should be set to true on first call to buildForm()
55
-    * @var bool
56
-    */
53
+    /**
54
+     * Should be set to true on first call to buildForm()
55
+     * @var bool
56
+     */
57 57
     var $_formBuilt = false;
58 58
 
59
-   /**
60
-    * Class constructor
61
-    *
62
-    * @access public
63
-    */
59
+    /**
60
+     * Class constructor
61
+     *
62
+     * @access public
63
+     */
64 64
     function HTML_QuickForm_Page($formName, $method = 'post', $target = '', $attributes = null)
65 65
     {
66 66
         $this->HTML_QuickForm($formName, $method, '', $target, $attributes);
67 67
     }
68 68
 
69 69
 
70
-   /**
71
-    * Registers a handler for a specific action.
72
-    *
73
-    * @access public
74
-    * @param  string                name of the action
75
-    * @param  HTML_QuickForm_Action the handler for the action
76
-    */
70
+    /**
71
+     * Registers a handler for a specific action.
72
+     *
73
+     * @access public
74
+     * @param  string                name of the action
75
+     * @param  HTML_QuickForm_Action the handler for the action
76
+     */
77 77
     function addAction($actionName, &$action)
78 78
     {
79 79
         $this->_actions[$actionName] =& $action;
80 80
     }
81 81
 
82 82
 
83
-   /**
84
-    * Handles an action.
85
-    *
86
-    * If an Action object was not registered here, controller's handle()
87
-    * method will be called.
88
-    *
89
-    * @access public
90
-    * @param  string Name of the action
91
-    * @throws PEAR_Error
92
-    */
83
+    /**
84
+     * Handles an action.
85
+     *
86
+     * If an Action object was not registered here, controller's handle()
87
+     * method will be called.
88
+     *
89
+     * @access public
90
+     * @param  string Name of the action
91
+     * @throws PEAR_Error
92
+     */
93 93
     function handle($actionName)
94 94
     {
95 95
         if (isset($this->_actions[$actionName])) {
@@ -100,27 +100,27 @@  discard block
 block discarded – undo
100 100
     }
101 101
 
102 102
 
103
-   /**
104
-    * Returns a name for a submit button that will invoke a specific action.
105
-    *
106
-    * @access public
107
-    * @param  string  Name of the action
108
-    * @return string  "name" attribute for a submit button
109
-    */
103
+    /**
104
+     * Returns a name for a submit button that will invoke a specific action.
105
+     *
106
+     * @access public
107
+     * @param  string  Name of the action
108
+     * @return string  "name" attribute for a submit button
109
+     */
110 110
     function getButtonName($actionName)
111 111
     {
112 112
         return '_qf_' . $this->getAttribute('id') . '_' . $actionName;
113 113
     }
114 114
 
115 115
 
116
-   /**
117
-    * Loads the submit values from the array.
118
-    *
119
-    * The method is NOT intended for general usage.
120
-    *
121
-    * @param array  'submit' values
122
-    * @access public
123
-    */
116
+    /**
117
+     * Loads the submit values from the array.
118
+     *
119
+     * The method is NOT intended for general usage.
120
+     *
121
+     * @param array  'submit' values
122
+     * @access public
123
+     */
124 124
     function loadValues($values)
125 125
     {
126 126
         $this->_flagSubmitted = true;
@@ -131,46 +131,46 @@  discard block
 block discarded – undo
131 131
     }
132 132
 
133 133
 
134
-   /**
135
-    * Builds a form.
136
-    *
137
-    * You should override this method when you subclass HTML_QuickForm_Page,
138
-    * it should contain all the necessary addElement(), applyFilter(), addRule()
139
-    * and possibly setDefaults() and setConstants() calls. The method will be
140
-    * called on demand, so please be sure to set $_formBuilt property to true to
141
-    * assure that the method works only once.
142
-    *
143
-    * @access public
144
-    * @abstract
145
-    */
134
+    /**
135
+     * Builds a form.
136
+     *
137
+     * You should override this method when you subclass HTML_QuickForm_Page,
138
+     * it should contain all the necessary addElement(), applyFilter(), addRule()
139
+     * and possibly setDefaults() and setConstants() calls. The method will be
140
+     * called on demand, so please be sure to set $_formBuilt property to true to
141
+     * assure that the method works only once.
142
+     *
143
+     * @access public
144
+     * @abstract
145
+     */
146 146
     function buildForm()
147 147
     {
148 148
         $this->_formBuilt = true;
149 149
     }
150 150
 
151 151
 
152
-   /**
153
-    * Checks whether the form was already built.
154
-    *
155
-    * @access public
156
-    * @return bool
157
-    */
152
+    /**
153
+     * Checks whether the form was already built.
154
+     *
155
+     * @access public
156
+     * @return bool
157
+     */
158 158
     function isFormBuilt()
159 159
     {
160 160
         return $this->_formBuilt;
161 161
     }
162 162
 
163 163
 
164
-   /**
165
-    * Sets the default action invoked on page-form submit
166
-    *
167
-    * This is necessary as the user may just press Enter instead of
168
-    * clicking one of the named submit buttons and then no action name will
169
-    * be passed to the script.
170
-    *
171
-    * @access public
172
-    * @param  string    default action name
173
-    */
164
+    /**
165
+     * Sets the default action invoked on page-form submit
166
+     *
167
+     * This is necessary as the user may just press Enter instead of
168
+     * clicking one of the named submit buttons and then no action name will
169
+     * be passed to the script.
170
+     *
171
+     * @access public
172
+     * @param  string    default action name
173
+     */
174 174
     function setDefaultAction($actionName)
175 175
     {
176 176
         if ($this->elementExists('_qf_default')) {
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
     }
183 183
 
184 184
 
185
-   /**
186
-    * Returns 'safe' elements' values
187
-    *
188
-    * @param   mixed   Array/string of element names, whose values we want. If not set then return all elements.
189
-    * @param   bool    Whether to remove internal (_qf_...) values from the resultant array
190
-    */
185
+    /**
186
+     * Returns 'safe' elements' values
187
+     *
188
+     * @param   mixed   Array/string of element names, whose values we want. If not set then return all elements.
189
+     * @param   bool    Whether to remove internal (_qf_...) values from the resultant array
190
+     */
191 191
     function exportValues($elementList = null, $filterInternal = false)
192 192
     {
193 193
         $values = parent::exportValues($elementList);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     */
77 77
     function addAction($actionName, &$action)
78 78
     {
79
-        $this->_actions[$actionName] =& $action;
79
+        $this->_actions[$actionName] = & $action;
80 80
     }
81 81
 
82 82
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     */
110 110
     function getButtonName($actionName)
111 111
     {
112
-        return '_qf_' . $this->getAttribute('id') . '_' . $actionName;
112
+        return '_qf_'.$this->getAttribute('id').'_'.$actionName;
113 113
     }
114 114
 
115 115
 
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
     function setDefaultAction($actionName)
175 175
     {
176 176
         if ($this->elementExists('_qf_default')) {
177
-            $element =& $this->getElement('_qf_default');
178
-            $element->setValue($this->getAttribute('id') . ':' . $actionName);
177
+            $element = & $this->getElement('_qf_default');
178
+            $element->setValue($this->getAttribute('id').':'.$actionName);
179 179
         } else {
180
-            $this->addElement('hidden', '_qf_default', $this->getAttribute('id') . ':' . $actionName);
180
+            $this->addElement('hidden', '_qf_default', $this->getAttribute('id').':'.$actionName);
181 181
         }
182 182
     }
183 183
 
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/header.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 {
35 35
     // {{{ constructor
36 36
 
37
-   /**
38
-    * Class constructor
39
-    *
40
-    * @param string $elementName    Header name
41
-    * @param string $text           Header text
42
-    * @access public
43
-    * @return void
44
-    */
37
+    /**
38
+     * Class constructor
39
+     *
40
+     * @param string $elementName    Header name
41
+     * @param string $text           Header text
42
+     * @access public
43
+     * @return void
44
+     */
45 45
     function HTML_QuickForm_header($elementName = null, $text = null)
46 46
     {
47 47
         if (!empty($elementName)) {
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
     // }}}
55 55
     // {{{ accept()
56 56
 
57
-   /**
58
-    * Accepts a renderer
59
-    *
60
-    * @param HTML_QuickForm_Renderer    renderer object
61
-    * @access public
62
-    * @return void
63
-    */
57
+    /**
58
+     * Accepts a renderer
59
+     *
60
+     * @param HTML_QuickForm_Renderer    renderer object
61
+     * @access public
62
+     * @return void
63
+     */
64 64
     function accept(&$renderer, $required=false, $error=null)
65 65
     {
66 66
         $renderer->renderHeader($this);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     * @access public
62 62
     * @return void
63 63
     */
64
-    function accept(&$renderer, $required=false, $error=null)
64
+    function accept(&$renderer, $required = false, $error = null)
65 65
     {
66 66
         $renderer->renderHeader($this);
67 67
     } // end func accept
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/link.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * @return    void
61 61
      * @throws
62 62
      */
63
-    function HTML_QuickForm_link($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null)
63
+    function HTML_QuickForm_link($elementName = null, $elementLabel = null, $href = null, $text = null, $attributes = null)
64 64
     {
65 65
         parent::__construct($elementName, $elementLabel, $attributes);
66 66
         $this->_persistantFreeze = false;
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/advmultiselect.php 1 patch
Spacing   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         $sort = null
281 281
     ) {
282 282
         $opts = $options;
283
-        $options = null;  // prevent to use the default select element load options
283
+        $options = null; // prevent to use the default select element load options
284 284
 
285 285
         parent::__construct($elementName, $elementLabel, $options, $attributes);
286 286
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
         //$this->_tableAttributes = $this->_getAttrString($attr);
313 313
         $this->removeAttribute('class');
314
-        $this->setAttribute('class','form-control');
314
+        $this->setAttribute('class', 'form-control');
315 315
 
316 316
         // set default add button attributes
317 317
         $this->setButtonAttributes('add');
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     function setButtonAttributes($button, $attributes = null)
401 401
     {
402 402
         if (!is_string($button)) {
403
-            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::' .
403
+            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::'.
404 404
                 'setButtonAttributes is not a string',
405 405
                 HTML_QUICKFORM_ADVMULTISELECT_ERROR_INVALID_INPUT,
406 406
                 array('level' => 'exception'));
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
                 }
515 515
                 break;
516 516
             default;
517
-                return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::' .
517
+                return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::'.
518 518
                     'setButtonAttributes has unexpected value',
519 519
                     HTML_QUICKFORM_ADVMULTISELECT_ERROR_INVALID_INPUT,
520 520
                     array('level' => 'error'));
@@ -580,12 +580,12 @@  discard block
 block discarded – undo
580 580
         $css = str_replace('{id}', $id, $this->_elementCSS);
581 581
 
582 582
         if ($raw !== true) {
583
-            $css = '<style type="text/css">' . PHP_EOL
583
+            $css = '<style type="text/css">'.PHP_EOL
584 584
                 // Modified by Chamilo team, 16-MAR-2010.
585 585
                 //. '<!--' . $css . '// -->'  . PHP_EOL
586
-                . '/*<![CDATA[*/' . PHP_EOL
587
-                . $css . PHP_EOL
588
-                . '/*]]>*/'  . PHP_EOL
586
+                . '/*<![CDATA[*/'.PHP_EOL
587
+                . $css.PHP_EOL
588
+                . '/*]]>*/'.PHP_EOL
589 589
                 //
590 590
                 . '</style>';
591 591
         }
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
         $tab = $this->_getTab();
610 610
 
611 611
         $selectId       = $this->getName();
612
-        $selectName     = $this->getName() . '[]';
613
-        $selectNameFrom = $this->getName() . '-f[]';
614
-        $selectNameTo   = $this->getName() . '-t[]';
612
+        $selectName     = $this->getName().'[]';
613
+        $selectNameFrom = $this->getName().'-f[]';
614
+        $selectNameTo   = $this->getName().'-t[]';
615 615
         $selected_count = 0;
616 616
 
617 617
         // placeholder {unselected} existence determines if we will render
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 
622 622
             $id = $this->getAttribute('name');
623 623
 
624
-            $strHtmlSelected  = $tab . '<div id="qfams_'.$id.'">'  . PHP_EOL;
624
+            $strHtmlSelected  = $tab.'<div id="qfams_'.$id.'">'.PHP_EOL;
625 625
             $unselected_count = count($this->_options);
626 626
             $checkbox_id_suffix = 0;
627 627
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
                 }
638 638
 
639 639
                 if (is_array($this->_values)
640
-                    && in_array((string)$option['attr']['value'], $this->_values)) {
640
+                    && in_array((string) $option['attr']['value'], $this->_values)) {
641 641
                     // The items is *selected*
642 642
                     $checked = ' checked="checked"';
643 643
                     $selected_count++;
@@ -648,16 +648,16 @@  discard block
 block discarded – undo
648 648
                 $checkbox_id_suffix++;
649 649
                 $strHtmlSelected .= $tab
650 650
                     .  '<label'
651
-                    .  $this->_getAttrString($labelAttributes) .'>'
651
+                    .  $this->_getAttrString($labelAttributes).'>'
652 652
                     .  '<input type="checkbox"'
653
-                    .  ' id="'.$selectId . $checkbox_id_suffix.'"'
653
+                    .  ' id="'.$selectId.$checkbox_id_suffix.'"'
654 654
                     .  ' name="'.$selectName.'"'
655 655
                     .  $checked
656 656
                     .  $this->_getAttrString($option['attr'])
657
-                    .  ' />' .  $option['text'] . '</label>'
657
+                    .  ' />'.$option['text'].'</label>'
658 658
                     .  PHP_EOL;
659 659
             }
660
-            $strHtmlSelected .= $tab . '</div>'. PHP_EOL;
660
+            $strHtmlSelected .= $tab.'</div>'.PHP_EOL;
661 661
 
662 662
             $strHtmlHidden     = '';
663 663
             $strHtmlUnselected = '';
@@ -665,25 +665,25 @@  discard block
 block discarded – undo
665 665
             $strHtmlRemove     = '';
666 666
 
667 667
             // build the select all button with all its attributes
668
-            $jsName     = $this->_jsPrefix . $this->_jsPostfix;
669
-            $attributes = array('onclick' => $jsName ."('". $selectId ."', 1);");
668
+            $jsName     = $this->_jsPrefix.$this->_jsPostfix;
669
+            $attributes = array('onclick' => $jsName."('".$selectId."', 1);");
670 670
             $this->_allButtonAttributes = array_merge($this->_allButtonAttributes, $attributes);
671 671
             $attrStrAll = $this->_getAttrString($this->_allButtonAttributes);
672
-            $strHtmlAll = "<input$attrStrAll />". PHP_EOL;
672
+            $strHtmlAll = "<input$attrStrAll />".PHP_EOL;
673 673
 
674 674
             // build the select none button with all its attributes
675
-            $attributes = array('onclick' => $jsName ."('". $selectId ."', 0);");
675
+            $attributes = array('onclick' => $jsName."('".$selectId."', 0);");
676 676
             $this->_noneButtonAttributes
677 677
                 = array_merge($this->_noneButtonAttributes, $attributes);
678 678
             $attrStrNone = $this->_getAttrString($this->_noneButtonAttributes);
679
-            $strHtmlNone = "<input$attrStrNone />". PHP_EOL;
679
+            $strHtmlNone = "<input$attrStrNone />".PHP_EOL;
680 680
 
681 681
             // build the toggle selection button with all its attributes
682
-            $attributes = array('onclick' => $jsName .
683
-                "('". $selectId ."', 2);");
682
+            $attributes = array('onclick' => $jsName.
683
+                "('".$selectId."', 2);");
684 684
             $this->_toggleButtonAttributes = array_merge($this->_toggleButtonAttributes, $attributes);
685 685
             $attrStrToggle = $this->_getAttrString($this->_toggleButtonAttributes);
686
-            $strHtmlToggle = "<input$attrStrToggle />". PHP_EOL;
686
+            $strHtmlToggle = "<input$attrStrToggle />".PHP_EOL;
687 687
 
688 688
             $strHtmlMoveUp      = '';
689 689
             $strHtmlMoveDown    = '';
@@ -691,21 +691,21 @@  discard block
 block discarded – undo
691 691
             $strHtmlMoveBottom  = '';
692 692
 
693 693
             // default selection counters
694
-            $strHtmlSelectedCount = $selected_count . '/' . $unselected_count;
694
+            $strHtmlSelectedCount = $selected_count.'/'.$unselected_count;
695 695
         } else {
696 696
             // ... or a dual multi-select
697 697
             $this->_jsPostfix = 'moveSelection';
698
-            $jsName           = $this->_jsPrefix . $this->_jsPostfix;
698
+            $jsName           = $this->_jsPrefix.$this->_jsPostfix;
699 699
 
700 700
             // set name of Select From Box
701 701
             $this->_attributesUnselected
702
-                = array('id' => $selectId . '-f',
702
+                = array('id' => $selectId.'-f',
703 703
                 'name' => $selectNameFrom,
704
-                'ondblclick' => $jsName .
704
+                'ondblclick' => $jsName.
705 705
                     "('{$selectId}', ".
706
-                    "this.form.elements['" . $selectNameFrom . "'], " .
707
-                    "this.form.elements['" . $selectNameTo . "'], " .
708
-                    "this.form.elements['" . $selectName . "'], " .
706
+                    "this.form.elements['".$selectNameFrom."'], ".
707
+                    "this.form.elements['".$selectNameTo."'], ".
708
+                    "this.form.elements['".$selectName."'], ".
709 709
                     "'add', '{$this->_sort}')");
710 710
             $this->_attributesUnselected
711 711
                 = array_merge($this->_attributes, $this->_attributesUnselected);
@@ -713,13 +713,13 @@  discard block
 block discarded – undo
713 713
 
714 714
             // set name of Select To Box
715 715
             $this->_attributesSelected
716
-                = array('id' => $selectId . '-t',
716
+                = array('id' => $selectId.'-t',
717 717
                 'name' => $selectNameTo,
718
-                'ondblclick' => $jsName .
719
-                    "('{$selectId}', " .
720
-                    "this.form.elements['" . $selectNameFrom . "'], " .
721
-                    "this.form.elements['" . $selectNameTo . "'], ".
722
-                    "this.form.elements['" . $selectName . "'], " .
718
+                'ondblclick' => $jsName.
719
+                    "('{$selectId}', ".
720
+                    "this.form.elements['".$selectNameFrom."'], ".
721
+                    "this.form.elements['".$selectNameTo."'], ".
722
+                    "this.form.elements['".$selectName."'], ".
723 723
                     "'remove', '{$this->_sort}')");
724 724
             $this->_attributesSelected
725 725
                 = array_merge($this->_attributes, $this->_attributesSelected);
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
             // set name of Select hidden Box
729 729
             $this->_attributesHidden
730 730
                 = array('name' => $selectName,
731
-                'style' => 'overflow: hidden; visibility: hidden; ' .
731
+                'style' => 'overflow: hidden; visibility: hidden; '.
732 732
                     'width: 1px; height: 0;');
733 733
             $this->_attributesHidden
734 734
                 = array_merge($this->_attributes, $this->_attributesHidden);
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 
750 750
                 foreach ($this->_options as $option) {
751 751
                     if (is_array($this->_values)
752
-                        && in_array((string)$option['attr']['value'],
752
+                        && in_array((string) $option['attr']['value'],
753 753
                             $this->_values)) {
754 754
                         // Get the post order
755 755
                         $key = array_search($option['attr']['value'],
@@ -787,13 +787,13 @@  discard block
 block discarded – undo
787 787
                     = array_merge($this->_attributes, $this->_attributesUnselected);
788 788
                 $attrUnselected = $this->_getAttrString($this->_attributesUnselected);
789 789
             }
790
-            $strHtmlUnselected = "<select$attrUnselected>". PHP_EOL;
790
+            $strHtmlUnselected = "<select$attrUnselected>".PHP_EOL;
791 791
             if ($unselected_count > 0) {
792 792
                 foreach ($arrHtmlUnselected as $data) {
793 793
                     $strHtmlUnselected
794
-                        .= $tabs . $tab
795
-                        . '<option' . $this->_getAttrString($data['attr']) . '>'
796
-                        . $data['text'] . '</option>' . PHP_EOL;
794
+                        .= $tabs.$tab
795
+                        . '<option'.$this->_getAttrString($data['attr']).'>'
796
+                        . $data['text'].'</option>'.PHP_EOL;
797 797
                 }
798 798
             } else {
799 799
                 $strHtmlUnselected .= '<option value="">&nbsp;</option>';
@@ -813,19 +813,19 @@  discard block
 block discarded – undo
813 813
             $strHtmlSelected = "<select$attrSelected>";
814 814
             if ($selected_count > 0) {
815 815
                 foreach ($arrHtmlSelected as $data) {
816
-                    $attribute  = null;
816
+                    $attribute = null;
817 817
                     if (isset($data['attr'])) {
818 818
                         $attribute = $this->_getAttrString($data['attr']);
819 819
                     }
820 820
 
821
-                    $text  = null;
821
+                    $text = null;
822 822
                     if (isset($data['text'])) {
823 823
                         $text = $data['text'];
824 824
                     }
825 825
                     $strHtmlSelected
826
-                        .= $tabs . $tab
827
-                        . '<option' . $attribute. '>'
828
-                        . $text . '</option>';
826
+                        .= $tabs.$tab
827
+                        . '<option'.$attribute.'>'
828
+                        . $text.'</option>';
829 829
                 }
830 830
             } else {
831 831
                 $strHtmlSelected .= '<option value="">&nbsp;</option>';
@@ -835,32 +835,32 @@  discard block
 block discarded – undo
835 835
             $strHtmlSelected = '<input placeholder="'.get_lang('Search').'" id="'.$selectId.'-t-filter" type="text" class="form-control search-query select_class_filter"><br />'.$strHtmlSelected;
836 836
 
837 837
             // The 'hidden' multi-select
838
-            $strHtmlHidden = "<select$attrHidden>". PHP_EOL;
838
+            $strHtmlHidden = "<select$attrHidden>".PHP_EOL;
839 839
             if (count($arrHtmlHidden) > 0) {
840 840
                 foreach ($arrHtmlHidden as $data) {
841
-                    $attribute  = null;
841
+                    $attribute = null;
842 842
                     if (isset($data['attr'])) {
843 843
                         $attribute = $this->_getAttrString($data['attr']);
844 844
                     }
845
-                    $text  = null;
845
+                    $text = null;
846 846
                     if (isset($data['text'])) {
847 847
                         $text = $data['text'];
848 848
                     }
849 849
                     $strHtmlHidden
850
-                        .= $tabs . $tab
851
-                        . '<option' . $attribute . '>'
852
-                        . $text . '</option>' . PHP_EOL;
850
+                        .= $tabs.$tab
851
+                        . '<option'.$attribute.'>'
852
+                        . $text.'</option>'.PHP_EOL;
853 853
                 }
854 854
             }
855 855
             $strHtmlHidden .= '</select>';
856 856
 
857 857
             // build the remove button with all its attributes
858 858
             $attributes
859
-                = array('onclick' => $jsName .
860
-                "('{$selectId}', " .
861
-                "this.form.elements['" . $selectNameFrom . "'], " .
862
-                "this.form.elements['" . $selectNameTo . "'], " .
863
-                "this.form.elements['" . $selectName . "'], " .
859
+                = array('onclick' => $jsName.
860
+                "('{$selectId}', ".
861
+                "this.form.elements['".$selectNameFrom."'], ".
862
+                "this.form.elements['".$selectNameTo."'], ".
863
+                "this.form.elements['".$selectName."'], ".
864 864
                 "'remove', '{$this->_sort}'); return false;");
865 865
             $this->_removeButtonAttributes
866 866
                 = array_merge($this->_removeButtonAttributes, $attributes);
@@ -869,11 +869,11 @@  discard block
 block discarded – undo
869 869
 
870 870
             // build the add button with all its attributes
871 871
             $attributes
872
-                = array('onclick' => $jsName .
873
-                "('{$selectId}', " .
874
-                "this.form.elements['" . $selectNameFrom . "'], " .
875
-                "this.form.elements['" . $selectNameTo . "'], " .
876
-                "this.form.elements['" . $selectName . "'], " .
872
+                = array('onclick' => $jsName.
873
+                "('{$selectId}', ".
874
+                "this.form.elements['".$selectNameFrom."'], ".
875
+                "this.form.elements['".$selectNameTo."'], ".
876
+                "this.form.elements['".$selectName."'], ".
877 877
                 "'add', '{$this->_sort}'); return false;");
878 878
             $this->_addButtonAttributes = array_merge($this->_addButtonAttributes, $attributes);
879 879
             $attrStrAdd = $this->_getAttrString($this->_addButtonAttributes);
@@ -881,93 +881,93 @@  discard block
 block discarded – undo
881 881
 
882 882
             // build the select all button with all its attributes
883 883
             $attributes
884
-                = array('onclick' => $jsName .
885
-                "('{$selectId}', " .
886
-                "this.form.elements['" . $selectNameFrom . "'], " .
887
-                "this.form.elements['" . $selectNameTo . "'], " .
888
-                "this.form.elements['" . $selectName . "'], " .
884
+                = array('onclick' => $jsName.
885
+                "('{$selectId}', ".
886
+                "this.form.elements['".$selectNameFrom."'], ".
887
+                "this.form.elements['".$selectNameTo."'], ".
888
+                "this.form.elements['".$selectName."'], ".
889 889
                 "'all', '{$this->_sort}'); return false;");
890 890
             $this->_allButtonAttributes = array_merge($this->_allButtonAttributes, $attributes);
891 891
             $attrStrAll = $this->_getAttrString($this->_allButtonAttributes);
892
-            $strHtmlAll = "<input$attrStrAll />". PHP_EOL;
892
+            $strHtmlAll = "<input$attrStrAll />".PHP_EOL;
893 893
 
894 894
             // build the select none button with all its attributes
895 895
             $attributes
896
-                = array('onclick' => $jsName .
897
-                "('{$selectId}', " .
898
-                "this.form.elements['" . $selectNameFrom . "'], " .
899
-                "this.form.elements['" . $selectNameTo . "'], " .
900
-                "this.form.elements['" . $selectName . "'], " .
896
+                = array('onclick' => $jsName.
897
+                "('{$selectId}', ".
898
+                "this.form.elements['".$selectNameFrom."'], ".
899
+                "this.form.elements['".$selectNameTo."'], ".
900
+                "this.form.elements['".$selectName."'], ".
901 901
                 "'none', '{$this->_sort}'); return false;");
902 902
             $this->_noneButtonAttributes
903 903
                 = array_merge($this->_noneButtonAttributes, $attributes);
904 904
             $attrStrNone = $this->_getAttrString($this->_noneButtonAttributes);
905
-            $strHtmlNone = "<input$attrStrNone />". PHP_EOL;
905
+            $strHtmlNone = "<input$attrStrNone />".PHP_EOL;
906 906
 
907 907
             // build the toggle button with all its attributes
908 908
             $attributes
909
-                = array('onclick' => $jsName .
910
-                "('{$selectId}', " .
911
-                "this.form.elements['" . $selectNameFrom . "'], " .
912
-                "this.form.elements['" . $selectNameTo . "'], " .
913
-                "this.form.elements['" . $selectName . "'], " .
909
+                = array('onclick' => $jsName.
910
+                "('{$selectId}', ".
911
+                "this.form.elements['".$selectNameFrom."'], ".
912
+                "this.form.elements['".$selectNameTo."'], ".
913
+                "this.form.elements['".$selectName."'], ".
914 914
                 "'toggle', '{$this->_sort}'); return false;");
915 915
             $this->_toggleButtonAttributes
916 916
                 = array_merge($this->_toggleButtonAttributes, $attributes);
917 917
             $attrStrToggle = $this->_getAttrString($this->_toggleButtonAttributes);
918
-            $strHtmlToggle = "<input$attrStrToggle />". PHP_EOL;
918
+            $strHtmlToggle = "<input$attrStrToggle />".PHP_EOL;
919 919
 
920 920
             // build the move up button with all its attributes
921 921
             $attributes
922
-                = array('onclick' => "{$this->_jsPrefix}moveUp" .
923
-                "(this.form.elements['" . $selectNameTo . "'], " .
924
-                "this.form.elements['" . $selectName . "']); " .
922
+                = array('onclick' => "{$this->_jsPrefix}moveUp".
923
+                "(this.form.elements['".$selectNameTo."'], ".
924
+                "this.form.elements['".$selectName."']); ".
925 925
                 "return false;");
926 926
             $this->_upButtonAttributes
927 927
                 = array_merge($this->_upButtonAttributes, $attributes);
928 928
             $attrStrUp     = $this->_getAttrString($this->_upButtonAttributes);
929
-            $strHtmlMoveUp = "<input$attrStrUp />". PHP_EOL;
929
+            $strHtmlMoveUp = "<input$attrStrUp />".PHP_EOL;
930 930
 
931 931
             // build the move down button with all its attributes
932 932
             $attributes
933
-                = array('onclick' => "{$this->_jsPrefix}moveDown" .
934
-                "(this.form.elements['" . $selectNameTo . "'], " .
935
-                "this.form.elements['" . $selectName . "']); " .
933
+                = array('onclick' => "{$this->_jsPrefix}moveDown".
934
+                "(this.form.elements['".$selectNameTo."'], ".
935
+                "this.form.elements['".$selectName."']); ".
936 936
                 "return false;");
937 937
             $this->_downButtonAttributes
938 938
                 = array_merge($this->_downButtonAttributes, $attributes);
939 939
             $attrStrDown     = $this->_getAttrString($this->_downButtonAttributes);
940
-            $strHtmlMoveDown = "<input$attrStrDown />". PHP_EOL;
940
+            $strHtmlMoveDown = "<input$attrStrDown />".PHP_EOL;
941 941
 
942 942
             // build the move top button with all its attributes
943 943
             $attributes
944
-                = array('onclick' => "{$this->_jsPrefix}moveTop" .
945
-                "(this.form.elements['" . $selectNameTo . "'], " .
946
-                "this.form.elements['" . $selectName . "']); " .
944
+                = array('onclick' => "{$this->_jsPrefix}moveTop".
945
+                "(this.form.elements['".$selectNameTo."'], ".
946
+                "this.form.elements['".$selectName."']); ".
947 947
                 "return false;");
948 948
             $this->_topButtonAttributes
949 949
                 = array_merge($this->_topButtonAttributes, $attributes);
950 950
             $attrStrTop     = $this->_getAttrString($this->_topButtonAttributes);
951
-            $strHtmlMoveTop = "<input$attrStrTop />". PHP_EOL;
951
+            $strHtmlMoveTop = "<input$attrStrTop />".PHP_EOL;
952 952
 
953 953
             // build the move bottom button with all its attributes
954 954
             $attributes
955
-                = array('onclick' => "{$this->_jsPrefix}moveBottom" .
956
-                "(this.form.elements['" . $selectNameTo . "'], " .
957
-                "this.form.elements['" . $selectName . "']); " .
955
+                = array('onclick' => "{$this->_jsPrefix}moveBottom".
956
+                "(this.form.elements['".$selectNameTo."'], ".
957
+                "this.form.elements['".$selectName."']); ".
958 958
                 "return false;");
959 959
             $this->_bottomButtonAttributes
960 960
                 = array_merge($this->_bottomButtonAttributes, $attributes);
961 961
             $attrStrBottom     = $this->_getAttrString($this->_bottomButtonAttributes);
962
-            $strHtmlMoveBottom = "<input$attrStrBottom />". PHP_EOL;
962
+            $strHtmlMoveBottom = "<input$attrStrBottom />".PHP_EOL;
963 963
 
964 964
             // default selection counters
965 965
             $strHtmlSelectedCount = $selected_count;
966 966
         }
967 967
         $strHtmlUnselectedCount = $unselected_count;
968 968
 
969
-        $strHtmlSelectedCountId   = $selectId .'_selected';
970
-        $strHtmlUnselectedCountId = $selectId .'_unselected';
969
+        $strHtmlSelectedCountId   = $selectId.'_selected';
970
+        $strHtmlUnselectedCountId = $selectId.'_unselected';
971 971
 
972 972
         // render all part of the multi select component with the template
973 973
         $strHtml = $this->_elementTemplate;
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
         // render extra labels, if any
981 981
         if (is_array($labels)) {
982 982
             foreach ($labels as $key => $text) {
983
-                $key     = is_int($key)? $key + 2: $key;
983
+                $key     = is_int($key) ? $key + 2 : $key;
984 984
                 $strHtml = str_replace("{label_{$key}}", $text, $strHtml);
985 985
                 $strHtml = str_replace("<!-- BEGIN label_{$key} -->", '', $strHtml);
986 986
                 $strHtml = str_replace("<!-- END label_{$key} -->", '', $strHtml);
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
         $comment = $this->getComment();
1052 1052
 
1053 1053
         if (!empty($comment)) {
1054
-            $strHtml = $tabs . '<!-- ' . $comment . " //-->" . PHP_EOL . $strHtml;
1054
+            $strHtml = $tabs.'<!-- '.$comment." //-->".PHP_EOL.$strHtml;
1055 1055
         }
1056 1056
 
1057 1057
 
@@ -1087,10 +1087,10 @@  discard block
 block discarded – undo
1087 1087
 
1088 1088
         if ($raw !== true) {
1089 1089
             $js = '<script type="text/javascript">'
1090
-                . PHP_EOL . '//<![CDATA['
1091
-                . PHP_EOL . $js
1092
-                . PHP_EOL . '//]]>'
1093
-                . PHP_EOL . '</script>'
1090
+                . PHP_EOL.'//<![CDATA['
1091
+                . PHP_EOL.$js
1092
+                . PHP_EOL.'//]]>'
1093
+                . PHP_EOL.'</script>'
1094 1094
                 . PHP_EOL;
1095 1095
         }
1096 1096
 
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
     function loadArray($arr, $values = null)
1145 1145
     {
1146 1146
         if (!is_array($arr)) {
1147
-            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::' .
1147
+            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::'.
1148 1148
                 'loadArray is not a valid array',
1149 1149
                 HTML_QUICKFORM_ADVMULTISELECT_ERROR_INVALID_INPUT,
1150 1150
                 array('level' => 'exception'));
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
     function setPersistantOptions($optionValues, $persistant = true)
1182 1182
     {
1183 1183
         if (!is_bool($persistant)) {
1184
-            return PEAR::throwError('Argument 2 of HTML_QuickForm_advmultiselect::' .
1184
+            return PEAR::throwError('Argument 2 of HTML_QuickForm_advmultiselect::'.
1185 1185
                 'setPersistantOptions is not a boolean',
1186 1186
                 HTML_QUICKFORM_ADVMULTISELECT_ERROR_INVALID_INPUT,
1187 1187
                 array('level' => 'exception'));
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
             $optionValues = array($optionValues);
1191 1191
         }
1192 1192
         if (!is_array($optionValues)) {
1193
-            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::' .
1193
+            return PEAR::throwError('Argument 1 of HTML_QuickForm_advmultiselect::'.
1194 1194
                 'setPersistantOptions is not a valid array',
1195 1195
                 HTML_QUICKFORM_ADVMULTISELECT_ERROR_INVALID_INPUT,
1196 1196
                 array('level' => 'exception'));
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/advcheckbox.php 3 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
     // }}}
157 157
     // {{{ setValue()
158 158
 
159
-   /**
160
-    * Sets the element's value
161
-    *
162
-    * @param    mixed   Element's value
163
-    * @access   public
164
-    */
159
+    /**
160
+     * Sets the element's value
161
+     *
162
+     * @param    mixed   Element's value
163
+     * @access   public
164
+     */
165 165
     function setValue($value)
166 166
     {
167 167
         $this->setChecked(isset($this->_values[1]) && $value == $this->_values[1]);
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
     // }}}
172 172
     // {{{ getValue()
173 173
 
174
-   /**
175
-    * Returns the element's value
176
-    *
177
-    * @access   public
178
-    * @return   mixed
179
-    */
174
+    /**
175
+     * Returns the element's value
176
+     *
177
+     * @access   public
178
+     * @return   mixed
179
+     */
180 180
     function getValue()
181 181
     {
182 182
         if (is_array($this->_values)) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                         'type'  => 'hidden',
206 206
                         'name'  => $this->getName(),
207 207
                         'value' => $this->_values[0]
208
-                   )) . ' />' . parent::toHtml();
208
+                    )) . ' />' . parent::toHtml();
209 209
 
210 210
         }
211 211
     } //end func toHtml
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
     // }}}
214 214
     // {{{ getFrozenHtml()
215 215
 
216
-   /**
217
-    * Unlike checkbox, this has to append a hidden input in both
218
-    * checked and non-checked states
219
-    */
216
+    /**
217
+     * Unlike checkbox, this has to append a hidden input in both
218
+     * checked and non-checked states
219
+     */
220 220
     function getFrozenHtml()
221 221
     {
222 222
         return ($this->getChecked()? '<tt>[x]</tt>': '<tt>[ ]</tt>') .
223
-               $this->_getPersistantData();
223
+                $this->_getPersistantData();
224 224
     }
225 225
 
226 226
     // }}}
@@ -262,10 +262,10 @@  discard block
 block discarded – undo
262 262
     // }}}
263 263
     // {{{ exportValue()
264 264
 
265
-   /**
266
-    * This element has a value even if it is not checked, thus we override
267
-    * checkbox's behaviour here
268
-    */
265
+    /**
266
+     * This element has a value even if it is not checked, thus we override
267
+     * checkbox's behaviour here
268
+     */
269 269
     function exportValue(&$submitValues, $assoc)
270 270
     {
271 271
         $value = $this->_findValue($submitValues);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * @access    public
82 82
      * @return    void
83 83
      */
84
-    function HTML_QuickForm_advcheckbox($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null)
84
+    function HTML_QuickForm_advcheckbox($elementName = null, $elementLabel = null, $text = null, $attributes = null, $values = null)
85 85
     {
86 86
         $this->HTML_QuickForm_checkbox($elementName, $elementLabel, $text, $attributes);
87 87
         $this->setValues($values);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     function getValue()
181 181
     {
182 182
         if (is_array($this->_values)) {
183
-            return $this->_values[$this->getChecked()? 1: 0];
183
+            return $this->_values[$this->getChecked() ? 1 : 0];
184 184
         } else {
185 185
             return null;
186 186
         }
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
         if ($this->_flagFrozen) {
202 202
             return parent::toHtml();
203 203
         } else {
204
-            return '<input' . $this->_getAttrString(array(
204
+            return '<input'.$this->_getAttrString(array(
205 205
                         'type'  => 'hidden',
206 206
                         'name'  => $this->getName(),
207 207
                         'value' => $this->_values[0]
208
-                   )) . ' />' . parent::toHtml();
208
+                   )).' />'.parent::toHtml();
209 209
 
210 210
         }
211 211
     } //end func toHtml
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     */
220 220
     function getFrozenHtml()
221 221
     {
222
-        return ($this->getChecked()? '<tt>[x]</tt>': '<tt>[ ]</tt>') .
222
+        return ($this->getChecked() ? '<tt>[x]</tt>' : '<tt>[ ]</tt>').
223 223
                $this->_getPersistantData();
224 224
     }
225 225
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * Freeze the element so that only its value is returned
61 61
      *
62 62
      * @access    public
63
-     * @return    void
63
+     * @return    boolean
64 64
      */
65 65
     function freeze()
66 66
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/html.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,26 +37,26 @@
 block discarded – undo
37 37
 class HTML_QuickForm_html extends HTML_QuickForm_static
38 38
 {
39 39
 
40
-   /**
41
-    * Class constructor
42
-    *
43
-    * @param string $text   raw HTML to add
44
-    * @access public
45
-    * @return void
46
-    */
40
+    /**
41
+     * Class constructor
42
+     *
43
+     * @param string $text   raw HTML to add
44
+     * @access public
45
+     * @return void
46
+     */
47 47
     public function __construct($text = null)
48 48
     {
49 49
         parent::__construct(null, null, $text);
50 50
         $this->_type = 'html';
51 51
     }
52 52
 
53
-   /**
54
-    * Accepts a renderer
55
-    *
56
-    * @param HTML_QuickForm_Renderer    renderer object (only works with Default renderer!)
57
-    * @access public
58
-    * @return void
59
-    */
53
+    /**
54
+     * Accepts a renderer
55
+     *
56
+     * @param HTML_QuickForm_Renderer    renderer object (only works with Default renderer!)
57
+     * @access public
58
+     * @return void
59
+     */
60 60
     public function accept(&$renderer, $required = false, $error = null)
61 61
     {
62 62
         $renderer->renderHtml($this);
Please login to merge, or discard this patch.