Completed
Push — 1.11.x ( 6904fa...6a92e6 )
by José
525:44 queued 484:20
created
main/forum/viewthread.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 require_once '../inc/global.inc.php';
10
-$current_course_tool  = TOOL_FORUM;
10
+$current_course_tool = TOOL_FORUM;
11 11
 
12 12
 $this_section = SECTION_COURSES;
13 13
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // Are we in a lp ?
24 24
 $origin = '';
25 25
 if (isset($_GET['origin'])) {
26
-    $origin =  Security::remove_XSS($_GET['origin']);
26
+    $origin = Security::remove_XSS($_GET['origin']);
27 27
 }
28 28
 $my_search = null;
29 29
 $gradebook = null;
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 // Note pcool: I tried to use only one sql statement (and function) for this,
37 37
 // but the problem is that the visibility of the forum AND forum category are stored in the item_property table.
38 38
 // Note: This has to be validated that it is an existing thread
39
-$current_thread	= get_thread_information($_GET['thread']);
39
+$current_thread = get_thread_information($_GET['thread']);
40 40
 // Note: This has to be validated that it is an existing forum.
41
-$current_forum	= get_forum_information($current_thread['forum_id']);
42
-$current_forum_category	= get_forumcategory_information($current_forum['forum_category']);
41
+$current_forum = get_forum_information($current_thread['forum_id']);
42
+$current_forum_category = get_forumcategory_information($current_forum['forum_category']);
43 43
 $whatsnew_post_info = isset($_SESSION['whatsnew_post_info']) ? $_SESSION['whatsnew_post_info'] : null;
44 44
 /* Header and Breadcrumbs */
45 45
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 }
50 50
 
51 51
 if (!empty($gradebook) && $gradebook == 'view') {
52
-    $interbreadcrumb[] = array (
53
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
52
+    $interbreadcrumb[] = array(
53
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
54 54
         'name' => get_lang('ToolGradebook')
55 55
     );
56 56
 }
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
         'name' => get_lang('Groups')
66 66
     );
67 67
     $interbreadcrumb[] = array(
68
-        'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?' . api_get_cidreq(),
69
-        'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']
68
+        'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
69
+        'name' => get_lang('GroupSpace').' '.$group_properties['name']
70 70
     );
71 71
     $interbreadcrumb[] = array(
72
-        'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum=' . intval($_GET['forum']) . '&' . api_get_cidreq(). "&search=" . Security::remove_XSS(urlencode($my_search)),
72
+        'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.intval($_GET['forum']).'&'.api_get_cidreq()."&search=".Security::remove_XSS(urlencode($my_search)),
73 73
         'name' => Security::remove_XSS($current_forum['forum_title'])
74 74
     );
75 75
     $interbreadcrumb[] = array(
76
-        'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?forum=' . intval($_GET['forum']) . '&' . api_get_cidreq(). '&thread=' . intval($_GET['thread']),
76
+        'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?forum='.intval($_GET['forum']).'&'.api_get_cidreq().'&thread='.intval($_GET['thread']),
77 77
         'name' => Security::remove_XSS($current_thread['thread_title'])
78 78
     );
79 79
 
@@ -84,15 +84,15 @@  discard block
 block discarded – undo
84 84
         Display::display_reduced_header();
85 85
     } else {
86 86
         $interbreadcrumb[] = array(
87
-            'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&search=' . Security::remove_XSS(urlencode($my_search)),
87
+            'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&search='.Security::remove_XSS(urlencode($my_search)),
88 88
             'name' => $nameTools
89 89
         );
90 90
         $interbreadcrumb[] = array(
91
-            'url' => api_get_path(WEB_CODE_PATH).'forum/viewforumcategory.php?forumcategory='. $current_forum_category['cat_id']. "&search=". Security::remove_XSS(urlencode($my_search)),
91
+            'url' => api_get_path(WEB_CODE_PATH).'forum/viewforumcategory.php?forumcategory='.$current_forum_category['cat_id']."&search=".Security::remove_XSS(urlencode($my_search)),
92 92
             'name' => Security::remove_XSS($current_forum_category['cat_title'])
93 93
         );
94 94
         $interbreadcrumb[] = array(
95
-            'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum=' . intval($_GET['forum']). "&search=". Security::remove_XSS(urlencode($my_search)),
95
+            'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum='.intval($_GET['forum'])."&search=".Security::remove_XSS(urlencode($my_search)),
96 96
             'name' => Security::remove_XSS($current_forum['forum_title'])
97 97
         );
98 98
         $interbreadcrumb[] = array(
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     echo '<div class="actions">';
162 162
     echo '<span style="float:right;">'.search_link().'</span>';
163 163
     if ($origin != 'learnpath') {
164
-        echo '<a href="' . $forumUrl . 'viewforum.php?forum='
165
-            . intval($_GET['forum']) . '&' . api_get_cidreq() . '">'
166
-            . Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM) . '</a>';
164
+        echo '<a href="'.$forumUrl.'viewforum.php?forum='
165
+            . intval($_GET['forum']).'&'.api_get_cidreq().'">'
166
+            . Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
167 167
     }
168 168
     // The reply to thread link should only appear when the forum_category is
169 169
     // not locked AND the forum is not locked AND the thread is not locked.
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
         if ($_user['user_id'] || ($current_forum['allow_anonymous'] == 1 && !$_user['user_id'])) {
180 180
             // reply link
181 181
             if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
182
-                echo '<a href="' . $forumUrl . 'reply.php?' . api_get_cidreq() . '&forum='
183
-                    . intval($_GET['forum']) . '&thread='
184
-                    . intval($_GET['thread']) . '&action=replythread">'
182
+                echo '<a href="'.$forumUrl.'reply.php?'.api_get_cidreq().'&forum='
183
+                    . intval($_GET['forum']).'&thread='
184
+                    . intval($_GET['thread']).'&action=replythread">'
185 185
                     . Display::return_icon('reply_thread.png', get_lang('ReplyToThread'), '', ICON_SIZE_MEDIUM)
186 186
                     . '</a>';
187 187
             }
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
 
206 206
     // The different views of the thread.
207 207
     if ($origin != 'learnpath') {
208
-        $my_url = '<a href="' . $forumUrl . 'viewthread.php?' . api_get_cidreq() . '&' . api_get_cidreq()
209
-            . '&forum=' . intval($_GET['forum']) . '&thread=' . intval($_GET['thread'])
210
-            . '&search=' . Security::remove_XSS(urlencode($my_search));
211
-        echo $my_url . '&view=flat">'
208
+        $my_url = '<a href="'.$forumUrl.'viewthread.php?'.api_get_cidreq().'&'.api_get_cidreq()
209
+            . '&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread'])
210
+            . '&search='.Security::remove_XSS(urlencode($my_search));
211
+        echo $my_url.'&view=flat">'
212 212
             . Display::return_icon('forum_listview.png', get_lang('FlatView'), null, ICON_SIZE_MEDIUM)
213 213
             . '</a>';
214
-        echo $my_url . '&view=nested">'
214
+        echo $my_url.'&view=nested">'
215 215
             . Display::return_icon('forum_nestedview.png', get_lang('NestedView'), null, ICON_SIZE_MEDIUM)
216 216
             . '</a>';
217 217
     }
Please login to merge, or discard this patch.
main/admin/careers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
 
84 84
 //With this function we can add actions to the jgrid (edit, delete, etc)
85 85
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
86
-    return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
87
-    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'.
88
-    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
86
+    return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
87
+    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'.
88
+    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
89 89
     '\';
90 90
 }';
91 91
 ?>
Please login to merge, or discard this patch.
main/admin/access_urls.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     exit;
20 20
 }
21 21
 
22
-$interbreadcrumb[] = array ("url" => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array("url" => 'index.php', 'name' => get_lang('PlatformAdmin'));
23 23
 $tool_name = get_lang('MultipleAccessURLs');
24 24
 Display :: display_header($tool_name);
25 25
 
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
         case 'register':
56 56
             // we are going to register the admin
57 57
             if (api_is_platform_admin()) {
58
-                if ($current_access_url_id!=-1) {
58
+                if ($current_access_url_id != -1) {
59 59
                     $url_str = '';
60 60
                     foreach ($url_list as $my_url) {
61 61
                         if (!in_array($my_url['id'], $my_user_url_list)) {
62 62
                             UrlManager::add_user_to_url(api_get_user_id(), $my_url['id']);
63
-                            $url_str.=$my_url['url'].' <br />';
63
+                            $url_str .= $my_url['url'].' <br />';
64 64
                         }
65 65
                     }
66 66
                     Display:: display_normal_message(
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
         $url_string .= $my_url['url'].' <br />';
85 85
     }
86 86
 }
87
-if(!empty($url_string)) {
88
-	Display :: display_warning_message(get_lang('AdminShouldBeRegisterInSite').'<br />'.$url_string,false);
87
+if (!empty($url_string)) {
88
+	Display :: display_warning_message(get_lang('AdminShouldBeRegisterInSite').'<br />'.$url_string, false);
89 89
 }
90 90
 
91 91
 // checking the current installation
92
-if ($current_access_url_id==-1) {
92
+if ($current_access_url_id == -1) {
93 93
 	Display::display_warning_message(get_lang('URLNotConfiguredPleaseChangedTo').': '.api_get_path(WEB_PATH));
94
-} elseif(api_is_platform_admin()) {
95
-    $quant= UrlManager::relation_url_user_exist(api_get_user_id(),$current_access_url_id);
96
-    if ($quant==0) {
94
+} elseif (api_is_platform_admin()) {
95
+    $quant = UrlManager::relation_url_user_exist(api_get_user_id(), $current_access_url_id);
96
+    if ($quant == 0) {
97 97
         Display:: display_warning_message(
98 98
             '<a href="'.api_get_self().'?action=register&sec_token='.$parameters['sec_token'].'">'.get_lang('ClickToRegisterAdmin').'</a>',
99 99
             false
@@ -142,16 +142,16 @@  discard block
 block discarded – undo
142 142
 
143 143
     //Status
144 144
     $active = $row['active'];
145
-    if ($active=='1') {
146
-        $action='lock';
147
-        $image='right';
145
+    if ($active == '1') {
146
+        $action = 'lock';
147
+        $image = 'right';
148 148
     }
149
-    if ($active=='0') {
150
-        $action='unlock';
151
-        $image='wrong';
149
+    if ($active == '0') {
150
+        $action = 'unlock';
151
+        $image = 'wrong';
152 152
     }
153 153
     // you cannot lock the default
154
-    if ($row['id']=='1') {
154
+    if ($row['id'] == '1') {
155 155
         $status = Display::return_icon($image.'.gif', get_lang(ucfirst($action)));
156 156
     } else {
157 157
         $status = '<a href="access_urls.php?action='.$action.'&amp;url_id='.$row['id'].'">'.
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     $url_id = $row['id'];
162 162
     $actions = Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), "access_url_edit.php?url_id=$url_id");
163 163
     if ($url_id != '1') {
164
-        $actions .= '<a href="access_urls.php?action=delete_url&amp;url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.
164
+        $actions .= '<a href="access_urls.php?action=delete_url&amp;url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset))."'".')) return false;">'.
165 165
             Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
166 166
     }
167 167
     $urls[] = array($url, $description, $status, $actions);
Please login to merge, or discard this patch.
main/admin/user_import.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
             // We are sure that the extra field exists.
216 216
             foreach ($extra_fields as $extras) {
217 217
                 if (isset($user[$extras[1]])) {
218
-                    $key 	= $extras[1];
219
-                    $value 	= $user[$extras[1]];
218
+                    $key = $extras[1];
219
+                    $value = $user[$extras[1]];
220 220
                     UserManager::update_extra_field_value($user_id, $key, $value);
221 221
                 }
222 222
             }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     global $current_tag;
253 253
     switch ($data) {
254 254
         case 'Contact':
255
-            $user = array ();
255
+            $user = array();
256 256
             break;
257 257
         default:
258 258
             $current_tag = $data;
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     $allowed_file_mimetype = array('csv', 'xml');
346 346
     $error_kind_file = false;
347 347
 
348
-    $checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] :null;
348
+    $checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] : null;
349 349
 
350 350
     $uploadInfo = pathinfo($_FILES['import_file']['name']);
351 351
     $ext_import_file = $uploadInfo['extension'];
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         if (strcmp($file_type, 'csv') === 0 &&
355 355
             $ext_import_file == $allowed_file_mimetype[0]
356 356
         ) {
357
-            $users	= parse_csv_data($_FILES['import_file']['tmp_name']);
357
+            $users = parse_csv_data($_FILES['import_file']['tmp_name']);
358 358
             $errors = validate_data($users, $checkUniqueEmail);
359 359
             $error_kind_file = false;
360 360
         } elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) {
Please login to merge, or discard this patch.
main/calendar/agenda.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
             }
275 275
             break;
276 276
         case "delete":
277
-            if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId) )) {
277
+            if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId))) {
278 278
                 // a coach can only delete an element belonging to his session
279 279
                 $content = $agenda->deleteEvent($eventId);
280 280
             }
Please login to merge, or discard this patch.
main/attendance/attendance_sheet.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $form = new FormValidator(
25 25
             'filter',
26 26
             'post',
27
-            'index.php?action=attendance_sheet_list&' . api_get_cidreq().'&attendance_id=' . $attendance_id,
27
+            'index.php?action=attendance_sheet_list&'.api_get_cidreq().'&attendance_id='.$attendance_id,
28 28
             null,
29 29
             array(),
30 30
             'inline'
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                             <th width="100px"><?php echo get_lang('AttendancesFaults')?></th>
218 218
                         </tr>
219 219
                         <tr class="tableFloatingHeaderOriginal" >
220
-                            <th width="10px"><?php echo '#';?></th>
220
+                            <th width="10px"><?php echo '#'; ?></th>
221 221
                             <th width="10px"><?php echo get_lang('Photo')?></th>
222 222
                             <th width="150px"><?php echo get_lang('LastName')?></th>
223 223
                             <th width="140px"><?php echo get_lang('FirstName')?></th>
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
                         foreach ($users_in_course as $data) {
232 232
                             $faults = 0;
233 233
                             if ($i % 2 == 0) {
234
-                                $class='row_odd';
234
+                                $class = 'row_odd';
235 235
                             } else {
236
-                                $class='row_even';
236
+                                $class = 'row_even';
237 237
                             }
238 238
                             $username = api_htmlentities(sprintf(get_lang('LoginX'), $data['username']), ENT_QUOTES);
239 239
                             ?>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                                 <td><span title="<?php echo $username ?>"><?php echo $data['lastname'] ?></span></td>
244 244
                                 <td><?php echo $data['firstname'] ?></td>
245 245
                                 <td>
246
-                                    <div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar'])?$data['result_color_bar']:'none') ?>">
246
+                                    <div class="attendance-faults-bar" style="background-color:<?php echo (!empty($data['result_color_bar']) ? $data['result_color_bar'] : 'none') ?>">
247 247
                                         <?php echo $data['attendance_result'] ?>
248 248
                                     </div>
249 249
                                 </td>
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
                     foreach ($attendant_calendar as $calendar) {
266 266
                         $date = $calendar['date'];
267 267
                         $time = $calendar['time'];
268
-                        $datetime = '<div class="grey">'. $date . ' - ' . $time . '</div>';
268
+                        $datetime = '<div class="grey">'.$date.' - '.$time.'</div>';
269 269
 
270 270
                         $img_lock = Display::return_icon(
271 271
                             'lock-closed.png',
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
                         );
275 275
 
276 276
                         if (!empty($calendar['done_attendance'])) {
277
-                            $datetime = '<div class="blue">' . $date . ' - ' . $time . '</div>';
277
+                            $datetime = '<div class="blue">'.$date.' - '.$time.'</div>';
278 278
                         }
279 279
                         $disabled_check = 'disabled = "true"';
280 280
                         $input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="" disabled />';
281 281
                         if ($next_attendance_calendar_id == $calendar['id']) {
282 282
                             $input_hidden = '<input type="hidden" id="hidden_input_'.$calendar['id'].'" name="hidden_input[]" value="'.$calendar['id'].'" />';
283 283
                             $disabled_check = '';
284
-                            $img_lock = Display::return_icon('lock-closed.png',get_lang('DateLock'),array('class'=>'img_unlock','id'=>'datetime_column_'.$calendar['id']));
284
+                            $img_lock = Display::return_icon('lock-closed.png', get_lang('DateLock'), array('class'=>'img_unlock', 'id'=>'datetime_column_'.$calendar['id']));
285 285
                         }
286 286
 
287 287
                         $result .= '<th>';
288 288
                         $result .= '<div class="date-attendance">'.$datetime.'&nbsp;';
289 289
 
290 290
                         if (api_is_allowed_to_edit(null, true)) {
291
-                            $result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin()?$img_lock:'').'</span>';
291
+                            $result .= '<span id="attendance_lock" style="cursor:pointer">'.(!$is_locked_attendance || api_is_platform_admin() ? $img_lock : '').'</span>';
292 292
                         }
293 293
 
294 294
                         if ($is_locked_attendance == false) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                     }
300 300
                 } else {
301 301
                     $result  = '<th width="2000px"><span><a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">';
302
-                    $result .= Display::return_icon('attendance_calendar.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
302
+                    $result .= Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).' '.get_lang('GoToAttendanceCalendar').'</a></span></th>';
303 303
                 }
304 304
 
305 305
                 echo '<tr class="tableFloatingHeader row_odd" style="position: absolute; top: 0px; left: 0px; visibility: hidden; margin:0px;padding:0px">';
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
                 $i = 0;
314 314
                 foreach ($users_in_course as $user) {
315 315
                     $class = '';
316
-                    if ($i%2 == 0) {
316
+                    if ($i % 2 == 0) {
317 317
                         $class = 'row_even';
318 318
                     } else {
319 319
                         $class = 'row_odd';
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
                                     echo '<input type="checkbox" name="check_presence['.$calendar['id'].'][]" value="'.$user['user_id'].'" '.$disabled.' '.$checked.' />';
361 361
                                     echo '<span class="anchor_'.$calendar['id'].'"></span>';
362 362
                                 } else {
363
-                                    echo $presence ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence'));
363
+                                    echo $presence ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence'));
364 364
                                 }
365 365
                             } else {
366 366
                                 switch ($presence) {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                         </td>';
392 392
                     }
393 393
                     echo '</tr>';
394
-                    $i++ ;
394
+                    $i++;
395 395
                 }
396 396
                 echo '</tbody></table>';
397 397
                 echo '</div></div>';
@@ -419,13 +419,13 @@  discard block
 block discarded – undo
419 419
     echo Display::page_header(get_lang('AttendanceSheetReport'));
420 420
     // View for students
421 421
     ?>
422
-    <?php if(!empty($users_presence)) { ?>
422
+    <?php if (!empty($users_presence)) { ?>
423 423
         <div>
424 424
             <table width="250px;">
425 425
                 <tr>
426 426
                     <td><?php echo get_lang('ToAttend').': ' ?></td>
427 427
                     <td>
428
-                        <center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar'])?$faults['color_bar']:'none') ?>">
428
+                        <center><div class="attendance-faults-bar" style="background-color:<?php echo (!empty($faults['color_bar']) ? $faults['color_bar'] : 'none') ?>">
429 429
                         <?php echo $faults['faults'].'/'.$faults['total'].' ('.$faults['faults_porcent'].'%)' ?></div></center>
430 430
                     </td>
431 431
                 </tr>
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
             $i = 0;
443 443
             foreach ($users_presence[$user_id] as $presence) {
444 444
                 $class = '';
445
-                if ($i%2==0) {
445
+                if ($i % 2 == 0) {
446 446
                     $class = 'row_even';
447 447
                 } else {
448 448
                     $class = 'row_odd';
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
                 ?>
451 451
                 <tr class="<?php echo $class ?>">
452 452
                     <td>
453
-                        <?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif',get_lang('Presence')) : Display::return_icon('checkbox_off.gif',get_lang('Presence')) ?>
453
+                        <?php echo $presence['presence'] ? Display::return_icon('checkbox_on.gif', get_lang('Presence')) : Display::return_icon('checkbox_off.gif', get_lang('Presence')) ?>
454 454
                         <?php echo "&nbsp; ".$presence['date_time'] ?>
455 455
                     </td>
456 456
                 </tr>
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/FormValidator.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $renderer->setHeaderTemplate('<legend>{header}</legend>');
100 100
 
101 101
         //Set required field template
102
-        $this->setRequiredNote('<span class="form_required">*</span> <small>' . get_lang('ThisFieldIsRequired') . '</small>');
102
+        $this->setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>');
103 103
         $noteTemplate = <<<EOT
104 104
 	<div class="form-group">
105 105
 		<div class="col-sm-offset-2 col-sm-10">{requiredNote}</div>
@@ -851,9 +851,9 @@  discard block
 block discarded – undo
851 851
             $label = get_lang('PleaseStandBy');
852 852
         }
853 853
         $this->with_progress_bar = true;
854
-        $this->updateAttributes("onsubmit=\"javascript: myUpload.start('dynamic_div','".Display::returnIconPath('progress_bar.gif')."','" . $label . "','" . $this->getAttribute('id') . "')\"");
855
-        $this->addElement('html', '<script language="javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/upload.js" type="text/javascript"></script>');
856
-        $this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . (abs(intval($delay)) * 1000) . ');</script>');
854
+        $this->updateAttributes("onsubmit=\"javascript: myUpload.start('dynamic_div','".Display::returnIconPath('progress_bar.gif')."','".$label."','".$this->getAttribute('id')."')\"");
855
+        $this->addElement('html', '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/upload.js" type="text/javascript"></script>');
856
+        $this->addElement('html', '<script type="text/javascript">var myUpload = new upload('.(abs(intval($delay)) * 1000).');</script>');
857 857
     }
858 858
 
859 859
     /**
@@ -870,11 +870,11 @@  discard block
 block discarded – undo
870 870
             return;
871 871
         }
872 872
 
873
-        $xajax_upload = new xajax(api_get_path(WEB_LIBRARY_PATH) . 'upload.xajax.php');
873
+        $xajax_upload = new xajax(api_get_path(WEB_LIBRARY_PATH).'upload.xajax.php');
874 874
 
875 875
         $xajax_upload->registerFunction('updateProgress');
876 876
         // IMPORTANT : must be the first element of the form
877
-        $el = $this->insertElementBefore(FormValidator::createElement('html', '<input type="hidden" name="UPLOAD_IDENTIFIER" value="' . $upload_id . '" />'), $element_after);
877
+        $el = $this->insertElementBefore(FormValidator::createElement('html', '<input type="hidden" name="UPLOAD_IDENTIFIER" value="'.$upload_id.'" />'), $element_after);
878 878
 
879 879
         $this->addElement('html', '<br />');
880 880
 
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
         $this->addElement(
883 883
             'html',
884 884
             '<div id="dynamic_div_container" style="display:none">
885
-                <div id="dynamic_div_label">' . get_lang('UploadFile') . '</div>
885
+                <div id="dynamic_div_label">' . get_lang('UploadFile').'</div>
886 886
                 <div id="dynamic_div_frame" style="width:214px; height:12px; border:1px solid grey; background-image:url(' . Display::returnIconPath('real_upload_frame.gif').');">
887 887
                     <div id="dynamic_div_filled" style="width:0%;height:100%;background-image:url(' . Display::returnIconPath('real_upload_step.gif').');background-repeat:repeat-x;background-position:center;"></div>
888 888
                 </div>
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
             $this->addElement('html', '
894 894
 			<div id="dynamic_div_waiter_container" style="display:none">
895 895
 				<div id="dynamic_div_waiter_label">
896
-					' . get_lang('SlideshowConversion') . '
896
+					' . get_lang('SlideshowConversion').'
897 897
 				</div>
898 898
 				<div id="dynamic_div_waiter_frame">
899 899
 					'.Display::return_icon('real_upload_frame.gif').'
@@ -903,18 +903,18 @@  discard block
 block discarded – undo
903 903
         }
904 904
 
905 905
         // Get the xajax code
906
-        $this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH) . 'xajax'));
906
+        $this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH).'xajax'));
907 907
 
908 908
         // Get the upload code
909
-        $this->addElement('html', '<script language="javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/upload.js" type="text/javascript"></script>');
910
-        $this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . (abs(intval($delay)) * 1000) . ');</script>');
909
+        $this->addElement('html', '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/upload.js" type="text/javascript"></script>');
910
+        $this->addElement('html', '<script type="text/javascript">var myUpload = new upload('.(abs(intval($delay)) * 1000).');</script>');
911 911
 
912 912
         if (!$wait_after_upload) {
913 913
             $wait_after_upload = 0;
914 914
         }
915 915
 
916 916
         // Add the upload event
917
-        $this->updateAttributes("onsubmit=\"javascript: myUpload.startRealUpload('dynamic_div','" . $upload_id . "','" . $this->getAttribute('id') . "'," . $wait_after_upload . ")\"");
917
+        $this->updateAttributes("onsubmit=\"javascript: myUpload.startRealUpload('dynamic_div','".$upload_id."','".$this->getAttribute('id')."',".$wait_after_upload.")\"");
918 918
     }
919 919
 
920 920
     /**
Please login to merge, or discard this patch.
main/forum/newthread.php 1 patch
Spacing   +6 added lines, -6 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']);
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
 
128 128
 /* Resource Linker */
129 129
 if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Resources')) {
130
-    $_SESSION['formelements']	= $_POST;
131
-    $_SESSION['origin']			= $_SERVER['REQUEST_URI'];
132
-    $_SESSION['breadcrumbs']	= $interbreadcrumb;
130
+    $_SESSION['formelements'] = $_POST;
131
+    $_SESSION['origin'] = $_SERVER['REQUEST_URI'];
132
+    $_SESSION['breadcrumbs'] = $interbreadcrumb;
133 133
     header('Location: ../resourcelinker/resourcelinker.php');
134 134
     exit;
135 135
 }
Please login to merge, or discard this patch.
main/forum/editthread.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 
47 47
 if (!empty($gradebook) && $gradebook == 'view') {
48
-    $interbreadcrumb[] = array (
48
+    $interbreadcrumb[] = array(
49 49
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
50 50
         'name' => get_lang('ToolGradebook')
51 51
     );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
108 108
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
109 109
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => $currentForum['forum_title']);
110
-    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']),'name' => get_lang('EditThread'));
110
+    $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => get_lang('EditThread'));
111 111
 } else {
112 112
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq, 'name' => $nameTools);
113 113
     $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH).'forum/viewforumcategory.php?'.$cidreq.'&forumcategory='.$currentForumCategory['cat_id'], 'name' => $currentForumCategory['cat_title']);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 echo '<div class="actions">';
157 157
 echo '<span style="float:right;">'.search_link().'</span>';
158 158
 echo '<a href="viewforum.php?forum='.intval($_GET['forum']).'&'.$cidreq.'">'.
159
-    Display::return_icon('back.png',get_lang('BackToForum'),'',ICON_SIZE_MEDIUM).'</a>';
159
+    Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
160 160
 echo '</div>';
161 161
 
162 162
 $threadData = getThreadInfo($threadId, $cId);
Please login to merge, or discard this patch.