Completed
Push — 1.11.x ( d84d27...922b6f )
by José
30:17
created
main/gradebook/lib/fe/exportgradebook.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @param	string	View to print as a title for the table
13 13
  * @param	string	Course name to print as title for the table
14 14
  */
15
-function print_table($data_array,$header_names,$view,$coursename)
15
+function print_table($data_array, $header_names, $view, $coursename)
16 16
 {
17 17
 	$printdata = '<!DOCTYPE html
18 18
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 	$count_pages = ceil(count($data_table) / $items_per_page);
162 162
     $content_table = '';
163
-    for ($x = 0; $x<$count_pages; $x++) {
163
+    for ($x = 0; $x < $count_pages; $x++) {
164 164
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
165 165
         // header table
166 166
         $content_table .= '<tr>';
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             foreach ($headers_table as $head_table) {
171 171
                 if (!empty($head_table[0])) {
172
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
172
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
173 173
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
174 174
                     $i++;
175 175
                 }
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
         $content_table .= '</tr>';
179 179
         // body table
180 180
         if (is_array($data_table) && count($data_table) > 0) {
181
-            $offset = $x*$items_per_page;
182
-            $data_table = array_slice ($data_table, $offset, count($data_table));
181
+            $offset = $x * $items_per_page;
182
+            $data_table = array_slice($data_table, $offset, count($data_table));
183 183
             $i = 1;
184
-            $item = $offset+1;
184
+            $item = $offset + 1;
185 185
             foreach ($data_table as $data) {
186 186
                 $content_table .= '<tr>';
187
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
187
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
188 188
                 foreach ($data as  $key => $content) {
189 189
                     if (isset($content)) {
190
-                        $key == 1 ? $align='align="left"':$align='align="center"';
190
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
191 191
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
192 192
                     }
193 193
                 }
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
                             <h1>'.$title_pdf.'</h1></td></tr>';
241 241
         foreach ($headers_pdf as $header_pdf) {
242 242
             if (!empty($header_pdf[0]) && !empty($header_pdf[1])) {
243
-                $header.= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
243
+                $header .= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
244 244
             }
245 245
         }
246
-        $header.='</table><br />';
246
+        $header .= '</table><br />';
247 247
     }
248 248
 
249 249
     // preparing footer pdf
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     }
268 268
     $items_per_page = 30;
269 269
     $count_pages = ceil(count($data_table) / $items_per_page);
270
-    for ($x = 0; $x<$count_pages; $x++) {
270
+    for ($x = 0; $x < $count_pages; $x++) {
271 271
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
272 272
         // header table
273 273
         $content_table .= '<tr>';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         if (is_array($headers_table)) {
276 276
             foreach ($headers_table as $head_table) {
277 277
                 if (!empty($head_table[0])) {
278
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
278
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
279 279
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
280 280
                     $i++;
281 281
                 }
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
         // body table
286 286
 
287 287
         if (is_array($data_table) && count($data_table) > 0) {
288
-            $offset = $x*$items_per_page;
289
-            $data_table = array_slice ($data_table, $offset, count($data_table));
288
+            $offset = $x * $items_per_page;
289
+            $data_table = array_slice($data_table, $offset, count($data_table));
290 290
             $i = 1;
291
-            $item = $offset+1;
291
+            $item = $offset + 1;
292 292
             foreach ($data_table as $data) {
293 293
                 $content_table .= '<tr>';
294
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
294
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
295 295
                 foreach ($data as  $key => $content) {
296 296
                     if (isset($content)) {
297
-                        $key == 1 ? $align='align="left"':$align='align="center"';
297
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
298 298
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
299 299
                     }
300 300
                 }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     $pdf = new PDF();
313 313
     $pdf->set_custom_footer($footer);
314 314
     $pdf->set_custom_header($headers_in_pdf);
315
-    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf );
315
+    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf);
316 316
     exit;
317 317
 
318 318
 }
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
 function export_pdf($pdf, $newarray, $header_names, $format)
328 328
 {
329 329
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
330
-	$pdf->ezSetCmMargins(0,0,0,0);
331
-	$pdf->ezSetY(($format=='portrait')?'820':'570');
330
+	$pdf->ezSetCmMargins(0, 0, 0, 0);
331
+	$pdf->ezSetY(($format == 'portrait') ? '820' : '570');
332 332
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
333 333
     if ($format == 'portrait') {
334 334
         $pdf->line(40, 790, 540, 790);
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         $pdf->line(40, 540, 790, 540);
338 338
         $pdf->line(40, 40, 790, 40);
339 339
     }
340
-    $pdf->ezSetY(($format=='portrait')?'750':'520');
340
+    $pdf->ezSetY(($format == 'portrait') ? '750' : '520');
341 341
     $pdf->ezTable($newarray, $header_names, '', array(
342 342
         'showHeadings' => 1,
343 343
         'shaded' => 1,
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function print_table($data_array,$header_names,$view,$coursename)
16 16
 {
17
-	$printdata = '<!DOCTYPE html
17
+    $printdata = '<!DOCTYPE html
18 18
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
19 19
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 20
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.api_get_language_isocode().'" lang="'.api_get_language_isocode().'">
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
 function export_pdf_attendance($headers_table, $data_table, $headers_pdf, $footers_pdf, $title_pdf)
99 99
 {
100 100
     $mpdf = new mPDF('UTF-8', 'A4-L', '', '', 15, 10, 35, 20, 4, 2, 'L');
101
-	$mpdf->useOnlyCoreFonts = true;
102
-	$mpdf->mirrorMargins = 0;
101
+    $mpdf->useOnlyCoreFonts = true;
102
+    $mpdf->mirrorMargins = 0;
103 103
     // Use different Odd/Even headers and footers and mirror margins
104 104
 
105
-	if (is_array($headers_pdf)) {
106
-		// preparing headers pdf
107
-		$header = '
105
+    if (is_array($headers_pdf)) {
106
+        // preparing headers pdf
107
+        $header = '
108 108
             <table width="100%"  cellspacing="1" cellpadding="1" border="0" class="strong">
109 109
             <tr>
110 110
                 <td ROWSPAN="3" style="text-align: left;" class="title">
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $items_per_page = count($data_table);
160 160
     }
161 161
 
162
-	$count_pages = ceil(count($data_table) / $items_per_page);
162
+    $count_pages = ceil(count($data_table) / $items_per_page);
163 163
     $content_table = '';
164 164
     for ($x = 0; $x<$count_pages; $x++) {
165 165
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
@@ -327,10 +327,10 @@  discard block
 block discarded – undo
327 327
  */
328 328
 function export_pdf($pdf, $newarray, $header_names, $format)
329 329
 {
330
-	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
331
-	$pdf->ezSetCmMargins(0,0,0,0);
332
-	$pdf->ezSetY(($format=='portrait')?'820':'570');
333
-	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
330
+    $pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
331
+    $pdf->ezSetCmMargins(0,0,0,0);
332
+    $pdf->ezSetY(($format=='portrait')?'820':'570');
333
+    $pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
334 334
     if ($format == 'portrait') {
335 335
         $pdf->line(40, 790, 540, 790);
336 336
         $pdf->line(40, 40, 540, 40);
@@ -346,5 +346,5 @@  discard block
 block discarded – undo
346 346
         'rowGap' => 3,
347 347
         'width' => (($format == 'portrait') ? '500' : '750'),
348 348
     ));
349
-	$pdf->ezStream();
349
+    $pdf->ezStream();
350 350
 }
Please login to merge, or discard this patch.
main/session/session_user_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
31
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
32 32
 $interbreadcrumb[] = array(
33 33
     'url' => "resume_session.php?id_session=".$sessionId,
34 34
     "name" => get_lang('SessionOverview')
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     if ($days > 0) {
61 61
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateInZDays'), $firstAccessString, $duration, $days);
62 62
     } else {
63
-        $endDateInSeconds = $firstAccess + $duration * 24*60*60;
63
+        $endDateInSeconds = $firstAccess + $duration * 24 * 60 * 60;
64 64
         $last = api_convert_and_format_date($endDateInSeconds, DATE_FORMAT_SHORT);
65 65
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateWasZ'), $firstAccessString, $duration, $last);
66 66
     }
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
             ],
109 109
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
110 110
             ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
111
-            [   'Styles',
111
+            ['Styles',
112 112
                 'Format',
113 113
                 'Font',
114 114
                 'FontSize',
Please login to merge, or discard this patch.
main/admin/specific_fields.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -15,36 +15,36 @@  discard block
 block discarded – undo
15 15
 api_protect_admin_script();
16 16
 
17 17
 // Breadcrumb
18
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
19
-$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
18
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
19
+$interbreadcrumb[] = array('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
20 20
 
21 21
 $libpath = api_get_path(LIBRARY_PATH);
22 22
 
23 23
 include_once $libpath.'specific_fields_manager.lib.php';
24 24
 
25 25
 // Create an add-field box
26
-$form = new FormValidator('add_field','post','','',null,false);
27
-$renderer =& $form->defaultRenderer();
26
+$form = new FormValidator('add_field', 'post', '', '', null, false);
27
+$renderer = & $form->defaultRenderer();
28 28
 $renderer->setCustomElementTemplate('<span>{element}</span> ');
29
-$form->addElement('static','search_advanced_link',null,'<a href="specific_fields_add.php">'.Display::return_icon('fieldadd.gif').get_lang('AddSpecificSearchField').'</a>');
29
+$form->addElement('static', 'search_advanced_link', null, '<a href="specific_fields_add.php">'.Display::return_icon('fieldadd.gif').get_lang('AddSpecificSearchField').'</a>');
30 30
 
31 31
 // Create a sortable table with specific fields data
32
-$column_show = array(1,1,1);
33
-$column_order = array(3,2,1);
32
+$column_show = array(1, 1, 1);
33
+$column_order = array(3, 2, 1);
34 34
 $extra_fields = get_specific_field_list();
35 35
 $number_of_extra_fields = count($extra_fields);
36 36
 
37
-$table = new SortableTableFromArrayConfig($extra_fields,2,50,'',$column_show,$column_order);
38
-$table->set_header(0, '&nbsp;', false,null,'width="2%"', 'style="display:none"');
37
+$table = new SortableTableFromArrayConfig($extra_fields, 2, 50, '', $column_show, $column_order);
38
+$table->set_header(0, '&nbsp;', false, null, 'width="2%"', 'style="display:none"');
39 39
 $table->set_header(1, get_lang('Code'), TRUE, 'width="10%"');
40 40
 $table->set_header(2, get_lang('Name'));
41
-$table->set_header(3, get_lang('Modify'),false,'width="10%"');
41
+$table->set_header(3, get_lang('Modify'), false, 'width="10%"');
42 42
 $table->set_column_filter(3, 'edit_filter');
43 43
 
44
-function edit_filter($id,$url_params,$row) {
44
+function edit_filter($id, $url_params, $row) {
45 45
 	global $charset;
46
-	$return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>';
47
-	$return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>';
46
+	$return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
47
+	$return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset))."'".')) return false;">'.Display::return_icon('delete.gif', get_lang('Delete')).'</a>';
48 48
 	return $return;
49 49
 }
50 50
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 Display::display_header(get_lang('SpecificSearchFields'));
61 61
 echo Display::display_normal_message(get_lang('SpecificSearchFieldsIntro'));
62 62
 
63
-if(!empty($_GET['message'])) {
63
+if (!empty($_GET['message'])) {
64 64
   Display::display_confirmation_message($_GET['message']);
65 65
 }
66 66
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
 $table->set_column_filter(3, 'edit_filter');
43 43
 
44 44
 function edit_filter($id,$url_params,$row) {
45
-	global $charset;
46
-	$return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>';
47
-	$return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>';
48
-	return $return;
45
+    global $charset;
46
+    $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>';
47
+    $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>';
48
+    return $return;
49 49
 }
50 50
 
51 51
 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
52
-	delete_specific_field($_REQUEST['field_id']);
53
-	header('Location: specific_fields.php?message='.get_lang('FieldRemoved'));
52
+    delete_specific_field($_REQUEST['field_id']);
53
+    header('Location: specific_fields.php?message='.get_lang('FieldRemoved'));
54 54
     exit;
55 55
 }
56 56
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 echo Display::display_normal_message(get_lang('SpecificSearchFieldsIntro'));
62 62
 
63 63
 if(!empty($_GET['message'])) {
64
-  Display::display_confirmation_message($_GET['message']);
64
+    Display::display_confirmation_message($_GET['message']);
65 65
 }
66 66
 
67 67
 echo '<div class="actions">';
Please login to merge, or discard this patch.
main/admin/specific_fields_add.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 $tool_name = get_lang('AddSpecificSearchField');
28 28
 
29 29
 if (isset($_GET['action']) && $_GET['action'] === 'edit') {
30
-  $tool_name = get_lang('EditSpecificSearchField');
30
+    $tool_name = get_lang('EditSpecificSearchField');
31 31
 }
32 32
 // Create the form
33 33
 $form = new FormValidator('specific_fields_add');
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@  discard block
 block discarded – undo
32 32
 // Create the form
33 33
 $form = new FormValidator('specific_fields_add');
34 34
 // Field variable name
35
-$form->addElement('hidden','field_id', $fieldId);
36
-$form->addElement('text','field_name',get_lang('FieldName'));
37
-$form->applyFilter('field_name','html_filter');
38
-$form->applyFilter('field_name','trim');
35
+$form->addElement('hidden', 'field_id', $fieldId);
36
+$form->addElement('text', 'field_name', get_lang('FieldName'));
37
+$form->applyFilter('field_name', 'html_filter');
38
+$form->applyFilter('field_name', 'trim');
39 39
 $form->addRule('field_name', get_lang('ThisFieldIsRequired'), 'required');
40 40
 $form->addRule('field_name', get_lang('OnlyLettersAndNumbersAllowed'), 'username');
41
-$form->addRule('field_name', '', 'maxlength',20);
41
+$form->addRule('field_name', '', 'maxlength', 20);
42 42
 
43 43
 // Set default values (only not empty when editing)
44 44
 $defaults = array();
45 45
 if ($fieldId) {
46
-    $form_information = get_specific_field_list(array( 'id' => $fieldId ));
46
+    $form_information = get_specific_field_list(array('id' => $fieldId));
47 47
     $defaults['field_name'] = $form_information[0]['name'];
48 48
 }
49 49
 $form->setDefaults($defaults);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 if ($form->validate()) {
55 55
     $field = $form->exportValues();
56 56
     $field_name = $field['field_name'];
57
-    if (is_numeric($field['field_id']) && $field['field_id']<>0 && !empty($field['field_id'])) {
57
+    if (is_numeric($field['field_id']) && $field['field_id'] <> 0 && !empty($field['field_id'])) {
58 58
         edit_specific_field($field['field_id'], $field['field_name']);
59 59
         $message = get_lang('FieldEdited');
60 60
     } else {
Please login to merge, or discard this patch.
main/inc/lib/course_category.lib.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param string $canHaveCourses
104 104
      * @param int $parent_id
105 105
      *
106
-     * @return bool
106
+     * @return false|string
107 107
      */
108 108
     public static function addNode($code, $name, $canHaveCourses, $parent_id)
109 109
     {
@@ -297,8 +297,7 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * Counts the number of children categories a category has
299 299
      * @param int $categoryId The ID of the category of which we want to count the children
300
-     * @param int $count The number of subcategories we counted this far
301
-     * @return mixed The number of subcategories this category has
300
+     * @return integer The number of subcategories this category has
302 301
      */
303 302
     public static function courseCategoryChildrenCount($categoryId)
304 303
     {
@@ -476,7 +475,7 @@  discard block
 block discarded – undo
476 475
     /**
477 476
      * @param int $id
478 477
      *
479
-     * @return bool
478
+     * @return boolean|null
480 479
      */
481 480
     public static function addToUrl($id)
482 481
     {
@@ -958,7 +957,7 @@  discard block
 block discarded – undo
958 957
      * Get Pagination HTML div
959 958
      * @param $pageCurrent
960 959
      * @param $pageLength
961
-     * @param $pageTotal
960
+     * @param integer $pageTotal
962 961
      * @return string
963 962
      */
964 963
     public static function getCatalogPagination($pageCurrent, $pageLength, $pageTotal)
Please login to merge, or discard this patch.
main/admin/course_category.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     if ($action == 'delete') {
27 27
         CourseCategory::deleteNode($categoryId);
28 28
         Display::addFlash(Display::return_message(get_lang('Deleted')));
29
-        header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
29
+        header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
30 30
         exit();
31 31
     } elseif (($action == 'add' || $action == 'edit') && isset($_POST['formSent']) && $_POST['formSent']) {
32 32
         if ($action == 'add') {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
     } elseif ($action == 'moveUp') {
56 56
         CourseCategory::moveNodeUp($categoryId, $_GET['tree_pos'], $category);
57
-        header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
57
+        header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
58 58
         Display::addFlash(Display::return_message(get_lang('Updated')));
59 59
         exit();
60 60
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     $form_title = ($action == 'add') ? get_lang('AddACategory') : get_lang('EditNode');
80 80
     if (!empty($category)) {
81
-        $form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category);
81
+        $form_title .= ' '.get_lang('Into').' '.Security::remove_XSS($category);
82 82
     }
83 83
     $url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.Security::remove_XSS($categoryId);
84 84
     $form = new FormValidator('course_category', 'post', $url);
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/HTMLPurifier/Filter/AllowIframes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $vimeoMatch = preg_match('#://player.vimeo.com/#i', $matches[1]);
62 62
         $googleMapsMatch = preg_match('#src="https://maps.google.com/#i', $matches[1]);
63 63
         $slideShare = preg_match('#src="(https?:)?//www.slideshare.net/#', $matches[1]);
64
-        $platformDomain = preg_match('#src="https?://(.+\.)?' . $hostName[1] . '#i', $matches[1]);
64
+        $platformDomain = preg_match('#src="https?://(.+\.)?'.$hostName[1].'#i', $matches[1]);
65 65
 
66 66
         if ($youTubeMatch || $vimeoMatch || $googleMapsMatch || $slideShare || $platformDomain) {
67 67
             $extra = ' frameborder="0"';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             } elseif ($vimeoMatch) {
71 71
                 $extra .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen';
72 72
             }
73
-            return '<iframe ' . $matches[1] . $extra . '></iframe>';
73
+            return '<iframe '.$matches[1].$extra.'></iframe>';
74 74
         } else {
75 75
             return '';
76 76
         }
Please login to merge, or discard this patch.
main/inc/ajax/course.ajax.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                         0, //howMany
75 75
                         1, //$orderby = 1
76 76
                         'ASC',
77
-                        -1,  //visibility
77
+                        -1, //visibility
78 78
                         $_GET['q'],
79 79
                         null, //$urlId
80 80
                         true //AlsoSearchCode
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
                 if (!empty($course['category_code'])) {
98 98
                     $parents = CourseCategory::getParentsToString($course['category_code']);
99
-                    $title = $parents . $course['title'];
99
+                    $title = $parents.$course['title'];
100 100
                 }
101 101
 
102 102
                 $results['items'][] = array(
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     INNER JOIN $session_course_user r ON u.user_id = r.user_id
177 177
                     WHERE session_id = %d AND c_id =  '%s'
178 178
                     AND (u.firstname LIKE '%s' OR u.username LIKE '%s' OR u.lastname LIKE '%s')";
179
-            $needle = '%' . $_GET['q'] . '%';
179
+            $needle = '%'.$_GET['q'].'%';
180 180
             $sql_query = sprintf($sql, $_GET['session_id'], $course['real_id'], $needle, $needle, $needle);
181 181
 
182 182
             $result = Database::query($sql_query);
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
     case 'search_exercise_by_course':
196 196
         if (api_is_platform_admin()) {
197 197
             $course = api_get_course_info_by_id($_GET['course_id']);
198
-            $session_id = (!empty($_GET['session_id'])) ?  intval($_GET['session_id']) : 0 ;
198
+            $session_id = (!empty($_GET['session_id'])) ? intval($_GET['session_id']) : 0;
199 199
             $exercises = ExerciseLib::get_all_exercises($course, $session_id, false, $_GET['q'], true, 3);
200 200
 
201 201
             foreach ($exercises as $exercise) {
202
-                $data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title']) );
202
+                $data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title']));
203 203
             }
204 204
             if (!empty($data)) {
205 205
                 $data[] = array('id' => 'T', 'text' => 'TODOS');
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
                 $sql,
225 225
                 intval($_GET['course_id']),
226 226
                 intval($_GET['session_id']),
227
-                '%' . Database::escape_string($_GET['q']).'%'
227
+                '%'.Database::escape_string($_GET['q']).'%'
228 228
             );
229 229
             $result = Database::query($sql_query);
230 230
             while ($survey = Database::fetch_assoc($result)) {
231
-                $survey['title'] .= ($survey['anonymous'] == 1) ? ' (' . get_lang('Anonymous') . ')' : '';
231
+                $survey['title'] .= ($survey['anonymous'] == 1) ? ' ('.get_lang('Anonymous').')' : '';
232 232
                 $data[] = array(
233 233
                     'id' => $survey['id'],
234 234
                     'text' => strip_tags(html_entity_decode($survey['title']))
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -267,11 +267,11 @@
 block discarded – undo
267 267
                 $coachName = api_get_person_name($userResult['firstname'], $userResult['lastname']);
268 268
             }
269 269
 
270
-           $courses[] = array(
271
-               'id' => $courseId,
272
-               'name' => $course['title'],
273
-               'coachName' => $coachName,
274
-           );
270
+            $courses[] = array(
271
+                'id' => $courseId,
272
+                'name' => $course['title'],
273
+                'coachName' => $coachName,
274
+            );
275 275
         }
276 276
 
277 277
         echo json_encode($courses);
Please login to merge, or discard this patch.