Completed
Push — 1.10.x ( 8f997c...918380 )
by Yannick
259:37 queued 220:06
created
main/inc/lib/pear/PEAR.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 /**#@+
27 27
  * ERROR constants
28 28
  */
29
-define('PEAR_ERROR_RETURN',     1);
30
-define('PEAR_ERROR_PRINT',      2);
31
-define('PEAR_ERROR_TRIGGER',    4);
32
-define('PEAR_ERROR_DIE',        8);
33
-define('PEAR_ERROR_CALLBACK',  16);
29
+define('PEAR_ERROR_RETURN', 1);
30
+define('PEAR_ERROR_PRINT', 2);
31
+define('PEAR_ERROR_TRIGGER', 4);
32
+define('PEAR_ERROR_DIE', 8);
33
+define('PEAR_ERROR_CALLBACK', 16);
34 34
 /**
35 35
  * WARNING: obsolete
36 36
  * @deprecated
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 
43 43
 if (substr(PHP_OS, 0, 3) == 'WIN') {
44 44
     define('OS_WINDOWS', true);
45
-    define('OS_UNIX',    false);
46
-    define('PEAR_OS',    'Windows');
45
+    define('OS_UNIX', false);
46
+    define('PEAR_OS', 'Windows');
47 47
 } else {
48 48
     define('OS_WINDOWS', false);
49
-    define('OS_UNIX',    true);
50
-    define('PEAR_OS',    'Unix'); // blatant assumption
49
+    define('OS_UNIX', true);
50
+    define('PEAR_OS', 'Unix'); // blatant assumption
51 51
 }
52 52
 
53 53
 $GLOBALS['_PEAR_default_error_mode']     = PEAR_ERROR_RETURN;
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
             // $error_code is a non-empty array here;
452 452
             // we walk through it trying to unset all
453 453
             // values
454
-            foreach($error_code as $key => $error) {
454
+            foreach ($error_code as $key => $error) {
455 455
                 if ($this->_checkDelExpect($error)) {
456
-                    $deleted =  true;
456
+                    $deleted = true;
457 457
                 } else {
458 458
                     $deleted = false;
459 459
                 }
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
      */
987 987
     function getMessage()
988 988
     {
989
-        return ($this->error_message_prefix . $this->message);
989
+        return ($this->error_message_prefix.$this->message);
990 990
     }
991 991
 
992 992
 
@@ -1103,8 +1103,7 @@  discard block
 block discarded – undo
1103 1103
         if ($this->mode & PEAR_ERROR_CALLBACK) {
1104 1104
             if (is_array($this->callback)) {
1105 1105
                 $callback = (is_object($this->callback[0]) ?
1106
-                    strtolower(get_class($this->callback[0])) :
1107
-                    $this->callback[0]) . '::' .
1106
+                    strtolower(get_class($this->callback[0])) : $this->callback[0]).'::'.
1108 1107
                     $this->callback[1];
1109 1108
             } else {
1110 1109
                 $callback = $this->callback;
Please login to merge, or discard this patch.
main/inc/lib/pear/Exception.php 1 patch
Spacing   +24 added lines, -26 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             // using is_object allows both Exception and PEAR_Error
127 127
             if (is_object($p2) && !($p2 instanceof Exception)) {
128 128
                 if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) {
129
-                    throw new PEAR_Exception('exception cause must be Exception, ' .
129
+                    throw new PEAR_Exception('exception cause must be Exception, '.
130 130
                         'array, or PEAR_Error');
131 131
                 }
132 132
             }
@@ -276,11 +276,9 @@  discard block
 block discarded – undo
276 276
                         'class' => $cause['package'],
277 277
                         'message' => $cause['message'],
278 278
                         'file' => isset($cause['context']['file']) ?
279
-                                            $cause['context']['file'] :
280
-                                            'unknown',
279
+                                            $cause['context']['file'] : 'unknown',
281 280
                         'line' => isset($cause['context']['line']) ?
282
-                                            $cause['context']['line'] :
283
-                                            'unknown',
281
+                                            $cause['context']['line'] : 'unknown',
284 282
                     );
285 283
                 }
286 284
             }
@@ -293,7 +291,7 @@  discard block
 block discarded – undo
293 291
             $this->_trace = $this->getTrace();
294 292
             if (empty($this->_trace)) {
295 293
                 $backtrace = debug_backtrace();
296
-                $this->_trace = array($backtrace[count($backtrace)-1]);
294
+                $this->_trace = array($backtrace[count($backtrace) - 1]);
297 295
             }
298 296
         }
299 297
         return $this->_trace;
@@ -324,24 +322,24 @@  discard block
 block discarded – undo
324 322
         $trace = $this->getTraceSafe();
325 323
         $causes = array();
326 324
         $this->getCauseMessage($causes);
327
-        $html =  '<table style="border: 1px" cellspacing="0">' . "\n";
325
+        $html = '<table style="border: 1px" cellspacing="0">'."\n";
328 326
         foreach ($causes as $i => $cause) {
329 327
             $html .= '<tr><td colspan="3" style="background: #ff9999">'
330
-               . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: '
331
-               . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> '
332
-               . 'on line <b>' . $cause['line'] . '</b>'
328
+               . str_repeat('-', $i).' <b>'.$cause['class'].'</b>: '
329
+               . htmlspecialchars($cause['message']).' in <b>'.$cause['file'].'</b> '
330
+               . 'on line <b>'.$cause['line'].'</b>'
333 331
                . "</td></tr>\n";
334 332
         }
335
-        $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n"
333
+        $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>'."\n"
336 334
                . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>'
337 335
                . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>'
338
-               . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n";
336
+               . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>'."\n";
339 337
 
340 338
         foreach ($trace as $k => $v) {
341
-            $html .= '<tr><td style="text-align: center;">' . $k . '</td>'
339
+            $html .= '<tr><td style="text-align: center;">'.$k.'</td>'
342 340
                    . '<td>';
343 341
             if (!empty($v['class'])) {
344
-                $html .= $v['class'] . $v['type'];
342
+                $html .= $v['class'].$v['type'];
345 343
             }
346 344
             $html .= $v['function'];
347 345
             $args = array();
@@ -353,22 +351,22 @@  discard block
 block discarded – undo
353 351
                     elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false';
354 352
                     elseif (is_int($arg) || is_double($arg)) $args[] = $arg;
355 353
                     else {
356
-                        $arg = (string)$arg;
354
+                        $arg = (string) $arg;
357 355
                         $str = htmlspecialchars(substr($arg, 0, 16));
358 356
                         if (strlen($arg) > 16) $str .= '&hellip;';
359
-                        $args[] = "'" . $str . "'";
357
+                        $args[] = "'".$str."'";
360 358
                     }
361 359
                 }
362 360
             }
363
-            $html .= '(' . implode(', ',$args) . ')'
361
+            $html .= '('.implode(', ', $args).')'
364 362
                    . '</td>'
365
-                   . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown')
366
-                   . ':' . (isset($v['line']) ? $v['line'] : 'unknown')
367
-                   . '</td></tr>' . "\n";
363
+                   . '<td>'.(isset($v['file']) ? $v['file'] : 'unknown')
364
+                   . ':'.(isset($v['line']) ? $v['line'] : 'unknown')
365
+                   . '</td></tr>'."\n";
368 366
         }
369
-        $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>'
367
+        $html .= '<tr><td style="text-align: center;">'.($k + 1).'</td>'
370 368
                . '<td>{main}</td>'
371
-               . '<td>&nbsp;</td></tr>' . "\n"
369
+               . '<td>&nbsp;</td></tr>'."\n"
372 370
                . '</table>';
373 371
         return $html;
374 372
     }
@@ -379,10 +377,10 @@  discard block
 block discarded – undo
379 377
         $this->getCauseMessage($causes);
380 378
         $causeMsg = '';
381 379
         foreach ($causes as $i => $cause) {
382
-            $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
383
-                   . $cause['message'] . ' in ' . $cause['file']
384
-                   . ' on line ' . $cause['line'] . "\n";
380
+            $causeMsg .= str_repeat(' ', $i).$cause['class'].': '
381
+                   . $cause['message'].' in '.$cause['file']
382
+                   . ' on line '.$cause['line']."\n";
385 383
         }
386
-        return $causeMsg . $this->getTraceAsString();
384
+        return $causeMsg.$this->getTraceAsString();
387 385
     }
388 386
 }
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/HtmlWidgets.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     function Pager_HtmlWidgets(&$pager)
61 61
     {
62
-        $this->pager =& $pager;
62
+        $this->pager = & $pager;
63 63
     }
64 64
 
65 65
     // }}}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @return string xhtml select box
91 91
      * @access public
92 92
      */
93
-    function getPerPageSelectBox($start=5, $end=30, $step=5, $showAllData=false, $extraParams=array())
93
+    function getPerPageSelectBox($start = 5, $end = 30, $step = 5, $showAllData = false, $extraParams = array())
94 94
     {
95 95
         // FIXME: needs POST support
96 96
         $optionText = '%d';
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                 ERROR_PAGER_INVALID_PLACEHOLDER
118 118
             );
119 119
         }
120
-        $start = (int)$start;
121
-        $end   = (int)$end;
122
-        $step  = (int)$step;
120
+        $start = (int) $start;
121
+        $end   = (int) $end;
122
+        $step  = (int) $step;
123 123
         if (!empty($_SESSION[$this->pager->_sessionVar])) {
124
-            $selected = (int)$_SESSION[$this->pager->_sessionVar];
124
+            $selected = (int) $_SESSION[$this->pager->_sessionVar];
125 125
         } else {
126 126
             $selected = $this->pager->_perPage;
127 127
         }
@@ -143,17 +143,17 @@  discard block
 block discarded – undo
143 143
                         $tmpLinkData[$this->pager->_urlVar] = $this->pager->getCurrentPageID();
144 144
                     }
145 145
                     $tmpLinkData[$this->pager->_sessionVar] = '1';
146
-                    $href = '?' . $this->pager->_http_build_query_wrapper($tmpLinkData);
147
-                    $href = htmlentities($this->pager->_url, ENT_COMPAT, 'UTF-8'). preg_replace(
146
+                    $href = '?'.$this->pager->_http_build_query_wrapper($tmpLinkData);
147
+                    $href = htmlentities($this->pager->_url, ENT_COMPAT, 'UTF-8').preg_replace(
148 148
                         '/(&|&amp;|\?)('.$this->pager->_sessionVar.'=)(\d+)/',
149 149
                         '\\1\\2'.$selector,
150 150
                         htmlentities($href, ENT_COMPAT, 'UTF-8')
151 151
                     );
152 152
                 } else {
153
-                    $href = htmlentities($this->pager->_url . str_replace('%d', $selector, $this->pager->_fileName), ENT_COMPAT, 'UTF-8');
153
+                    $href = htmlentities($this->pager->_url.str_replace('%d', $selector, $this->pager->_fileName), ENT_COMPAT, 'UTF-8');
154 154
                 }
155 155
                 $tmp .= ' onchange="document.location.href=\''
156
-                     . $href .'\''
156
+                     . $href.'\''
157 157
                      . '"';
158 158
             } elseif ($this->pager->_httpMethod == 'POST') {
159 159
                 $tmp .= " onchange='"
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
         $tmp .= '>';
172 172
         $last = $start;
173
-        for ($i=$start; $i<=$end; $i+=$step) {
173
+        for ($i = $start; $i <= $end; $i += $step) {
174 174
             $last = $i;
175 175
             $tmp .= '<option value="'.$i.'"';
176 176
             if ($i == $selected) {
@@ -240,13 +240,13 @@  discard block
 block discarded – undo
240 240
             if ($this->pager->_httpMethod == 'GET') {
241 241
                 $selector = '\' + '.'this.options[this.selectedIndex].value + \'';
242 242
                 if ($this->pager->_append) {
243
-                    $href = '?' . $this->pager->_http_build_query_wrapper($this->pager->_linkData);
243
+                    $href = '?'.$this->pager->_http_build_query_wrapper($this->pager->_linkData);
244 244
                     // Modified by Ivan Tcholakov, 17-OCT-2008.
245 245
                     //$href = htmlentities($this->pager->_url, ENT_COMPAT, 'UTF-8'). preg_replace(
246 246
                     //    '/(&|&amp;|\?)('.$this->pager->_urlVar.'=)(\d+)/',
247 247
                     //    '\\1\\2'.$selector,
248 248
                     //    htmlentities($href, ENT_COMPAT, 'UTF-8')
249
-                    $href = api_htmlentities($this->pager->_url). preg_replace(
249
+                    $href = api_htmlentities($this->pager->_url).preg_replace(
250 250
                         '/(&|&amp;|\?)('.$this->pager->_urlVar.'=)(\d+)/',
251 251
                         '\\1\\2'.$selector,
252 252
                         api_htmlentities($href)
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
                 } else {
256 256
                     // Modified by Ivan Tcholakov, 17-OCT-2008.
257 257
                     //$href = htmlentities($this->pager->_url . str_replace('%d', $selector, $this->pager->_fileName), ENT_COMPAT, 'UTF-8');
258
-                    $href = api_htmlentities($this->pager->_url . str_replace('%d', $selector, $this->pager->_fileName));
258
+                    $href = api_htmlentities($this->pager->_url.str_replace('%d', $selector, $this->pager->_fileName));
259 259
                     //
260 260
                 }
261 261
                 $tmp .= ' onchange="javascript: document.location.href=\''
262
-                     . $href .'\''
262
+                     . $href.'\''
263 263
                      . '"';
264 264
             } elseif ($this->pager->_httpMethod == 'POST') {
265 265
                 $tmp .= " onchange='"
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $start = 1;
277 277
         $end   = $this->pager->numPages();
278 278
         $selected = $this->pager->getCurrentPageID();
279
-        for ($i=$start; $i<=$end; $i++) {
279
+        for ($i = $start; $i <= $end; $i++) {
280 280
             $tmp .= '<option value="'.$i.'"';
281 281
             if ($i == $selected) {
282 282
                 $tmp .= ' selected="selected"';
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/Common.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 /**
62 62
  * Error codes
63 63
  */
64
-define('PAGER_OK',                         0);
65
-define('ERROR_PAGER',                     -1);
66
-define('ERROR_PAGER_INVALID',             -2);
64
+define('PAGER_OK', 0);
65
+define('ERROR_PAGER', -1);
66
+define('ERROR_PAGER_INVALID', -2);
67 67
 define('ERROR_PAGER_INVALID_PLACEHOLDER', -3);
68
-define('ERROR_PAGER_INVALID_USAGE',       -4);
69
-define('ERROR_PAGER_NOT_IMPLEMENTED',     -5);
68
+define('ERROR_PAGER_INVALID_USAGE', -4);
69
+define('ERROR_PAGER_NOT_IMPLEMENTED', -5);
70 70
 
71 71
 /**
72 72
  * Pager_Common - Common base class for [Sliding|Jumping] Window Pager
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
      * @var integer number of items per page
95 95
      * @access private
96 96
      */
97
-    var $_perPage     = 10;
97
+    var $_perPage = 10;
98 98
 
99 99
     /**
100 100
      * @var integer number of page links for each window
101 101
      * @access private
102 102
      */
103
-    var $_delta       = 10;
103
+    var $_delta = 10;
104 104
 
105 105
     /**
106 106
      * @var integer current page number
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
      * @var integer total pages number
113 113
      * @access private
114 114
      */
115
-    var $_totalPages  = 1;
115
+    var $_totalPages = 1;
116 116
 
117 117
     /**
118 118
      * @var string CSS class for links
119 119
      * @access private
120 120
      */
121
-    var $_linkClass   = '';
121
+    var $_linkClass = '';
122 122
 
123 123
     /**
124 124
      * @var string wrapper for CSS class name
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
      * @var string path name
131 131
      * @access private
132 132
      */
133
-    var $_path        = PAGER_CURRENT_PATHNAME;
133
+    var $_path = PAGER_CURRENT_PATHNAME;
134 134
 
135 135
     /**
136 136
      * @var string file name
137 137
      * @access private
138 138
      */
139
-    var $_fileName    = PAGER_CURRENT_FILENAME;
139
+    var $_fileName = PAGER_CURRENT_FILENAME;
140 140
 
141 141
     /**
142 142
      * @var boolean If false, don't override the fileName option. Use at your own risk.
@@ -148,19 +148,19 @@  discard block
 block discarded – undo
148 148
      * @var boolean you have to use FALSE with mod_rewrite
149 149
      * @access private
150 150
      */
151
-    var $_append      = true;
151
+    var $_append = true;
152 152
 
153 153
     /**
154 154
      * @var string specifies which HTTP method to use
155 155
      * @access private
156 156
      */
157
-    var $_httpMethod  = 'GET';
157
+    var $_httpMethod = 'GET';
158 158
 
159 159
     /**
160 160
      * @var string specifies which HTML form to use
161 161
      * @access private
162 162
      */
163
-    var $_formID      = '';
163
+    var $_formID = '';
164 164
 
165 165
     /**
166 166
      * @var boolean whether or not to import submitted data
@@ -172,19 +172,19 @@  discard block
 block discarded – undo
172 172
      * @var string name of the querystring var for pageID
173 173
      * @access private
174 174
      */
175
-    var $_urlVar      = 'pageID';
175
+    var $_urlVar = 'pageID';
176 176
 
177 177
     /**
178 178
      * @var array data to pass through the link
179 179
      * @access private
180 180
      */
181
-    var $_linkData    = array();
181
+    var $_linkData = array();
182 182
 
183 183
     /**
184 184
      * @var array additional URL vars
185 185
      * @access private
186 186
      */
187
-    var $_extraVars   = array();
187
+    var $_extraVars = array();
188 188
 
189 189
     /**
190 190
      * @var array URL vars to ignore
@@ -196,19 +196,19 @@  discard block
 block discarded – undo
196 196
      * @var boolean TRUE => expanded mode (for Pager_Sliding)
197 197
      * @access private
198 198
      */
199
-    var $_expanded    = true;
199
+    var $_expanded = true;
200 200
 
201 201
     /**
202 202
      * @var boolean TRUE => show accesskey attribute on <a> tags
203 203
      * @access private
204 204
      */
205
-    var $_accesskey   = false;
205
+    var $_accesskey = false;
206 206
 
207 207
     /**
208 208
      * @var string extra attributes for the <a> tag
209 209
      * @access private
210 210
      */
211
-    var $_attributes  = '';
211
+    var $_attributes = '';
212 212
 
213 213
     /**
214 214
      * @var string onclick
@@ -220,37 +220,37 @@  discard block
 block discarded – undo
220 220
      * @var string alt text for "first page" (use "%d" placeholder for page number)
221 221
      * @access private
222 222
      */
223
-    var $_altFirst     = 'first page';
223
+    var $_altFirst = 'first page';
224 224
 
225 225
     /**
226 226
      * @var string alt text for "previous page"
227 227
      * @access private
228 228
      */
229
-    var $_altPrev     = 'previous page';
229
+    var $_altPrev = 'previous page';
230 230
 
231 231
     /**
232 232
      * @var string alt text for "next page"
233 233
      * @access private
234 234
      */
235
-    var $_altNext     = 'next page';
235
+    var $_altNext = 'next page';
236 236
 
237 237
     /**
238 238
      * @var string alt text for "last page" (use "%d" placeholder for page number)
239 239
      * @access private
240 240
      */
241
-    var $_altLast     = 'last page';
241
+    var $_altLast = 'last page';
242 242
 
243 243
     /**
244 244
      * @var string alt text for "page" (use optional "%d" placeholder for page number)
245 245
      * @access private
246 246
      */
247
-    var $_altPage     = 'page';
247
+    var $_altPage = 'page';
248 248
 
249 249
     /**
250 250
      * @var string image/text to use as "prev" link
251 251
      * @access private
252 252
      */
253
-    var $_prevImg     = '&lt;&lt; Back';
253
+    var $_prevImg = '&lt;&lt; Back';
254 254
 
255 255
     /**
256 256
      * image/text to use as "prev" link when no prev link is needed  (e.g. on the first page)
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      * @var string image/text to use as "next" link
266 266
      * @access private
267 267
      */
268
-    var $_nextImg     = 'Next &gt;&gt;';
268
+    var $_nextImg = 'Next &gt;&gt;';
269 269
 
270 270
     /**
271 271
      * image/text to use as "next" link when
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      * @var string link separator
282 282
      * @access private
283 283
      */
284
-    var $_separator   = '';
284
+    var $_separator = '';
285 285
 
286 286
     /**
287 287
      * @var integer number of spaces before separator
@@ -293,31 +293,31 @@  discard block
 block discarded – undo
293 293
      * @var integer number of spaces after separator
294 294
      * @access private
295 295
      */
296
-    var $_spacesAfterSeparator  = 1;
296
+    var $_spacesAfterSeparator = 1;
297 297
 
298 298
     /**
299 299
      * @var string CSS class name for current page link
300 300
      * @access private
301 301
      */
302
-    var $_curPageLinkClassName  = '';
302
+    var $_curPageLinkClassName = '';
303 303
 
304 304
     /**
305 305
      * @var string Text before current page link
306 306
      * @access private
307 307
      */
308
-    var $_curPageSpanPre        = '';
308
+    var $_curPageSpanPre = '';
309 309
 
310 310
     /**
311 311
      * @var string Text after current page link
312 312
      * @access private
313 313
      */
314
-    var $_curPageSpanPost       = '';
314
+    var $_curPageSpanPost = '';
315 315
 
316 316
     /**
317 317
      * @var string Text before first page link
318 318
      * @access private
319 319
      */
320
-    var $_firstPagePre  = '[';
320
+    var $_firstPagePre = '[';
321 321
 
322 322
     /**
323 323
      * @var string Text to be used for first page link
@@ -335,31 +335,31 @@  discard block
 block discarded – undo
335 335
      * @var string Text before last page link
336 336
      * @access private
337 337
      */
338
-    var $_lastPagePre   = '[';
338
+    var $_lastPagePre = '[';
339 339
 
340 340
     /**
341 341
      * @var string Text to be used for last page link
342 342
      * @access private
343 343
      */
344
-    var $_lastPageText  = '';
344
+    var $_lastPageText = '';
345 345
 
346 346
     /**
347 347
      * @var string Text after last page link
348 348
      * @access private
349 349
      */
350
-    var $_lastPagePost  = ']';
350
+    var $_lastPagePost = ']';
351 351
 
352 352
     /**
353 353
      * @var string Will contain the HTML code for the spaces
354 354
      * @access private
355 355
      */
356
-    var $_spacesBefore  = '';
356
+    var $_spacesBefore = '';
357 357
 
358 358
     /**
359 359
      * @var string Will contain the HTML code for the spaces
360 360
      * @access private
361 361
      */
362
-    var $_spacesAfter   = '';
362
+    var $_spacesAfter = '';
363 363
 
364 364
     /**
365 365
      * @var string String used as title in <link rel="first"> tag
@@ -389,37 +389,37 @@  discard block
 block discarded – undo
389 389
      * @var string Text to be used for the 'show all' option in the select box
390 390
      * @access private
391 391
      */
392
-    var $_showAllText   = '';
392
+    var $_showAllText = '';
393 393
 
394 394
     /**
395 395
      * @var array data to be paged
396 396
      * @access private
397 397
      */
398
-    var $_itemData      = null;
398
+    var $_itemData = null;
399 399
 
400 400
     /**
401 401
      * @var boolean If TRUE and there's only one page, links aren't shown
402 402
      * @access private
403 403
      */
404
-    var $_clearIfVoid   = true;
404
+    var $_clearIfVoid = true;
405 405
 
406 406
     /**
407 407
      * @var boolean Use session for storing the number of items per page
408 408
      * @access private
409 409
      */
410
-    var $_useSessions   = false;
410
+    var $_useSessions = false;
411 411
 
412 412
     /**
413 413
      * @var boolean Close the session when finished reading/writing data
414 414
      * @access private
415 415
      */
416
-    var $_closeSession  = false;
416
+    var $_closeSession = false;
417 417
 
418 418
     /**
419 419
      * @var string name of the session var for number of items per page
420 420
      * @access private
421 421
      */
422
-    var $_sessionVar    = 'setPerPage';
422
+    var $_sessionVar = 'setPerPage';
423 423
 
424 424
     /**
425 425
      * Pear error mode (when raiseError is called)
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
      * @return array back/next/first/last and page links
672 672
      * @access public
673 673
      */
674
-    function getLinks($pageID=null, $next_html='')
674
+    function getLinks($pageID = null, $next_html = '')
675 675
     {
676 676
         $msg = 'function "getLinks()" not implemented.';
677 677
         return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
      */
747 747
     function numPages()
748 748
     {
749
-        return (int)$this->_totalPages;
749
+        return (int) $this->_totalPages;
750 750
     }
751 751
 
752 752
     // }}}
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
         if (!is_null($this->_itemData)) {
807 807
             $this->_totalItems = count($this->_itemData);
808 808
         }
809
-        $this->_totalPages = ceil((float)$this->_totalItems / (float)$this->_perPage);
809
+        $this->_totalPages = ceil((float) $this->_totalItems / (float) $this->_perPage);
810 810
         $i = 1;
811 811
         if (!empty($this->_itemData)) {
812 812
             foreach ($this->_itemData as $key => $value) {
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
     {
840 840
         if ($this->_httpMethod == 'GET') {
841 841
             if ($this->_append) {
842
-                $href = '?' . $this->_http_build_query_wrapper($this->_linkData);
842
+                $href = '?'.$this->_http_build_query_wrapper($this->_linkData);
843 843
             } else {
844 844
                 $href = str_replace('%d', $this->_linkData[$this->_urlVar], $this->_fileName);
845 845
             }
@@ -850,25 +850,25 @@  discard block
 block discarded – undo
850 850
             return sprintf('<a href="%s"%s%s%s%s title="%s">%s</a>',
851 851
                            // Modified by Ivan Tcholakov, 17-OCT-2008.
852 852
                            //htmlentities($this->_url . $href, ENT_COMPAT, 'UTF-8'),
853
-                           api_htmlentities($this->_url . $href),
853
+                           api_htmlentities($this->_url.$href),
854 854
                            //
855 855
                            empty($this->_classString) ? '' : ' '.$this->_classString,
856
-                           empty($this->_attributes)  ? '' : ' '.$this->_attributes,
857
-                           empty($this->_accesskey)   ? '' : ' accesskey="'.$this->_linkData[$this->_urlVar].'"',
858
-                           empty($onclick)            ? '' : ' onclick="'.$onclick.'"',
856
+                           empty($this->_attributes) ? '' : ' '.$this->_attributes,
857
+                           empty($this->_accesskey) ? '' : ' accesskey="'.$this->_linkData[$this->_urlVar].'"',
858
+                           empty($onclick) ? '' : ' onclick="'.$onclick.'"',
859 859
                            $altText,
860 860
                            $linkText
861 861
             );
862 862
         } elseif ($this->_httpMethod == 'POST') {
863 863
             $href = $this->_url;
864 864
             if (!empty($_GET)) {
865
-                $href .= '?' . $this->_http_build_query_wrapper($_GET);
865
+                $href .= '?'.$this->_http_build_query_wrapper($_GET);
866 866
             }
867 867
             return sprintf("<a href='javascript:void(0)' onclick='%s'%s%s%s title='%s'>%s</a>",
868 868
                            $this->_generateFormOnClick($href, $this->_linkData),
869 869
                            empty($this->_classString) ? '' : ' '.$this->_classString,
870
-                           empty($this->_attributes)  ? '' : ' '.$this->_attributes,
871
-                           empty($this->_accesskey)   ? '' : ' accesskey=\''.$this->_linkData[$this->_urlVar].'\'',
870
+                           empty($this->_attributes) ? '' : ' '.$this->_attributes,
871
+                           empty($this->_accesskey) ? '' : ' accesskey=\''.$this->_linkData[$this->_urlVar].'\'',
872 872
                            $altText,
873 873
                            $linkText
874 874
             );
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
         $str = '';
957 957
         if (is_array($data) || is_object($data)) {
958 958
             // foreach key/visible member
959
-            foreach ((array)$data as $key => $val) {
959
+            foreach ((array) $data as $key => $val) {
960 960
                 // append [$key] to prev
961 961
                 $tempKey = sprintf('%s[%s]', $prev, $key);
962 962
                 $str .= $this->_generateFormOnClickHelper($val, $tempKey);
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
      * @return string The link
1107 1107
      * @access private
1108 1108
      */
1109
-    function _getBackLink($url='', $link='')
1109
+    function _getBackLink($url = '', $link = '')
1110 1110
     {
1111 1111
         //legacy settings... the preferred way to set an option
1112 1112
         //now is passing it to the factory
@@ -1120,10 +1120,10 @@  discard block
 block discarded – undo
1120 1120
         if ($this->_currentPage > 1) {
1121 1121
             $this->_linkData[$this->_urlVar] = $this->getPreviousPageID();
1122 1122
             $back = $this->_renderLink($this->_altPrev, $this->_prevImg)
1123
-                  . $this->_spacesBefore . $this->_spacesAfter;
1123
+                  . $this->_spacesBefore.$this->_spacesAfter;
1124 1124
         } else if ($this->_prevImgEmpty !== null && $this->_totalPages > 1) {
1125 1125
             $back = $this->_prevImgEmpty
1126
-                  . $this->_spacesBefore . $this->_spacesAfter;
1126
+                  . $this->_spacesBefore.$this->_spacesAfter;
1127 1127
         }
1128 1128
         return $back;
1129 1129
     }
@@ -1139,7 +1139,7 @@  discard block
 block discarded – undo
1139 1139
      * @return string Links
1140 1140
      * @access private
1141 1141
      */
1142
-    function _getPageLinks($url='')
1142
+    function _getPageLinks($url = '')
1143 1143
     {
1144 1144
         $msg = 'function "_getPageLinks()" not implemented.';
1145 1145
         return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
      * @return string The link
1158 1158
      * @access private
1159 1159
      */
1160
-    function _getNextLink($url='', $link='')
1160
+    function _getNextLink($url = '', $link = '')
1161 1161
     {
1162 1162
         //legacy settings... the preferred way to set an option
1163 1163
         //now is passing it to the factory
@@ -1172,11 +1172,11 @@  discard block
 block discarded – undo
1172 1172
             $this->_linkData[$this->_urlVar] = $this->getNextPageID();
1173 1173
             $next = $this->_spacesAfter
1174 1174
                   . $this->_renderLink($this->_altNext, $this->_nextImg)
1175
-                  . $this->_spacesBefore . $this->_spacesAfter;
1175
+                  . $this->_spacesBefore.$this->_spacesAfter;
1176 1176
         } else if ($this->_nextImgEmpty !== null && $this->_totalPages > 1) {
1177 1177
             $next = $this->_spacesAfter
1178 1178
                   . $this->_nextImgEmpty
1179
-                  . $this->_spacesBefore . $this->_spacesAfter;
1179
+                  . $this->_spacesBefore.$this->_spacesAfter;
1180 1180
         }
1181 1181
         return $next;
1182 1182
     }
@@ -1308,13 +1308,13 @@  discard block
 block discarded – undo
1308 1308
     {
1309 1309
         $this->_linkData[$this->_urlVar] = $pageID;
1310 1310
         if ($this->_append) {
1311
-            $href = '?' . $this->_http_build_query_wrapper($this->_linkData);
1311
+            $href = '?'.$this->_http_build_query_wrapper($this->_linkData);
1312 1312
         } else {
1313 1313
             $href = str_replace('%d', $this->_linkData[$this->_urlVar], $this->_fileName);
1314 1314
         }
1315 1315
         // Modified by Ivan Tcholakov, 17-OCT-2008.
1316 1316
         //return htmlentities($this->_url . $href, ENT_COMPAT, 'UTF-8');
1317
-        return api_htmlentities($this->_url . $href);
1317
+        return api_htmlentities($this->_url.$href);
1318 1318
         //
1319 1319
     }
1320 1320
 
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
      * @return string xhtml select box
1343 1343
      * @access public
1344 1344
      */
1345
-    function getPerPageSelectBox($start=5, $end=30, $step=5, $showAllData=false, $extraParams=array())
1345
+    function getPerPageSelectBox($start = 5, $end = 30, $step = 5, $showAllData = false, $extraParams = array())
1346 1346
     {
1347 1347
         include_once 'Pager/HtmlWidgets.php';
1348 1348
         $widget = new Pager_HtmlWidgets($this);
@@ -1393,8 +1393,8 @@  discard block
 block discarded – undo
1393 1393
         $this->_linkData[$this->_urlVar] = 1;
1394 1394
         return $this->_renderLink(
1395 1395
                 str_replace('%d', 1, $this->_altFirst),
1396
-                $this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost
1397
-        ) . $this->_spacesBefore . $this->_spacesAfter;
1396
+                $this->_firstPagePre.$this->_firstPageText.$this->_firstPagePost
1397
+        ).$this->_spacesBefore.$this->_spacesAfter;
1398 1398
     }
1399 1399
 
1400 1400
     // }}}
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
         $this->_linkData[$this->_urlVar] = $this->_totalPages;
1416 1416
         return $this->_renderLink(
1417 1417
                 str_replace('%d', $this->_totalPages, $this->_altLast),
1418
-                $this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost
1418
+                $this->_lastPagePre.$this->_lastPageText.$this->_lastPagePost
1419 1419
         );
1420 1420
     }
1421 1421
 
@@ -1455,7 +1455,7 @@  discard block
 block discarded – undo
1455 1455
      */
1456 1456
     function _http_build_query_wrapper($data)
1457 1457
     {
1458
-        $data = (array)$data;
1458
+        $data = (array) $data;
1459 1459
         if (empty($data)) {
1460 1460
             return '';
1461 1461
         }
@@ -1463,12 +1463,12 @@  discard block
 block discarded – undo
1463 1463
         if ($separator == '&amp;') {
1464 1464
             $separator = '&'; //the string is escaped by htmlentities anyway...
1465 1465
         }
1466
-        $tmp = array ();
1466
+        $tmp = array();
1467 1467
         foreach ($data as $key => $val) {
1468 1468
             if (is_scalar($val)) {
1469 1469
                 //array_push($tmp, $key.'='.$val);
1470 1470
                 $val = urlencode($val);
1471
-                array_push($tmp, $key .'='. str_replace('%2F', '/', $val));
1471
+                array_push($tmp, $key.'='.str_replace('%2F', '/', $val));
1472 1472
                 continue;
1473 1473
             }
1474 1474
             // If the value is an array, recursively parse it
@@ -1494,7 +1494,7 @@  discard block
 block discarded – undo
1494 1494
      */
1495 1495
     function __http_build_query($array, $name)
1496 1496
     {
1497
-        $tmp = array ();
1497
+        $tmp = array();
1498 1498
         $separator = ini_get('arg_separator.output');
1499 1499
         if ($separator == '&amp;') {
1500 1500
             $separator = '&'; //the string is escaped by htmlentities anyway...
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
     {
1570 1570
         foreach ($options as $key => $value) {
1571 1571
             if (in_array($key, $this->_allowed_options) && (!is_null($value))) {
1572
-                $this->{'_' . $key} = $value;
1572
+                $this->{'_'.$key} = $value;
1573 1573
             }
1574 1574
         }
1575 1575
 
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
         }
1585 1585
 
1586 1586
         if (substr($this->_path, -1, 1) == '/') {
1587
-            $this->_fileName = ltrim($this->_fileName, '/');  //strip leading slash
1587
+            $this->_fileName = ltrim($this->_fileName, '/'); //strip leading slash
1588 1588
         }
1589 1589
 
1590 1590
         if ($this->_append) {
@@ -1615,8 +1615,8 @@  discard block
 block discarded – undo
1615 1615
         }
1616 1616
 
1617 1617
         if (strlen($this->_curPageLinkClassName)) {
1618
-            $this->_curPageSpanPre  .= '<span class="'.$this->_curPageLinkClassName.'">';
1619
-            $this->_curPageSpanPost = '</span>' . $this->_curPageSpanPost;
1618
+            $this->_curPageSpanPre .= '<span class="'.$this->_curPageLinkClassName.'">';
1619
+            $this->_curPageSpanPost = '</span>'.$this->_curPageSpanPost;
1620 1620
         }
1621 1621
 
1622 1622
         $this->_perPage = max($this->_perPage, 1); //avoid possible user errors
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
             session_start();
1626 1626
         }
1627 1627
         if (!empty($_REQUEST[$this->_sessionVar])) {
1628
-            $this->_perPage = max(1, (int)$_REQUEST[$this->_sessionVar]);
1628
+            $this->_perPage = max(1, (int) $_REQUEST[$this->_sessionVar]);
1629 1629
             if ($this->_useSessions) {
1630 1630
                 $_SESSION[$this->_sessionVar] = $this->_perPage;
1631 1631
             }
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
         //
1648 1648
 
1649 1649
         if (isset($_REQUEST[$this->_urlVar]) && empty($options['currentPage'])) {
1650
-            $this->_currentPage = (int)$_REQUEST[$this->_urlVar];
1650
+            $this->_currentPage = (int) $_REQUEST[$this->_urlVar];
1651 1651
         }
1652 1652
         $this->_currentPage = max($this->_currentPage, 1);
1653 1653
         $this->_linkData = $this->_getLinksData();
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
             $msg = 'invalid option: '.$name;
1673 1673
             return $this->raiseError($msg, ERROR_PAGER_INVALID);
1674 1674
         }
1675
-        return $this->{'_' . $name};
1675
+        return $this->{'_'.$name};
1676 1676
     }
1677 1677
 
1678 1678
     // }}}
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
     {
1689 1689
         $options = array();
1690 1690
         foreach ($this->_allowed_options as $option) {
1691
-            $options[$option] = $this->{'_' . $option};
1691
+            $options[$option] = $this->{'_'.$option};
1692 1692
         }
1693 1693
         return $options;
1694 1694
     }
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/Sliding.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     function getPageRangeByPageId($pageid = null)
114 114
     {
115
-        $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
115
+        $pageid = isset($pageid) ? (int) $pageid : $this->_currentPage;
116 116
         if (!isset($this->_pageData)) {
117 117
             $this->_generatePageData();
118 118
         }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * @return array back/pages/next/first/last/all links
147 147
      * @access public
148 148
      */
149
-    function getLinks($pageID = null, $dummy='')
149
+    function getLinks($pageID = null, $dummy = '')
150 150
     {
151 151
         if (!is_null($pageID)) {
152 152
             $_sav = $this->_currentPage;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
                 if ($i == $this->_currentPage) {
253 253
                     $this->range[$i] = true;
254
-                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
254
+                    $links .= $this->_curPageSpanPre.$i.$this->_curPageSpanPost;
255 255
                 } else {
256 256
                     $this->range[$i] = false;
257 257
                     $this->_linkData[$this->_urlVar] = $i;
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
             }
263 263
 
264 264
             if ($this->_expanded && $expansion_after) {
265
-                $links .= $this->_separator . $this->_spacesAfter;
266
-                for ($i = $this->_currentPage + $this->_delta +1; $expansion_after; $expansion_after--, $i++) {
265
+                $links .= $this->_separator.$this->_spacesAfter;
266
+                for ($i = $this->_currentPage + $this->_delta + 1; $expansion_after; $expansion_after--, $i++) {
267 267
                     $print_separator_flag = ($expansion_after != 1);
268 268
                     $this->range[$i] = false;
269 269
                     $this->_linkData[$this->_urlVar] = $i;
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
 
276 276
         } else {
277 277
             //if $this->_totalPages <= (2*Delta+1) show them all
278
-            for ($i=1; $i<=$this->_totalPages; $i++) {
278
+            for ($i = 1; $i <= $this->_totalPages; $i++) {
279 279
                 if ($i != $this->_currentPage) {
280 280
                     $this->range[$i] = false;
281 281
                     $this->_linkData[$this->_urlVar] = $i;
282 282
                     $links .= $this->_renderLink(str_replace('%d', $i, $this->_altPage), $i);
283 283
                 } else {
284 284
                     $this->range[$i] = true;
285
-                    $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
285
+                    $links .= $this->_curPageSpanPre.$i.$this->_curPageSpanPost;
286 286
                 }
287 287
                 $links .= $this->_spacesBefore
288 288
                        . (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/Jumping.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         if (($index % $this->_perPage) > 0) {
94
-            $pageID = ceil((float)$index / (float)$this->_perPage);
94
+            $pageID = ceil((float) $index / (float) $this->_perPage);
95 95
         } else {
96 96
             $pageID = $index / $this->_perPage;
97 97
         }
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
      */
118 118
     function getPageRangeByPageId($pageid = null)
119 119
     {
120
-        $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
120
+        $pageid = isset($pageid) ? (int) $pageid : $this->_currentPage;
121 121
         if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
122 122
             // I'm sure I'm missing something here, but this formula works
123 123
             // so I'm using it until I find something simpler.
124
-            $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1;
124
+            $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta + 1;
125 125
             return array(
126 126
                 max($start, 1),
127
-                min($start+$this->_delta-1, $this->_totalPages)
127
+                min($start + $this->_delta - 1, $this->_totalPages)
128 128
             );
129 129
         } else {
130 130
             return array(0, 0);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      *
154 154
      * @return array Back/pages/next links
155 155
      */
156
-    function getLinks($pageID=null, $next_html='')
156
+    function getLinks($pageID = null, $next_html = '')
157 157
     {
158 158
         //BC hack
159 159
         if (!empty($next_html)) {
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
         $links = '';
241 241
         $limits = $this->getPageRangeByPageId($this->_currentPage);
242 242
 
243
-        for ($i=$limits[0]; $i<=min($limits[1], $this->_totalPages); $i++) {
243
+        for ($i = $limits[0]; $i <= min($limits[1], $this->_totalPages); $i++) {
244 244
             if ($i != $this->_currentPage) {
245 245
                 $this->range[$i] = false;
246 246
                 $this->_linkData[$this->_urlVar] = $i;
247 247
                 $links .= $this->_renderLink(str_replace('%d', $i, $this->_altPage), $i);
248 248
             } else {
249 249
                 $this->range[$i] = true;
250
-                $links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
250
+                $links .= $this->_curPageSpanPre.$i.$this->_curPageSpanPost;
251 251
             }
252 252
             $links .= $this->_spacesBefore
253 253
                    . (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
Please login to merge, or discard this patch.
main/inc/lib/pear/Pager/Pager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@
 block discarded – undo
169 169
     static function &factory($options = array())
170 170
     {
171 171
         $mode = (isset($options['mode']) ? ucfirst($options['mode']) : 'Jumping');
172
-        $classname = 'Pager_' . $mode;
173
-        $classfile = 'Pager' . DIRECTORY_SEPARATOR . $mode . '.php';
172
+        $classname = 'Pager_'.$mode;
173
+        $classfile = 'Pager'.DIRECTORY_SEPARATOR.$mode.'.php';
174 174
 
175 175
         // Attempt to include a custom version of the named class, but don't treat
176 176
         // a failure as fatal.  The caller may have already included their own
Please login to merge, or discard this patch.
main/inc/lib/pear/Image/Text.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
         $space = (1 + $this->_options['line_spacing'])
684 684
             * $this->_options['font_size'];
685 685
 
686
-        $max_lines = (int)$this->_options['max_lines'];
686
+        $max_lines = (int) $this->_options['max_lines'];
687 687
 
688 688
         if (($max_lines < 1) && !$force) {
689 689
             return false;
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
                     'color' => $c
733 733
                 );
734 734
                 $text_width = max($text_width, ($bounds[2] - $bounds[0]));
735
-                $text_height += (int)$space;
735
+                $text_height += (int) $space;
736 736
                 if (($text_height > $block_height) && !$force) {
737 737
                     return false;
738 738
                 }
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
                 $text_line_next = $token;
750 750
                 $beginning_of_line = false;
751 751
             } else {
752
-                $text_line_next = $text_line . ' ' . $token;
752
+                $text_line_next = $text_line.' '.$token;
753 753
             }
754 754
             $bounds = imagettfbbox($size, 0, $font, $text_line_next);
755 755
             $prev_width = isset($prev_width) ? $width : 0;
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
                     'color' => $c
777 777
                 );
778 778
                 $text_width = max($text_width, ($bounds[2] - $bounds[0]));
779
-                $text_height += (int)$space;
779
+                $text_height += (int) $space;
780 780
                 if (($text_height > $block_height) && !$force) {
781 781
                     return false;
782 782
                 }
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
     {
991 991
         if (!headers_sent()) {
992 992
             header(
993
-                "Content-type: " .
993
+                "Content-type: ".
994 994
                 image_type_to_mime_type($this->_options['image_type'])
995 995
             );
996 996
         } else {
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
                 $y += $vC[1];
1122 1122
             }
1123 1123
         }
1124
-        return array('x' => (int)round($x, 0), 'y' => (int)round($y, 0));
1124
+        return array('x' => (int) round($x, 0), 'y' => (int) round($y, 0));
1125 1125
     }
1126 1126
 
1127 1127
     /**
Please login to merge, or discard this patch.
main/inc/lib/dashboard.lib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
                 echo '<tr>';
54 54
                 self::display_dashboard_plugin_checkboxes($testplugin);
55
-                for ($i = 0 ; $i < count($table_cols); $i++) {
55
+                for ($i = 0; $i < count($table_cols); $i++) {
56 56
                     if (isset($plugin_info[strtolower($table_cols[$i])])) {
57 57
                         echo '<td>';
58 58
                         echo $plugin_info[$table_cols[$i]];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     echo Display::tag(
68 68
                         'tr',
69 69
                         Display::tag('td',
70
-                            get_lang('CheckFilePermissions') . ' ' . Security::remove_XSS($plugin_info_file),
70
+                            get_lang('CheckFilePermissions').' '.Security::remove_XSS($plugin_info_file),
71 71
                             array('colspan' => '3'))
72 72
                     );
73 73
                 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             foreach ($disabled_blocks_data as $disabled_block) {
80 80
                 echo '<tr style="background-color:#eee">';
81 81
                 echo '<td><center><input type="checkbox" name="disabled_block" value="true" checked disabled /></center>';
82
-                for ($j = 0 ; $j < count($table_cols); $j++) {
82
+                for ($j = 0; $j < count($table_cols); $j++) {
83 83
                     if (isset($disabled_block[strtolower($table_cols[$j])])) {
84 84
                         if ($j == 2) {
85 85
                             echo '<td>';
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
             }
190 190
             // clean from block data
191 191
             if (!empty($not_selected_blocks_id)) {
192
-                $sql_check = "SELECT id FROM $tbl_block WHERE id IN(".implode(',',$not_selected_blocks_id).")";
192
+                $sql_check = "SELECT id FROM $tbl_block WHERE id IN(".implode(',', $not_selected_blocks_id).")";
193 193
                 $rs_check = Database::query($sql_check);
194 194
                 if (Database::num_rows($rs_check) > 0) {
195
-                    $del = "DELETE FROM $tbl_block WHERE id IN(".implode(',',$not_selected_blocks_id).")";
195
+                    $del = "DELETE FROM $tbl_block WHERE id IN(".implode(',', $not_selected_blocks_id).")";
196 196
                     Database::query($del);
197 197
                 }
198 198
             }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                         $affected_rows = Database::affected_rows($result);
213 213
                     } else {
214 214
                         // insert
215
-                        $plugin_info_file = $dashboard_pluginpath . $testplugin . "/$testplugin.info";
215
+                        $plugin_info_file = $dashboard_pluginpath.$testplugin."/$testplugin.info";
216 216
                         $plugin_info = array();
217 217
                         if (file_exists($plugin_info_file)) {
218 218
                             $plugin_info = parse_info_file($plugin_info_file);
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 		// We check if plugin exists inside directory for updating active field
283 283
 		$sql = "SELECT * FROM $tbl_block";
284 284
 		$rs = Database::query($sql);
285
-		if (Database::num_rows($rs) > 0){
285
+		if (Database::num_rows($rs) > 0) {
286 286
 			while ($row = Database::fetch_array($rs)) {
287 287
 				$path = $row['path'];
288
-				if (!in_array($row['path'],$possibleplugins)) {
288
+				if (!in_array($row['path'], $possibleplugins)) {
289 289
 					$active = 0;
290 290
 				} else {
291 291
 					$active = 1;
@@ -390,13 +390,13 @@  discard block
 block discarded – undo
390 390
 					echo '<td>'.$block['description'].'</td>';
391 391
 					echo '<td>
392 392
                             <select class="selectpicker show-tick form-control" name="columns['.$block['id'].']">
393
-                            <option value="1" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column']==1?'selected':'').' >1</option>
394
-                            <option value="2" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column']==2?'selected':'').' >2</option>
393
+                            <option value="1" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 1 ? 'selected' : '').' >1</option>
394
+                            <option value="2" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 2 ? 'selected' : '').' >2</option>
395 395
                             </select>
396 396
                           </td>';
397 397
 					echo '</tr>';
398 398
 				} else {
399
-					echo Display::tag('tr',  Display::tag('td', get_lang('Error').' '.$controller_class, array('colspan'=>'3')));
399
+					echo Display::tag('tr', Display::tag('td', get_lang('Error').' '.$controller_class, array('colspan'=>'3')));
400 400
 				}
401 401
 			}
402 402
 
@@ -475,10 +475,10 @@  discard block
 block discarded – undo
475 475
 		$user_id = intval($user_id);
476 476
 		$field_variable = 'dashboard';
477 477
 		$extra_user_data = UserManager::get_extra_user_data_by_field($user_id, $field_variable);
478
-		$extra_user_data = explode(';',$extra_user_data[$field_variable]);
478
+		$extra_user_data = explode(';', $extra_user_data[$field_variable]);
479 479
 		$data = array();
480 480
 		foreach ($extra_user_data as $extra) {
481
-			$split_extra = explode(':',$extra);
481
+			$split_extra = explode(':', $extra);
482 482
 			if (!empty($split_extra)) {
483 483
 				$block_id = $split_extra[0];
484 484
 				$column = isset($split_extra[1]) ? $split_extra[1] : null;
Please login to merge, or discard this patch.