Completed
Push — 1.10.x ( 34fa34...b0da58 )
by Yannick
448:57 queued 407:31
created
main/inc/lib/phpseclib/Net/SSH1.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -76,23 +76,23 @@  discard block
 block discarded – undo
76 76
  *
77 77
  * Not supported.
78 78
  */
79
-define('NET_SSH1_CIPHER_NONE',       0);
79
+define('NET_SSH1_CIPHER_NONE', 0);
80 80
 /**
81 81
  * IDEA in CFB mode
82 82
  *
83 83
  * Not supported.
84 84
  */
85
-define('NET_SSH1_CIPHER_IDEA',       1);
85
+define('NET_SSH1_CIPHER_IDEA', 1);
86 86
 /**
87 87
  * DES in CBC mode
88 88
  */
89
-define('NET_SSH1_CIPHER_DES',        2);
89
+define('NET_SSH1_CIPHER_DES', 2);
90 90
 /**
91 91
  * Triple-DES in CBC mode
92 92
  *
93 93
  * All implementations are required to support this
94 94
  */
95
-define('NET_SSH1_CIPHER_3DES',       3);
95
+define('NET_SSH1_CIPHER_3DES', 3);
96 96
 /**
97 97
  * TRI's Simple Stream encryption CBC
98 98
  *
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
  *     This library currently only supports encryption when the same key is being used for both directions.  This is
116 116
  *     because there's only one $crypto object.  Two could be added ($encrypt and $decrypt, perhaps).
117 117
  */
118
-define('NET_SSH1_CIPHER_RC4',        5);
118
+define('NET_SSH1_CIPHER_RC4', 5);
119 119
 /**
120 120
  * Blowfish
121 121
  *
122 122
  * Not supported nor is it defined in the official SSH1 specs.  OpenSSH, however, defines it (see cipher.h) and
123 123
  * uses it (see cipher.c)
124 124
  */
125
-define('NET_SSH1_CIPHER_BLOWFISH',   6);
125
+define('NET_SSH1_CIPHER_BLOWFISH', 6);
126 126
 /**#@-*/
127 127
 
128 128
 /**#@+
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
 /**
135 135
  * .rhosts or /etc/hosts.equiv
136 136
  */
137
-define('NET_SSH1_AUTH_RHOSTS',     1);
137
+define('NET_SSH1_AUTH_RHOSTS', 1);
138 138
 /**
139 139
  * pure RSA authentication
140 140
  */
141
-define('NET_SSH1_AUTH_RSA',        2);
141
+define('NET_SSH1_AUTH_RSA', 2);
142 142
 /**
143 143
  * password authentication
144 144
  *
145 145
  * This is the only method that is supported by this library.
146 146
  */
147
-define('NET_SSH1_AUTH_PASSWORD',   3);
147
+define('NET_SSH1_AUTH_PASSWORD', 3);
148 148
 /**
149 149
  * .rhosts with RSA host authentication
150 150
  */
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
  * @link http://3sp.com/content/developer/maverick-net/docs/Maverick.SSH.PseudoTerminalModesMembers.html
158 158
  * @access private
159 159
  */
160
-define('NET_SSH1_TTY_OP_END',  0);
160
+define('NET_SSH1_TTY_OP_END', 0);
161 161
 /**#@-*/
162 162
 
163 163
 /**
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
  * @access private
184 184
  */
185 185
 define('NET_SSH1_MASK_CONSTRUCTOR', 0x00000001);
186
-define('NET_SSH1_MASK_LOGIN',       0x00000002);
187
-define('NET_SSH1_MASK_SHELL',       0x00000004);
186
+define('NET_SSH1_MASK_LOGIN', 0x00000002);
187
+define('NET_SSH1_MASK_SHELL', 0x00000004);
188 188
 /**#@-*/
189 189
 
190 190
 /**#@+
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 /**
195 195
  * Returns the message numbers
196 196
  */
197
-define('NET_SSH1_LOG_SIMPLE',  1);
197
+define('NET_SSH1_LOG_SIMPLE', 1);
198 198
 /**
199 199
  * Returns the message content
200 200
  */
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 /**
217 217
  * Returns when a string matching $expect exactly is found
218 218
  */
219
-define('NET_SSH1_READ_SIMPLE',  1);
219
+define('NET_SSH1_READ_SIMPLE', 1);
220 220
 /**
221 221
  * Returns when a string matching the regular expression $expect is found
222 222
  */
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 
493 493
         if (defined('NET_SSH1_LOGGING')) {
494 494
             $this->_append_log('<-', $this->server_identification);
495
-            $this->_append_log('->', $this->identifier . "\r\n");
495
+            $this->_append_log('->', $this->identifier."\r\n");
496 496
         }
497 497
 
498 498
         if (!preg_match('#SSH-([0-9\.]+)-(.+)#', $init_line, $parts)) {
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
             }
553 553
         }
554 554
 
555
-        $session_id = pack('H*', md5($host_key_public_modulus->toBytes() . $server_key_public_modulus->toBytes() . $anti_spoofing_cookie));
555
+        $session_id = pack('H*', md5($host_key_public_modulus->toBytes().$server_key_public_modulus->toBytes().$anti_spoofing_cookie));
556 556
 
557 557
         $session_key = crypt_random_string(32);
558 558
         $double_encrypted_session_key = $session_key ^ str_pad($session_id, 32, chr(0));
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
                 $this->crypto = new Crypt_DES();
609 609
                 $this->crypto->disablePadding();
610 610
                 $this->crypto->enableContinuousBuffer();
611
-                $this->crypto->setKey(substr($session_key, 0,  8));
611
+                $this->crypto->setKey(substr($session_key, 0, 8));
612 612
                 break;
613 613
             case NET_SSH1_CIPHER_3DES:
614 614
                 if (!class_exists('Crypt_TripleDES')) {
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 
759 759
         if ($response !== false) {
760 760
             do {
761
-                $output.= substr($response[NET_SSH1_RESPONSE_DATA], 4);
761
+                $output .= substr($response[NET_SSH1_RESPONSE_DATA], 4);
762 762
                 $response = $this->_get_binary_packet();
763 763
             } while (is_array($response) && $response[NET_SSH1_RESPONSE_TYPE] != NET_SSH1_SMSG_EXITSTATUS);
764 764
         }
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
             if ($response === true) {
873 873
                 return $this->_string_shift($this->interactiveBuffer, strlen($this->interactiveBuffer));
874 874
             }
875
-            $this->interactiveBuffer.= substr($response[NET_SSH1_RESPONSE_DATA], 4);
875
+            $this->interactiveBuffer .= substr($response[NET_SSH1_RESPONSE_DATA], 4);
876 876
         }
877 877
     }
878 878
 
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
                 return true;
1029 1029
             }
1030 1030
             $elapsed = strtok(microtime(), ' ') + strtok('') - $start;
1031
-            $this->curTimeout-= $elapsed;
1031
+            $this->curTimeout -= $elapsed;
1032 1032
         }
1033 1033
 
1034 1034
         $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838
@@ -1039,8 +1039,8 @@  discard block
 block discarded – undo
1039 1039
 
1040 1040
         while ($length > 0) {
1041 1041
             $temp = fread($this->fsock, $length);
1042
-            $raw.= $temp;
1043
-            $length-= strlen($temp);
1042
+            $raw .= $temp;
1043
+            $length -= strlen($temp);
1044 1044
         }
1045 1045
         $stop = strtok(microtime(), ' ') + strtok('');
1046 1046
 
@@ -1063,8 +1063,8 @@  discard block
 block discarded – undo
1063 1063
 
1064 1064
         if (defined('NET_SSH1_LOGGING')) {
1065 1065
             $temp = isset($this->protocol_flags[$type]) ? $this->protocol_flags[$type] : 'UNKNOWN';
1066
-            $temp = '<- ' . $temp .
1067
-                    ' (' . round($stop - $start, 4) . 's)';
1066
+            $temp = '<- '.$temp.
1067
+                    ' ('.round($stop - $start, 4).'s)';
1068 1068
             $this->_append_log($temp, $data);
1069 1069
         }
1070 1070
 
@@ -1096,8 +1096,8 @@  discard block
 block discarded – undo
1096 1096
         $padding = crypt_random_string(8 - ($length & 7));
1097 1097
 
1098 1098
         $orig = $data;
1099
-        $data = $padding . $data;
1100
-        $data.= pack('N', $this->_crc($data));
1099
+        $data = $padding.$data;
1100
+        $data .= pack('N', $this->_crc($data));
1101 1101
 
1102 1102
         if ($this->crypto !== false) {
1103 1103
             $data = $this->crypto->encrypt($data);
@@ -1111,8 +1111,8 @@  discard block
 block discarded – undo
1111 1111
 
1112 1112
         if (defined('NET_SSH1_LOGGING')) {
1113 1113
             $temp = isset($this->protocol_flags[ord($orig[0])]) ? $this->protocol_flags[ord($orig[0])] : 'UNKNOWN';
1114
-            $temp = '-> ' . $temp .
1115
-                    ' (' . round($stop - $start, 4) . 's)';
1114
+            $temp = '-> '.$temp.
1115
+                    ' ('.round($stop - $start, 4).'s)';
1116 1116
             $this->_append_log($temp, $orig);
1117 1117
         }
1118 1118
 
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
         $crc = 0x00000000;
1207 1207
         $length = strlen($data);
1208 1208
 
1209
-        for ($i=0;$i<$length;$i++) {
1209
+        for ($i = 0; $i < $length; $i++) {
1210 1210
             // We AND $crc >> 8 with 0x00FFFFFF because we want the eight newly added bits to all
1211 1211
             // be zero.  PHP, unfortunately, doesn't always do this.  0x80000000 >> 8, as an example,
1212 1212
             // yields 0xFF800000 - not 0x00800000.  The following link elaborates:
@@ -1281,9 +1281,9 @@  discard block
 block discarded – undo
1281 1281
         while (strlen($random) != $length) {
1282 1282
             $block = crypt_random_string($length - strlen($random));
1283 1283
             $block = str_replace("\x00", '', $block);
1284
-            $random.= $block;
1284
+            $random .= $block;
1285 1285
         }
1286
-        $temp = chr(0) . chr(2) . $random . chr(0) . $m;
1286
+        $temp = chr(0).chr(2).$random.chr(0).$m;
1287 1287
 
1288 1288
         $m = new Math_BigInteger($temp, 256);
1289 1289
         $m = $m->modPow($key[0], $key[1]);
@@ -1355,18 +1355,18 @@  discard block
 block discarded – undo
1355 1355
 
1356 1356
         $output = '';
1357 1357
         for ($i = 0; $i < count($message_log); $i++) {
1358
-            $output.= $message_number_log[$i] . "\r\n";
1358
+            $output .= $message_number_log[$i]."\r\n";
1359 1359
             $current_log = $message_log[$i];
1360 1360
             $j = 0;
1361 1361
             do {
1362 1362
                 if (strlen($current_log)) {
1363
-                    $output.= str_pad(dechex($j), 7, '0', STR_PAD_LEFT) . '0  ';
1363
+                    $output .= str_pad(dechex($j), 7, '0', STR_PAD_LEFT).'0  ';
1364 1364
                 }
1365 1365
                 $fragment = $this->_string_shift($current_log, $short_width);
1366 1366
                 $hex = substr(
1367 1367
                            preg_replace(
1368 1368
                                '#(.)#es',
1369
-                               '"' . $boundary . '" . str_pad(dechex(ord(substr("\\1", -1))), 2, "0", STR_PAD_LEFT)',
1369
+                               '"'.$boundary.'" . str_pad(dechex(ord(substr("\\1", -1))), 2, "0", STR_PAD_LEFT)',
1370 1370
                                $fragment),
1371 1371
                            strlen($boundary)
1372 1372
                        );
@@ -1374,10 +1374,10 @@  discard block
 block discarded – undo
1374 1374
                 // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
1375 1375
                 // also replace < with a . since < messes up the output on web browsers
1376 1376
                 $raw = preg_replace('#[^\x20-\x7E]|<#', '.', $fragment);
1377
-                $output.= str_pad($hex, $long_width - $short_width, ' ') . $raw . "\r\n";
1377
+                $output .= str_pad($hex, $long_width - $short_width, ' ').$raw."\r\n";
1378 1378
                 $j++;
1379 1379
             } while (strlen($current_log));
1380
-            $output.= "\r\n";
1380
+            $output .= "\r\n";
1381 1381
         }
1382 1382
 
1383 1383
         return $output;
@@ -1505,10 +1505,10 @@  discard block
 block discarded – undo
1505 1505
                 case NET_SSH1_LOG_COMPLEX:
1506 1506
                     $this->protocol_flags_log[] = $protocol_flags;
1507 1507
                     $this->_string_shift($message);
1508
-                    $this->log_size+= strlen($message);
1508
+                    $this->log_size += strlen($message);
1509 1509
                     $this->message_log[] = $message;
1510 1510
                     while ($this->log_size > NET_SSH2_LOG_MAX_SIZE) {
1511
-                        $this->log_size-= strlen(array_shift($this->message_log));
1511
+                        $this->log_size -= strlen(array_shift($this->message_log));
1512 1512
                         array_shift($this->protocol_flags_log);
1513 1513
                     }
1514 1514
                     break;
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
                 // passwords won't be filtered out and select other packets may not be correctly
1517 1517
                 // identified
1518 1518
                 case NET_SSH1_LOG_REALTIME:
1519
-                    echo "<pre>\r\n" . $this->_format_log(array($message), array($protocol_flags)) . "\r\n</pre>\r\n";
1519
+                    echo "<pre>\r\n".$this->_format_log(array($message), array($protocol_flags))."\r\n</pre>\r\n";
1520 1520
                     @flush();
1521 1521
                     @ob_flush();
1522 1522
                     break;
@@ -1537,10 +1537,10 @@  discard block
 block discarded – undo
1537 1537
                     $entry = $this->_format_log(array($message), array($protocol_flags));
1538 1538
                     if ($this->realtime_log_wrap) {
1539 1539
                         $temp = "<<< START >>>\r\n";
1540
-                        $entry.= $temp;
1540
+                        $entry .= $temp;
1541 1541
                         fseek($this->realtime_log_file, ftell($this->realtime_log_file) - strlen($temp));
1542 1542
                     }
1543
-                    $this->realtime_log_size+= strlen($entry);
1543
+                    $this->realtime_log_size += strlen($entry);
1544 1544
                     if ($this->realtime_log_size > NET_SSH1_LOG_MAX_SIZE) {
1545 1545
                         fseek($this->realtime_log_file, 0);
1546 1546
                         $this->realtime_log_size = strlen($entry);
Please login to merge, or discard this patch.
main/inc/lib/phpseclib/Net/SCP.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 /**
62 62
  * Reads data from a string.
63 63
  */
64
-define('NET_SCP_STRING',  2);
64
+define('NET_SCP_STRING', 2);
65 65
 /**#@-*/
66 66
 
67 67
 /**#@+
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 /**
77 77
  * SSH2 is being used.
78 78
  */
79
-define('NET_SCP_SSH2',  2);
79
+define('NET_SCP_SSH2', 2);
80 80
 /**#@-*/
81 81
 
82 82
 /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             return false;
171 171
         }
172 172
 
173
-        $this->ssh->exec('scp -t ' . $remote_file, false); // -t = to
173
+        $this->ssh->exec('scp -t '.$remote_file, false); // -t = to
174 174
 
175 175
         $temp = $this->_receive();
176 176
         if ($temp !== chr(0)) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         $remote_file = basename($remote_file);
185
-        $this->_send('C0644 ' . strlen($data) . ' ' . $remote_file . "\n");
185
+        $this->_send('C0644 '.strlen($data).' '.$remote_file."\n");
186 186
 
187 187
         $temp = $this->_receive();
188 188
         if ($temp !== chr(0)) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             return false;
228 228
         }
229 229
 
230
-        $this->ssh->exec('scp -f ' . $remote_file, false); // -f = from
230
+        $this->ssh->exec('scp -f '.$remote_file, false); // -f = from
231 231
 
232 232
         $this->_send("\0");
233 233
 
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
         while ($size < $info['size']) {
251 251
             $data = $this->_receive();
252 252
             // SCP usually seems to split stuff out into 16k chunks
253
-            $size+= strlen($data);
253
+            $size += strlen($data);
254 254
 
255 255
             if ($local_file === false) {
256
-                $content.= $data;
256
+                $content .= $data;
257 257
             } else {
258 258
                 fputs($fp, $data);
259 259
             }
Please login to merge, or discard this patch.
main/inc/lib/lp_item.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
     public $search_did = 0;
35 35
     public $audio = "";
36 36
 
37
-    public function __construct($in_c_id=0, $in_id=0)
37
+    public function __construct($in_c_id = 0, $in_id = 0)
38 38
     {
39
-        if ($in_c_id > 0 && $in_id >0) {
39
+        if ($in_c_id > 0 && $in_id > 0) {
40 40
             $item_view_table = Database::get_course_table(TABLE_LP_ITEM);
41 41
             $sql = "SELECT * FROM $item_view_table
42 42
                     WHERE
Please login to merge, or discard this patch.
main/inc/lib/course_request.lib.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         $exemplary_content
66 66
     ) {
67 67
         $wanted_code = trim($wanted_code);
68
-        $user_id = (int)$user_id;
69
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
68
+        $user_id = (int) $user_id;
69
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
70 70
 
71 71
         if ($wanted_code == '') {
72 72
             return false;
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
         $user_id,
255 255
         $exemplary_content
256 256
     ) {
257
-        $id = (int)$id;
257
+        $id = (int) $id;
258 258
         $wanted_code = trim($wanted_code);
259
-        $user_id = (int)$user_id;
260
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
259
+        $user_id = (int) $user_id;
260
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
261 261
 
262 262
         if ($wanted_code == '') {
263 263
             return false;
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
      */
361 361
     public static function delete_course_request($id)
362 362
     {
363
-        $id = (int)$id;
363
+        $id = (int) $id;
364 364
         $sql = "DELETE FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
365 365
                 WHERE id = ".$id;
366 366
         $result = Database::query($sql);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         if (is_null($status)) {
378 378
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table;
379 379
         } else {
380
-            $status = (int)$status;
380
+            $status = (int) $status;
381 381
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table."
382 382
                     WHERE status = ".$status;
383 383
         }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public static function get_course_request_info($id)
397 397
     {
398
-        $id = (int)$id;
398
+        $id = (int) $id;
399 399
         $sql = "SELECT *
400 400
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
401 401
                 WHERE id = ".$id;
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public static function get_course_request_code($id)
415 415
     {
416
-        $id = (int)$id;
416
+        $id = (int) $id;
417 417
         $sql = "SELECT code
418 418
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
419 419
                 WHERE id = ".$id;
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public static function accept_course_request($id)
436 436
     {
437
-        $id = (int)$id;
437
+        $id = (int) $id;
438 438
 
439 439
         // Retrieve request's data
440 440
         $course_request_info = self::get_course_request_info($id);
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             return false;
448 448
         }*/
449 449
 
450
-        $user_id = (int)$course_request_info['user_id'];
450
+        $user_id = (int) $course_request_info['user_id'];
451 451
         if ($user_id <= 0) {
452 452
             return false;
453 453
         }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public static function reject_course_request($id)
533 533
     {
534
-        $id = (int)$id;
534
+        $id = (int) $id;
535 535
         // Retrieve request's data
536 536
         $course_request_info = self::get_course_request_info($id);
537 537
         if (!is_array($course_request_info)) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
      */
610 610
     public static function ask_for_additional_info($id)
611 611
     {
612
-        $id = (int)$id;
612
+        $id = (int) $id;
613 613
 
614 614
         // Retrieve request's data
615 615
         $course_request_info = self::get_course_request_info($id);
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
      */
701 701
     public static function additional_info_asked($id)
702 702
     {
703
-        $id = (int)$id;
703
+        $id = (int) $id;
704 704
         $sql = "SELECT id FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
705 705
                 WHERE (id = ".$id." AND info > 0)";
706 706
         $result = Database::num_rows(Database::query($sql));
Please login to merge, or discard this patch.
main/inc/lib/system/web/request.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         return isset($_REQUEST[$key]) ? $_REQUEST[$key] : $default;
16 16
     }
17 17
 
18
-    public static function has($key){
18
+    public static function has($key) {
19 19
         return isset($_REQUEST[$key]);
20 20
     }
21 21
 
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,17 +44,17 @@
 block discarded – undo
44 44
                     ORDER BY name, id
45 45
                     LIMIT 11';
46 46
             $rs = Database::query($sql);
47
-            $i=0;
47
+            $i = 0;
48 48
             while ($session = Database :: fetch_array($rs)) {
49 49
                 $i++;
50
-                if ($i<=10) {
50
+                if ($i <= 10) {
51 51
                      $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
55 55
             }
56 56
         }
57
-        $xajax_response -> addAssign('ajax_list_courses','innerHTML',api_utf8_encode($return));
57
+        $xajax_response -> addAssign('ajax_list_courses', 'innerHTML', api_utf8_encode($return));
58 58
         return $xajax_response;
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
main/inc/lib/portfolio.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -482,14 +482,14 @@  discard block
 block discarded – undo
482 482
         $attributes['z-index'] = 100000;
483 483
         $s = ' ';
484 484
         foreach ($attributes as $key => $value) {
485
-            $s .= $key . '="' . $value . '" ';
485
+            $s .= $key.'="'.$value.'" ';
486 486
         }
487 487
 
488 488
         $result = array();
489
-        $result[] = '<span ' . $s . ' >';
489
+        $result[] = '<span '.$s.' >';
490 490
         $result[] = '<span class="dropdown" >';
491 491
         $result[] = '<a href="#" data-toggle="dropdown" class="dropdown-toggle">';
492
-        $result[] = Display::return_icon('document_send.png', get_lang('Send'), array(), ICON_SIZE_SMALL) . '<b class="caret"></b>';
492
+        $result[] = Display::return_icon('document_send.png', get_lang('Send'), array(), ICON_SIZE_SMALL).'<b class="caret"></b>';
493 493
         $result[] = '</a>';
494 494
         $result[] = '<ul class="dropdown-menu">';
495 495
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             $parameters[PortfolioController::PARAM_TOOL] = $tool;
506 506
             $url = api_get_path(WEB_CODE_PATH).'portfolio/share.php?';
507 507
             $result[] = '<li>';
508
-            $result[] = '<a href="' . $url . '">' . $portfolio->get_title() . '</a>';
508
+            $result[] = '<a href="'.$url.'">'.$portfolio->get_title().'</a>';
509 509
             $result[] = '</li>';
510 510
         }
511 511
         $result[] = '</ul>';
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
      */
565 565
     public function __construct($portfolio)
566 566
     {
567
-        $this->name = md5(__CLASS__) . '_' . $portfolio->get_name();
568
-        $this->title = $portfolio->get_title() ? $portfolio->get_title() : get_lang('SendTo') . ' ' . $portfolio->get_name();
567
+        $this->name = md5(__CLASS__).'_'.$portfolio->get_name();
568
+        $this->title = $portfolio->get_title() ? $portfolio->get_title() : get_lang('SendTo').' '.$portfolio->get_name();
569 569
         $this->portfolio = $portfolio;
570 570
     }
571 571
 
Please login to merge, or discard this patch.
main/inc/lib/nanogong/receiver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 $title = trim(str_replace('_chnano_.', '.', $filename)); //hide nanogong wav tag at title
49 49
 $title = str_replace('_', ' ', $title);
50 50
 
51
-$documentPath = $filepath . $filename;
51
+$documentPath = $filepath.$filename;
52 52
 
53 53
 if ($nano_user_id != api_get_user_id() || api_get_user_id() == 0 || $nano_user_id == 0) {
54 54
     echo 'Not allowed';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     $groupId = $nano_group_id;
67 67
     $file_size = filesize($documentPath);
68 68
     $relativeUrlPath = $dir;
69
-    $doc_id = add_document($_course, $relativeUrlPath . $filename, 'file', filesize($documentPath), $title);
69
+    $doc_id = add_document($_course, $relativeUrlPath.$filename, 'file', filesize($documentPath), $title);
70 70
     api_item_property_update(
71 71
         $_course,
72 72
         TOOL_DOCUMENT,
Please login to merge, or discard this patch.
main/inc/lib/hook/HookManagement.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     public function listHookObservers($eventName)
146 146
     {
147 147
         $array = array();
148
-        $joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
149
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
150
-            ' ON hc.hook_event_id = he.id ' .
151
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
148
+        $joinTable = $this->tables[TABLE_HOOK_CALL].' hc'.
149
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_EVENT].' he'.
150
+            ' ON hc.hook_event_id = he.id '.
151
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_OBSERVER].' ho '.
152 152
             ' ON hc.hook_observer_id = ho.id ';
153 153
         $columns = 'ho.class_name, ho.path, ho.plugin_name, hc.enabled';
154 154
         $where = array('where' => array('he.class_name = ? ' => $eventName, 'AND hc.enabled = ? ' => 1));
@@ -202,10 +202,10 @@  discard block
 block discarded – undo
202 202
     public function listAllHookCalls()
203 203
     {
204 204
         $array = array();
205
-        $joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
206
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
207
-            ' ON hc.hook_event_id = he.id ' .
208
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
205
+        $joinTable = $this->tables[TABLE_HOOK_CALL].' hc'.
206
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_EVENT].' he'.
207
+            ' ON hc.hook_event_id = he.id '.
208
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_OBSERVER].' ho '.
209 209
             ' ON hc.hook_observer_id = ho.id ';
210 210
         $columns = 'he.class_name AS event_class_name, ho.class_name AS observer_class_name, hc.id AS id, hc.type AS type';
211 211
         $rows = Database::select($columns, $joinTable);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         if (isset($eventName) && !isset($this->hookEvents[$eventName])) {
232 232
             $attributes = array(
233 233
                 'class_name' => $eventName,
234
-                'description' => get_lang('HookDescription' . $eventName),
234
+                'description' => get_lang('HookDescription'.$eventName),
235 235
             );
236 236
             $id = Database::insert($this->tables[TABLE_HOOK_EVENT], $attributes);
237 237
             $this->hookEvents[$eventName] = $id;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         // Check if exists hook observer
241 241
         if (isset($observerClassName) &&
242 242
             !isset($this->hookObservers[$observerClassName])
243
-        ){
243
+        ) {
244 244
             $object = $observerClassName::create();
245 245
             $attributes = array(
246 246
                 'class_name' => $observerClassName,
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
         $eventName = Database::escape_string($eventName);
339 339
         $observerClassName($observerClassName);
340 340
         $type = Database::escape_string($type);
341
-        $joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
342
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
343
-            ' ON hc.hook_event_id = he.id ' .
344
-            ' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
341
+        $joinTable = $this->tables[TABLE_HOOK_CALL].' hc'.
342
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_EVENT].' he'.
343
+            ' ON hc.hook_event_id = he.id '.
344
+            ' INNER JOIN '.$this->tables[TABLE_HOOK_OBSERVER].' ho '.
345 345
             ' ON hc.hook_observer_id = ho.id ';
346 346
         $row = Database::select(
347 347
             'id',
Please login to merge, or discard this patch.