Completed
Push — 1.10.x ( c135db...ea3352 )
by Julito
26:21
created
main/inc/lib/pear/HTML/QuickForm/checkbox.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     {
176 176
         if ($this->getChecked()) {
177 177
             return '<code>[x]</code>' .
178
-                   $this->_getPersistantData();
178
+                    $this->_getPersistantData();
179 179
         } else {
180 180
             return '<code>[ ]</code>';
181 181
         }
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
     // }}}
289 289
     // {{{ exportValue()
290 290
 
291
-   /**
292
-    * Return true if the checkbox is checked, null if it is not checked (getValue() returns false)
293
-    */
291
+    /**
292
+     * Return true if the checkbox is checked, null if it is not checked (getValue() returns false)
293
+     */
294 294
     function exportValue(&$submitValues, $assoc = false)
295 295
     {
296 296
         $value = $this->_findValue($submitValues);
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/Rule/Callback.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@
 block discarded – undo
44 44
      */
45 45
     var $_data = array();
46 46
 
47
-   /**
48
-    * Whether to use BC mode for specific rules
49
-    *
50
-    * Previous versions of QF passed element's name as a first parameter
51
-    * to validation functions, but not to validation methods. This behaviour
52
-    * is emulated if you are using 'function' as rule type when registering.
53
-    *
54
-    * @var array
55
-    * @access private
56
-    */
47
+    /**
48
+     * Whether to use BC mode for specific rules
49
+     *
50
+     * Previous versions of QF passed element's name as a first parameter
51
+     * to validation functions, but not to validation methods. This behaviour
52
+     * is emulated if you are using 'function' as rule type when registering.
53
+     *
54
+     * @var array
55
+     * @access private
56
+     */
57 57
     var $_BCMode = array();
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/Rule/Compare.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
  */
36 36
 class HTML_QuickForm_Rule_Compare extends HTML_QuickForm_Rule
37 37
 {
38
-   /**
39
-    * Possible operators to use
40
-    * @var array
41
-    * @access private
42
-    */
38
+    /**
39
+     * Possible operators to use
40
+     * @var array
41
+     * @access private
42
+     */
43 43
     var $_operators = array(
44 44
         'eq'  => '===',
45 45
         'neq' => '!==',
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
         '!='  => '!=='
52 52
     );
53 53
 
54
-   /**
55
-    * Returns the operator to use for comparing the values
56
-    *
57
-    * @access private
58
-    * @param  string     operator name
59
-    * @return string     operator to use for validation
60
-    */
54
+    /**
55
+     * Returns the operator to use for comparing the values
56
+     *
57
+     * @access private
58
+     * @param  string     operator name
59
+     * @return string     operator to use for validation
60
+     */
61 61
     function _findOperator($name)
62 62
     {
63 63
         $name = trim($name);
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/file.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 {
39 39
     // {{{ properties
40 40
 
41
-   /**
42
-    * Uploaded file data, from $_FILES
43
-    * @var array
44
-    */
41
+    /**
42
+     * Uploaded file data, from $_FILES
43
+     * @var array
44
+     */
45 45
     var $_value = null;
46 46
 
47 47
     // }}}
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
     // }}}
238 238
     // {{{ _ruleCheckMaxFileSize()
239 239
 
240
-   /**
241
-    * Tries to find the element value from the values array
242
-    *
243
-    * Needs to be redefined here as $_FILES is populated differently from
244
-    * other arrays when element name is of the form foo[bar]
245
-    *
246
-    * @access    private
247
-    * @return    mixed
248
-    */
240
+    /**
241
+     * Tries to find the element value from the values array
242
+     *
243
+     * Needs to be redefined here as $_FILES is populated differently from
244
+     * other arrays when element name is of the form foo[bar]
245
+     *
246
+     * @access    private
247
+     * @return    mixed
248
+     */
249 249
     function _findValue(&$values = null)
250 250
     {
251 251
         if (empty($_FILES)) {
@@ -262,12 +262,12 @@  discard block
 block discarded – undo
262 262
             $idx   = "['" . str_replace(
263 263
                         array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
264 264
                         substr($elementName, $pos + 1, -1)
265
-                     ) . "']";
265
+                        ) . "']";
266 266
             $props = array('name', 'type', 'size', 'tmp_name', 'error');
267 267
             $code  = "if (!isset(\$_FILES['{$base}']['name']{$idx})) {\n" .
268
-                     "    return null;\n" .
269
-                     "} else {\n" .
270
-                     "    \$value = array();\n";
268
+                        "    return null;\n" .
269
+                        "} else {\n" .
270
+                        "    \$value = array();\n";
271 271
             foreach ($props as $prop) {
272 272
                 $code .= "    \$value['{$prop}'] = \$_FILES['{$base}']['{$prop}']{$idx};\n";
273 273
             }
Please login to merge, or discard this patch.
main/inc/lib/pear/HTML/QuickForm/select.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -355,16 +355,16 @@  discard block
 block discarded – undo
355 355
 
356 356
 
357 357
         /**
358
-     * Adds a new OPTION to the SELECT
359
-     *
360
-     * @param     string    $text       Display text for the OPTION
361
-     * @param     string    $value      Value for the OPTION
362
-     * @param     mixed     $attributes Either a typical HTML attribute string
363
-     *                                  or an associative array
364
-     * @since     1.0
365
-     * @access    public
366
-     * @return    void
367
-     */
358
+         * Adds a new OPTION to the SELECT
359
+         *
360
+         * @param     string    $text       Display text for the OPTION
361
+         * @param     string    $value      Value for the OPTION
362
+         * @param     mixed     $attributes Either a typical HTML attribute string
363
+         *                                  or an associative array
364
+         * @since     1.0
365
+         * @access    public
366
+         * @return    void
367
+         */
368 368
     function addOptGroup($options, $label)
369 369
     {
370 370
         foreach ($options as $option) {
@@ -614,10 +614,10 @@  discard block
 block discarded – undo
614 614
             }
615 615
             foreach ($value as $key => $item) {
616 616
                 $html .= '<input' . $this->_getAttrString(array(
617
-                             'type'  => 'hidden',
618
-                             'name'  => $name,
619
-                             'value' => $this->_values[$key]
620
-                         ) + $idAttr) . ' />';
617
+                                'type'  => 'hidden',
618
+                                'name'  => $name,
619
+                                'value' => $this->_values[$key]
620
+                            ) + $idAttr) . ' />';
621 621
             }
622 622
         }
623 623
         return $html;
@@ -626,10 +626,10 @@  discard block
 block discarded – undo
626 626
     // }}}
627 627
     // {{{ exportValue()
628 628
 
629
-   /**
630
-    * We check the options and return only the values that _could_ have been
631
-    * selected. We also return a scalar value if select is not "multiple"
632
-    */
629
+    /**
630
+     * We check the options and return only the values that _could_ have been
631
+     * selected. We also return a scalar value if select is not "multiple"
632
+     */
633 633
     function exportValue(&$submitValues, $assoc = false)
634 634
     {
635 635
         $value = $this->_findValue($submitValues);
Please login to merge, or discard this patch.
main/inc/lib/pear/OLE/PPS/Root.php 1 patch
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -32,41 +32,41 @@  discard block
 block discarded – undo
32 32
 class OLE_PPS_Root extends OLE_PPS
33 33
 {
34 34
     /**
35
-    * The temporary dir for storing the OLE file
36
-    * @var string
37
-    */
35
+     * The temporary dir for storing the OLE file
36
+     * @var string
37
+     */
38 38
     var $_tmp_dir;
39 39
 
40 40
     /**
41
-    * Constructor
42
-    *
43
-    * @access public
44
-    * @param integer $time_1st A timestamp
45
-    * @param integer $time_2nd A timestamp
46
-    */
41
+     * Constructor
42
+     *
43
+     * @access public
44
+     * @param integer $time_1st A timestamp
45
+     * @param integer $time_2nd A timestamp
46
+     */
47 47
     function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
48 48
     {
49 49
         $this->_tmp_dir = '';
50 50
         $this->OLE_PPS(
51
-           null,
52
-           OLE::Asc2Ucs('Root Entry'),
53
-           OLE_PPS_TYPE_ROOT,
54
-           null,
55
-           null,
56
-           null,
57
-           $time_1st,
58
-           $time_2nd,
59
-           null,
60
-           $raChild);
51
+            null,
52
+            OLE::Asc2Ucs('Root Entry'),
53
+            OLE_PPS_TYPE_ROOT,
54
+            null,
55
+            null,
56
+            null,
57
+            $time_1st,
58
+            $time_2nd,
59
+            null,
60
+            $raChild);
61 61
     }
62 62
 
63 63
     /**
64
-    * Sets the temp dir used for storing the OLE file
65
-    *
66
-    * @access public
67
-    * @param string $dir The dir to be used as temp dir
68
-    * @return true if given dir is valid, false otherwise
69
-    */
64
+     * Sets the temp dir used for storing the OLE file
65
+     *
66
+     * @access public
67
+     * @param string $dir The dir to be used as temp dir
68
+     * @return true if given dir is valid, false otherwise
69
+     */
70 70
     function setTempDir($dir)
71 71
     {
72 72
         if (is_dir($dir)) {
@@ -77,21 +77,21 @@  discard block
 block discarded – undo
77 77
     }
78 78
 
79 79
     /**
80
-    * Method for saving the whole OLE container (including files).
81
-    * In fact, if called with an empty argument (or '-'), it saves to a
82
-    * temporary file and then outputs it's contents to stdout.
83
-    *
84
-    * @param string $filename The name of the file where to save the OLE container
85
-    * @access public
86
-    * @return mixed true on success, PEAR_Error on failure
87
-    */
80
+     * Method for saving the whole OLE container (including files).
81
+     * In fact, if called with an empty argument (or '-'), it saves to a
82
+     * temporary file and then outputs it's contents to stdout.
83
+     *
84
+     * @param string $filename The name of the file where to save the OLE container
85
+     * @access public
86
+     * @return mixed true on success, PEAR_Error on failure
87
+     */
88 88
     function save($filename)
89 89
     {
90 90
         // Initial Setting for saving
91 91
         $this->_BIG_BLOCK_SIZE  = pow(2,
92
-                      ((isset($this->_BIG_BLOCK_SIZE))? $this->_adjust2($this->_BIG_BLOCK_SIZE)  : 9));
92
+                        ((isset($this->_BIG_BLOCK_SIZE))? $this->_adjust2($this->_BIG_BLOCK_SIZE)  : 9));
93 93
         $this->_SMALL_BLOCK_SIZE= pow(2,
94
-                      ((isset($this->_SMALL_BLOCK_SIZE))?  $this->_adjust2($this->_SMALL_BLOCK_SIZE): 6));
94
+                        ((isset($this->_SMALL_BLOCK_SIZE))?  $this->_adjust2($this->_SMALL_BLOCK_SIZE): 6));
95 95
 
96 96
         // Open temp file if we are sending output to stdout
97 97
         if (($filename == '-') || ($filename == '')) {
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
     }
139 139
 
140 140
     /**
141
-    * Calculate some numbers
142
-    *
143
-    * @access private
144
-    * @param array $raList Reference to an array of PPS's
145
-    * @return array The array of numbers
146
-    */
141
+     * Calculate some numbers
142
+     *
143
+     * @access private
144
+     * @param array $raList Reference to an array of PPS's
145
+     * @return array The array of numbers
146
+     */
147 147
     function _calcSize(&$raList)
148 148
     {
149 149
         // Calculate Basic Setting
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
     }
176 176
 
177 177
     /**
178
-    * Helper function for caculating a magic value for block sizes
179
-    *
180
-    * @access private
181
-    * @param integer $i2 The argument
182
-    * @see save()
183
-    * @return integer
184
-    */
178
+     * Helper function for caculating a magic value for block sizes
179
+     *
180
+     * @access private
181
+     * @param integer $i2 The argument
182
+     * @see save()
183
+     * @return integer
184
+     */
185 185
     function _adjust2($i2)
186 186
     {
187 187
         $iWk = log($i2)/log(2);
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
     }
190 190
 
191 191
     /**
192
-    * Save OLE header
193
-    *
194
-    * @access private
195
-    * @param integer $iSBDcnt
196
-    * @param integer $iBBcnt
197
-    * @param integer $iPPScnt
198
-    */
192
+     * Save OLE header
193
+     *
194
+     * @access private
195
+     * @param integer $iSBDcnt
196
+     * @param integer $iBBcnt
197
+     * @param integer $iPPScnt
198
+     */
199 199
     function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt)
200 200
     {
201 201
         $FILE = $this->_FILEH_;
@@ -225,32 +225,32 @@  discard block
 block discarded – undo
225 225
 
226 226
         // Save Header
227 227
         fwrite($FILE,
228
-                  "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"
229
-                  . "\x00\x00\x00\x00"
230
-                  . "\x00\x00\x00\x00"
231
-                  . "\x00\x00\x00\x00"
232
-                  . "\x00\x00\x00\x00"
233
-                  . pack("v", 0x3b)
234
-                  . pack("v", 0x03)
235
-                  . pack("v", -2)
236
-                  . pack("v", 9)
237
-                  . pack("v", 6)
238
-                  . pack("v", 0)
239
-                  . "\x00\x00\x00\x00"
240
-                  . "\x00\x00\x00\x00"
241
-                  . pack("V", $iBdCnt)
242
-                  . pack("V", $iBBcnt+$iSBDcnt) //ROOT START
243
-                  . pack("V", 0)
244
-                  . pack("V", 0x1000)
245
-                  . pack("V", 0)                  //Small Block Depot
246
-                  . pack("V", 1)
247
-          );
228
+                    "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"
229
+                    . "\x00\x00\x00\x00"
230
+                    . "\x00\x00\x00\x00"
231
+                    . "\x00\x00\x00\x00"
232
+                    . "\x00\x00\x00\x00"
233
+                    . pack("v", 0x3b)
234
+                    . pack("v", 0x03)
235
+                    . pack("v", -2)
236
+                    . pack("v", 9)
237
+                    . pack("v", 6)
238
+                    . pack("v", 0)
239
+                    . "\x00\x00\x00\x00"
240
+                    . "\x00\x00\x00\x00"
241
+                    . pack("V", $iBdCnt)
242
+                    . pack("V", $iBBcnt+$iSBDcnt) //ROOT START
243
+                    . pack("V", 0)
244
+                    . pack("V", 0x1000)
245
+                    . pack("V", 0)                  //Small Block Depot
246
+                    . pack("V", 1)
247
+            );
248 248
         // Extra BDList Start, Count
249 249
         if ($iBdCnt < $i1stBdL) {
250 250
             fwrite($FILE,
251
-                      pack("V", -2).      // Extra BDList Start
252
-                      pack("V", 0)        // Extra BDList Count
253
-                  );
251
+                        pack("V", -2).      // Extra BDList Start
252
+                        pack("V", 0)        // Extra BDList Count
253
+                    );
254 254
         } else {
255 255
             fwrite($FILE, pack("V", $iAll+$iBdCnt) . pack("V", $iBdExL));
256 256
         }
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
     }
268 268
 
269 269
     /**
270
-    * Saving big data (PPS's with data bigger than OLE_DATA_SIZE_SMALL)
271
-    *
272
-    * @access private
273
-    * @param integer $iStBlk
274
-    * @param array &$raList Reference to array of PPS's
275
-    */
270
+     * Saving big data (PPS's with data bigger than OLE_DATA_SIZE_SMALL)
271
+     *
272
+     * @access private
273
+     * @param integer $iStBlk
274
+     * @param array &$raList Reference to array of PPS's
275
+     */
276 276
     function _saveBigData($iStBlk, &$raList)
277 277
     {
278 278
         $FILE = $this->_FILEH_;
@@ -318,11 +318,11 @@  discard block
 block discarded – undo
318 318
     }
319 319
 
320 320
     /**
321
-    * get small data (PPS's with data smaller than OLE_DATA_SIZE_SMALL)
322
-    *
323
-    * @access private
324
-    * @param array &$raList Reference to array of PPS's
325
-    */
321
+     * get small data (PPS's with data smaller than OLE_DATA_SIZE_SMALL)
322
+     *
323
+     * @access private
324
+     * @param array &$raList Reference to array of PPS's
325
+     */
326 326
     function _makeSmallData(&$raList)
327 327
     {
328 328
         $sRes = '';
@@ -374,11 +374,11 @@  discard block
 block discarded – undo
374 374
     }
375 375
 
376 376
     /**
377
-    * Saves all the PPS's WKs
378
-    *
379
-    * @access private
380
-    * @param array $raList Reference to an array with all PPS's
381
-    */
377
+     * Saves all the PPS's WKs
378
+     *
379
+     * @access private
380
+     * @param array $raList Reference to an array with all PPS's
381
+     */
382 382
     function _savePps(&$raList)
383 383
     {
384 384
         // Save each PPS WK
@@ -396,13 +396,13 @@  discard block
 block discarded – undo
396 396
     }
397 397
 
398 398
     /**
399
-    * Saving Big Block Depot
400
-    *
401
-    * @access private
402
-    * @param integer $iSbdSize
403
-    * @param integer $iBsize
404
-    * @param integer $iPpsCnt
405
-    */
399
+     * Saving Big Block Depot
400
+     *
401
+     * @access private
402
+     * @param integer $iSbdSize
403
+     * @param integer $iBsize
404
+     * @param integer $iPpsCnt
405
+     */
406 406
     function _saveBbd($iSbdSize, $iBsize, $iPpsCnt)
407 407
     {
408 408
         $FILE = $this->_FILEH_;
Please login to merge, or discard this patch.
main/inc/lib/pear/OLE/PPS/File.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
 class OLE_PPS_File extends OLE_PPS
31 31
 {
32 32
     /**
33
-    * The temporary dir for storing the OLE file
34
-    * @var string
35
-    */
33
+     * The temporary dir for storing the OLE file
34
+     * @var string
35
+     */
36 36
     var $_tmp_dir;
37 37
 
38 38
     /**
39
-    * The constructor
40
-    *
41
-    * @access public
42
-    * @param string $name The name of the file (in Unicode)
43
-    * @see OLE::Asc2Ucs()
44
-    */
39
+     * The constructor
40
+     *
41
+     * @access public
42
+     * @param string $name The name of the file (in Unicode)
43
+     * @see OLE::Asc2Ucs()
44
+     */
45 45
     function OLE_PPS_File($name)
46 46
     {
47 47
         $this->_tmp_dir = '';
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-    * Sets the temp dir used for storing the OLE file
63
-    *
64
-    * @access public
65
-    * @param string $dir The dir to be used as temp dir
66
-    * @return true if given dir is valid, false otherwise
67
-    */
62
+     * Sets the temp dir used for storing the OLE file
63
+     *
64
+     * @access public
65
+     * @param string $dir The dir to be used as temp dir
66
+     * @return true if given dir is valid, false otherwise
67
+     */
68 68
     function setTempDir($dir)
69 69
     {
70 70
         if (is_dir($dir)) {
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
     }
76 76
 
77 77
     /**
78
-    * Initialization method. Has to be called right after OLE_PPS_File().
79
-    *
80
-    * @access public
81
-    * @return mixed true on success. PEAR_Error on failure
82
-    */
78
+     * Initialization method. Has to be called right after OLE_PPS_File().
79
+     *
80
+     * @access public
81
+     * @return mixed true on success. PEAR_Error on failure
82
+     */
83 83
     function init()
84 84
     {
85 85
         $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_File");
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
     }
97 97
 
98 98
     /**
99
-    * Append data to PPS
100
-    *
101
-    * @access public
102
-    * @param string $data The data to append
103
-    */
99
+     * Append data to PPS
100
+     *
101
+     * @access public
102
+     * @param string $data The data to append
103
+     */
104 104
     function append($data)
105 105
     {
106 106
         if ($this->_PPS_FILE) {
Please login to merge, or discard this patch.
main/inc/lib/pear/OLE/OLE.php 1 patch
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -49,74 +49,74 @@  discard block
 block discarded – undo
49 49
 {
50 50
 
51 51
     /**
52
-    * The file handle for reading an OLE container
53
-    * @var resource
54
-    */
52
+     * The file handle for reading an OLE container
53
+     * @var resource
54
+     */
55 55
     var $_file_handle;
56 56
 
57 57
     /**
58
-    * Array of PPS's found on the OLE container
59
-    * @var array
60
-    */
58
+     * Array of PPS's found on the OLE container
59
+     * @var array
60
+     */
61 61
     var $_list;
62 62
 
63 63
     /**
64
-    * Root directory of OLE container
65
-    * @var OLE_PPS_Root
66
-    */
64
+     * Root directory of OLE container
65
+     * @var OLE_PPS_Root
66
+     */
67 67
     var $root;
68 68
 
69 69
     /**
70
-    * Big Block Allocation Table
71
-    * @var array  (blockId => nextBlockId)
72
-    */
70
+     * Big Block Allocation Table
71
+     * @var array  (blockId => nextBlockId)
72
+     */
73 73
     var $bbat;
74 74
 
75 75
     /**
76
-    * Short Block Allocation Table
77
-    * @var array  (blockId => nextBlockId)
78
-    */
76
+     * Short Block Allocation Table
77
+     * @var array  (blockId => nextBlockId)
78
+     */
79 79
     var $sbat;
80 80
 
81 81
     /**
82
-    * Size of big blocks. This is usually 512.
83
-    * @var  int  number of octets per block.
84
-    */
82
+     * Size of big blocks. This is usually 512.
83
+     * @var  int  number of octets per block.
84
+     */
85 85
     var $bigBlockSize;
86 86
 
87 87
     /**
88
-    * Size of small blocks. This is usually 64.
89
-    * @var  int  number of octets per block
90
-    */
88
+     * Size of small blocks. This is usually 64.
89
+     * @var  int  number of octets per block
90
+     */
91 91
     var $smallBlockSize;
92 92
 
93 93
     /**
94
-    * Creates a new OLE object
95
-    * @access public
96
-    */
94
+     * Creates a new OLE object
95
+     * @access public
96
+     */
97 97
     function OLE()
98 98
     {
99 99
         $this->_list = array();
100 100
     }
101 101
 
102 102
     /**
103
-    * Destructor (using PEAR)
104
-    * Just closes the file handle on the OLE file.
105
-    *
106
-    * @access private
107
-    */
103
+     * Destructor (using PEAR)
104
+     * Just closes the file handle on the OLE file.
105
+     *
106
+     * @access private
107
+     */
108 108
     function _OLE()
109 109
     {
110 110
         fclose($this->_file_handle);
111 111
     }
112 112
 
113 113
     /**
114
-    * Reads an OLE container from the contents of the file given.
115
-    *
116
-    * @access public
117
-    * @param string $file
118
-    * @return mixed true on success, PEAR_Error on failure
119
-    */
114
+     * Reads an OLE container from the contents of the file given.
115
+     *
116
+     * @access public
117
+     * @param string $file
118
+     * @return mixed true on success, PEAR_Error on failure
119
+     */
120 120
     function read($file)
121 121
     {
122 122
         $fh = @fopen($file, "r");
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
     }
282 282
 
283 283
     /**
284
-    * Gets information about all PPS's on the OLE container from the PPS WK's
285
-    * creates an OLE_PPS object for each one.
286
-    *
287
-    * @access private
288
-    * @param integer $blockId the block id of the first block
289
-    * @return mixed true on success, PEAR_Error on failure
290
-    */
284
+     * Gets information about all PPS's on the OLE container from the PPS WK's
285
+     * creates an OLE_PPS object for each one.
286
+     *
287
+     * @access private
288
+     * @param integer $blockId the block id of the first block
289
+     * @return mixed true on success, PEAR_Error on failure
290
+     */
291 291
     function _readPpsWks($blockId)
292 292
     {
293 293
         $fh = $this->getStream($blockId);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
                 break;
308 308
             case OLE_PPS_TYPE_DIR:
309 309
                 $pps = new OLE_PPS(null, null, null, null, null,
310
-                                   null, null, null, null, array());
310
+                                    null, null, null, null, array());
311 311
                 break;
312 312
             case OLE_PPS_TYPE_FILE:
313 313
                 require_once 'OLE/PPS/File.php';
@@ -360,13 +360,13 @@  discard block
 block discarded – undo
360 360
     }
361 361
 
362 362
     /**
363
-    * It checks whether the PPS tree is complete (all PPS's read)
364
-    * starting with the given PPS (not necessarily root)
365
-    *
366
-    * @access private
367
-    * @param integer $index The index of the PPS from which we are checking
368
-    * @return boolean Whether the PPS tree for the given PPS is complete
369
-    */
363
+     * It checks whether the PPS tree is complete (all PPS's read)
364
+     * starting with the given PPS (not necessarily root)
365
+     *
366
+     * @access private
367
+     * @param integer $index The index of the PPS from which we are checking
368
+     * @return boolean Whether the PPS tree for the given PPS is complete
369
+     */
370 370
     function _ppsTreeComplete($index)
371 371
     {
372 372
         return isset($this->_list[$index]) &&
@@ -380,12 +380,12 @@  discard block
 block discarded – undo
380 380
     }
381 381
 
382 382
     /**
383
-    * Checks whether a PPS is a File PPS or not.
384
-    * If there is no PPS for the index given, it will return false.
385
-    * @param integer $index The index for the PPS
386
-    * @return bool true if it's a File PPS, false otherwise
387
-    * @access public
388
-    */
383
+     * Checks whether a PPS is a File PPS or not.
384
+     * If there is no PPS for the index given, it will return false.
385
+     * @param integer $index The index for the PPS
386
+     * @return bool true if it's a File PPS, false otherwise
387
+     * @access public
388
+     */
389 389
     function isFile($index)
390 390
     {
391 391
         if (isset($this->_list[$index])) {
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
     }
396 396
 
397 397
     /**
398
-    * Checks whether a PPS is a Root PPS or not.
399
-    * If there is no PPS for the index given, it will return false.
400
-    * @param integer $index The index for the PPS.
401
-    * @return bool true if it's a Root PPS, false otherwise
402
-    * @access public
403
-    */
398
+     * Checks whether a PPS is a Root PPS or not.
399
+     * If there is no PPS for the index given, it will return false.
400
+     * @param integer $index The index for the PPS.
401
+     * @return bool true if it's a Root PPS, false otherwise
402
+     * @access public
403
+     */
404 404
     function isRoot($index)
405 405
     {
406 406
         if (isset($this->_list[$index])) {
@@ -410,26 +410,26 @@  discard block
 block discarded – undo
410 410
     }
411 411
 
412 412
     /**
413
-    * Gives the total number of PPS's found in the OLE container.
414
-    * @return integer The total number of PPS's found in the OLE container
415
-    * @access public
416
-    */
413
+     * Gives the total number of PPS's found in the OLE container.
414
+     * @return integer The total number of PPS's found in the OLE container
415
+     * @access public
416
+     */
417 417
     function ppsTotal()
418 418
     {
419 419
         return count($this->_list);
420 420
     }
421 421
 
422 422
     /**
423
-    * Gets data from a PPS
424
-    * If there is no PPS for the index given, it will return an empty string.
425
-    * @param integer $index    The index for the PPS
426
-    * @param integer $position The position from which to start reading
427
-    *                          (relative to the PPS)
428
-    * @param integer $length   The amount of bytes to read (at most)
429
-    * @return string The binary string containing the data requested
430
-    * @access public
431
-    * @see OLE_PPS_File::getStream()
432
-    */
423
+     * Gets data from a PPS
424
+     * If there is no PPS for the index given, it will return an empty string.
425
+     * @param integer $index    The index for the PPS
426
+     * @param integer $position The position from which to start reading
427
+     *                          (relative to the PPS)
428
+     * @param integer $length   The amount of bytes to read (at most)
429
+     * @return string The binary string containing the data requested
430
+     * @access public
431
+     * @see OLE_PPS_File::getStream()
432
+     */
433 433
     function getData($index, $position, $length)
434 434
     {
435 435
         // if position is not valid return empty string
@@ -446,12 +446,12 @@  discard block
 block discarded – undo
446 446
     }
447 447
 
448 448
     /**
449
-    * Gets the data length from a PPS
450
-    * If there is no PPS for the index given, it will return 0.
451
-    * @param integer $index The index for the PPS
452
-    * @return integer The amount of bytes in data the PPS has
453
-    * @access public
454
-    */
449
+     * Gets the data length from a PPS
450
+     * If there is no PPS for the index given, it will return 0.
451
+     * @param integer $index The index for the PPS
452
+     * @return integer The amount of bytes in data the PPS has
453
+     * @access public
454
+     */
455 455
     function getDataLength($index)
456 456
     {
457 457
         if (isset($this->_list[$index])) {
@@ -461,13 +461,13 @@  discard block
 block discarded – undo
461 461
     }
462 462
 
463 463
     /**
464
-    * Utility function to transform ASCII text to Unicode
465
-    *
466
-    * @access public
467
-    * @static
468
-    * @param string $ascii The ASCII string to transform
469
-    * @return string The string in Unicode
470
-    */
464
+     * Utility function to transform ASCII text to Unicode
465
+     *
466
+     * @access public
467
+     * @static
468
+     * @param string $ascii The ASCII string to transform
469
+     * @return string The string in Unicode
470
+     */
471 471
     function Asc2Ucs($ascii)
472 472
     {
473 473
         $rawname = '';
@@ -478,14 +478,14 @@  discard block
 block discarded – undo
478 478
     }
479 479
 
480 480
     /**
481
-    * Utility function
482
-    * Returns a string for the OLE container with the date given
483
-    *
484
-    * @access public
485
-    * @static
486
-    * @param integer $date A timestamp
487
-    * @return string The string for the OLE container
488
-    */
481
+     * Utility function
482
+     * Returns a string for the OLE container with the date given
483
+     *
484
+     * @access public
485
+     * @static
486
+     * @param integer $date A timestamp
487
+     * @return string The string for the OLE container
488
+     */
489 489
     function LocalDate2OLE($date = null)
490 490
     {
491 491
         if (!isset($date)) {
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
         // calculate seconds
501 501
         $big_date = $days * 24 * 3600 +
502 502
             gmmktime(date("H",$date),date("i",$date),date("s",$date),
503
-                     date("m",$date),date("d",$date),date("Y",$date));
503
+                        date("m",$date),date("d",$date),date("Y",$date));
504 504
         // multiply just to make MS happy
505 505
         $big_date *= 10000000;
506 506
 
@@ -525,12 +525,12 @@  discard block
 block discarded – undo
525 525
     }
526 526
 
527 527
     /**
528
-    * Returns a timestamp from an OLE container's date
529
-    * @param integer $string A binary string with the encoded date
530
-    * @return string The timestamp corresponding to the string
531
-    * @access public
532
-    * @static
533
-    */
528
+     * Returns a timestamp from an OLE container's date
529
+     * @param integer $string A binary string with the encoded date
530
+     * @return string The timestamp corresponding to the string
531
+     * @access public
532
+     * @static
533
+     */
534 534
     function OLE2LocalDate($string)
535 535
     {
536 536
         if (strlen($string) != 8) {
Please login to merge, or discard this patch.
main/inc/lib/pear/OLE/ChainedBlockStream.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
         // 25 is length of "ole-chainedblockstream://"
84 84
         parse_str(substr($path, 25), $this->params);
85 85
         if (!isset($this->params['oleInstanceId'],
86
-                   $this->params['blockId'],
87
-                   $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) {
86
+                    $this->params['blockId'],
87
+                    $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) {
88 88
 
89 89
             if ($options & STREAM_REPORT_ERRORS) {
90 90
                 trigger_error('OLE stream not found', E_USER_WARNING);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         if (version_compare(PHP_VERSION, '5.0', '>=') &&
164 164
             version_compare(PHP_VERSION, '5.1', '<')) {
165 165
 
166
-           $eof = !$eof;
166
+            $eof = !$eof;
167 167
         }
168 168
         return $eof;
169 169
     }
Please login to merge, or discard this patch.