Passed
Push — 1.10.x ( 6bd950...f9cbcd )
by Yannick
619:37 queued 578:35
created
main/inc/lib/pear/HTML/QuickForm.php 1 patch
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -630,8 +630,8 @@  discard block
 block discarded – undo
630 630
     public function &addElement($element)
631 631
     {
632 632
         if (is_object($element) && is_subclass_of($element, 'html_quickform_element')) {
633
-           $elementObject = &$element;
634
-           $elementObject->onQuickFormEvent('updateValue', null, $this);
633
+            $elementObject = &$element;
634
+            $elementObject->onQuickFormEvent('updateValue', null, $this);
635 635
         } else {
636 636
             $args = func_get_args();
637 637
             $elementObject =& $this->_loadElement('addElement', $element, array_slice($args, 1));
@@ -676,22 +676,22 @@  discard block
 block discarded – undo
676 676
     // }}}
677 677
     // {{{ insertElementBefore()
678 678
 
679
-   /**
680
-    * Inserts a new element right before the other element
681
-    *
682
-    * Warning: it is not possible to check whether the $element is already
683
-    * added to the form, therefore if you want to move the existing form
684
-    * element to a new position, you'll have to use removeElement():
685
-    * $form->insertElementBefore($form->removeElement('foo', false), 'bar');
686
-    *
687
-    * @access   public
688
-    * @since    3.2.4
689
-    * @param    HTML_QuickForm_element  Element to insert
690
-    * @param    string                  Name of the element before which the new
691
-    *                                   one is inserted
692
-    * @return   HTML_QuickForm_element  reference to inserted element
693
-    * @throws   HTML_QuickForm_Error
694
-    */
679
+    /**
680
+     * Inserts a new element right before the other element
681
+     *
682
+     * Warning: it is not possible to check whether the $element is already
683
+     * added to the form, therefore if you want to move the existing form
684
+     * element to a new position, you'll have to use removeElement():
685
+     * $form->insertElementBefore($form->removeElement('foo', false), 'bar');
686
+     *
687
+     * @access   public
688
+     * @since    3.2.4
689
+     * @param    HTML_QuickForm_element  Element to insert
690
+     * @param    string                  Name of the element before which the new
691
+     *                                   one is inserted
692
+     * @return   HTML_QuickForm_element  reference to inserted element
693
+     * @throws   HTML_QuickForm_Error
694
+     */
695 695
     function &insertElementBefore(&$element, $nameAfter)
696 696
     {
697 697
         if (!empty($this->_duplicateIndex[$nameAfter])) {
@@ -870,9 +870,9 @@  discard block
 block discarded – undo
870 870
             if ((is_array($value) || null === $value) && isset($this->_submitFiles[$base])) {
871 871
                 $props = array('name', 'type', 'size', 'tmp_name', 'error');
872 872
                 $code  = "if (!isset(\$this->_submitFiles['{$base}']['name']{$idx})) {\n" .
873
-                         "    return null;\n" .
874
-                         "} else {\n" .
875
-                         "    \$v = array();\n";
873
+                            "    return null;\n" .
874
+                            "} else {\n" .
875
+                            "    \$v = array();\n";
876 876
                 foreach ($props as $prop) {
877 877
                     $code .= "    \$v = HTML_QuickForm::arrayMerge(\$v, \$this->_reindexFiles(\$this->_submitFiles['{$base}']['{$prop}']{$idx}, '{$prop}'));\n";
878 878
                 }
@@ -917,13 +917,13 @@  discard block
 block discarded – undo
917 917
         return $value;
918 918
     }
919 919
 
920
-   /**
921
-    * A helper function to change the indexes in $_FILES array
922
-    *
923
-    * @param  mixed   Some value from the $_FILES array
924
-    * @param  string  The key from the $_FILES array that should be appended
925
-    * @return array
926
-    */
920
+    /**
921
+     * A helper function to change the indexes in $_FILES array
922
+     *
923
+     * @param  mixed   Some value from the $_FILES array
924
+     * @param  string  The key from the $_FILES array that should be appended
925
+     * @return array
926
+     */
927 927
     function _reindexFiles($value, $key)
928 928
     {
929 929
         if (!is_array($value)) {
@@ -976,27 +976,27 @@  discard block
 block discarded – undo
976 976
         }
977 977
     } // end func setElementError
978 978
 
979
-     // }}}
980
-     // {{{ getElementType()
981
-
982
-     /**
983
-      * Returns the type of the given element
984
-      *
985
-      * @param      string    $element    Name of form element
986
-      * @since      1.1
987
-      * @access     public
988
-      * @return     string    Type of the element, false if the element is not found
989
-      */
990
-     function getElementType($element)
991
-     {
992
-         if (isset($this->_elementIndex[$element])) {
993
-             return $this->_elements[$this->_elementIndex[$element]]->getType();
994
-         }
995
-         return false;
996
-     } // end func getElementType
997
-
998
-     // }}}
999
-     // {{{ updateElementAttr()
979
+        // }}}
980
+        // {{{ getElementType()
981
+
982
+        /**
983
+         * Returns the type of the given element
984
+         *
985
+         * @param      string    $element    Name of form element
986
+         * @since      1.1
987
+         * @access     public
988
+         * @return     string    Type of the element, false if the element is not found
989
+         */
990
+        function getElementType($element)
991
+        {
992
+            if (isset($this->_elementIndex[$element])) {
993
+                return $this->_elements[$this->_elementIndex[$element]]->getType();
994
+            }
995
+            return false;
996
+        } // end func getElementType
997
+
998
+        // }}}
999
+        // {{{ updateElementAttr()
1000 1000
 
1001 1001
     /**
1002 1002
      * Updates Attributes for one or more elements
@@ -1263,18 +1263,18 @@  discard block
 block discarded – undo
1263 1263
     // }}}
1264 1264
     // {{{ addFormRule()
1265 1265
 
1266
-   /**
1267
-    * Adds a global validation rule
1268
-    *
1269
-    * This should be used when for a rule involving several fields or if
1270
-    * you want to use some completely custom validation for your form.
1271
-    * The rule function/method should return true in case of successful
1272
-    * validation and array('element name' => 'error') when there were errors.
1273
-    *
1274
-    * @access   public
1275
-    * @param    mixed   Callback, either function name or array(&$object, 'method')
1276
-    * @throws   HTML_QuickForm_Error
1277
-    */
1266
+    /**
1267
+     * Adds a global validation rule
1268
+     *
1269
+     * This should be used when for a rule involving several fields or if
1270
+     * you want to use some completely custom validation for your form.
1271
+     * The rule function/method should return true in case of successful
1272
+     * validation and array('element name' => 'error') when there were errors.
1273
+     *
1274
+     * @access   public
1275
+     * @param    mixed   Callback, either function name or array(&$object, 'method')
1276
+     * @throws   HTML_QuickForm_Error
1277
+     */
1278 1278
     function addFormRule($rule)
1279 1279
     {
1280 1280
         if (!is_callable($rule)) {
@@ -1351,18 +1351,18 @@  discard block
 block discarded – undo
1351 1351
     // }}}
1352 1352
     // {{{ arrayMerge()
1353 1353
 
1354
-   /**
1355
-    * Merges two arrays
1356
-    *
1357
-    * Merges two array like the PHP function array_merge but recursively.
1358
-    * The main difference is that existing keys will not be renumbered
1359
-    * if they are integers.
1360
-    *
1361
-    * @access   public
1362
-    * @param    array   $a  original array
1363
-    * @param    array   $b  array which will be merged into first one
1364
-    * @return   array   merged array
1365
-    */
1354
+    /**
1355
+     * Merges two arrays
1356
+     *
1357
+     * Merges two array like the PHP function array_merge but recursively.
1358
+     * The main difference is that existing keys will not be renumbered
1359
+     * if they are integers.
1360
+     *
1361
+     * @access   public
1362
+     * @param    array   $a  original array
1363
+     * @param    array   $b  array which will be merged into first one
1364
+     * @return   array   merged array
1365
+     */
1366 1366
     static function arrayMerge($a, $b)
1367 1367
     {
1368 1368
         foreach ($b as $k => $v) {
@@ -1496,10 +1496,10 @@  discard block
 block discarded – undo
1496 1496
      */
1497 1497
     function isElementFrozen($element)
1498 1498
     {
1499
-         if (isset($this->_elementIndex[$element])) {
1500
-             return $this->_elements[$this->_elementIndex[$element]]->isFrozen();
1501
-         }
1502
-         return false;
1499
+            if (isset($this->_elementIndex[$element])) {
1500
+                return $this->_elements[$this->_elementIndex[$element]]->isFrozen();
1501
+            }
1502
+            return false;
1503 1503
     } // end func isElementFrozen
1504 1504
 
1505 1505
     // }}}
@@ -1697,7 +1697,7 @@  discard block
 block discarded – undo
1697 1697
      */
1698 1698
     function isFrozen()
1699 1699
     {
1700
-         return $this->_freezeAll;
1700
+            return $this->_freezeAll;
1701 1701
     } // end func isFrozen
1702 1702
 
1703 1703
     // }}}
@@ -1725,14 +1725,14 @@  discard block
 block discarded – undo
1725 1725
     // }}}
1726 1726
     // {{{ accept()
1727 1727
 
1728
-   /**
1729
-    * Accepts a renderer
1730
-    *
1731
-    * @param object     An HTML_QuickForm_Renderer object
1732
-    * @since 3.0
1733
-    * @access public
1734
-    * @return void
1735
-    */
1728
+    /**
1729
+     * Accepts a renderer
1730
+     *
1731
+     * @param object     An HTML_QuickForm_Renderer object
1732
+     * @since 3.0
1733
+     * @access public
1734
+     * @return void
1735
+     */
1736 1736
     function accept(&$renderer) {
1737 1737
         $renderer->startForm($this);
1738 1738
         foreach (array_keys($this->_elements) as $key) {
@@ -1748,13 +1748,13 @@  discard block
 block discarded – undo
1748 1748
     // }}}
1749 1749
     // {{{ defaultRenderer()
1750 1750
 
1751
-   /**
1752
-    * Returns a reference to default renderer object
1753
-    *
1754
-    * @access public
1755
-    * @since 3.0
1756
-    * @return HTML_QuickForm_Renderer_Default
1757
-    */
1751
+    /**
1752
+     * Returns a reference to default renderer object
1753
+     *
1754
+     * @access public
1755
+     * @since 3.0
1756
+     * @return HTML_QuickForm_Renderer_Default
1757
+     */
1758 1758
     function &defaultRenderer() {
1759 1759
         if (!isset($GLOBALS['_HTML_QuickForm_default_renderer'])) {
1760 1760
             // Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
         //
1923 1923
         $this->accept($renderer);
1924 1924
         return $renderer->toArray();
1925
-     } // end func toArray
1925
+        } // end func toArray
1926 1926
 
1927 1927
     // }}}
1928 1928
     // {{{ exportValue()
@@ -2003,15 +2003,15 @@  discard block
 block discarded – undo
2003 2003
     // }}}
2004 2004
     // {{{ isSubmitted()
2005 2005
 
2006
-   /**
2007
-    * Tells whether the form was already submitted
2008
-    *
2009
-    * This is useful since the _submitFiles and _submitValues arrays
2010
-    * may be completely empty after the trackSubmit value is removed.
2011
-    *
2012
-    * @access public
2013
-    * @return bool
2014
-    */
2006
+    /**
2007
+     * Tells whether the form was already submitted
2008
+     *
2009
+     * This is useful since the _submitFiles and _submitValues arrays
2010
+     * may be completely empty after the trackSubmit value is removed.
2011
+     *
2012
+     * @access public
2013
+     * @return bool
2014
+     */
2015 2015
     function isSubmitted()
2016 2016
     {
2017 2017
         return $this->_flagSubmitted;
@@ -2102,24 +2102,24 @@  discard block
 block discarded – undo
2102 2102
     // {{{ properties
2103 2103
 
2104 2104
     /**
2105
-    * Prefix for all error messages
2106
-    * @var string
2107
-    */
2105
+     * Prefix for all error messages
2106
+     * @var string
2107
+     */
2108 2108
     var $error_message_prefix = 'QuickForm Error: ';
2109 2109
 
2110 2110
     // }}}
2111 2111
     // {{{ constructor
2112 2112
 
2113 2113
     /**
2114
-    * Creates a quickform error object, extending the PEAR_Error class
2115
-    *
2116
-    * @param int   $code the error code
2117
-    * @param int   $mode the reaction to the error, either return, die or trigger/callback
2118
-    * @param int   $level intensity of the error (PHP error code)
2119
-    * @param mixed $debuginfo any information that can inform user as to nature of the error
2120
-    */
2114
+     * Creates a quickform error object, extending the PEAR_Error class
2115
+     *
2116
+     * @param int   $code the error code
2117
+     * @param int   $mode the reaction to the error, either return, die or trigger/callback
2118
+     * @param int   $level intensity of the error (PHP error code)
2119
+     * @param mixed $debuginfo any information that can inform user as to nature of the error
2120
+     */
2121 2121
     function HTML_QuickForm_Error($code = QUICKFORM_ERROR, $mode = PEAR_ERROR_RETURN,
2122
-                         $level = E_USER_NOTICE, $debuginfo = null)
2122
+                            $level = E_USER_NOTICE, $debuginfo = null)
2123 2123
     {
2124 2124
         if (is_int($code)) {
2125 2125
             $this->PEAR_Error(HTML_QuickForm::errorMessage($code), $code, $mode, $level, $debuginfo);
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/Table.php 1 patch
Indentation   +58 added lines, -59 removed lines patch added patch discarded remove patch
@@ -1,63 +1,62 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3 3
 /**
4
- * PEAR::HTML_Table makes the design of HTML tables easy, flexible, reusable and
5
- * efficient.
6
- *
7
- * The PEAR::HTML_Table package provides methods for easy and efficient design
8
- * of HTML tables.
9
- * - Lots of customization options.
10
- * - Tables can be modified at any time.
11
- * - The logic is the same as standard HTML editors.
12
- * - Handles col and rowspans.
13
- * - PHP code is shorter, easier to read and to maintain.
14
- * - Tables options can be reused.
15
- *
16
- * For auto filling of data and such then check out
17
- * http://pear.php.net/package/HTML_Table_Matrix
18
- *
19
- * PHP versions 4 and 5
20
- *
21
- * LICENSE:
22
- *
23
- * Copyright (c) 2005-2007, Adam Daniel <[email protected]>,
24
- *                          Bertrand Mansion <[email protected]>,
25
- *                          Mark Wiesemann <[email protected]>
26
- * All rights reserved.
27
- *
28
- * Redistribution and use in source and binary forms, with or without
29
- * modification, are permitted provided that the following conditions
30
- * are met:
31
- *
32
- *    * Redistributions of source code must retain the above copyright
33
- *      notice, this list of conditions and the following disclaimer.
34
- *    * Redistributions in binary form must reproduce the above copyright
35
- *      notice, this list of conditions and the following disclaimer in the
36
- *      documentation and/or other materials provided with the distribution.
37
- *    * The names of the authors may not be used to endorse or promote products
38
- *      derived from this software without specific prior written permission.
39
- *
40
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
41
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
42
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
44
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
45
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
46
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
47
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
48
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
49
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
50
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51
-
52
- *
53
- * @category   HTML
54
- * @package    HTML_Table
55
- * @author     Adam Daniel <[email protected]>
56
- * @author     Bertrand Mansion <[email protected]>
57
- * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
58
- * @version    CVS: $Id: Table.php,v 1.39 2007/06/25 16:44:43 wiesemann Exp $
59
- * @link       http://pear.php.net/package/HTML_Table
60
- */
4
+     * PEAR::HTML_Table makes the design of HTML tables easy, flexible, reusable and
5
+     * efficient.
6
+     *
7
+     * The PEAR::HTML_Table package provides methods for easy and efficient design
8
+     * of HTML tables.
9
+     * - Lots of customization options.
10
+     * - Tables can be modified at any time.
11
+     * - The logic is the same as standard HTML editors.
12
+     * - Handles col and rowspans.
13
+     * - PHP code is shorter, easier to read and to maintain.
14
+     * - Tables options can be reused.
15
+     *
16
+     * For auto filling of data and such then check out
17
+     * http://pear.php.net/package/HTML_Table_Matrix
18
+     *
19
+     * PHP versions 4 and 5
20
+     *
21
+     * LICENSE:
22
+     *
23
+     * Copyright (c) 2005-2007, Adam Daniel <[email protected]>,
24
+     *                          Bertrand Mansion <[email protected]>,
25
+     *                          Mark Wiesemann <[email protected]>
26
+     * All rights reserved.
27
+     *
28
+     * Redistribution and use in source and binary forms, with or without
29
+     * modification, are permitted provided that the following conditions
30
+     * are met:
31
+     *
32
+     *    * Redistributions of source code must retain the above copyright
33
+     *      notice, this list of conditions and the following disclaimer.
34
+     *    * Redistributions in binary form must reproduce the above copyright
35
+     *      notice, this list of conditions and the following disclaimer in the
36
+     *      documentation and/or other materials provided with the distribution.
37
+     *    * The names of the authors may not be used to endorse or promote products
38
+     *      derived from this software without specific prior written permission.
39
+     *
40
+     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
41
+     * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
42
+     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43
+     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
44
+     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
45
+     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
46
+     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
47
+     * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
48
+     * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
49
+     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
50
+     * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51
+     *
52
+     * @category   HTML
53
+     * @package    HTML_Table
54
+     * @author     Adam Daniel <[email protected]>
55
+     * @author     Bertrand Mansion <[email protected]>
56
+     * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
57
+     * @version    CVS: $Id: Table.php,v 1.39 2007/06/25 16:44:43 wiesemann Exp $
58
+     * @link       http://pear.php.net/package/HTML_Table
59
+     */
61 60
 
62 61
 /**
63 62
  * PEAR::HTML_Table makes the design of HTML tables easy, flexible, reusable and efficient.
@@ -256,7 +255,7 @@  discard block
 block discarded – undo
256 255
 
257 256
         $body = $this->_tbodyCount++;
258 257
         $this->_tbodies[$body] = new HTML_Table_Storage($this->_tabOffset,
259
-                                                         $this->_useTGroups);
258
+                                                            $this->_useTGroups);
260 259
         $this->_tbodies[$body]->setAutoFill($this->_autoFill);
261 260
         $this->_tbodies[$body]->setAttributes($attributes);
262 261
         return $body;
@@ -308,7 +307,7 @@  discard block
 block discarded – undo
308 307
         if (isset($colgroup)) {
309 308
             $attributes = $this->_parseAttributes($attributes);
310 309
             $this->_colgroup[] = array('attr' => $attributes,
311
-                                       'contents' => $colgroup);
310
+                                        'contents' => $colgroup);
312 311
         } else {
313 312
             $this->_colgroup = array();
314 313
         }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/Common.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
         if (is_array($attributes)) {
142 142
             $charset = HTML_Common::charset();
143 143
             foreach ($attributes as $key => $value) {
144
-            	// Modified by Ivan Tcholakov, 16-MAR-2010
144
+                // Modified by Ivan Tcholakov, 16-MAR-2010
145 145
                 $value = @htmlspecialchars($value, ENT_COMPAT, $charset);
146 146
                 $strAttr .= ' ' . $key . '= "' . $value. '"';
147 147
             }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/hidden.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@
 block discarded – undo
71 71
     // }}}
72 72
     // {{{ accept()
73 73
 
74
-   /**
75
-    * Accepts a renderer
76
-    *
77
-    * @param HTML_QuickForm_Renderer    renderer object
78
-    * @access public
79
-    * @return void
80
-    */
74
+    /**
75
+     * Accepts a renderer
76
+     *
77
+     * @param HTML_QuickForm_Renderer    renderer object
78
+     * @access public
79
+     * @return void
80
+     */
81 81
     //function accept(&$renderer)
82 82
     function accept(&$renderer, $required=false, $error=null)
83 83
     {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/element.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -259,13 +259,13 @@  discard block
 block discarded – undo
259 259
     // }}}
260 260
     // {{{ unfreeze()
261 261
 
262
-   /**
263
-    * Unfreezes the element so that it becomes editable
264
-    *
265
-    * @access public
266
-    * @return void
267
-    * @since  3.2.4
268
-    */
262
+    /**
263
+     * Unfreezes the element so that it becomes editable
264
+     *
265
+     * @access public
266
+     * @return void
267
+     * @since  3.2.4
268
+     */
269 269
     function unfreeze()
270 270
     {
271 271
         $this->_flagFrozen = false;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         //       $this->_getPersistantData();
290 290
 
291 291
         $value =  ('' != $value ? @htmlspecialchars($value, ENT_COMPAT, HTML_Common::charset()): '&nbsp;') .
292
-               $this->_getPersistantData();
292
+                $this->_getPersistantData();
293 293
         return '<span class="freeze">'.$value.'</span>';
294 294
         //
295 295
     } //end func getFrozenHtml
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
     // }}}
298 298
     // {{{ _getPersistantData()
299 299
 
300
-   /**
301
-    * Used by getFrozenHtml() to pass the element's value if _persistantFreeze is on
302
-    *
303
-    * @access private
304
-    * @return string
305
-    */
300
+    /**
301
+     * Used by getFrozenHtml() to pass the element's value if _persistantFreeze is on
302
+     *
303
+     * @access private
304
+     * @return string
305
+     */
306 306
     function _getPersistantData()
307 307
     {
308 308
         if (!$this->_persistantFreeze) {
@@ -310,10 +310,10 @@  discard block
 block discarded – undo
310 310
         } else {
311 311
             $id = $this->getAttribute('id');
312 312
             return '<input' . $this->_getAttrString(array(
313
-                       'type'  => 'hidden',
314
-                       'name'  => $this->getName(),
315
-                       'value' => $this->getValue()
316
-                   ) + (isset($id)? array('id' => $id): array())) . ' />';
313
+                        'type'  => 'hidden',
314
+                        'name'  => $this->getName(),
315
+                        'value' => $this->getValue()
316
+                    ) + (isset($id)? array('id' => $id): array())) . ' />';
317 317
         }
318 318
     }
319 319
 
@@ -415,9 +415,9 @@  discard block
 block discarded – undo
415 415
             return $values[$elementName];
416 416
         } elseif (strpos($elementName, '[')) {
417 417
             $myVar = "['" . str_replace(
418
-                         array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
419
-                         $elementName
420
-                     ) . "']";
418
+                            array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
419
+                            $elementName
420
+                        ) . "']";
421 421
             return eval("return (isset(\$values$myVar)) ? \$values$myVar : null;");
422 422
         } else {
423 423
             return null;
@@ -471,29 +471,29 @@  discard block
 block discarded – undo
471 471
         return true;
472 472
     }
473 473
 
474
-   /**
475
-    * Accepts a renderer
476
-    *
477
-    * @param HTML_QuickForm_Renderer    renderer object
478
-    * @param bool                       Whether an element is required
479
-    * @param string                     An error message associated with an element
480
-    * @access public
481
-    * @return void
482
-    */
474
+    /**
475
+     * Accepts a renderer
476
+     *
477
+     * @param HTML_QuickForm_Renderer    renderer object
478
+     * @param bool                       Whether an element is required
479
+     * @param string                     An error message associated with an element
480
+     * @access public
481
+     * @return void
482
+     */
483 483
     function accept(&$renderer, $required=false, $error=null)
484 484
     {
485 485
         $renderer->renderElement($this, $required, $error);
486 486
     }
487 487
 
488
-   /**
489
-    * Automatically generates and assigns an 'id' attribute for the element.
490
-    *
491
-    * Currently used to ensure that labels work on radio buttons and
492
-    * checkboxes. Per idea of Alexander Radivanovich.
493
-    *
494
-    * @access private
495
-    * @return void
496
-    */
488
+    /**
489
+     * Automatically generates and assigns an 'id' attribute for the element.
490
+     *
491
+     * Currently used to ensure that labels work on radio buttons and
492
+     * checkboxes. Per idea of Alexander Radivanovich.
493
+     *
494
+     * @access private
495
+     * @return void
496
+     */
497 497
     function _generateId()
498 498
     {
499 499
         static $idx = 1;
@@ -503,14 +503,14 @@  discard block
 block discarded – undo
503 503
         }
504 504
     }
505 505
 
506
-   /**
507
-    * Returns a 'safe' element's value
508
-    *
509
-    * @param  array   array of submitted values to search
510
-    * @param  bool    whether to return the value as associative array
511
-    * @access public
512
-    * @return mixed
513
-    */
506
+    /**
507
+     * Returns a 'safe' element's value
508
+     *
509
+     * @param  array   array of submitted values to search
510
+     * @param  bool    whether to return the value as associative array
511
+     * @access public
512
+     * @return mixed
513
+     */
514 514
     function exportValue(&$submitValues, $assoc = false)
515 515
     {
516 516
         $value = $this->_findValue($submitValues);
@@ -523,14 +523,14 @@  discard block
 block discarded – undo
523 523
     // }}}
524 524
     // {{{ _prepareValue()
525 525
 
526
-   /**
527
-    * Used by exportValue() to prepare the value for returning
528
-    *
529
-    * @param  mixed   the value found in exportValue()
530
-    * @param  bool    whether to return the value as associative array
531
-    * @access private
532
-    * @return mixed
533
-    */
526
+    /**
527
+     * Used by exportValue() to prepare the value for returning
528
+     *
529
+     * @param  mixed   the value found in exportValue()
530
+     * @param  bool    whether to return the value as associative array
531
+     * @access private
532
+     * @return mixed
533
+     */
534 534
     function _prepareValue($value, $assoc)
535 535
     {
536 536
         if (null === $value) {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/hierselect.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -434,8 +434,8 @@  discard block
 block discarded – undo
434 434
                 $jsParts[] = $this->_convertArrayToJavascript($this->_options[$i]);
435 435
             }
436 436
             $this->_js .= "\n_hs_options['" . $this->_escapeString($this->getName()) . "'] = [\n" .
437
-                          implode(",\n", $jsParts) .
438
-                          "\n];\n";
437
+                            implode(",\n", $jsParts) .
438
+                            "\n];\n";
439 439
             // default value; if we don't actually have any values yet just use
440 440
             // the first option (for single selects) or empty array (for multiple)
441 441
             $values = array();
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
                 }
451 451
             }
452 452
             $this->_js .= "_hs_defaults['" . $this->_escapeString($this->getName()) . "'] = " .
453
-                          $this->_convertArrayToJavascript($values, false) . ";\n";
453
+                            $this->_convertArrayToJavascript($values, false) . ";\n";
454 454
         }
455 455
         include_once('HTML/QuickForm/Renderer/Default.php');
456 456
         $renderer =& new HTML_QuickForm_Renderer_Default();
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             }
465 465
         }
466 466
         return (empty($this->_js)? '': "<script type=\"text/javascript\">\n//<![CDATA[\n" . $this->_js . "//]]>\n</script>") .
467
-               $renderer->toHtml();
467
+                $renderer->toHtml();
468 468
     } // end func toHtml
469 469
 
470 470
     // }}}
@@ -506,14 +506,14 @@  discard block
 block discarded – undo
506 506
     // }}}
507 507
     // {{{ _convertArrayToJavascript()
508 508
 
509
-   /**
510
-    * Converts PHP array to its Javascript analog
511
-    *
512
-    * @access private
513
-    * @param  array     PHP array to convert
514
-    * @param  bool      Generate Javascript object literal (default, works like PHP's associative array) or array literal
515
-    * @return string    Javascript representation of the value
516
-    */
509
+    /**
510
+     * Converts PHP array to its Javascript analog
511
+     *
512
+     * @access private
513
+     * @param  array     PHP array to convert
514
+     * @param  bool      Generate Javascript object literal (default, works like PHP's associative array) or array literal
515
+     * @return string    Javascript representation of the value
516
+     */
517 517
     function _convertArrayToJavascript($array, $assoc = true)
518 518
     {
519 519
         if (!is_array($array)) {
@@ -537,13 +537,13 @@  discard block
 block discarded – undo
537 537
     // }}}
538 538
     // {{{ _convertScalarToJavascript()
539 539
 
540
-   /**
541
-    * Converts PHP's scalar value to its Javascript analog
542
-    *
543
-    * @access private
544
-    * @param  mixed     PHP value to convert
545
-    * @return string    Javascript representation of the value
546
-    */
540
+    /**
541
+     * Converts PHP's scalar value to its Javascript analog
542
+     *
543
+     * @access private
544
+     * @param  mixed     PHP value to convert
545
+     * @return string    Javascript representation of the value
546
+     */
547 547
     function _convertScalarToJavascript($val)
548 548
     {
549 549
         if (is_bool($val)) {
@@ -563,13 +563,13 @@  discard block
 block discarded – undo
563 563
     // }}}
564 564
     // {{{ _escapeString()
565 565
 
566
-   /**
567
-    * Quotes the string so that it can be used in Javascript string constants
568
-    *
569
-    * @access private
570
-    * @param  string
571
-    * @return string
572
-    */
566
+    /**
567
+     * Quotes the string so that it can be used in Javascript string constants
568
+     *
569
+     * @access private
570
+     * @param  string
571
+     * @return string
572
+     */
573 573
     function _escapeString($str)
574 574
     {
575 575
         return strtr($str,array(
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/group.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
      */
69 69
     private $_required = array();
70 70
 
71
-   /**
72
-    * Whether to change elements' names to $groupName[$elementName] or leave them as is
73
-    * @var      bool
74
-    * @since    3.0
75
-    * @access   private
76
-    */
71
+    /**
72
+     * Whether to change elements' names to $groupName[$elementName] or leave them as is
73
+     * @var      bool
74
+     * @since    3.0
75
+     * @access   private
76
+     */
77 77
     private $_appendName = true;
78 78
 
79 79
     /**
@@ -378,15 +378,15 @@  discard block
 block discarded – undo
378 378
         return true;
379 379
     }
380 380
 
381
-   /**
382
-    * Accepts a renderer
383
-    *
384
-    * @param HTML_QuickForm_Renderer    renderer object
385
-    * @param bool                       Whether a group is required
386
-    * @param string                     An error message associated with a group
387
-    * @access public
388
-    * @return void
389
-    */
381
+    /**
382
+     * Accepts a renderer
383
+     *
384
+     * @param HTML_QuickForm_Renderer    renderer object
385
+     * @param bool                       Whether a group is required
386
+     * @param string                     An error message associated with a group
387
+     * @access public
388
+     * @return void
389
+     */
390 390
     function accept(&$renderer, $required = false, $error = null)
391 391
     {
392 392
         $this->_createElementsIfNotExist();
@@ -416,10 +416,10 @@  discard block
 block discarded – undo
416 416
         $renderer->finishGroup($this);
417 417
     }
418 418
 
419
-   /**
420
-    * As usual, to get the group's value we access its elements and call
421
-    * their exportValue() methods
422
-    */
419
+    /**
420
+     * As usual, to get the group's value we access its elements and call
421
+     * their exportValue() methods
422
+     */
423 423
     function exportValue(&$submitValues, $assoc = false)
424 424
     {
425 425
         $value = null;
@@ -462,31 +462,31 @@  discard block
 block discarded – undo
462 462
         return $value;
463 463
     }
464 464
 
465
-   /**
466
-    * Creates the group's elements.
467
-    *
468
-    * This should be overriden by child classes that need to create their
469
-    * elements. The method will be called automatically when needed, calling
470
-    * it from the constructor is discouraged as the constructor is usually
471
-    * called _twice_ on element creation, first time with _no_ parameters.
472
-    *
473
-    * @access private
474
-    * @abstract
475
-    */
465
+    /**
466
+     * Creates the group's elements.
467
+     *
468
+     * This should be overriden by child classes that need to create their
469
+     * elements. The method will be called automatically when needed, calling
470
+     * it from the constructor is discouraged as the constructor is usually
471
+     * called _twice_ on element creation, first time with _no_ parameters.
472
+     *
473
+     * @access private
474
+     * @abstract
475
+     */
476 476
     function _createElements()
477 477
     {
478 478
         // abstract
479 479
     }
480 480
 
481
-   /**
482
-    * A wrapper around _createElements()
483
-    *
484
-    * This method calls _createElements() if the group's _elements array
485
-    * is empty. It also performs some updates, e.g. freezes the created
486
-    * elements if the group is already frozen.
487
-    *
488
-    * @access private
489
-    */
481
+    /**
482
+     * A wrapper around _createElements()
483
+     *
484
+     * This method calls _createElements() if the group's _elements array
485
+     * is empty. It also performs some updates, e.g. freezes the created
486
+     * elements if the group is already frozen.
487
+     *
488
+     * @access private
489
+     */
490 490
     function _createElementsIfNotExist()
491 491
     {
492 492
         if (empty($this->_elements)) {
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/Action/Jump.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
  */
32 32
 class HTML_QuickForm_Action_Jump extends HTML_QuickForm_Action
33 33
 {
34
-   /**
35
-    * Splits (part of) the URI into path and query components
36
-    *
37
-    * @param    string  String of the form 'foo?bar'
38
-    * @return   array   Array of the form array('foo', '?bar)
39
-    * @access   private
40
-    */
34
+    /**
35
+     * Splits (part of) the URI into path and query components
36
+     *
37
+     * @param    string  String of the form 'foo?bar'
38
+     * @return   array   Array of the form array('foo', '?bar)
39
+     * @access   private
40
+     */
41 41
     function _splitUri($uri)
42 42
     {
43 43
         if (false === ($qm = strpos($uri, '?'))) {
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
         }
48 48
     }
49 49
 
50
-   /**
51
-    * Removes the '..' and '.' segments from the path component
52
-    *
53
-    * @param    string  Path component of the URL, possibly with '.' and '..' segments
54
-    * @return   string  Path component of the URL with '.' and '..' segments removed
55
-    * @access   private
56
-    */
50
+    /**
51
+     * Removes the '..' and '.' segments from the path component
52
+     *
53
+     * @param    string  Path component of the URL, possibly with '.' and '..' segments
54
+     * @return   string  Path component of the URL with '.' and '..' segments removed
55
+     * @access   private
56
+     */
57 57
     function _normalizePath($path)
58 58
     {
59 59
         $pathAry = explode('/', $path);
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
         return implode('/', $pathAry);
85 85
     }
86 86
 
87
-   /**
88
-    * Resolves relative URL using current page's URL as base
89
-    *
90
-    * The method follows procedure described in section 4 of RFC 1808 and
91
-    * passes the examples provided in section 5 of said RFC. Values from
92
-    * $_SERVER array are used for calculation of "current URL"
93
-    *
94
-    * @param    string  Relative URL, probably from form's action attribute
95
-    * @return   string  Absolute URL
96
-    * @access   private
97
-    */
87
+    /**
88
+     * Resolves relative URL using current page's URL as base
89
+     *
90
+     * The method follows procedure described in section 4 of RFC 1808 and
91
+     * passes the examples provided in section 5 of said RFC. Values from
92
+     * $_SERVER array are used for calculation of "current URL"
93
+     *
94
+     * @param    string  Relative URL, probably from form's action attribute
95
+     * @return   string  Absolute URL
96
+     * @access   private
97
+     */
98 98
     function _resolveRelativeURL($url)
99 99
     {
100 100
         $https  = !empty($_SERVER['HTTPS']) && ('off' != strtolower($_SERVER['HTTPS']));
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         } else {
106 106
             $host   = $scheme . '//' . $_SERVER['SERVER_NAME'] .
107
-                      (($https && 443 == $_SERVER['SERVER_PORT'] ||
107
+                        (($https && 443 == $_SERVER['SERVER_PORT'] ||
108 108
                         !$https && 80 == $_SERVER['SERVER_PORT'])? '': ':' . $_SERVER['SERVER_PORT']);
109 109
             if ('' == $url) {
110 110
                 return $host . $_SERVER['REQUEST_URI'];
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
             $action = $this->_resolveRelativeURL($action);
149 149
         }
150 150
         $url    = $action . (false === strpos($action, '?')? '?': '&') .
151
-                  $current->getButtonName('display') . '=true' .
152
-                  ((!defined('SID') || '' == SID || ini_get('session.use_only_cookies'))? '': '&' . SID);
151
+                    $current->getButtonName('display') . '=true' .
152
+                    ((!defined('SID') || '' == SID || ini_get('session.use_only_cookies'))? '': '&' . SID);
153 153
         header('Location: ' . $url);
154 154
         exit;
155 155
     }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/Action/Display.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -73,15 +73,15 @@
 block discarded – undo
73 73
     }
74 74
 
75 75
 
76
-   /**
77
-    * Actually outputs the form.
78
-    *
79
-    * If you want to customize the form's appearance (you most certainly will),
80
-    * then you should override this method. There is no need to override perform()
81
-    *
82
-    * @access private
83
-    * @param  HTML_QuickForm_Page  the page being processed
84
-    */
76
+    /**
77
+     * Actually outputs the form.
78
+     *
79
+     * If you want to customize the form's appearance (you most certainly will),
80
+     * then you should override this method. There is no need to override perform()
81
+     *
82
+     * @access private
83
+     * @param  HTML_QuickForm_Page  the page being processed
84
+     */
85 85
     function _renderForm(&$page)
86 86
     {
87 87
         $page->display();
Please login to merge, or discard this patch.