Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
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/internationalization_database/name_order_conventions.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -19,82 +19,82 @@
 block discarded – undo
19 19
  * last_name                   - sorting names with priority for the last name.
20 20
  */
21 21
 return array(
22
-	'afrikaans' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
23
-	'albanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
24
-	'alemannic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
25
-	'amharic' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
26
-	'armenian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
27
-	'arabic' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
28
-	'asturian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
29
-	'bosnian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
30
-	'brazilian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
31
-	'breton' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
32
-	'bulgarian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
33
-	'catalan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
34
-	'croatian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
35
-	'czech' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
36
-	'danish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
37
-	'dari' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
38
-	'dutch' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
39
-	'english' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
40
-	'esperanto' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
41
-	'estonian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
42
-	'basque'  =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
43
-	'finnish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
44
-	'french' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
45
-	'frisian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
46
-	'friulian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
47
-    'galician' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'),
48
-	'georgian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
49
-	'german' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
50
-	'greek' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
51
-	'hawaiian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
52
-	'hebrew' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
53
-	'hindi' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
54
-	'hungarian' =>        array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
55
-	'icelandic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
56
-	'indonesian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
57
-	'irish' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
58
-	'italian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
59
-	'japanese' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
60
-	'korean' =>           array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
61
-	'latin' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
62
-	'latvian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
63
-	'lithuanian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
64
-	'macedonian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
65
-	'malay' =>            array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
66
-	'manx' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
67
-	'marathi' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
68
-	'middle_frisian' =>   array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
69
-	'mingo' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
70
-	'nepali' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
71
-	'norwegian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
72
-	'occitan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
73
-	'pashto' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
74
-	'persian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
75
-	'polish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
76
-	'portuguese' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
77
-	'quechua_cusco' =>    array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
78
-	'romanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
79
-	'rumantsch' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
80
-	'russian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
81
-	'sanskrit' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
82
-	'serbian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
83
-	'serbian_cyrillic' => array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
84
-	'simpl_chinese' =>    array('format' => 'title last_name first_name',  'sort_by' => 'last_name' ), // Eastern order
85
-	'slovak' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
86
-	'slovenian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
87
-	'spanish' =>          array('format' => 'title last_name, first_name',  'sort_by' => 'last_name'), // Library order
88
-	'swahili' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
89
-	'swedish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
90
-	'tagalog' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
91
-	'tamil' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
92
-	'thai' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
93
-	'trad_chinese' =>     array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
94
-	'turkish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
95
-	'ukrainian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
96
-	'vietnamese' =>       array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
97
-	'welsh' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
98
-	'yiddish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
99
-	'yoruba' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name')
22
+	'afrikaans' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
23
+	'albanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
24
+	'alemannic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
25
+	'amharic' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
26
+	'armenian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
27
+	'arabic' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
28
+	'asturian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
29
+	'bosnian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
30
+	'brazilian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
31
+	'breton' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
32
+	'bulgarian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
33
+	'catalan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
34
+	'croatian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
35
+	'czech' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
36
+	'danish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
37
+	'dari' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
38
+	'dutch' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
39
+	'english' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
40
+	'esperanto' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
41
+	'estonian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
42
+	'basque'  =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
43
+	'finnish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
44
+	'french' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
45
+	'frisian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
46
+	'friulian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
47
+    'galician' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'),
48
+	'georgian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
49
+	'german' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
50
+	'greek' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
51
+	'hawaiian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
52
+	'hebrew' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
53
+	'hindi' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
54
+	'hungarian' =>        array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
55
+	'icelandic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
56
+	'indonesian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
57
+	'irish' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
58
+	'italian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
59
+	'japanese' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
60
+	'korean' =>           array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
61
+	'latin' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
62
+	'latvian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
63
+	'lithuanian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
64
+	'macedonian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
65
+	'malay' =>            array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
66
+	'manx' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
67
+	'marathi' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
68
+	'middle_frisian' =>   array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
69
+	'mingo' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
70
+	'nepali' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
71
+	'norwegian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
72
+	'occitan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
73
+	'pashto' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
74
+	'persian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
75
+	'polish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
76
+	'portuguese' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
77
+	'quechua_cusco' =>    array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
78
+	'romanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
79
+	'rumantsch' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
80
+	'russian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
81
+	'sanskrit' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
82
+	'serbian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
83
+	'serbian_cyrillic' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
84
+	'simpl_chinese' =>    array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
85
+	'slovak' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
86
+	'slovenian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
87
+	'spanish' =>          array('format' => 'title last_name, first_name', 'sort_by' => 'last_name'), // Library order
88
+	'swahili' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
89
+	'swedish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
90
+	'tagalog' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
91
+	'tamil' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
92
+	'thai' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
93
+	'trad_chinese' =>     array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
94
+	'turkish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
95
+	'ukrainian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
96
+	'vietnamese' =>       array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
97
+	'welsh' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
98
+	'yiddish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
99
+	'yoruba' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name')
100 100
 );
Please login to merge, or discard this patch.
main/inc/lib/login_redirection.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,30 +18,30 @@  discard block
 block discarded – undo
18 18
         if (api_is_student() && !api_get_setting('student_page_after_login') == '') {
19 19
             $redirect_url = html_entity_decode(api_get_setting('student_page_after_login'));
20 20
             if ($redirect_url[0] == "/") {
21
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
21
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
22 22
             }
23 23
         }
24 24
         if (api_is_teacher() && !api_get_setting('teacher_page_after_login') == '') {
25 25
             $redirect_url = html_entity_decode(api_get_setting('teacher_page_after_login'));
26 26
             if ($redirect_url[0] == "/") {
27
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
27
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
28 28
             }
29 29
         }
30 30
         if (api_is_drh() && !api_get_setting('drh_page_after_login') == '') {
31 31
             $redirect_url = html_entity_decode(api_get_setting('drh_page_after_login'));
32 32
             if ($redirect_url[0] == "/") {
33
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
33
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
34 34
             }
35 35
         }
36 36
         if (api_is_session_admin() && !api_get_setting('sessionadmin_page_after_login') == '') {
37 37
             $redirect_url = html_entity_decode(api_get_setting('sessionadmin_page_after_login'));
38 38
             if ($redirect_url[0] == "/") {
39
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
39
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
40 40
             }
41 41
         }
42 42
 
43 43
         if (!empty($redirect_url)) {
44
-            header('Location: ' . $redirect_url . $param);
44
+            header('Location: '.$redirect_url.$param);
45 45
             exit();
46 46
         }
47 47
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (CustomPages::enabled()) {
50 50
             CustomPages::display(CustomPages::INDEX_LOGGED);
51 51
         }
52
-        header('location: ' . api_get_path(WEB_PATH) . api_get_setting('page_after_login') . $param);
52
+        header('location: '.api_get_path(WEB_PATH).api_get_setting('page_after_login').$param);
53 53
         exit();
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
main/inc/lib/conditional_login.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                     if (isset($condition['conditional_function']) && $condition['conditional_function']($user) == false) {
24 24
                         $_SESSION['conditional_login']['uid'] = $user['user_id'];
25 25
                         $_SESSION['conditional_login']['can_login'] = false;
26
-                        header("Location:". $condition['url']);
26
+                        header("Location:".$condition['url']);
27 27
                         exit();
28 28
                     }
29 29
                 }
Please login to merge, or discard this patch.
main/inc/lib/image.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             return false;
116 116
         }
117 117
         $this->path = preg_match(VALID_WEB_PATH, $path) ? (api_is_internal_path($path) ? api_get_path(TO_SYS, $path) : $path) : $path;
118
-        $this->set_image_wrapper();  //Creates image obj
118
+        $this->set_image_wrapper(); //Creates image obj
119 119
     }
120 120
 
121 121
     abstract function set_image_wrapper();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         if ($this->debug) error_log('Image::set_image_wrapper loaded');
158 158
         try {
159 159
             if (file_exists($this->path)) {
160
-                $this->image     = new Imagick($this->path);
160
+                $this->image = new Imagick($this->path);
161 161
 
162 162
                 if ($this->image) {
163 163
                     $this->fill_image_info(); //Fills height, width and type
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             } else {
166 166
                 if ($this->debug) error_log('Image::image does not exist');
167 167
             }
168
-        } catch(ImagickException $e) {
168
+        } catch (ImagickException $e) {
169 169
             if ($this->debug) error_log($e->getMessage());
170 170
         }
171 171
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 	public function get_image_size()
188 188
     {
189
-		$imagesize = array('width'=>0,'height'=>0);
189
+		$imagesize = array('width'=>0, 'height'=>0);
190 190
 	    if ($this->image_validated) {
191 191
             $imagesize = $this->image->getImageGeometry();
192 192
 	    }
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
             $height = $thumbh;
204 204
         } else {
205 205
             $scale  = ($this->width > 0 && $this->height > 0) ? min($thumbw / $this->width, $thumbh / $this->height) : 0;
206
-            $width  = (int)($this->width * $scale);
207
-            $height = (int)($this->height * $scale);
206
+            $width  = (int) ($this->width * $scale);
207
+            $height = (int) ($this->height * $scale);
208 208
         }
209 209
 		$result = $this->image->resizeImage($width, $height, $this->filter, 1);
210 210
 		$this->width  = $thumbw;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 		$result = false;
251 251
 		try {
252 252
 		    $result = $this->image->writeImage($file);
253
-		} catch(ImagickException $e) {
253
+		} catch (ImagickException $e) {
254 254
             if ($this->debug) error_log($e->getMessage());
255 255
         }
256 256
 
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
 
312 312
     public function get_image_size()
313 313
     {
314
-        $return_array = array('width'=>0,'height'=>0);
314
+        $return_array = array('width'=>0, 'height'=>0);
315 315
         if ($this->image_validated) {
316
-	        $return_array = array('width'=>$this->width,'height'=>$this->height);
316
+	        $return_array = array('width'=>$this->width, 'height'=>$this->height);
317 317
         }
318 318
         return $return_array;
319 319
 	}
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     public function fill_image_info()
322 322
     {
323 323
     	if (file_exists($this->path)) {
324
-	        $image_info     = getimagesize($this->path);
324
+	        $image_info = getimagesize($this->path);
325 325
 			$this->width    = $image_info[0];
326 326
 			$this->height   = $image_info[1];
327 327
 			$this->type     = $image_info[2];
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
                 $height = $thumbh;
342 342
             } else {
343 343
                 $scale = min($thumbw / $this->width, $thumbh / $this->height);
344
-                $width = (int)($this->width * $scale);
345
-                $height = (int)($this->height * $scale);
344
+                $width = (int) ($this->width * $scale);
345
+                $height = (int) ($this->height * $scale);
346 346
             }
347
-			$deltaw = (int)(($thumbw - $width) / 2);
348
-			$deltah = (int)(($thumbh - $height) / 2);
347
+			$deltaw = (int) (($thumbw - $width) / 2);
348
+			$deltah = (int) (($thumbh - $height) / 2);
349 349
 			$dst_img = @ImageCreateTrueColor($thumbw, $thumbh);
350 350
             		@imagealphablending($dst_img, false);
351 351
 		        @imagesavealpha($dst_img, true);
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
                 $height = $thumbh;
361 361
             } else {
362 362
                 $scale = ($this->width > 0 && $this->height > 0) ? min($thumbw / $this->width, $thumbh / $this->height) : 0;
363
-                $width  = (int)($this->width * $scale);
364
-                $height = (int)($this->height * $scale);
363
+                $width  = (int) ($this->width * $scale);
364
+                $height = (int) ($this->height * $scale);
365 365
             }
366 366
 			$deltaw = 0;
367 367
 			$deltah = 0;
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	public function send_image($file = '', $compress = -1, $convert_file_to = null)
420 420
     {
421 421
 	    if (!$this->image_validated) return false;
422
-        $compress = (int)$compress;
422
+        $compress = (int) $compress;
423 423
         $type = $this->type;
424 424
         if (!empty($convert_file_to) && in_array($convert_file_to, $this->allowed_extensions)) {
425 425
             $type = $convert_file_to;
@@ -463,11 +463,11 @@  discard block
 block discarded – undo
463 463
          * so that we can use black (0,0,0) as transparent, which is what
464 464
          * the image is filled with when created.
465 465
          */
466
-        $transparent = imagecolorallocate($dest_img, 0,0,0);
466
+        $transparent = imagecolorallocate($dest_img, 0, 0, 0);
467 467
         imagealphablending($dest_img, false);
468 468
         imagesavealpha($dest_img, true);
469 469
         imagecolortransparent($dest_img, $transparent);
470
-        imagecopy($dest_img, $this->bg, 0,0, 0, 0,imagesx($this->bg), imagesx($this->bg));
470
+        imagecopy($dest_img, $this->bg, 0, 0, 0, 0, imagesx($this->bg), imagesx($this->bg));
471 471
         imagefilter($dest_img, IMG_FILTER_GRAYSCALE);
472 472
         $this->bg = $dest_img;
473 473
 
Please login to merge, or discard this patch.
main/inc/lib/login.lib.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -37,24 +37,24 @@  discard block
 block discarded – undo
37 37
             if ($by_username) {
38 38
                 $secret_word = self::get_secret_word($user['email']);
39 39
                 if ($reset) {
40
-                    $reset_link = $portal_url . "main/auth/lostPassword.php?reset=" . $secret_word . "&id=" . $user['uid'];
40
+                    $reset_link = $portal_url."main/auth/lostPassword.php?reset=".$secret_word."&id=".$user['uid'];
41 41
                 } else {
42
-                    $reset_link = get_lang('Pass') . " : $user[password]";
42
+                    $reset_link = get_lang('Pass')." : $user[password]";
43 43
                 }
44
-                $user_account_list = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $user['loginName'] . "\n" . get_lang('ResetLink') . ' : ' . $reset_link . '';
44
+                $user_account_list = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$user['loginName']."\n".get_lang('ResetLink').' : '.$reset_link.'';
45 45
 
46 46
                 if ($user_account_list) {
47
-                    $user_account_list = "\n-----------------------------------------------\n" . $user_account_list;
47
+                    $user_account_list = "\n-----------------------------------------------\n".$user_account_list;
48 48
                 }
49 49
             } else {
50 50
                 foreach ($user as $this_user) {
51 51
                     $secret_word = self::get_secret_word($this_user['email']);
52 52
                     if ($reset) {
53
-                        $reset_link = $portal_url . "main/auth/lostPassword.php?reset=" . $secret_word . "&id=" . $this_user['uid'];
53
+                        $reset_link = $portal_url."main/auth/lostPassword.php?reset=".$secret_word."&id=".$this_user['uid'];
54 54
                     } else {
55
-                        $reset_link = get_lang('Pass') . " : $this_user[password]";
55
+                        $reset_link = get_lang('Pass')." : $this_user[password]";
56 56
                     }
57
-                    $user_account_list[] = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $this_user['loginName'] . "\n" . get_lang('ResetLink') . ' : ' . $reset_link . '';
57
+                    $user_account_list[] = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$this_user['loginName']."\n".get_lang('ResetLink').' : '.$reset_link.'';
58 58
                 }
59 59
                 if ($user_account_list) {
60 60
                     $user_account_list = implode("\n-----------------------------------------------\n", $user_account_list);
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
             if (!$by_username) {
65 65
                 $user = $user[0];
66 66
             }
67
-            $reset_link = get_lang('Pass') . " : $user[password]";
68
-            $user_account_list = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $user['loginName'] . "\n" . $reset_link . '';
67
+            $reset_link = get_lang('Pass')." : $user[password]";
68
+            $user_account_list = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$user['loginName']."\n".$reset_link.'';
69 69
         }
70 70
         return $user_account_list;
71 71
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public static function send_password_to_user($user, $by_username = false)
80 80
     {
81
-        $email_subject = "[" . api_get_setting('siteName') . "] " . get_lang('LoginRequest'); // SUBJECT
81
+        $email_subject = "[".api_get_setting('siteName')."] ".get_lang('LoginRequest'); // SUBJECT
82 82
 
83 83
         if ($by_username) { // Show only for lost password
84 84
             $user_account_list = self::get_user_account_list($user, false, $by_username); // BODY
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             }
98 98
         }
99 99
 
100
-        $email_body = get_lang('YourAccountParam') . " " . $portal_url . "\n\n$user_account_list";
100
+        $email_body = get_lang('YourAccountParam')." ".$portal_url."\n\n$user_account_list";
101 101
         // SEND MESSAGE
102 102
         $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS);
103 103
         $email_admin = api_get_setting('emailAdministrator');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public static function handle_encrypted_password($user, $by_username = false)
133 133
     {
134
-        $email_subject = "[" . api_get_setting('siteName') . "] " . get_lang('LoginRequest'); // SUBJECT
134
+        $email_subject = "[".api_get_setting('siteName')."] ".get_lang('LoginRequest'); // SUBJECT
135 135
 
136 136
         if ($by_username) {
137 137
         // Show only for lost password
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
             $user_account_list = self::get_user_account_list($user, true); // BODY
142 142
             $email_to = $user[0]['email'];
143 143
         }
144
-        $email_body = get_lang('DearUser') . " :\n" . get_lang('password_request') . "\n";
145
-        $email_body .= $user_account_list . "\n-----------------------------------------------\n\n";
144
+        $email_body = get_lang('DearUser')." :\n".get_lang('password_request')."\n";
145
+        $email_body .= $user_account_list."\n-----------------------------------------------\n\n";
146 146
         $email_body .= get_lang('PasswordEncryptedForSecurity');
147 147
 
148
-        $email_body .= "\n\n" . get_lang('SignatureFormula') . ",\n" . api_get_setting('administratorName') . " " . api_get_setting('administratorSurname') . "\n" . get_lang('PlataformAdmin') . " - " . api_get_setting('siteName');
148
+        $email_body .= "\n\n".get_lang('SignatureFormula').",\n".api_get_setting('administratorName')." ".api_get_setting('administratorSurname')."\n".get_lang('PlataformAdmin')." - ".api_get_setting('siteName');
149 149
 
150 150
         $sender_name = api_get_person_name(
151 151
             api_get_setting('administratorName'),
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                     username AS loginName,
239 239
                     password,
240 240
                     email
241
-                FROM " . $tbl_user . "
241
+                FROM " . $tbl_user."
242 242
                 WHERE user_id = $id";
243 243
         $result = Database::query($sql);
244 244
         $num_rows = Database::num_rows($result);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                         ON user.user_id = a.user_id
292 292
                         LEFT JOIN $track_e_login login
293 293
                         ON user.user_id  = login.login_user_id
294
-                        WHERE user.user_id = '" . $_user['user_id'] . "'
294
+                        WHERE user.user_id = '".$_user['user_id']."'
295 295
                         ORDER BY login.login_date DESC LIMIT 1";
296 296
 
297 297
                 $result = Database::query($sql);
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                     Session::write('is_platformAdmin', $is_platformAdmin);
322 322
                     Session::write('is_allowedCreateCourse', $is_allowedCreateCourse);
323 323
                 } else {
324
-                    header('location:' . api_get_path(WEB_PATH));
324
+                    header('location:'.api_get_path(WEB_PATH));
325 325
                     //exit("WARNING UNDEFINED UID !! ");
326 326
                 }
327 327
             } else { // no uid => logout or Anonymous
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
         global $_course;
369 369
         global $_real_cid;
370 370
 
371
-        global $is_courseAdmin;  //course teacher
372
-        global $is_courseTutor;  //course teacher - some rights
373
-        global $is_courseCoach;  //course coach
371
+        global $is_courseAdmin; //course teacher
372
+        global $is_courseTutor; //course teacher - some rights
373
+        global $is_courseCoach; //course coach
374 374
         global $is_courseMember; //course student
375 375
         global $is_sessionAdmin;
376 376
         global $is_allowed_in_course;
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
                     if (!empty($_GET['id_session'])) {
429 429
                         $_SESSION['id_session'] = intval($_GET['id_session']);
430
-                        $sql = 'SELECT name FROM ' . $tbl_session . ' WHERE id="' . intval($_SESSION['id_session']) . '"';
430
+                        $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_SESSION['id_session']).'"';
431 431
                         $rs = Database::query($sql);
432 432
                         list($_SESSION['session_name']) = Database::fetch_array($rs);
433 433
                     } else {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                     }
444 444
                 } else {
445 445
                     //exit("WARNING UNDEFINED CID !! ");
446
-                    header('location:' . api_get_path(WEB_PATH));
446
+                    header('location:'.api_get_path(WEB_PATH));
447 447
                 }
448 448
             } else {
449 449
                 Session::erase('_cid');
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
         } else {
471 471
             // Continue with the previous values
472 472
             if (empty($_SESSION['_course']) OR empty($_SESSION['_cid'])) { //no previous values...
473
-                $_cid = -1;        //set default values that will be caracteristic of being unset
473
+                $_cid = -1; //set default values that will be caracteristic of being unset
474 474
                 $_course = -1;
475 475
             } else {
476 476
                 $_cid = $_SESSION['_cid'];
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                 // Moreover, if we want to track a course with another session it can be usefull
481 481
                 if (!empty($_GET['id_session'])) {
482 482
                     $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
483
-                    $sql = 'SELECT name FROM ' . $tbl_session . ' WHERE id="' . intval($_SESSION['id_session']) . '"';
483
+                    $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_SESSION['id_session']).'"';
484 484
                     $rs = Database::query($sql);
485 485
                     list($_SESSION['session_name']) = Database::fetch_array($rs);
486 486
                     $_SESSION['id_session'] = intval($_GET['id_session']);
@@ -520,9 +520,9 @@  discard block
 block discarded – undo
520 520
                             //But only if the login date is < than now + max_life_time
521 521
                             $sql = "SELECT course_access_id FROM $course_tracking_table
522 522
                                     WHERE
523
-                                        user_id     = " . intval($_user ['user_id']) . " AND
523
+                                        user_id     = ".intval($_user ['user_id'])." AND
524 524
                                         c_id = '".api_get_course_int_id()."' AND
525
-                                        session_id  = " . api_get_session_id() . " AND
525
+                                        session_id  = " . api_get_session_id()." AND
526 526
                                         login_course_date > now() - INTERVAL $session_lifetime SECOND
527 527
                                     ORDER BY login_course_date DESC LIMIT 0,1";
528 528
                             $result = Database::query($sql);
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
                                 //We update the course tracking table
533 533
                                 $sql = "UPDATE $course_tracking_table
534 534
                                         SET logout_course_date = '$time', counter = counter+1
535
-                                        WHERE course_access_id = " . intval($i_course_access_id) . " AND session_id = " . api_get_session_id();
535
+                                        WHERE course_access_id = ".intval($i_course_access_id)." AND session_id = ".api_get_session_id();
536 536
                                 Database::query($sql);
537 537
                             } else {
538
-                                $sql = "INSERT INTO $course_tracking_table (c_id, user_id, login_course_date, logout_course_date, counter, session_id)" .
539
-                                        "VALUES('" . api_get_course_int_id() . "', '" . $_user['user_id'] . "', '$time', '$time', '1','" . api_get_session_id() . "')";
538
+                                $sql = "INSERT INTO $course_tracking_table (c_id, user_id, login_course_date, logout_course_date, counter, session_id)".
539
+                                        "VALUES('".api_get_course_int_id()."', '".$_user['user_id']."', '$time', '$time', '1','".api_get_session_id()."')";
540 540
                                 Database::query($sql);
541 541
                             }
542 542
                         }
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
                 $course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
565 565
                 $sql = "SELECT * FROM $course_user_table
566 566
                        WHERE
567
-                        user_id  = '" . $user_id . "' AND
568
-                        relation_type <> " . COURSE_RELATION_TYPE_RRHH . " AND
567
+                        user_id  = '".$user_id."' AND
568
+                        relation_type <> " . COURSE_RELATION_TYPE_RRHH." AND
569 569
                         course_code = '$course_id'";
570 570
                 $result = Database::query($sql);
571 571
 
@@ -585,8 +585,8 @@  discard block
 block discarded – undo
585 585
                             $session_id
586 586
                         );
587 587
                         if (!$user_is_subscribed) {
588
-                            $url = api_get_path(WEB_CODE_PATH) . 'course_info/legal.php?course_code=' . $_course['code'] . '&session_id=' . $session_id;
589
-                            header('Location: ' . $url);
588
+                            $url = api_get_path(WEB_CODE_PATH).'course_info/legal.php?course_code='.$_course['code'].'&session_id='.$session_id;
589
+                            header('Location: '.$url);
590 590
                             exit;
591 591
                         }
592 592
                     }
@@ -627,11 +627,11 @@  discard block
 block discarded – undo
627 627
                         } else {
628 628
                             //Im a coach or a student?
629 629
                             $sql = "SELECT user_id, status
630
-                                    FROM " . $tbl_session_course_user . "
630
+                                    FROM " . $tbl_session_course_user."
631 631
                                     WHERE
632 632
                                         c_id = '$_cid' AND
633
-                                        user_id = '" . $user_id . "' AND
634
-                                        session_id = '" . $session_id . "'
633
+                                        user_id = '".$user_id."' AND
634
+                                        session_id = '" . $session_id."'
635 635
                                     LIMIT 1";
636 636
                             $result = Database::query($sql);
637 637
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
         if ($reset) { // session data refresh requested
778 778
             if ($group_id && $_cid && !empty($_course['real_id'])) { // have keys to search data
779 779
                 $group_table = Database::get_course_table(TABLE_GROUP);
780
-                $sql = "SELECT * FROM $group_table WHERE c_id = " . $_course['real_id'] . " AND id = '$group_id'";
780
+                $sql = "SELECT * FROM $group_table WHERE c_id = ".$_course['real_id']." AND id = '$group_id'";
781 781
                 $result = Database::query($sql);
782 782
                 if (Database::num_rows($result) > 0) { // This group has recorded status related to this course
783 783
                     $gpData = Database::fetch_array($result);
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
      */
831 831
     public static function get_user_accounts_by_username($username)
832 832
     {
833
-        if (strpos($username,'@')){
833
+        if (strpos($username, '@')) {
834 834
             $username = api_strtolower($username);
835 835
             $email = true;
836 836
         } else {
Please login to merge, or discard this patch.
main/inc/lib/specific_fields_manager.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 function delete_specific_field($id)
43 43
 {
44 44
     $table_sf = Database:: get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
45
-    $id = (int)$id;
45
+    $id = (int) $id;
46 46
     if (!is_numeric($id)) {
47 47
         return false;
48 48
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 function edit_specific_field($id, $name)
61 61
 {
62 62
     $table_sf = Database:: get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
63
-    $id = (int)$id;
63
+    $id = (int) $id;
64 64
     if (!is_numeric($id)) {
65 65
         return false;
66 66
     }
Please login to merge, or discard this patch.
main/inc/lib/timeline.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	public function __construct()
29 29
     {
30
-        $this->table =  Database::get_course_table(TABLE_TIMELINE);
30
+        $this->table = Database::get_course_table(TABLE_TIMELINE);
31 31
 	}
32 32
 
33 33
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function get_all($where_conditions = array())
48 48
     {
49
-        return Database::select('*',$this->table, array('where'=>$where_conditions,'order' =>'headline ASC'));
49
+        return Database::select('*', $this->table, array('where'=>$where_conditions, 'order' =>'headline ASC'));
50 50
     }
51 51
 
52 52
     /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		// action links
58 58
 		$html = '<div class="actions">';
59 59
         //$html .= '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
60
-		$html .= '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'),'','32').'</a>';
60
+		$html .= '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', '32').'</a>';
61 61
 		$html .= '</div>';
62 62
         $html .= Display::grid_html('timelines');
63 63
         return $html;
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         }
245 245
         unset($item['end_date']);
246 246
         // Assets
247
-        $item['asset'] = array( 'media'     => $item['media'],
247
+        $item['asset'] = array('media'     => $item['media'],
248 248
                                 'credit'    => $item['media_credit'],
249 249
                                 'caption'   => $item['media_caption'],
250 250
          );
Please login to merge, or discard this patch.