Completed
Push — 1.11.x ( d4cbce...fbf9a8 )
by José
48:27
created
main/inc/lib/table_sort.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                 $new_data_order = array();
159 159
                 if (!empty($docs_to_sort)) {
160
-                    foreach($docs_to_sort as $id => $document) {
160
+                    foreach ($docs_to_sort as $id => $document) {
161 161
                         if (isset($new_data[$id])) {
162 162
                             $new_data_order[] = $new_data[$id];
163 163
                         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                 }
166 166
 
167 167
                 if (!empty($folder_to_sort)) {
168
-                    foreach($folder_to_sort as $id => $document) {
168
+                    foreach ($folder_to_sort as $id => $document) {
169 169
                         if (isset($new_data[$id])) {
170 170
                             $new_data_order[] = $new_data[$id];
171 171
                         }
Please login to merge, or discard this patch.
main/inc/lib/plugin.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             //extra options
426 426
             $plugin_settings = api_get_settings_params(
427 427
                 array(
428
-                    "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting')
428
+                    "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting')
429 429
                 )
430 430
             );
431 431
             $settings_filtered = array();
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             if (!empty($obj->course_settings)) {
531 531
                 if (is_file(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_SMALL.'/'.$plugin_name.'.png')) {
532 532
                     $icon = Display::return_icon(
533
-                        $plugin_name . '.png',
533
+                        $plugin_name.'.png',
534 534
                         Security::remove_XSS($pluginTitle),
535 535
                         '',
536 536
                         ICON_SIZE_SMALL
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/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.
main/inc/lib/promotion.lib.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                     case 'updated_at':
58 58
                         break;
59 59
                     case 'name':
60
-                        $val .= ' ' . get_lang('CopyLabelSuffix');
60
+                        $val .= ' '.get_lang('CopyLabelSuffix');
61 61
                         $new[$key] = $val;
62 62
                         break;
63 63
                     case 'created_at':
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                         break;
67 67
                     case 'career_id':
68 68
                         if (!empty($career_id)) {
69
-                            $val = (int)$career_id;
69
+                            $val = (int) $career_id;
70 70
                         }
71 71
                         $new[$key] = $val;
72 72
                         break;
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
     {
148 148
         // Action links
149 149
         echo '<div class="actions" style="margin-bottom:20px">';
150
-        echo '<a href="career_dashboard.php">' . Display::return_icon('back.png',
151
-                get_lang('Back'), '', '32') . '</a>';
152
-        echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('new_promotion.png',
153
-                get_lang('Add'), '', '32') . '</a>';
154
-        echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'session/session_add.php">' . Display::return_icon('new_session.png',
155
-                get_lang('AddSession'), '', '32') . '</a>';
150
+        echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',
151
+                get_lang('Back'), '', '32').'</a>';
152
+        echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('new_promotion.png',
153
+                get_lang('Add'), '', '32').'</a>';
154
+        echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.Display::return_icon('new_session.png',
155
+                get_lang('AddSession'), '', '32').'</a>';
156 156
         echo '</div>';
157 157
         echo Display::grid_html('promotions');
158 158
     }
Please login to merge, or discard this patch.