Completed
Pull Request — 1.11.x (#1458)
by José
138:44 queued 104:05
created
main/auth/external_login/login.ldap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 
40 40
 use ChamiloSession as Session;
41 41
 
42
-require_once dirname(__FILE__) . '/ldap.inc.php';
43
-require_once dirname(__FILE__) . '/functions.inc.php';
42
+require_once dirname(__FILE__).'/ldap.inc.php';
43
+require_once dirname(__FILE__).'/functions.inc.php';
44 44
 
45 45
 $ldap_user = extldap_authenticate($login, $password);
46 46
 if ($ldap_user !== false) {
Please login to merge, or discard this patch.
main/auth/lostPassword.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $result = $objExercise->read($exercise_id);
18 18
 
19 19
 if (!$result) {
20
-	api_not_allowed(true);
20
+    api_not_allowed(true);
21 21
 }
22 22
 
23 23
 $interbreadcrumb[] = array(
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     Display::addFlash(
48 48
         Display::return_message($messageText, 'info', false)
49 49
     );
50
-    header('Location: ' . api_get_path(WEB_PATH));
50
+    header('Location: '.api_get_path(WEB_PATH));
51 51
     exit;
52 52
 }
53 53
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         Display::addFlash(
75 75
             Display::return_message($messageText, 'error', false)
76 76
         );
77
-        header('Location: ' . api_get_self());
77
+        header('Location: '.api_get_self());
78 78
         exit;
79 79
     }
80 80
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         Display::addFlash(
95 95
             Display::return_message($messageText, 'info', false)
96 96
         );
97
-        header('Location: ' . api_get_path(WEB_PATH));
97
+        header('Location: '.api_get_path(WEB_PATH));
98 98
         exit;
99 99
     }
100 100
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         Display::addFlash(
103 103
             Display::return_message(get_lang('CouldNotResetPassword'), 'info', false)
104 104
         );
105
-        header('Location: ' . api_get_path(WEB_PATH));
105
+        header('Location: '.api_get_path(WEB_PATH));
106 106
         exit;
107 107
     }
108 108
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             exit;
122 122
         }
123 123
 
124
-        header('Location: ' . api_get_path(WEB_PATH));
124
+        header('Location: '.api_get_path(WEB_PATH));
125 125
         exit;
126 126
     }
127 127
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     Display::addFlash(
139 139
         Display::return_message($messageText, 'info', false)
140 140
     );
141
-    header('Location: ' . api_get_path(WEB_PATH));
141
+    header('Location: '.api_get_path(WEB_PATH));
142 142
     exit;
143 143
 }
144 144
 
Please login to merge, or discard this patch.
main/auth/shibboleth/lib/scaffolder/template/model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
24 24
  * @author Laurent Opprecht <[email protected]>
25 25
  */
26
-class <?php echo $prefix . $class_name ?>
26
+class <?php echo $prefix.$class_name ?>
27 27
 
28 28
 {
29 29
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         return self::store()->create_object($data);
52 52
     }   
53 53
 
54
-<?php foreach($fields as $field){?>
54
+<?php foreach ($fields as $field) {?>
55 55
     public $<?php echo $field->name; ?> = <?php echo $field->def ? $field->def : 'null'; ?>;    
56 56
 <?php }?> 
57 57
     
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
74 74
  * @author Laurent Opprecht <[email protected]>
75 75
  */
76
-class <?php echo $prefix . $class_name ?>Store extends Store
76
+class <?php echo $prefix.$class_name ?>Store extends Store
77 77
 {
78 78
 
79 79
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     
93 93
     public function __construct()
94 94
     {
95
-        parent::__construct('<?php echo $table_name;?>', '<?php echo $class_name;?>', '<?php echo $id_name;?>');
95
+        parent::__construct('<?php echo $table_name; ?>', '<?php echo $class_name; ?>', '<?php echo $id_name; ?>');
96 96
     }
97 97
     
98 98
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         return parent::create_object($data);
116 116
     }    
117
-<?php foreach($keys as $key){?>
117
+<?php foreach ($keys as $key) {?>
118 118
     
119 119
     /**
120 120
      *
Please login to merge, or discard this patch.
main/admin/access_url_edit_users_to_url.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
     ?>
262 262
     <option value="<?php echo $enreg['user_id']; ?>"><?php echo $enreg['username'].' - '.api_get_person_name($enreg['firstname'], $enreg['lastname']); ?></option>
263 263
     <?php
264
-     }
264
+        }
265 265
     unset($nosessionUsersList);
266 266
     ?>
267 267
     </select>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 function send() {
60 60
 	if (document.formulaire.access_url_id.value!=0) {
61 61
 		document.formulaire.form_sent.value=0;
62
-		document.formulaire.add_type.value=\'' . $add_type . '\';
62
+		document.formulaire.add_type.value=\'' . $add_type.'\';
63 63
 		document.formulaire.submit();
64 64
 	}
65 65
 }
@@ -95,17 +95,17 @@  discard block
 block discarded – undo
95 95
             $result = UrlManager::update_urls_rel_user($UserList, $access_url_id);
96 96
             $url_info = UrlManager::get_url_data_from_id($access_url_id);
97 97
             if (!empty($result)) {
98
-                $message .= 'URL: ' . $url_info['url'] . '<br />';
98
+                $message .= 'URL: '.$url_info['url'].'<br />';
99 99
             }
100 100
 
101 101
             if (!empty($result['users_added'])) {
102
-                $message .= '<h4>' . get_lang('UsersAdded') . ':</h4>';
102
+                $message .= '<h4>'.get_lang('UsersAdded').':</h4>';
103 103
                 $i = 1;
104 104
                 $user_added_list = array();
105 105
                 foreach ($result['users_added'] as $user) {
106 106
                     $user_info = api_get_user_info($user);
107 107
                     if (!empty($user_info)) {
108
-                        $user_added_list[] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']);
108
+                        $user_added_list[] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']);
109 109
                         $i++;
110 110
                     }
111 111
                 }
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
             }
116 116
 
117 117
             if (!empty($result['users_deleted'])) {
118
-                $message .= '<br /><h4>' . get_lang('UsersDeleted') . ': </h4>';
118
+                $message .= '<br /><h4>'.get_lang('UsersDeleted').': </h4>';
119 119
                 $user_deleted_list = array();
120 120
                 $i = 1;
121 121
                 foreach ($result['users_deleted'] as $user) {
122 122
                     $user_info = api_get_user_info($user);
123 123
                     if (!empty($user_info)) {
124
-                        $user_deleted_list [] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname']);
124
+                        $user_deleted_list [] = $i.'. '.api_get_person_name($user_info['firstname'], $user_info['lastname']);
125 125
                         $i++;
126 126
                     }
127 127
                 }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 echo '<div class="actions">';
143 143
 echo Display::url(
144 144
     Display::return_icon('view_more_stats.gif', get_lang('AddUserToURL'), ''),
145
-    api_get_path(WEB_CODE_PATH) . 'admin/access_url_add_users_to_url.php'
145
+    api_get_path(WEB_CODE_PATH).'admin/access_url_add_users_to_url.php'
146 146
 );
147 147
 echo '</div>';
148 148
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     }
168 168
 
169 169
     $sql = "SELECT u.user_id, lastname, firstname, username
170
-	  	  	FROM $tbl_user u WHERE status <> " . ANONYMOUS . " " .
170
+	  	  	FROM $tbl_user u WHERE status <> ".ANONYMOUS." ".
171 171
             $order_clause;
172 172
     $result = Database::query($sql);
173 173
     $Users = Database::store_result($result);
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 }
181 181
 
182 182
 if ($add_type == 'multiple') {
183
-    $link_add_type_unique = '<a href="' . api_get_self() . '?add_type=unique&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeUnique') . '</a>';
183
+    $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>';
184 184
     $link_add_type_multiple = get_lang('SessionAddTypeMultiple');
185 185
 } else {
186 186
     $link_add_type_unique = get_lang('SessionAddTypeUnique');
187
-    $link_add_type_multiple = '<a href="' . api_get_self() . '?add_type=multiple&access_url_id=' . $access_url_id . '">' . get_lang('SessionAddTypeMultiple') . '</a>';
187
+    $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>';
188 188
 }
189 189
 $url_list = UrlManager::get_url_data();
190 190
 ?>
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;" <?php if ($ajax_search) {
197 197
     echo ' onsubmit="valide();"';
198 198
 } ?> >
199
-    <?php echo get_lang('SelectUrl') . ' : '; ?>
199
+    <?php echo get_lang('SelectUrl').' : '; ?>
200 200
 <select name="access_url_id" onchange="javascript:send();">
201 201
 <option value="0"> <?php echo get_lang('SelectUrl') ?></option>
202 202
         <?php
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
     <td>
233 233
     <h3>
234 234
     <?php
235
-        $total_users = count($nosessionUsersList) +  count($sessionUsersList);
235
+        $total_users = count($nosessionUsersList) + count($sessionUsersList);
236 236
         echo get_lang('TotalAvailableUsers').' '.$total_users;
237 237
     ?>
238 238
     </h3>
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
   <td align="center"><b><?php echo get_lang('UserListInPlatform') ?> : <?php echo count($nosessionUsersList); ?></b>
243 243
   </td>
244 244
   <td></td>
245
-  <td align="center"><b><?php echo get_lang('UserListIn') . ' ' . $url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td>
245
+  <td align="center"><b><?php echo get_lang('UserListIn').' '.$url_selected; ?> : <?php echo count($sessionUsersList); ?></b></td>
246 246
 </tr>
247 247
 <tr>
248 248
   <td align="center">
@@ -302,9 +302,9 @@  discard block
 block discarded – undo
302 302
 		<br />
303 303
         <?php
304 304
         if (isset($_GET['add'])) {
305
-            echo '<button class="save" type="button" onclick="valide()" >' . get_lang('AddUsersToURL') . '</button>';
305
+            echo '<button class="save" type="button" onclick="valide()" >'.get_lang('AddUsersToURL').'</button>';
306 306
         } else {
307
-            echo '<button class="save" type="button" onclick="valide()" >' . get_lang('EditUsersToURL') . '</button>';
307
+            echo '<button class="save" type="button" onclick="valide()" >'.get_lang('EditUsersToURL').'</button>';
308 308
         }
309 309
         ?>
310 310
 	</td>
Please login to merge, or discard this patch.
main/admin/cli.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 $this_section = SECTION_PLATFORM_ADMIN;
12 12
 // User permissions
13 13
 api_protect_admin_script();
14
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
15 15
 Display :: display_header(get_lang('SystemStatus'));
16 16
 $diag = new Diagnoser();
17 17
 $diag->show_html();
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 switch ($_GET["cmd"]) {
29 29
     case "clear_stapi":
30 30
       echo "Are you sure you are willing to erease all storage api data (no backup)? <a href='cli.php?cmd=clear_stapi_confirm' >Yes</a>";
31
-      break;
31
+        break;
32 32
     case "clear_stapi_confirm":
33 33
       Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES));
34
-      Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK));
35
-      echo "Done";
36
-      break;
34
+        Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK));
35
+        echo "Done";
36
+        break;
37 37
     default:
38 38
       echo "UNKNOWN COMMAND";
39
-      break;
39
+        break;
40 40
 }
41 41
 /**
42 42
  * Footer 
Please login to merge, or discard this patch.
main/admin/add_sessions_to_usergroup.php 3 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,10 @@
 block discarded – undo
144 144
 echo '</div>';
145 145
 ?>
146 146
 
147
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
147
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
148
+    echo '&add=true' ;
149
+}
150
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
148 151
 <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>';
149 152
 
150 153
 if ($add_type=='multiple') {
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
       <option value = "%">--</option>
198 198
       <?php
199 199
         echo Display :: get_alphabet_options();
200
-      ?>
200
+        ?>
201 201
      </select>
202 202
 </td>
203 203
 <td align="center">&nbsp;</td>
@@ -207,31 +207,31 @@  discard block
 block discarded – undo
207 207
   <td align="center">
208 208
   <div id="content_source">
209 209
       <?php
210
-      if (!($add_type=='multiple')) {
210
+        if (!($add_type=='multiple')) {
211 211
         ?>
212 212
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
213 213
         <div id="ajax_list_users_single"></div>
214 214
         <?php
215
-      } else {
216
-      ?>
215
+        } else {
216
+        ?>
217 217
       <div id="ajax_list_multiple">
218 218
         <?php echo Display::select('session_not_in_promotion_name',$session_not_in_promotion, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'session_not_in_promotion','size'=>'15px'),false); ?>
219 219
       </div>
220 220
     <?php
221
-      }
222
-     ?>
221
+        }
222
+        ?>
223 223
   </div>
224 224
   </td>
225 225
   <td width="10%" valign="middle" align="center">
226 226
   <?php
227
-  if ($ajax_search) {
228
-  ?>
227
+    if ($ajax_search) {
228
+    ?>
229 229
     <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('session_in_promotion'))" >
230 230
         <em class="fa fa-arrow-left"></em>
231 231
     </button>
232 232
   <?php
233
-  } else {
234
-  ?>
233
+    } else {
234
+    ?>
235 235
     <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))">
236 236
         <em class="fa fa-arrow-right"></em>
237 237
     </button>
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
         <em class="fa fa-arrow-left"></em>
241 241
     </button>
242 242
     <?php
243
-  }
244
-  ?>
243
+    }
244
+    ?>
245 245
     <br /><br /><br /><br /><br /><br />
246 246
   </td>
247 247
   <td align="center">
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 api_protect_admin_script(true);
22 22
 
23 23
 // setting breadcrumbs
24
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
25
-$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Classes'));
24
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
25
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
26 26
 
27 27
 // Database Table Definitions
28 28
 
29 29
 // setting the name of the tool
30
-$tool_name=get_lang('SubscribeClassToSessions');
30
+$tool_name = get_lang('SubscribeClassToSessions');
31 31
 
32 32
 $add_type = 'multiple';
33
-if(isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
33
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
34 34
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
35 35
 }
36 36
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 function display_advanced_search () {
66 66
         if ($("#advancedSearch").css("display") == "none") {
67 67
                 $("#advancedSearch").css("display","block");
68
-                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
68
+                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif', get_lang('Hide'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
69 69
         } else {
70 70
                 $("#advancedSearch").css("display","none");
71
-                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
71
+                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
72 72
         }
73 73
 }
74 74
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 $form_sent  = 0;
84 84
 $errorMsg   = '';
85
-$sessions=array();
85
+$sessions = array();
86 86
 $usergroup = new UserGroup();
87 87
 $id = intval($_GET['id']);
88 88
 if (isset($_POST['form_sent']) && $_POST['form_sent']) {
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 $session_list       = SessionManager::get_sessions_list(array(), array('name'));
104 104
 
105 105
 //api_display_tool_title($tool_name.' ('.$session_info['name'].')');
106
-$elements_not_in = $elements_in= array();
106
+$elements_not_in = $elements_in = array();
107 107
 
108 108
 if (!empty($session_list)) {
109
-    foreach($session_list as $session) {
109
+    foreach ($session_list as $session) {
110 110
         if (in_array($session['id'], $session_list_in)) {
111 111
             $elements_in[$session['id']] = $session['name'];
112 112
         } else {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 //checking for extra field with filter on
121 121
 
122
-function search_usergroup_sessions($needle,$type) {
122
+function search_usergroup_sessions($needle, $type) {
123 123
     global $elements_in;
124 124
     $xajax_response = new xajaxResponse();
125 125
     $return = '';
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
                 array('s.name' => array('operator' => 'LIKE', 'value' => "$needle%"))
135 135
             );
136 136
         }
137
-        $i=0;
137
+        $i = 0;
138 138
         if ($type != 'single') {
139 139
             $return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
140 140
 
141
-            foreach ($session_list as $row ) {
141
+            foreach ($session_list as $row) {
142 142
                 if (!in_array($row['id'], array_keys($elements_in))) {
143 143
                     $return .= '<option value="'.$row['id'].'">'.$row['name'].'</option>';
144 144
                 }
145 145
             }
146 146
             $return .= '</select>';
147
-            $xajax_response -> addAssign('ajax_list_multiple','innerHTML',api_utf8_encode($return));
147
+            $xajax_response -> addAssign('ajax_list_multiple', 'innerHTML', api_utf8_encode($return));
148 148
         }
149 149
     }
150 150
 
@@ -156,30 +156,30 @@  discard block
 block discarded – undo
156 156
 
157 157
 $add = (empty($_GET['add']) ? '' : Security::remove_XSS($_GET['add']));
158 158
 if ($add_type == 'multiple') {
159
-    $link_add_type_unique = '<a href="' . api_get_self() . '?add=' . $add . '&add_type=unique">'.
159
+    $link_add_type_unique = '<a href="'.api_get_self().'?add='.$add.'&add_type=unique">'.
160 160
         Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
161 161
     $link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
162 162
 } else {
163 163
     $link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
164
-    $link_add_type_multiple = '<a href="' . api_get_self() . '?add=' . $add . '&add_type=multiple">'.
164
+    $link_add_type_multiple = '<a href="'.api_get_self().'?add='.$add.'&add_type=multiple">'.
165 165
         Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
166 166
 }
167 167
 
168 168
 echo '<div class="actions">';
169
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
169
+echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
170 170
 echo '<a href="javascript://" class="advanced_parameters" style="margin-top: 8px" onclick="display_advanced_search();"><span id="img_plus_and_minus">&nbsp;'.
171
-    Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'</span></a>';
171
+    Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'</span></a>';
172 172
 echo '</div>';
173
-echo '<div id="advancedSearch" style="display: none">'. get_lang('SearchSessions'); ?> :
173
+echo '<div id="advancedSearch" style="display: none">'.get_lang('SearchSessions'); ?> :
174 174
      <input name="SearchSession" onchange = "xajax_search_usergroup_sessions(this.value,'searchbox')" onkeyup="this.onchange()">
175 175
      </div>
176
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
176
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
177 177
 <?php
178 178
 echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
179
-echo Display::input('hidden','id',$id);
180
-echo Display::input('hidden','form_sent','1');
181
-echo Display::input('hidden','add_type',null);
182
-if(!empty($errorMsg)) {
179
+echo Display::input('hidden', 'id', $id);
180
+echo Display::input('hidden', 'form_sent', '1');
181
+echo Display::input('hidden', 'add_type', null);
182
+if (!empty($errorMsg)) {
183 183
     Display::display_normal_message($errorMsg); //main API
184 184
 }
185 185
 ?>
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
   <td align="center"><b><?php echo get_lang('SessionsInGroup') ?> :</b></td>
193 193
 </tr>
194 194
 
195
-<?php if ($add_type=='multiple') { ?>
195
+<?php if ($add_type == 'multiple') { ?>
196 196
 <tr>
197 197
 <td align="center">
198 198
 <?php echo get_lang('FirstLetterSessions'); ?> :
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
   <td align="center">
212 212
   <div id="content_source">
213 213
       <?php
214
-      if (!($add_type=='multiple')) {
214
+      if (!($add_type == 'multiple')) {
215 215
         ?>
216 216
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
217 217
         <div id="ajax_list_users_single"></div>
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
       } else {
220 220
       ?>
221 221
       <div id="ajax_list_multiple">
222
-        <?php echo Display::select('elements_not_in_name',$elements_not_in, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
222
+        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
223 223
       </div>
224 224
     <?php
225 225
       }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
   </td>
251 251
   <td align="center">
252 252
 <?php
253
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
253
+    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false);
254 254
     unset($sessionUsersList);
255 255
 ?>
256 256
  </td>
Please login to merge, or discard this patch.
main/admin/inactive_user_list.php 2 patches
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
     @author Andre Boivin base code
5 5
 	@author Julio Montoya fixing lot of little details
6 6
 	@todo this script is not ready for a production use that's why I'm commenting the function delete_inactive_student
7
-
8
-*	@package chamilo.admin
7
+ *	@package chamilo.admin
9 8
 *	script pour effacer les user inactif depuis x temps
10 9
 */
11 10
 $cidReset = true;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 Display :: display_header($tool_name);
24 24
 
25 25
 //On sélectionne les user élèves
26
-$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
26
+$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname ";
27 27
 $result = Database::query($sql);
28 28
 
29 29
 while ($row = Database::fetch_array($result)) {
Please login to merge, or discard this patch.
main/admin/course_request_accepted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     $from = intval($from);
115 115
     $number_of_items = intval($number_of_items);
116 116
     $column = intval($column);
117
-    $direction = !in_array(strtolower(trim($direction)), ['asc','desc']) ? 'asc' : $direction;
117
+    $direction = !in_array(strtolower(trim($direction)), ['asc', 'desc']) ? 'asc' : $direction;
118 118
 
119 119
     $sql = "SELECT
120 120
                 id AS col0,
Please login to merge, or discard this patch.
main/social/skills_wheel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
38 38
 $tpl->assign('wheel_url', $url);
39 39
 
40
-$url  = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
40
+$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
41 41
 $tpl->assign('url', $url);
42 42
 $tpl->assign('isAdministration', true);
43 43
 
Please login to merge, or discard this patch.