Completed
Push — 1.11.x ( 69878b...1da93a )
by José
64:32 queued 39:16
created
main/ticket/tickets.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
         echo '<div class="actions" >';
290 290
         echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'ticket/new_ticket.php?project_id='.$projectId.'">' .
291 291
                 Display::return_icon('add.png', get_lang('Add'), '', '32') .
292
-             '</a>';
292
+                '</a>';
293 293
         echo '</div>';
294 294
     }
295 295
 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     $.ajax({
20 20
         contentType: "application/x-www-form-urlencoded",
21 21
         beforeSend: function(object) {
22
-        $("div#"+div_course).html("<img src=\'' . $webLibPath . 'javascript/indicator.gif\' />"); },
22
+        $("div#"+div_course).html("<img src=\'' . $webLibPath.'javascript/indicator.gif\' />"); },
23 23
         type: "POST",
24 24
         url: "ticket_assign_log.php",
25 25
         data: "ticket_id="+ticket_id,
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 function display_advanced_search_form() {
43 43
     if ($("#advanced_search_form").css("display") == "none") {
44 44
         $("#advanced_search_form").css("display","block");
45
-        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_hide.gif', get_lang('Hide'), array('style' => 'vertical-align:middle')) . '&nbsp;' . get_lang('AdvancedSearch') . '\');
45
+        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_hide.gif', get_lang('Hide'), array('style' => 'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
46 46
     } else {
47 47
         $("#advanced_search_form").css("display","none");
48
-        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_show.gif', get_lang('Show'), array('style' => 'vertical-align:middle')) . '&nbsp;' . get_lang('AdvancedSearch') . '\');
48
+        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_show.gif', get_lang('Show'), array('style' => 'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
49 49
     }
50 50
 }
51 51
 </script>';
@@ -219,21 +219,21 @@  discard block
 block discarded – undo
219 219
         null,
220 220
         '<a href="javascript://" class = "advanced-parameters" onclick="display_advanced_search_form();">'
221 221
         . '<span id="img_plus_and_minus">&nbsp;'
222
-        . Display::return_icon('div_show.gif', get_lang('Show')) . ' '
223
-        . get_lang('AdvancedSearch') . '</span></a>'
222
+        . Display::return_icon('div_show.gif', get_lang('Show')).' '
223
+        . get_lang('AdvancedSearch').'</span></a>'
224 224
     );
225 225
 
226 226
     echo '<div class="actions" >';
227 227
     if (api_is_platform_admin()) {
228
-        echo '<span class="left">' .
229
-                '<a href="' . api_get_path(WEB_CODE_PATH) . 'ticket/new_ticket.php?project_id='.$projectId.'">' .
230
-                    Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM) . '</a>' .
231
-                '<a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '&project_id='.$projectId.'">' .
232
-                    Display::return_icon('export_excel.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
228
+        echo '<span class="left">'.
229
+                '<a href="'.api_get_path(WEB_CODE_PATH).'ticket/new_ticket.php?project_id='.$projectId.'">'.
230
+                    Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM).'</a>'.
231
+                '<a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'&project_id='.$projectId.'">'.
232
+                    Display::return_icon('export_excel.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
233 233
 
234 234
         echo Display::url(
235 235
             Display::return_icon('settings.png', get_lang('Categories')),
236
-            api_get_path(WEB_CODE_PATH) . 'ticket/settings.php'
236
+            api_get_path(WEB_CODE_PATH).'ticket/settings.php'
237 237
         );
238 238
         echo '</span>';
239 239
     }
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 } else {
288 288
     if (api_get_setting('ticket_allow_student_add') === 'true') {
289 289
         echo '<div class="actions" >';
290
-        echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'ticket/new_ticket.php?project_id='.$projectId.'">' .
291
-                Display::return_icon('add.png', get_lang('Add'), '', '32') .
290
+        echo '<a href="'.api_get_path(WEB_CODE_PATH).'ticket/new_ticket.php?project_id='.$projectId.'">'.
291
+                Display::return_icon('add.png', get_lang('Add'), '', '32').
292 292
              '</a>';
293 293
         echo '</div>';
294 294
     }
@@ -320,8 +320,8 @@  discard block
 block discarded – undo
320 320
     $table->set_header(6, get_lang('AssignedTo'), true);
321 321
     $table->set_header(7, get_lang('Message'), true);
322 322
 } else {
323
-    echo '<center><h1>' . get_lang('MyTickets') . '</h1></center>';
324
-    echo '<center><p>' . get_lang('TicketMsgWelcome') . '</p></center>';
323
+    echo '<center><h1>'.get_lang('MyTickets').'</h1></center>';
324
+    echo '<center><p>'.get_lang('TicketMsgWelcome').'</p></center>';
325 325
     $table->set_header(0, '#', true);
326 326
     $table->set_header(1, get_lang('Status'), false);
327 327
     $table->set_header(2, get_lang('Date'), true);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 $isAdmin = api_is_platform_admin();
139 139
 
140 140
 Display::display_header(get_lang('MyTickets'));
141
-if (!empty($projectId))
142
-if ($isAdmin) {
141
+if (!empty($projectId)) {
142
+    if ($isAdmin) {
143 143
     $getParameters = [
144 144
         'keyword',
145 145
         'keyword_status',
@@ -151,6 +151,7 @@  discard block
 block discarded – undo
151 151
         'Tickets_per_page',
152 152
         'Tickets_column'
153 153
     ];
154
+}
154 155
     $get_parameter = '';
155 156
     foreach ($getParameters as $getParameter) {
156 157
         if (isset($_GET[$getParameter])) {
Please login to merge, or discard this patch.
main/ticket/new_ticket.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 require_once __DIR__.'/../inc/global.inc.php';
9 9
 
10 10
 if (!api_is_platform_admin() && api_get_setting('ticket_allow_student_add') != 'true') {
11
-    header('location:' . api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
11
+    header('location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
12 12
     exit;
13 13
 }
14 14
 
@@ -84,15 +84,15 @@  discard block
 block discarded – undo
84 84
     var selected = document.getElementById("category_id").selectedIndex;
85 85
     var id = document.getElementById("category_id").options[selected].value;
86 86
     if(parseInt(course_required[id]) == 1 && document.getElementById("course_id").value == 0) {
87
-        alert("' . addslashes(get_lang("ValidCourse")) . '");
87
+        alert("' . addslashes(get_lang("ValidCourse")).'");
88 88
         return false;
89 89
     } else if(id != "CUR" && parseInt(course_required[id]) != 1  && !re.test(document.getElementById("personal_email").value)) {
90 90
         if (document.getElementById("personal_email").value != "") {
91
-            alert("' . addslashes(get_lang("PleaseEnterValidEmail")) . '");
91
+            alert("' . addslashes(get_lang("PleaseEnterValidEmail")).'");
92 92
             return false;
93 93
         }
94 94
     } else if(fckEditor1val == "") {
95
-        alert("' . addslashes(get_lang("Filled")) . '");
95
+        alert("' . addslashes(get_lang("Filled")).'");
96 96
         return false;
97 97
     }
98 98
 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     });
136 136
 
137 137
     img_remove = $("<img/>", {
138
-        src: "' . Display::returnIconPath('delete.png') . '"
138
+        src: "' . Display::returnIconPath('delete.png').'"
139 139
     });
140 140
 
141 141
     new_filepath_id = $("#filepath_" + counter_image);
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
 
168 168
 $types = TicketManager::get_all_tickets_categories($projectId, 'category.name ASC');
169 169
 $htmlHeadXtra[] = '<script language="javascript">
170
-    var projects = ' . js_array($types, 'projects', 'project_id') . '
171
-    var course_required = ' . js_array($types, 'course_required', 'course_required') . '
172
-    var other_area = ' . js_array($types, 'other_area', 'other_area') . '
173
-    var email = ' . js_array($types, 'email', 'email') .
170
+    var projects = ' . js_array($types, 'projects', 'project_id').'
171
+    var course_required = ' . js_array($types, 'course_required', 'course_required').'
172
+    var other_area = ' . js_array($types, 'other_area', 'other_area').'
173
+    var email = ' . js_array($types, 'email', 'email').
174 174
 '</script>';
175 175
 
176 176
 /**
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
  */
180 180
 function js_str($s)
181 181
 {
182
-    return '"' . addcslashes($s, "\0..\37\"\\") . '"';
182
+    return '"'.addcslashes($s, "\0..\37\"\\").'"';
183 183
 }
184 184
 
185 185
 /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 {
193 193
     $return = "new Array(); ";
194 194
     foreach ($array as $value) {
195
-        $return .= $name . "['" . $value['category_id'] . "'] ='" . $value[$key] . "'; ";
195
+        $return .= $name."['".$value['category_id']."'] ='".$value[$key]."'; ";
196 196
     }
197 197
 
198 198
     return $return;
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     $form->addElement(
381 381
         'text',
382 382
         'phone',
383
-        get_lang('Phone') . ' (' . get_lang('Optional') . ')',
383
+        get_lang('Phone').' ('.get_lang('Optional').')',
384 384
         array(
385 385
             'id' => 'phone'
386 386
         )
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
     $form->addLabel('',
421 421
         '<span id="link-more-attach">
422
-         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span>
422
+         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile').'</span>
423 423
          </span>
424 424
          ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
425 425
     ');
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     $category_id = $_POST['category_id'];
454 454
     $content = $_POST['content'];
455 455
     if ($_POST['phone'] != '') {
456
-        $content .= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . Security::remove_XSS($_POST['phone']). '</p>';
456
+        $content .= '<p style="color:red">&nbsp;'.get_lang('Phone').': '.Security::remove_XSS($_POST['phone']).'</p>';
457 457
     }
458 458
     $course_id = isset($_POST['course_id']) ? $_POST['course_id'] : '';
459 459
     $sessionId = isset($_POST['session_id']) ? $_POST['session_id'] : '';
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         $status,
486 486
         $user_id
487 487
     )) {
488
-        header('Location:' . api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
488
+        header('Location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
489 489
         exit;
490 490
     } else {
491 491
         Display::display_header(get_lang('ComposeMessage'));
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
     $sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
505 505
     if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
506 506
         $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
507
-        $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
507
+        $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
508 508
     }
509 509
     if (isset($_GET['keyword'])) {
510 510
         $keyword = Database::escape_string(trim($_GET['keyword']));
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
     while ($user = Database::fetch_row($res)) {
582 582
         $user_id = $user[0];
583 583
         $userPicture = UserManager::getUserPicture($user_id);
584
-        $photo = '<img src="' . $userPicture. '" alt="' . api_get_person_name($user[2], $user[3]) . '" title="' . api_get_person_name($user[2], $user[3]) . '" />';
584
+        $photo = '<img src="'.$userPicture.'" alt="'.api_get_person_name($user[2], $user[3]).'" title="'.api_get_person_name($user[2], $user[3]).'" />';
585 585
         $users[] = array(
586 586
             $photo,
587 587
             $user_id,
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
         $accessUrlId = api_get_current_access_url_id();
74 74
         $customLogoPath = "themes/$theme/images/header-logo-custom$accessUrlId.png";
75 75
 
76
-        if (file_exists(api_get_path(SYS_PUBLIC_PATH) . "css/$customLogoPath")) {
77
-            return api_get_path(WEB_CSS_PATH) . $customLogoPath;
76
+        if (file_exists(api_get_path(SYS_PUBLIC_PATH)."css/$customLogoPath")) {
77
+            return api_get_path(WEB_CSS_PATH).$customLogoPath;
78 78
         }
79 79
 
80 80
         $originalLogoPath = "themes/$theme/images/header-logo.png";
81 81
 
82
-        if (file_exists(api_get_path(SYS_CSS_PATH) . $originalLogoPath)) {
83
-            return api_get_path(WEB_CSS_PATH) . $originalLogoPath;
82
+        if (file_exists(api_get_path(SYS_CSS_PATH).$originalLogoPath)) {
83
+            return api_get_path(WEB_CSS_PATH).$originalLogoPath;
84 84
         }
85 85
 
86 86
         return null;
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         $siteName = api_get_setting('siteName');
101 101
 
102 102
         if ($logoPath === null) {
103
-            $headerLogo = \Display::url($siteName, api_get_path(WEB_PATH) . 'index.php');
103
+            $headerLogo = \Display::url($siteName, api_get_path(WEB_PATH).'index.php');
104 104
 
105 105
             if (!empty($insitutionUrl) && !empty($insitution)) {
106
-                $headerLogo .= ' - ' . \Display::url($insitution, $insitutionUrl);
106
+                $headerLogo .= ' - '.\Display::url($insitution, $insitutionUrl);
107 107
             }
108 108
 
109 109
             $courseInfo = api_get_course_info();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $image = \Display::img($logoPath, $insitution, $imageAttributes);
129 129
 
130
-        return \Display::url($image, api_get_path(WEB_PATH) . 'index.php');
130
+        return \Display::url($image, api_get_path(WEB_PATH).'index.php');
131 131
     }
132 132
     /**
133 133
      * Like strip_tags(), but leaves an additional space and removes only the given tags
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public static function stripGivenTags($string, $tags) {
139 139
         foreach ($tags as $tag) {
140
-            $string2 = preg_replace('#</' . $tag . '[^>]*>#i', ' ', $string);
140
+            $string2 = preg_replace('#</'.$tag.'[^>]*>#i', ' ', $string);
141 141
             if ($string2 != $string) {
142
-                $string = preg_replace('/<' . $tag . '[^>]*>/i', ' ', $string2);
142
+                $string = preg_replace('/<'.$tag.'[^>]*>/i', ' ', $string2);
143 143
             }
144 144
         }
145 145
         return $string;
Please login to merge, or discard this patch.
main/ticket/ticket_details.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@
 block discarded – undo
433 433
         $form->addElement(
434 434
             'checkbox',
435 435
             'confirmation',
436
-             null,
436
+                null,
437 437
             $plugin->get_lang('RequestConfirmation')
438 438
         );
439 439
     }
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 		width: 600,
27 27
 		modal: true,
28 28
 		buttons: {
29
-            ' . get_lang('Accept') . ': function(){
29
+            ' . get_lang('Accept').': function(){
30 30
                 $("#frmResponsable").submit()
31 31
             },
32
-            ' . ucfirst(get_lang('Close')) . ': function() {
32
+            ' . ucfirst(get_lang('Close')).': function() {
33 33
                 $(this).dialog("close");
34 34
             }
35 35
             }
@@ -40,25 +40,25 @@  discard block
 block discarded – undo
40 40
         });
41 41
 
42 42
         $(".responseyes").click(function () {
43
-            if(!confirm("' . get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('Yes')) . '. ' . get_lang('IfYouAreSureTheTicketWillBeClosed') . '")){
43
+            if(!confirm("' . get_lang('AreYouSure').' : '.strtoupper(get_lang('Yes')).'. '.get_lang('IfYouAreSureTheTicketWillBeClosed').'")){
44 44
                 return false;
45 45
             }
46 46
         });
47 47
 
48 48
         $("input#responseno").click(function () {
49
-            if(!confirm("' . get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('No')) . '")){
49
+            if(!confirm("' . get_lang('AreYouSure').' : '.strtoupper(get_lang('No')).'")){
50 50
                 return false;
51 51
             }
52 52
         });
53 53
 
54 54
         $("#unassign").click(function () {
55
-            if (!confirm("' . get_lang('AreYouSureYouWantToUnassignTheTicket') . '")) {
55
+            if (!confirm("' . get_lang('AreYouSureYouWantToUnassignTheTicket').'")) {
56 56
                 return false;
57 57
             }
58 58
         });
59 59
 
60 60
         $("#close").click(function () {
61
-            if (!confirm("' . get_lang('AreYouSureYouWantToCloseTheTicket') . '")) {
61
+            if (!confirm("' . get_lang('AreYouSureYouWantToCloseTheTicket').'")) {
62 62
                 return false;
63 63
             }
64 64
         });
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     fckEditor1val = CKEDITOR.instances["content"].getData();
70 70
     document.getElementById("content").value= fckEditor1val;
71 71
     if (fckEditor1val == ""){
72
-        alert("' . get_lang('Filled') . '");
72
+        alert("' . get_lang('Filled').'");
73 73
         return false;
74 74
     }
75 75
 }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $user_id
200 200
         );
201 201
         Display::addFlash(Display::return_message(get_lang('Updated')));
202
-        header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id);
202
+        header("Location:".api_get_self()."?ticket_id=".$ticket_id);
203 203
         exit;
204 204
 
205 205
     }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']);
213 213
             }
214 214
             Display::addFlash(Display::return_message(get_lang('Updated')));
215
-            header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id);
215
+            header("Location:".api_get_self()."?ticket_id=".$ticket_id);
216 216
             exit;
217 217
             break;
218 218
         case 'unassign':
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                 TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
221 221
             }
222 222
             Display::addFlash(Display::return_message(get_lang('Updated')));
223
-            header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id);
223
+            header("Location:".api_get_self()."?ticket_id=".$ticket_id);
224 224
             exit;
225 225
             break;
226 226
         default:
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     }
229 229
 }
230 230
 
231
-$title = 'Ticket #' . $ticket['ticket']['code'];
231
+$title = 'Ticket #'.$ticket['ticket']['code'];
232 232
 
233 233
 if (!isset($_POST['compose'])) {
234 234
     if (isset($_REQUEST['close'])) {
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
               </style>";
275 275
     }
276 276
     if ($isAdmin) {
277
-        $senderData = get_lang('AddedBy'). ' '.$ticket['ticket']['user_url'].' (' . $ticket['usuario']['username'] . ').';
277
+        $senderData = get_lang('AddedBy').' '.$ticket['ticket']['user_url'].' ('.$ticket['usuario']['username'].').';
278 278
     } else {
279
-        $senderData = get_lang('AddedBy'). ' '.$ticket['usuario']['complete_name'].' (' . $ticket['usuario']['username']. ').';
279
+        $senderData = get_lang('AddedBy').' '.$ticket['usuario']['complete_name'].' ('.$ticket['usuario']['username'].').';
280 280
     }
281 281
 
282 282
     echo '<table width="100%" >
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
               <h1>'.$title.' '.$form_close_ticket.'</h1>
286 286
               <h2>'.$ticket['ticket']['subject'].'</h2>
287 287
               <p>
288
-                '.$senderData.' ' .
289
-                get_lang('Created') . ' '.
288
+                '.$senderData.' '.
289
+                get_lang('Created').' '.
290 290
                 Display::url(
291 291
                     date_to_str_ago($ticket['ticket']['start_date_from_db']),
292 292
                     '#',
@@ -302,37 +302,37 @@  discard block
 block discarded – undo
302 302
               </td>
303 303
             </tr>
304 304
             <tr>
305
-               <td><p><b>' . get_lang('Category') . ': </b>' . $ticket['ticket']['name'] . '</p></td>
305
+               <td><p><b>' . get_lang('Category').': </b>'.$ticket['ticket']['name'].'</p></td>
306 306
             </tr>
307 307
             <tr>
308
-               <td><p ' . $bold . '><b>' . get_lang('Status') . ':</b> ' . $ticket['ticket']['status'] . '</p></td>
308
+               <td><p ' . $bold.'><b>'.get_lang('Status').':</b> '.$ticket['ticket']['status'].'</p></td>
309 309
             </tr>
310 310
             <tr>
311
-                <td><p><b>' . get_lang('Priority') . ': </b>' . $ticket['ticket']['priority'] . '<p></td>
311
+                <td><p><b>' . get_lang('Priority').': </b>'.$ticket['ticket']['priority'].'<p></td>
312 312
             </tr>';
313 313
 
314 314
     if (!empty($ticket['ticket']['assigned_last_user'])) {
315 315
         $assignedUser = api_get_user_info($ticket['ticket']['assigned_last_user']);
316 316
         echo '<tr>
317
-                <td><p><b>' . get_lang('AssignedTo') . ': </b>' . $assignedUser['complete_name'] . '<p></td>
317
+                <td><p><b>' . get_lang('AssignedTo').': </b>'.$assignedUser['complete_name'].'<p></td>
318 318
             </tr>';
319 319
     } else {
320 320
         echo '<tr>
321
-                <td><p><b>' . get_lang('AssignedTo') . ': </b>-<p></td>
321
+                <td><p><b>' . get_lang('AssignedTo').': </b>-<p></td>
322 322
             </tr>';
323 323
     }
324 324
     if ($ticket['ticket']['course_url'] != null) {
325 325
         if (!empty($ticket['ticket']['session_id'])) {
326 326
             $sessionInfo = api_get_session_info($ticket['ticket']['session_id']);
327 327
             echo '<tr>
328
-				<td><b>' . get_lang('Session') . ':</b> ' . $sessionInfo['name'] . ' </td>
328
+				<td><b>' . get_lang('Session').':</b> '.$sessionInfo['name'].' </td>
329 329
 			    <td></td>
330 330
 	            <td colspan="2"></td>
331 331
 	          </tr>';
332 332
         }
333 333
 
334 334
         echo '<tr>
335
-				<td><b>' . get_lang('Course') . ':</b> ' . $ticket['ticket']['course_url'] . ' </td>
335
+				<td><b>' . get_lang('Course').':</b> '.$ticket['ticket']['course_url'].' </td>
336 336
 			    <td></td>
337 337
 	            <td colspan="2"></td>
338 338
 	          </tr>';
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     echo '<tr>
341 341
             <td>
342 342
             <hr />
343
-            <b>' . get_lang('Description') . ':</b> <br />
343
+            <b>' . get_lang('Description').':</b> <br />
344 344
             '.$ticket['ticket']['message'].'
345 345
             <hr />
346 346
             </td>            
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
 
361 361
         $receivedMessage = '';
362 362
         if (!empty($message['subject'])) {
363
-            $receivedMessage = '<b>'.get_lang('Subject') . ': </b> '.$message['subject'].'<br/>';
363
+            $receivedMessage = '<b>'.get_lang('Subject').': </b> '.$message['subject'].'<br/>';
364 364
         }
365
-        $receivedMessage = '<b>'.get_lang('Message') . ':</b><br/>'.$message['message'].'<br/>';
365
+        $receivedMessage = '<b>'.get_lang('Message').':</b><br/>'.$message['message'].'<br/>';
366 366
 
367 367
         $attachmentLinks = '';
368 368
         if (isset($message['attachments'])) {
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
             }
375 375
         }
376 376
 
377
-        $entireMessage = $receivedMessage . $attachmentLinks;
377
+        $entireMessage = $receivedMessage.$attachmentLinks;
378 378
         $counterLink = Display::url('#'.$counter, api_get_self().'?ticket_id='.$ticket_id.'#note-'.$counter);
379
-        echo '<a id="note-'.$counter.'"> </a><h4>' . sprintf(get_lang('UpdatedByX'), $message['user_created']).' '.$date.
379
+        echo '<a id="note-'.$counter.'"> </a><h4>'.sprintf(get_lang('UpdatedByX'), $message['user_created']).' '.$date.
380 380
             ' <span class="pull-right">'.$counterLink.'</span></h4>';
381 381
         echo Display::div(
382 382
             $entireMessage,
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         $counter++;
386 386
     }
387 387
 
388
-    $subject = get_lang('ReplyShort') .': '.$ticket['ticket']['subject'];
388
+    $subject = get_lang('ReplyShort').': '.$ticket['ticket']['subject'];
389 389
 
390 390
     if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
391 391
         $ticket['ticket']['status_id'] != TicketManager::STATUS_CLOSE
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
         }
438 438
     }
439 439
     Display::addFlash(Display::return_message(get_lang('Saved')));
440
-    header("Location:" . api_get_self() . "?ticket_id=" . $ticket_id);
440
+    header("Location:".api_get_self()."?ticket_id=".$ticket_id);
441 441
     exit;
442 442
 }
443 443
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     $form = new FormValidator(
453 453
         'send_ticket',
454 454
         'POST',
455
-        api_get_self() . '?ticket_id=' . $ticket['id'],
455
+        api_get_self().'?ticket_id='.$ticket['id'],
456 456
         '',
457 457
         array(
458 458
             'enctype' => 'multipart/form-data',
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
     $form->addLabel('', '<span id="filepaths"><div id="filepath_1"></div></span>');
551 551
     $form->addLabel('',
552 552
         '<span id="link-more-attach">
553
-         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span>
553
+         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile').'</span>
554 554
          </span>
555 555
          ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
556 556
     ');
Please login to merge, or discard this patch.
main/messages/new_message.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
 
78 78
 function show_compose_reply_to_message($message_id, $receiver_id)
79 79
 {
80
-	$table_message = Database::get_main_table(TABLE_MESSAGE);
81
-	$query = "SELECT user_sender_id
80
+    $table_message = Database::get_main_table(TABLE_MESSAGE);
81
+    $query = "SELECT user_sender_id
82 82
               FROM $table_message
83 83
 			  WHERE user_receiver_id = ".intval($receiver_id)." AND id='".intval($message_id)."';";
84
-	$result = Database::query($query);
85
-	$row = Database::fetch_array($result,'ASSOC');
86
-	if (!isset($row['user_sender_id'])) {
87
-		$html = get_lang('InvalidMessageId');
84
+    $result = Database::query($query);
85
+    $row = Database::fetch_array($result,'ASSOC');
86
+    if (!isset($row['user_sender_id'])) {
87
+        $html = get_lang('InvalidMessageId');
88 88
 
89
-		return $html;
90
-	}
91
-	$userInfo = api_get_user_info($row['user_sender_id']);
92
-	$default['users'] = array($row['user_sender_id']);
93
-	$html = manage_form($default, null, $userInfo['complete_name']);
89
+        return $html;
90
+    }
91
+    $userInfo = api_get_user_info($row['user_sender_id']);
92
+    $default['users'] = array($row['user_sender_id']);
93
+    $html = manage_form($default, null, $userInfo['complete_name']);
94 94
 
95 95
     return $html;
96 96
 }
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
 function show_compose_to_user ($receiver_id)
99 99
 {
100 100
     $userInfo = api_get_user_info($receiver_id);
101
-	$html = get_lang('To').':&nbsp;<strong>'.$userInfo['complete_name'].'</strong>';
102
-	$default['title'] = api_xml_http_response_encode(get_lang('EnterTitle'));
103
-	$default['users'] = array($receiver_id);
104
-	$html .= manage_form($default);
101
+    $html = get_lang('To').':&nbsp;<strong>'.$userInfo['complete_name'].'</strong>';
102
+    $default['title'] = api_xml_http_response_encode(get_lang('EnterTitle'));
103
+    $default['users'] = array($receiver_id);
104
+    $html .= manage_form($default);
105 105
 
106 106
     return $html;
107 107
 }
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 
274 274
 /* MAIN SECTION */
275 275
 if ($socialToolIsActive) {
276
-	$this_section = SECTION_SOCIAL;
276
+    $this_section = SECTION_SOCIAL;
277 277
     $interbreadcrumb[] = array(
278 278
         'url' => api_get_path(WEB_PATH).'main/social/home.php',
279 279
         'name' => get_lang('SocialNetwork')
280 280
     );
281 281
 } else {
282
-	$this_section = SECTION_MYPROFILE;
282
+    $this_section = SECTION_MYPROFILE;
283 283
     $interbreadcrumb[] = array(
284 284
         'url' => api_get_path(WEB_PATH).'main/auth/profile.php',
285 285
         'name' => get_lang('Profile')
@@ -289,30 +289,30 @@  discard block
 block discarded – undo
289 289
 $group_id = isset($_REQUEST['group_id']) ? intval($_REQUEST['group_id']) : null;
290 290
 $social_right_content = null;
291 291
 if ($group_id != 0) {
292
-	$social_right_content .= '<div class=actions>';
293
-	$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/group_view.php?id='.$group_id.'">'.
294
-		Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
295
-	$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.
296
-		Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
297
-	$social_right_content .= '</div>';
292
+    $social_right_content .= '<div class=actions>';
293
+    $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/group_view.php?id='.$group_id.'">'.
294
+        Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
295
+    $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.
296
+        Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
297
+    $social_right_content .= '</div>';
298 298
 } else {
299
-	if ($socialToolIsActive) {
300
-	} else {
301
-		$social_right_content .= '<div class=actions>';
302
-		if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') {
303
-			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
299
+    if ($socialToolIsActive) {
300
+    } else {
301
+        $social_right_content .= '<div class=actions>';
302
+        if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') {
303
+            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
304 304
                 Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
305
-		}
306
-		if (api_get_setting('allow_message_tool') === 'true') {
307
-			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
305
+        }
306
+        if (api_get_setting('allow_message_tool') === 'true') {
307
+            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
308 308
                 Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>';
309
-			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
309
+            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
310 310
                 Display::return_icon('inbox.png',get_lang('Inbox')).'</a>';
311 311
             $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
312 312
                 Display::return_icon('outbox.png',get_lang('Outbox')).'</a>';
313
-		}
314
-		$social_right_content .= '</div>';
315
-	}
313
+        }
314
+        $social_right_content .= '</div>';
315
+    }
316 316
 }
317 317
 
318 318
 // LEFT COLUMN
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $nameTools = api_xml_http_response_encode(get_lang('Messages'));
25 25
 /*	Constants and variables */
26 26
 
27
-$htmlHeadXtra[]='
27
+$htmlHeadXtra[] = '
28 28
 <script>
29 29
 function validate(form, list) {
30 30
 	if(list.selectedIndex<0) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
               FROM $table_message
83 83
 			  WHERE user_receiver_id = ".intval($receiver_id)." AND id='".intval($message_id)."';";
84 84
 	$result = Database::query($query);
85
-	$row = Database::fetch_array($result,'ASSOC');
85
+	$row = Database::fetch_array($result, 'ASSOC');
86 86
 	if (!isset($row['user_sender_id'])) {
87 87
 		$html = get_lang('InvalidMessageId');
88 88
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     return $html;
96 96
 }
97 97
 
98
-function show_compose_to_user ($receiver_id)
98
+function show_compose_to_user($receiver_id)
99 99
 {
100 100
     $userInfo = api_get_user_info($receiver_id);
101 101
 	$html = get_lang('To').':&nbsp;<strong>'.$userInfo['complete_name'].'</strong>';
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 function manage_form($default, $select_from_user_list = null, $sent_to = null)
110 110
 {
111 111
     $group_id = isset($_REQUEST['group_id']) ? intval($_REQUEST['group_id']) : null;
112
-    $message_id = isset($_GET['message_id'])  ?  intval($_GET['message_id']) : null;
112
+    $message_id = isset($_GET['message_id']) ? intval($_GET['message_id']) : null;
113 113
     $param_f = isset($_GET['f']) && $_GET['f'] == 'social' ? 'social' : null;
114 114
 
115 115
     $form = new FormValidator(
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             );
134 134
             $form->addRule('id_text_name', get_lang('ThisFieldIsRequired'), 'required');
135 135
             $form->addElement('html', '<div id="id_div_search" style="padding:0px" class="message-select-box" >&nbsp;</div>');
136
-            $form->addElement('hidden','user_list', 0, array('id'=>'user_list'));
136
+            $form->addElement('hidden', 'user_list', 0, array('id'=>'user_list'));
137 137
         } else {
138 138
             if (!empty($sent_to)) {
139 139
                 $form->addLabel(get_lang('SendMessageTo'), $sent_to);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                     array(),
148 148
                     [
149 149
                         'multiple' => 'multiple',
150
-                        'url' => api_get_path(WEB_AJAX_PATH) . 'message.ajax.php?a=find_users'
150
+                        'url' => api_get_path(WEB_AJAX_PATH).'message.ajax.php?a=find_users'
151 151
                     ]
152 152
                 );
153 153
             } else {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         $form->addLabel(
213 213
             '',
214
-            '<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')'
214
+            '<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span>&nbsp;('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')'
215 215
         );
216 216
     }
217 217
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             $content = $default['content'];
234 234
             $group_id = isset($default['group_id']) ? $default['group_id'] : null;
235 235
             $parent_id = isset($default['parent_id']) ? $default['parent_id'] : null;
236
-            if (is_array($user_list) && count($user_list)> 0) {
236
+            if (is_array($user_list) && count($user_list) > 0) {
237 237
                 //all is well, send the message
238 238
                 foreach ($user_list as $userId) {
239 239
                     $res = MessageManager::send_message(
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                     if ($res) {
249 249
                         $userInfo = api_get_user_info($userId);
250 250
                         Display::addFlash(Display::return_message(
251
-                            get_lang('MessageSentTo') ."&nbsp;<b>" .$userInfo['complete_name'] ."</b>",
251
+                            get_lang('MessageSentTo')."&nbsp;<b>".$userInfo['complete_name']."</b>",
252 252
                             'confirmation',
253 253
                             false
254 254
                         ));
@@ -291,9 +291,9 @@  discard block
 block discarded – undo
291 291
 if ($group_id != 0) {
292 292
 	$social_right_content .= '<div class=actions>';
293 293
 	$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/group_view.php?id='.$group_id.'">'.
294
-		Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
294
+		Display::return_icon('back.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
295 295
 	$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.
296
-		Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
296
+		Display::return_icon('message_new.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
297 297
 	$social_right_content .= '</div>';
298 298
 } else {
299 299
 	if ($socialToolIsActive) {
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
 		}
306 306
 		if (api_get_setting('allow_message_tool') === 'true') {
307 307
 			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
308
-                Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>';
308
+                Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
309 309
 			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
310
-                Display::return_icon('inbox.png',get_lang('Inbox')).'</a>';
310
+                Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
311 311
             $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
312
-                Display::return_icon('outbox.png',get_lang('Outbox')).'</a>';
312
+                Display::return_icon('outbox.png', get_lang('Outbox')).'</a>';
313 313
 		}
314 314
 		$social_right_content .= '</div>';
315 315
 	}
@@ -323,21 +323,21 @@  discard block
 block discarded – undo
323 323
     $social_right_content .= '<div class="row">';
324 324
     $social_right_content .= '<div class="col-md-12">';
325 325
     $social_right_content .= '<div class="actions">';
326
-    $social_right_content .=  '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.
326
+    $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.
327 327
         Display::return_icon('back.png', get_lang('Back'), array(), 32).'</a>';
328
-    $social_right_content .=  '</div>';
329
-    $social_right_content .=  '</div>';
328
+    $social_right_content .= '</div>';
329
+    $social_right_content .= '</div>';
330 330
     $social_right_content .= '<div class="col-md-12">';
331 331
 }
332 332
 
333 333
 // MAIN CONTENT
334 334
 if (!isset($_POST['compose'])) {
335
-    if(isset($_GET['re_id'])) {
335
+    if (isset($_GET['re_id'])) {
336 336
         $social_right_content .= show_compose_reply_to_message(
337 337
             $_GET['re_id'],
338 338
             api_get_user_id()
339 339
         );
340
-    } elseif(isset($_GET['send_to_user'])) {
340
+    } elseif (isset($_GET['send_to_user'])) {
341 341
         $social_right_content .= show_compose_to_user($_GET['send_to_user']);
342 342
     } else {
343 343
         $social_right_content .= show_compose_to_any(api_get_user_id());
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         $restrict = true;
349 349
     } elseif (isset($_POST['group_id'])) {
350 350
         $restrict = true;
351
-    } elseif(isset($_POST['hidden_user'])) {
351
+    } elseif (isset($_POST['hidden_user'])) {
352 352
         $restrict = true;
353 353
     }
354 354
 
@@ -371,13 +371,13 @@  discard block
 block discarded – undo
371 371
             }
372 372
             $social_right_content .= manage_form($default);
373 373
         } else {
374
-            $social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'),'error');
374
+            $social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'), 'error');
375 375
         }
376 376
     }
377 377
 }
378 378
 if (api_get_setting('allow_social_tool') === 'true') {
379
-    $social_right_content .=  '</div>';
380
-    $social_right_content .=  '</div>';
379
+    $social_right_content .= '</div>';
380
+    $social_right_content .= '</div>';
381 381
 }
382 382
 
383 383
 $tpl = new Template(get_lang('ComposeMessage'));
Please login to merge, or discard this patch.
main/mySpace/users.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 $this_section = SECTION_TRACKING;
22 22
 
23
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
23
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
24 24
 
25 25
 if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) {
26
-    $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers'));
26
+    $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers'));
27 27
 }
28 28
 
29
-if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
-    $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
29
+if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
+    $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
31 31
 }
32 32
 
33 33
 function get_count_users()
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$sessionId.'">
164 164
 				            '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
165 165
         } else {
166
-            $detailsLink =  '<a href="myStudents.php?student='.$student_id.'">
166
+            $detailsLink = '<a href="myStudents.php?student='.$student_id.'">
167 167
 				            '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
168 168
         }
169 169
         $row[] = $detailsLink;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 if (api_is_drh()) {
186 186
     $menu_items = array(
187
-        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ),
187
+        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"),
188 188
         Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'),
189 189
         Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'),
190 190
         Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'),
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
 
241 241
 if ($export_csv) {
242 242
     if ($is_western_name_order) {
243
-        $csv_header[] = array (
243
+        $csv_header[] = array(
244 244
             get_lang('FirstName'),
245 245
             get_lang('LastName'),
246 246
             get_lang('FirstLogin'),
247 247
             get_lang('LastConnexion')
248 248
         );
249 249
     } else {
250
-        $csv_header[] = array (
250
+        $csv_header[] = array(
251 251
             get_lang('LastName'),
252 252
             get_lang('FirstName'),
253 253
             get_lang('FirstLogin'),
Please login to merge, or discard this patch.
main/forum/newthread.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
 /* Breadcrumbs */
56 56
 
57
-if (isset($_SESSION['gradebook'])){
57
+if (isset($_SESSION['gradebook'])) {
58 58
     $gradebook = Security::remove_XSS($_SESSION['gradebook']);
59 59
 }
60 60
 
61 61
 if (!empty($gradebook) && $gradebook == 'view') {
62
-    $interbreadcrumb[] = array (
62
+    $interbreadcrumb[] = array(
63 63
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
64 64
         'name' => get_lang('ToolGradebook')
65 65
     );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
118 118
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
119 119
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => $current_forum['forum_title']);
120
-    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']),'name' => get_lang('NewTopic'));
120
+    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => get_lang('NewTopic'));
121 121
 } else {
122 122
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq, 'name' => $nameTools);
123 123
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/viewforumcategory.php?'.$cidreq.'&forumcategory='.$current_forum_category['cat_id'], 'name' => $current_forum_category['cat_title']);
Please login to merge, or discard this patch.
main/tracking/userlogCSV.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 //YW Hack security to quick fix RolesRights bug
21 21
 $is_allowed = true;
22 22
 
23
-require_once api_get_path(SYS_CODE_PATH) . 'exercise/hotpotatoes.lib.php';
23
+require_once api_get_path(SYS_CODE_PATH).'exercise/hotpotatoes.lib.php';
24 24
 
25 25
 /* Header */
26 26
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             AND ((access_start_date <= '$now'
65 65
             AND access_end_date >= '$now')
66 66
             OR (access_start_date='0000-00-00' AND access_end_date='0000-00-00'))
67
-        WHERE session_id='" . api_get_session_id() . "' AND c_id = $courseId";
67
+        WHERE session_id='".api_get_session_id()."' AND c_id = $courseId";
68 68
 //echo $sql;
69 69
 $result = Database::query($sql);
70 70
 if (!Database::num_rows($result)) {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 $tbl_learnpath_view = Database::get_course_table(TABLE_LP_VIEW);
78 78
 $tbl_learnpath_item_view = Database::get_course_table(TABLE_LP_ITEM_VIEW);
79 79
 
80
-$documentPath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document';
80
+$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
81 81
 
82 82
 // The variables for the days and the months
83 83
 $DaysShort = api_get_week_days_short();
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             // if user can track everybody : list user of course
110 110
             $sql = "SELECT count(user_id)
111 111
                     FROM $TABLECOURSUSER
112
-                    WHERE c_id = '$courseId' AND relation_type<>" . COURSE_RELATION_TYPE_RRHH . "";
112
+                    WHERE c_id = '$courseId' AND relation_type<>".COURSE_RELATION_TYPE_RRHH."";
113 113
 
114 114
         } else {
115 115
             // if user can only track one group : list users of this group
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             // list of users in this course
148 148
             $sql = "SELECT u.user_id, u.firstname,u.lastname
149 149
                 FROM $TABLECOURSUSER cu , $TABLEUSER u
150
-                WHERE cu.user_id = u.user_id AND cu.relation_type<>" . COURSE_RELATION_TYPE_RRHH . "
150
+                WHERE cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH."
151 151
                 AND cu.c_id = '$courseId'
152 152
                 LIMIT $offset,$step";
153 153
         } else {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             // check if user is in this course
174 174
             $tracking_is_accepted = $is_course_member;
175 175
             $tracked_user_info = api_get_user_info($uInfo);
176
-            $title[0] = $tracked_user_info[1] . '_' . $tracked_user_info[2];
176
+            $title[0] = $tracked_user_info[1].'_'.$tracked_user_info[2];
177 177
         } else {
178 178
             // check if user is in the group of this tutor
179 179
             $sql = "SELECT u.firstname,u.lastname, u.email
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 $tracking_is_accepted = true;
188 188
             }
189 189
 
190
-            $title[0] = $tracked_user_info['firstname'] . '_' . $tracked_user_info['lastname'];
190
+            $title[0] = $tracked_user_info['firstname'].'_'.$tracked_user_info['lastname'];
191 191
         }
192 192
 
193 193
         if ($tracking_is_accepted) {
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
                 $_cid
236 236
             );
237 237
 
238
-            $title_line = $title_line1 . $title_line2 . $title_line3 . $title_line4 . $title_line5;
239
-            $line = $line1 . $line2 . $line3 . $line4 . $line5;
238
+            $title_line = $title_line1.$title_line2.$title_line3.$title_line4.$title_line5;
239
+            $line = $line1.$line2.$line3.$line4.$line5;
240 240
         } else {
241 241
             echo get_lang('ErrorUserNotInGroup');
242 242
         }
@@ -303,22 +303,22 @@  discard block
 block discarded – undo
303 303
      * force the browser to save the file instead of opening it
304 304
      */
305 305
 
306
-    $len = strlen($title_line . $line);
306
+    $len = strlen($title_line.$line);
307 307
     header('Content-type: application/octet-stream');
308 308
     //header('Content-Type: application/force-download');
309
-    header('Content-length: ' . $len);
309
+    header('Content-length: '.$len);
310 310
     $filename = html_entity_decode(
311 311
         str_replace(
312 312
             ":",
313 313
             "",
314
-            str_replace(" ", "_", $title[0] . '_' . $title[1] . '.csv')
314
+            str_replace(" ", "_", $title[0].'_'.$title[1].'.csv')
315 315
         )
316 316
     );
317 317
     $filename = api_replace_dangerous_char($filename);
318 318
     if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
319
-        header('Content-Disposition: filename= ' . $filename);
319
+        header('Content-Disposition: filename= '.$filename);
320 320
     } else {
321
-        header('Content-Disposition: attachment; filename= ' . $filename);
321
+        header('Content-Disposition: attachment; filename= '.$filename);
322 322
     }
323 323
     if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
324 324
         header('Pragma: ');
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             'Cache-Control: public'
328 328
         ); // IE cannot download from sessions without a cache
329 329
     }
330
-    header('Content-Description: ' . $filename);
330
+    header('Content-Description: '.$filename);
331 331
     header('Content-transfer-encoding: binary');
332 332
 
333 333
     echo api_html_entity_decode($title_line, ENT_QUOTES, $charset);
Please login to merge, or discard this patch.
main/inc/lib/javascript/chat/video.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
 $idUserLocal = api_get_user_id();
35 35
 $userLocal = api_get_user_info($idUserLocal, true);
36 36
 $htmlHeadXtra[] = '<script type="text/javascript" src="'
37
-    . api_get_path(WEB_PATH) . 'web/assets/simpleWebRTC/latest.js'
38
-    . '"></script>' . "\n";
37
+    . api_get_path(WEB_PATH).'web/assets/simpleWebRTC/latest.js'
38
+    . '"></script>'."\n";
39 39
 
40 40
 $template = new Template();
41 41
 $template->assign('room_name', $chatVideo->getRoomName());
Please login to merge, or discard this patch.