Passed
Push — 1.10.x ( 04397c...5e25f1 )
by Angel Fernando Quiroz
181:14 queued 130:00
created
main/admin/configure_inscription.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $tool_name = get_lang('ConfigureInscription');
47 47
 if (!empty($action)) {
48 48
     $interbreadcrumb[] = array('url' => 'configure_inscription.php', 'name' => get_lang('ConfigureInscription'));
49
-    switch($action) {
49
+    switch ($action) {
50 50
         case 'edit_top':
51 51
             $tool_name = get_lang('EditTopRegister');
52 52
             break;
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
                 // This request is only the preparation for the update of the home_top
142 142
                 $home_top = '';
143 143
                 if (is_file($homep.$topf.'_'.$lang.$ext) && is_readable($homep.$topf.'_'.$lang.$ext)) {
144
-                    $home_top = @(string)file_get_contents($homep.$topf.'_'.$lang.$ext);
144
+                    $home_top = @(string) file_get_contents($homep.$topf.'_'.$lang.$ext);
145 145
                 } elseif (is_file($homep.$topf.$lang.$ext) && is_readable($homep.$topf.$lang.$ext)) {
146
-                    $home_top = @(string)file_get_contents($homep.$topf.$lang.$ext);
146
+                    $home_top = @(string) file_get_contents($homep.$topf.$lang.$ext);
147 147
                 } else {
148 148
                     $errorMsg = get_lang('HomePageFilesNotReadable');
149 149
                 }
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
     if (api_is_western_name_order()) {
185 185
         //	FIRST NAME and LAST NAME
186 186
         $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40, 'disabled' => 'disabled'));
187
-        $form->addElement('text', 'lastname',  get_lang('LastName'),  array('size' => 40, 'disabled' => 'disabled'));
187
+        $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled'));
188 188
     } else {
189 189
         //	LAST NAME and FIRST NAME
190
-        $form->addElement('text', 'lastname',  get_lang('LastName'),  array('size' => 40, 'disabled' => 'disabled'));
190
+        $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40, 'disabled' => 'disabled'));
191 191
         $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40, 'disabled' => 'disabled'));
192 192
     }
193 193
     $form->applyFilter('firstname', 'trim');
194 194
     $form->applyFilter('lastname', 'trim');
195
-    $form->addRule('lastname',  get_lang('ThisFieldIsRequired'), 'required');
195
+    $form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
196 196
     $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
197 197
 
198 198
     //	EMAIL
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
     $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
211 211
     $form->addRule('username', get_lang('UsernameWrong'), 'username');
212 212
     $form->addRule('username', get_lang('UserTaken'), 'username_available');
213
-    $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
213
+    $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
214 214
 
215 215
     //	PASSWORD
216
-    $form->addElement('password', 'pass1', get_lang('Pass'),         array('size' => 40, 'disabled' => 'disabled'));
216
+    $form->addElement('password', 'pass1', get_lang('Pass'), array('size' => 40, 'disabled' => 'disabled'));
217 217
     $form->addElement('password', 'pass2', get_lang('Confirmation'), array('size' => 40, 'disabled' => 'disabled'));
218 218
     $form->addRule('pass1', get_lang('ThisFieldIsRequired'), 'required');
219 219
     $form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required');
@@ -241,25 +241,25 @@  discard block
 block discarded – undo
241 241
 
242 242
     //	EXTENDED FIELDS
243 243
     if (api_get_setting('extended_profile') == 'true' &&
244
-        api_get_setting('extendedprofile_registration','mycomptetences') == 'true'
244
+        api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true'
245 245
     ) {
246 246
         $form->addHtmlEditor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
247 247
     }
248 248
 
249 249
     if (api_get_setting('extended_profile') == 'true' &&
250
-        api_get_setting('extendedprofile_registration','mydiplomas') == 'true'
250
+        api_get_setting('extendedprofile_registration', 'mydiplomas') == 'true'
251 251
     ) {
252 252
         $form->addHtmlEditor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
253 253
     }
254 254
 
255 255
     if (api_get_setting('extended_profile') == 'true' &&
256
-        api_get_setting('extendedprofile_registration','myteach') == 'true'
256
+        api_get_setting('extendedprofile_registration', 'myteach') == 'true'
257 257
     ) {
258 258
         $form->addHtmlEditor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
259 259
     }
260 260
 
261 261
     if (api_get_setting('extended_profile') == 'true' &&
262
-        api_get_setting('extendedprofile_registration','mypersonalopenarea') == 'true'
262
+        api_get_setting('extendedprofile_registration', 'mypersonalopenarea') == 'true'
263 263
     ) {
264 264
         $form->addHtmlEditor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
265 265
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
     if ($term_preview['type'] == 1) {
308 308
         $form->addElement('checkbox', 'legal_accept', null, get_lang('IHaveReadAndAgree').'&nbsp;<a href="inscription.php?legal" target="_blank">'.get_lang('TermsAndConditions').'</a>');
309
-        $form->addRule('extra_legal_accept',  get_lang('ThisFieldIsRequired'), 'required');
309
+        $form->addRule('extra_legal_accept', get_lang('ThisFieldIsRequired'), 'required');
310 310
     } else {
311 311
         if (!empty($term_preview['content'])) {
312 312
             $preview = LegalManager::show_last_condition($term_preview);
@@ -343,14 +343,14 @@  discard block
 block discarded – undo
343 343
 
344 344
 $form->setDefaults($defaults);
345 345
 
346
-switch ($action){
346
+switch ($action) {
347 347
     case 'edit_top':
348 348
         if ($action == 'edit_top') {
349 349
             $name = $topf;
350 350
             $open = $home_top;
351 351
         } else {
352 352
             $name = $newsf;
353
-            $open = @(string)file_get_contents($homep.$newsf.'_'.$lang.$ext);
353
+            $open = @(string) file_get_contents($homep.$newsf.'_'.$lang.$ext);
354 354
             $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
355 355
         }
356 356
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
         $default = array();
362 362
         $form = new FormValidator('configure_inscription_'.$action, 'post', api_get_self().'?action='.$action, '', array('style' => 'margin: 0px;'));
363
-        $renderer =& $form->defaultRenderer();
363
+        $renderer = & $form->defaultRenderer();
364 364
         $renderer->setHeaderTemplate('');
365 365
         $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>');
366 366
         $renderer->setCustomElementTemplate('<tr><td>{element}</td></tr>');
@@ -379,9 +379,9 @@  discard block
 block discarded – undo
379 379
 
380 380
         $open = '';
381 381
         if (file_exists($homep.$topf.'_'.$lang.$ext)) {
382
-            $open = @(string)file_get_contents($homep.$topf.'_'.$lang.$ext);
382
+            $open = @(string) file_get_contents($homep.$topf.'_'.$lang.$ext);
383 383
         } else {
384
-            $open = @(string)file_get_contents($homep.$topf.$ext);
384
+            $open = @(string) file_get_contents($homep.$topf.$ext);
385 385
         }
386 386
         $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
387 387
         if (!empty($open)) {
Please login to merge, or discard this patch.
main/admin/resource_sequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     }
23 23
 }
24 24
 
25
-$formSequence = new FormValidator('sequence_form', 'post', api_get_self(),null,null,'inline');
25
+$formSequence = new FormValidator('sequence_form', 'post', api_get_self(), null, null, 'inline');
26 26
 $formSequence->addText('name', get_lang('Sequence'), true, ['cols-size' => [3, 8, 1]]);
27 27
 $formSequence->addButtonCreate(get_lang('AddSequence'), 'submit_sequence', false, ['cols-size' => [3, 8, 1]]);
28 28
 
Please login to merge, or discard this patch.
main/admin/careers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 $token = Security::get_token();
32 32
 
33 33
 if ($action == 'add') {
34
-    $interbreadcrumb[]=array('url' => 'careers.php','name' => get_lang('Careers'));
34
+    $interbreadcrumb[] = array('url' => 'careers.php', 'name' => get_lang('Careers'));
35 35
     $tool_name = get_lang('Add');
36 36
 } elseif ($action == 'edit') {
37
-    $interbreadcrumb[]=array('url' => 'careers.php','name' => get_lang('Careers'));
38
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
37
+    $interbreadcrumb[] = array('url' => 'careers.php', 'name' => get_lang('Careers'));
38
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit'));
39 39
     $tool_name = get_lang('Edit');
40 40
 } else {
41 41
     $tool_name = get_lang('Careers');
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
 //With this function we can add actions to the jgrid (edit, delete, etc)
83 83
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
84
-    return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
85
-    '&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>'.
86
-    '&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>'.
84
+    return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
85
+    '&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>'.
86
+    '&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>'.
87 87
     '\';
88 88
 }';
89 89
 ?>
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         } else {
123 123
             echo '<div class="actions">';
124 124
             echo '<a href="'.api_get_self().'">'.
125
-                Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
125
+                Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
126 126
             echo '</div>';
127 127
             $form->addElement('hidden', 'sec_token');
128 128
             $form->setConstants(array('sec_token' => $token));
Please login to merge, or discard this patch.
main/admin/ldap_users_synchro.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,43 +8,43 @@  discard block
 block discarded – undo
8 8
  */
9 9
 exit(); //not yet functional, needs to be revised
10 10
 
11
-$cidReset=true;
11
+$cidReset = true;
12 12
 
13 13
 require('../inc/global.inc.php');
14 14
 $libpath = api_get_path(LIBRARY_PATH);
15 15
 require("../auth/ldap/authldap.php");
16
-$annee_base=date('Y');
16
+$annee_base = date('Y');
17 17
 // setting the section (for the tabs)
18 18
 $this_section = SECTION_PLATFORM_ADMIN;
19 19
 api_protect_admin_script();
20 20
 
21 21
 // setting breadcrumbs
22
-$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[]=array('url' => api_get_self(),"name" => get_lang('SessionsList'));
22
+$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => api_get_self(), "name" => get_lang('SessionsList'));
24 24
 
25 25
 // Database Table Definitions
26 26
 $tbl_session						= Database::get_main_table(TABLE_MAIN_SESSION);
27
-$tbl_session_rel_class				= Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
-$tbl_session_rel_course				= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
-$tbl_session_rel_course_rel_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
-$tbl_course							= Database::get_main_table(TABLE_MAIN_COURSE);
31
-$tbl_user							= Database::get_main_table(TABLE_MAIN_USER);
32
-$tbl_session_rel_user				= Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
-$tbl_class							= Database::get_main_table(TABLE_MAIN_CLASS);
34
-$tbl_class_user						= Database::get_main_table(TABLE_MAIN_CLASS_USER);
27
+$tbl_session_rel_class = Database::get_main_table(TABLE_MAIN_SESSION_CLASS);
28
+$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
29
+$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
30
+$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
31
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
32
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
33
+$tbl_class = Database::get_main_table(TABLE_MAIN_CLASS);
34
+$tbl_class_user = Database::get_main_table(TABLE_MAIN_CLASS_USER);
35 35
 
36
-$tbl_session_rel_etape 				= "session_rel_etape";
36
+$tbl_session_rel_etape = "session_rel_etape";
37 37
 
38
-$id_session=intval($_GET['id_session']);
38
+$id_session = intval($_GET['id_session']);
39 39
 
40
-$formSent=0;
41
-$errorMsg=$firstLetterUser=$firstLetterSession='';
42
-$UserList=$SessionList=array();
43
-$users=$sessions=array();
44
-$noPHP_SELF=true;
40
+$formSent = 0;
41
+$errorMsg = $firstLetterUser = $firstLetterSession = '';
42
+$UserList = $SessionList = array();
43
+$users = $sessions = array();
44
+$noPHP_SELF = true;
45 45
 
46
-$page=intval($_GET['page']);
47
-$action=$_REQUEST['action'];
46
+$page = intval($_GET['page']);
47
+$action = $_REQUEST['action'];
48 48
 
49 49
 $tool_name = get_lang('Synchro LDAP : Import Etudiants/Etapes dans session');
50 50
 Display::display_header($tool_name);
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 		</form>
60 60
 
61 61
 <?php
62
-if (isset($action) && ($action=="synchro")) {
63
-	$included=true;
62
+if (isset($action) && ($action == "synchro")) {
63
+	$included = true;
64 64
 	require('ldap_synchro.php');
65
-	Display :: display_normal_message($message,false);
65
+	Display :: display_normal_message($message, false);
66 66
 }
67 67
 Display::display_footer();
68 68
 ?>
Please login to merge, or discard this patch.
main/admin/usergroup_export.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
 $tool_name = get_lang('Export');
15 15
 
16
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
17
-$interbreadcrumb[] = array ('url' => 'usergroups.php', 'name' => get_lang('Classes'));
16
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
17
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
18 18
 
19 19
 set_time_limit(0);
20 20
 
Please login to merge, or discard this patch.
main/admin/specific_fields_add.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22 22
 $interbreadcrumb[] = array('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings'));
23 23
 $interbreadcrumb[] = array('url' => 'specific_fields.php', 'name' => get_lang('SpecificSearchFields'));
24
-if ($_GET['action']<>'edit') {
24
+if ($_GET['action'] <> 'edit') {
25 25
   $tool_name = get_lang('AddSpecificSearchField');
26 26
 } else {
27 27
   $tool_name = get_lang('EditSpecificSearchField');
@@ -29,18 +29,18 @@  discard block
 block discarded – undo
29 29
 // Create the form
30 30
 $form = new FormValidator('specific_fields_add');
31 31
 // Field variable name
32
-$form->addElement('hidden','field_id',(int)$_REQUEST['field_id']);
33
-$form->addElement('text','field_name',get_lang('FieldName'));
34
-$form->applyFilter('field_name','html_filter');
35
-$form->applyFilter('field_name','trim');
32
+$form->addElement('hidden', 'field_id', (int) $_REQUEST['field_id']);
33
+$form->addElement('text', 'field_name', get_lang('FieldName'));
34
+$form->applyFilter('field_name', 'html_filter');
35
+$form->applyFilter('field_name', 'trim');
36 36
 $form->addRule('field_name', get_lang('ThisFieldIsRequired'), 'required');
37 37
 $form->addRule('field_name', get_lang('OnlyLettersAndNumbersAllowed'), 'username');
38
-$form->addRule('field_name', '', 'maxlength',20);
38
+$form->addRule('field_name', '', 'maxlength', 20);
39 39
 
40 40
 // Set default values (only not empty when editing)
41 41
 $defaults = array();
42 42
 if (is_numeric($_REQUEST['field_id'])) {
43
-    $form_information = get_specific_field_list(array( 'id' => (int)$_GET['field_id'] ));
43
+    $form_information = get_specific_field_list(array('id' => (int) $_GET['field_id']));
44 44
     $defaults['field_name'] = $form_information[0]['name'];
45 45
 }
46 46
 $form->setDefaults($defaults);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 if ($form->validate()) {
52 52
     $field = $form->exportValues();
53 53
     $field_name = $field['field_name'];
54
-    if (is_numeric($field['field_id']) && $field['field_id']<>0 && !empty($field['field_id'])) {
54
+    if (is_numeric($field['field_id']) && $field['field_id'] <> 0 && !empty($field['field_id'])) {
55 55
         edit_specific_field($field['field_id'], $field['field_name']);
56 56
         $message = get_lang('FieldEdited');
57 57
     } else {
Please login to merge, or discard this patch.
main/admin/statistics/index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     . '<script type="text/javascript">'
21 21
         . '$(document).ready(function() {'
22 22
             . '$.ajax({'
23
-                . 'url: "'. api_get_path(WEB_CODE_PATH) .'inc/ajax/statistics.ajax.php?a=recentlogins",'
23
+                . 'url: "'.api_get_path(WEB_CODE_PATH).'inc/ajax/statistics.ajax.php?a=recentlogins",'
24 24
                 . 'type: "POST",'
25 25
                 . 'success: function(data) {'
26 26
                     . 'Chart.defaults.global.responsive = true;'
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 // users ...
51 51
 $tools[$strUsers]['report=users'] = get_lang('CountUsers');
52 52
 $tools[$strUsers]['report=recentlogins'] = get_lang('Logins');
53
-$tools[$strUsers]['report=logins&amp;type=month'] = get_lang('Logins') . ' (' . get_lang('PeriodMonth') . ')';
54
-$tools[$strUsers]['report=logins&amp;type=day'] = get_lang('Logins') . ' (' . get_lang('PeriodDay') . ')';
55
-$tools[$strUsers]['report=logins&amp;type=hour'] = get_lang('Logins') . ' (' . get_lang('PeriodHour') . ')';
56
-$tools[$strUsers]['report=pictures'] = get_lang('CountUsers') . ' (' . get_lang('UserPicture') . ')';
53
+$tools[$strUsers]['report=logins&amp;type=month'] = get_lang('Logins').' ('.get_lang('PeriodMonth').')';
54
+$tools[$strUsers]['report=logins&amp;type=day'] = get_lang('Logins').' ('.get_lang('PeriodDay').')';
55
+$tools[$strUsers]['report=logins&amp;type=hour'] = get_lang('Logins').' ('.get_lang('PeriodHour').')';
56
+$tools[$strUsers]['report=pictures'] = get_lang('CountUsers').' ('.get_lang('UserPicture').')';
57 57
 $tools[$strUsers]['report=no_login_users'] = get_lang('StatsUsersDidNotLoginInLastPeriods');
58 58
 $tools[$strUsers]['report=zombies'] = get_lang('Zombies');
59 59
 
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 echo '<table><tr>';
69 69
 foreach ($tools as $section => $items) {
70 70
     echo '<td style="vertical-align:top;">';
71
-    echo '<h3>' . $section . '</h3>';
71
+    echo '<h3>'.$section.'</h3>';
72 72
     echo '<ul>';
73 73
     foreach ($items as $key => $value) {
74
-        echo '<li><a href="index.php?' . $key . '">' . $value . '</a></li>';
74
+        echo '<li><a href="index.php?'.$key.'">'.$value.'</a></li>';
75 75
     }
76 76
     echo '</ul>';
77 77
     echo '</td>';
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 echo '</tr></table>';
80 80
 
81 81
 $course_categories = Statistics::getCourseCategories();
82
-echo '<br/><br/>';//@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation
82
+echo '<br/><br/>'; //@todo: spaces between elements should be handled in the css, br should be removed if only there for presentation
83 83
 
84 84
 switch ($report) {
85 85
     case 'courses':
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         Statistics::printStats(get_lang('Students'), $students);
122 122
         break;
123 123
     case 'recentlogins':
124
-        echo '<h2>'. sprintf(get_lang('LastXDays'), '15') . '</h2>';
124
+        echo '<h2>'.sprintf(get_lang('LastXDays'), '15').'</h2>';
125 125
         echo '<canvas class="col-md-12" id="canvas" height="100px" style="margin-bottom: 20px"></canvas>';
126 126
         Statistics::printRecentLoginStats();
127 127
         Statistics::printRecentLoginStats(true);
Please login to merge, or discard this patch.
main/admin/class_add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
 // Setting breadcrumbs.
22 22
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[] = array ('url' => 'class_list.php', 'name' => get_lang('Classes'));
23
+$interbreadcrumb[] = array('url' => 'class_list.php', 'name' => get_lang('Classes'));
24 24
 
25 25
 // Setting the name of the tool.
26 26
 $tool_name = get_lang("AddClasses");
Please login to merge, or discard this patch.
main/admin/course_list.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1
27 27
     ) {
28 28
         $access_url_rel_course_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
29
-        $sql.= " INNER JOIN $access_url_rel_course_table url_rel_course
29
+        $sql .= " INNER JOIN $access_url_rel_course_table url_rel_course
30 30
                  ON (c.id = url_rel_course.c_id)";
31 31
     }
32 32
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     if ((api_is_platform_admin() || api_is_session_admin()) &&
63 63
         api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1
64 64
     ) {
65
-        $sql.= " AND url_rel_course.access_url_id = ".api_get_current_access_url_id();
65
+        $sql .= " AND url_rel_course.access_url_id = ".api_get_current_access_url_id();
66 66
     }
67 67
 
68 68
     $res = Database::query($sql);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1
102 102
     ) {
103 103
         $access_url_rel_course_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
104
-        $sql.= " INNER JOIN $access_url_rel_course_table url_rel_course
104
+        $sql .= " INNER JOIN $access_url_rel_course_table url_rel_course
105 105
                  ON (course.id = url_rel_course.c_id)";
106 106
     }
107 107
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     if ((api_is_platform_admin() || api_is_session_admin()) &&
137 137
         api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1
138 138
     ) {
139
-        $sql.= " AND url_rel_course.access_url_id=".api_get_current_access_url_id();
139
+        $sql .= " AND url_rel_course.access_url_id=".api_get_current_access_url_id();
140 140
     }
141 141
 
142 142
     $sql .= " ORDER BY col$column $direction ";
@@ -206,13 +206,13 @@  discard block
 block discarded – undo
206 206
 
207 207
     if (isset($_GET['session_id']) && !empty($_GET['session_id'])) {
208 208
         $sessionId = intval($_GET['session_id']);
209
-        $sql.= " WHERE s.id = ".$sessionId;
209
+        $sql .= " WHERE s.id = ".$sessionId;
210 210
     }
211 211
 
212 212
     $sql .= " ORDER BY col$column $direction ";
213 213
     $sql .= " LIMIT $from,$number_of_items";
214 214
     $res = Database::query($sql);
215
-    $courses = array ();
215
+    $courses = array();
216 216
     while ($course = Database::fetch_array($res)) {
217 217
         // Place colour icons in front of courses.
218 218
         $show_visual_code = $course['visual_code'] != $course[2] ? Display::label($course['visual_code'], 'info') : null;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
  */
256 256
 function get_course_visibility_icon($v) {
257 257
     $style = 'margin-bottom:0;margin-right:5px;';
258
-    switch($v) {
258
+    switch ($v) {
259 259
         case 0:
260 260
             return Display::return_icon('bullet_red.png', get_lang('CourseVisibilityClosed'), array('style' => $style));
261 261
             break;
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     $form->setDefaults($defaults);
343 343
     $content .= $form->return_form();
344 344
 } else {
345
-    $interbreadcrumb[] = array ('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
345
+    $interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
346 346
     $tool_name = get_lang('CourseList');
347 347
 
348 348
     if (isset($_GET['action'])) {
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     $form = new FormValidator('search_simple', 'get', '', '', array(), FormValidator::LAYOUT_INLINE);
370 370
     $form->addElement('text', 'keyword', null, array('id' => 'course-search-keyword'));
371 371
     $form->addButtonSearch(get_lang('SearchCourse'));
372
-    $advanced = '<a class="btn btn-default" href="'.  api_get_path(WEB_CODE_PATH).'admin/course_list.php?search=advanced"><em class="fa fa-search"></em> '.get_lang('AdvancedSearch').'</a>';
372
+    $advanced = '<a class="btn btn-default" href="'.api_get_path(WEB_CODE_PATH).'admin/course_list.php?search=advanced"><em class="fa fa-search"></em> '.get_lang('AdvancedSearch').'</a>';
373 373
 
374 374
     // Create a filter by session
375 375
     $sessionFilter = new FormValidator('course_filter', 'get', '', '', array(), FormValidator::LAYOUT_INLINE);
@@ -390,9 +390,9 @@  discard block
 block discarded – undo
390 390
     $courseListUrl = api_get_self();
391 391
     $actions .= '<div class="row">';
392 392
     $actions .= '<div class="col-md-2">';
393
-    $actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'',ICON_SIZE_MEDIUM).'</a> ';
393
+    $actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'), '', ICON_SIZE_MEDIUM).'</a> ';
394 394
     if (api_get_setting('course_validation') == 'true') {
395
-        $actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'',ICON_SIZE_MEDIUM).'</a>';
395
+        $actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'), '', ICON_SIZE_MEDIUM).'</a>';
396 396
     }
397 397
     $actions .= '</div>';
398 398
     $actions .= '<div class="col-md-4">';
@@ -430,18 +430,18 @@  discard block
 block discarded – undo
430 430
         $table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data', 2, 20, 'ASC', 'course-list');
431 431
     }
432 432
 
433
-    $parameters=array();
433
+    $parameters = array();
434 434
 
435 435
     if (isset ($_GET['keyword'])) {
436
-        $parameters = array ('keyword' => Security::remove_XSS($_GET['keyword']));
436
+        $parameters = array('keyword' => Security::remove_XSS($_GET['keyword']));
437 437
     } elseif (isset ($_GET['keyword_code'])) {
438
-        $parameters['keyword_code'] 		= Security::remove_XSS($_GET['keyword_code']);
439
-        $parameters['keyword_title'] 		= Security::remove_XSS($_GET['keyword_title']);
438
+        $parameters['keyword_code'] = Security::remove_XSS($_GET['keyword_code']);
439
+        $parameters['keyword_title'] = Security::remove_XSS($_GET['keyword_title']);
440 440
         $parameters['keyword_category'] 	= Security::remove_XSS($_GET['keyword_category']);
441 441
         $parameters['keyword_language'] 	= Security::remove_XSS($_GET['keyword_language']);
442
-        $parameters['keyword_visibility'] 	= Security::remove_XSS($_GET['keyword_visibility']);
443
-        $parameters['keyword_subscribe'] 	= Security::remove_XSS($_GET['keyword_subscribe']);
444
-        $parameters['keyword_unsubscribe'] 	= Security::remove_XSS($_GET['keyword_unsubscribe']);
442
+        $parameters['keyword_visibility'] = Security::remove_XSS($_GET['keyword_visibility']);
443
+        $parameters['keyword_subscribe'] = Security::remove_XSS($_GET['keyword_subscribe']);
444
+        $parameters['keyword_unsubscribe'] = Security::remove_XSS($_GET['keyword_unsubscribe']);
445 445
     }
446 446
 
447 447
     $table->set_additional_parameters($parameters);
Please login to merge, or discard this patch.