Completed
Push — 1.11.x ( d00fca...f1f062 )
by José
28:05
created
main/gradebook/lib/be/linkfactory.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @param string $name_mask search string
59 59
      * @return array link objects matching the search criterium
60 60
      */
61
-    public function find_links($name_mask,$selectcat)
61
+    public function find_links($name_mask, $selectcat)
62 62
     {
63 63
         return AbstractLink::find_links($name_mask, $selectcat);
64 64
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public static function get_all_types()
99 99
     {
100 100
         //LINK_DROPBOX,
101
-        return array (
101
+        return array(
102 102
             LINK_EXERCISE,
103 103
             //LINK_DROPBOX,
104 104
             LINK_HOTPOTATOES,
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
     /**
95 95
      * Return an array of all known link types
96
-     * @return array
96
+     * @return integer[]
97 97
      */
98 98
     public static function get_all_types()
99 99
     {
Please login to merge, or discard this patch.
main/gradebook/lib/be/result.class.php 2 patches
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -90,23 +90,23 @@  discard block
 block discarded – undo
90 90
         if (is_null($id) && is_null($user_id) && !is_null($evaluation_id)) {
91 91
             // Verified_if_exist_evaluation
92 92
             $sql = 'SELECT COUNT(*) AS count
93
-                    FROM ' . $tbl_grade_results . '
94
-                    WHERE evaluation_id="' . Database::escape_string($evaluation_id) . '";';
93
+                    FROM ' . $tbl_grade_results.'
94
+                    WHERE evaluation_id="' . Database::escape_string($evaluation_id).'";';
95 95
             $result = Database::query($sql);
96 96
             $existEvaluation = Database::result($result, 0, 0);
97 97
 
98 98
             if ($existEvaluation != 0) {
99 99
                 if ($sessionId) {
100 100
                     $sql = 'SELECT c_id, user_id as user_id, status
101
-                            FROM ' . $tbl_session_rel_course_user . '
101
+                            FROM ' . $tbl_session_rel_course_user.'
102 102
 							WHERE
103 103
 							    status= 0 AND
104
-							    c_id = "' . api_get_course_int_id() . '" AND
104
+							    c_id = "' . api_get_course_int_id().'" AND
105 105
 							    session_id = ' . $sessionId;
106 106
                 } else {
107 107
                     $sql = 'SELECT c_id, user_id, status
108
-                            FROM ' . $tbl_course_rel_course . '
109
-                            WHERE status ="' . STUDENT . '" AND c_id = "' . api_get_course_int_id() . '" ';
108
+                            FROM ' . $tbl_course_rel_course.'
109
+                            WHERE status ="' . STUDENT.'" AND c_id = "'.api_get_course_int_id().'" ';
110 110
                 }
111 111
 
112 112
                 $res_course_rel_user = Database::query($sql);
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
                 $current_date = api_get_utc_datetime();
117 117
                 for ($i = 0; $i < count($list_user_course_list); $i++) {
118 118
                     $sql_verified = 'SELECT COUNT(*) AS count
119
-                                    FROM ' . $tbl_grade_results . '
119
+                                    FROM ' . $tbl_grade_results.'
120 120
                                     WHERE
121
-                                        user_id="' . intval($list_user_course_list[$i]['user_id']) . '" AND
122
-                                        evaluation_id="' . intval($evaluation_id) . '";';
121
+                                        user_id="' . intval($list_user_course_list[$i]['user_id']).'" AND
122
+                                        evaluation_id="' . intval($evaluation_id).'";';
123 123
                     $res_verified = Database::query($sql_verified);
124 124
                     $info_verified = Database::result($res_verified, 0, 0);
125 125
                     if ($info_verified == 0) {
126
-                        $sql_insert = 'INSERT INTO ' . $tbl_grade_results . '(user_id,evaluation_id,created_at,score)
127
-									   VALUES ("' . intval($list_user_course_list[$i]['user_id']) . '","' . intval($evaluation_id) . '","' . $current_date . '",0);';
126
+                        $sql_insert = 'INSERT INTO '.$tbl_grade_results.'(user_id,evaluation_id,created_at,score)
127
+									   VALUES ("' . intval($list_user_course_list[$i]['user_id']).'","'.intval($evaluation_id).'","'.$current_date.'",0);';
128 128
                         Database::query($sql_insert);
129 129
                     }
130 130
                 }
@@ -148,16 +148,16 @@  discard block
 block discarded – undo
148 148
 
149 149
         $paramcount = 0;
150 150
         if (!empty($id)) {
151
-            $sql.= ' WHERE gr.id = ' . intval($id);
152
-            $paramcount ++;
151
+            $sql .= ' WHERE gr.id = '.intval($id);
152
+            $paramcount++;
153 153
         }
154 154
         if (!empty($user_id)) {
155 155
             if ($paramcount != 0)
156 156
                 $sql .= ' AND';
157 157
             else
158 158
                 $sql .= ' WHERE';
159
-            $sql .= ' gr.user_id = ' . intval($user_id);
160
-            $paramcount ++;
159
+            $sql .= ' gr.user_id = '.intval($user_id);
160
+            $paramcount++;
161 161
         }
162 162
         if (!empty($evaluation_id)) {
163 163
             if ($paramcount != 0) {
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
             } else {
166 166
                 $sql .= ' WHERE';
167 167
             }
168
-            $sql .= ' gr.evaluation_id = ' . intval($evaluation_id);
169
-            $paramcount ++;
168
+            $sql .= ' gr.evaluation_id = '.intval($evaluation_id);
169
+            $paramcount++;
170 170
         }
171 171
         $sql .= ' ORDER BY u.lastname, u.firstname';
172 172
         $result = Database::query($sql);
@@ -191,17 +191,17 @@  discard block
 block discarded – undo
191 191
     {
192 192
         if (isset($this->user_id) && isset($this->evaluation)) {
193 193
             $tbl_grade_results = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
194
-            $sql = "INSERT INTO " . $tbl_grade_results
194
+            $sql = "INSERT INTO ".$tbl_grade_results
195 195
                 . " (user_id, evaluation_id,
196 196
 					created_at";
197 197
             if (isset($this->score)) {
198 198
                 $sql .= ",score";
199 199
             }
200 200
             $sql .= ") VALUES
201
-					(" . (int) $this->get_user_id() . ", " . (int) $this->get_evaluation_id()
202
-                . ", '" . $this->get_date() . "' ";
201
+					(" . (int) $this->get_user_id().", ".(int) $this->get_evaluation_id()
202
+                . ", '".$this->get_date()."' ";
203 203
             if (isset($this->score)) {
204
-                $sql .= ", " . $this->get_score();
204
+                $sql .= ", ".$this->get_score();
205 205
             }
206 206
             $sql .= ")";
207 207
             Database::query($sql);
@@ -222,16 +222,16 @@  discard block
 block discarded – undo
222 222
             $arr_result = $result->load(null, $userid, $evaluationid);
223 223
             $arr = get_object_vars($arr_result[0]);
224 224
 
225
-            $sql = 'INSERT INTO ' . $tbl_grade_results_log
225
+            $sql = 'INSERT INTO '.$tbl_grade_results_log
226 226
                 . ' (id_result,user_id, evaluation_id,created_at';
227 227
             if (isset($arr['score'])) {
228 228
                 $sql .= ',score';
229 229
             }
230 230
             $sql .= ') VALUES
231
-					(' . (int) $arr['id'] . ',' . (int) $arr['user_id'] . ', ' . (int) $arr['evaluation']
232
-                . ", '" . api_get_utc_datetime() . "'";
231
+					(' . (int) $arr['id'].','.(int) $arr['user_id'].', '.(int) $arr['evaluation']
232
+                . ", '".api_get_utc_datetime()."'";
233 233
             if (isset($arr['score'])) {
234
-                $sql .= ', ' . $arr['score'];
234
+                $sql .= ', '.$arr['score'];
235 235
             }
236 236
             $sql .= ')';
237 237
 
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
     public function save()
248 248
     {
249 249
         $tbl_grade_results = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
250
-        $sql = 'UPDATE ' . $tbl_grade_results . '
250
+        $sql = 'UPDATE '.$tbl_grade_results.'
251 251
                 SET user_id = ' . $this->get_user_id()
252
-            . ', evaluation_id = ' . $this->get_evaluation_id()
252
+            . ', evaluation_id = '.$this->get_evaluation_id()
253 253
             . ', score = ';
254 254
         if (isset($this->score)) {
255 255
             $sql .= $this->get_score();
256 256
         } else {
257 257
             $sql .= 'null';
258 258
         }
259
-        $sql .= ' WHERE id = ' . $this->id;
259
+        $sql .= ' WHERE id = '.$this->id;
260 260
         // no need to update creation date
261 261
         Database::query($sql);
262 262
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     public function delete()
268 268
     {
269 269
         $tbl_grade_results = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);
270
-        $sql = 'DELETE FROM ' . $tbl_grade_results . ' WHERE id = ' . $this->id;
270
+        $sql = 'DELETE FROM '.$tbl_grade_results.' WHERE id = '.$this->id;
271 271
         Database::query($sql);
272 272
     }
273 273
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,10 +152,11 @@
 block discarded – undo
152 152
             $paramcount ++;
153 153
         }
154 154
         if (!empty($user_id)) {
155
-            if ($paramcount != 0)
156
-                $sql .= ' AND';
157
-            else
158
-                $sql .= ' WHERE';
155
+            if ($paramcount != 0) {
156
+                            $sql .= ' AND';
157
+            } else {
158
+                            $sql .= ' WHERE';
159
+            }
159 160
             $sql .= ' gr.user_id = ' . intval($user_id);
160 161
             $paramcount ++;
161 162
         }
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
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     $from = intval($from);
88 88
     $number_of_items = intval($number_of_items);
89 89
     $column = intval($column);
90
-    $direction = !in_array(strtolower(trim($direction)), ['asc','desc']) ? 'asc' : $direction;
90
+    $direction = !in_array(strtolower(trim($direction)), ['asc', 'desc']) ? 'asc' : $direction;
91 91
 
92 92
     $sql = "SELECT
93 93
                 id AS col0,
Please login to merge, or discard this patch.
main/admin/ldap_import_students.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,8 +269,7 @@
 block discarded – undo
269 269
     echo '<br /><br />';
270 270
     echo '</div>';
271 271
 
272
-}
273
-elseif (!empty($annee) && !empty($course) && ($_POST['confirmed']=='yes'))
272
+} elseif (!empty($annee) && !empty($course) && ($_POST['confirmed']=='yes'))
274 273
 {
275 274
 	$id=$_POST['username_form'];
276 275
 	$UserList=array();
Please login to merge, or discard this patch.
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
56 56
 //if ($annee == "" && $composante == "" && $etape == "") {
57 57
 if (empty($annee) && empty($course))
58 58
 {
59
-		Display::display_header($tool_name);
60
-		echo '<div style="align:center">';
61
-		Display::display_icon('group.gif', get_lang('LDAPSelectFilterOnUsersOU'));
62
-		echo get_lang('LDAPSelectFilterOnUsersOU');
63
-		//echo '<em>'.get_lang('ToDoThisYouMustEnterYearComponentAndComponentStep').'</em><br />';
64
-		///echo get_lang('FollowEachOfTheseStepsStepByStep').'<br />';
65
-
66
-		echo '<form method="get" action="'.api_get_self().'"><br />';
67
-		echo '<em>'.get_lang('LDAPOUAttributeFilter').' :</em> ';
68
-		echo '<input  type="text" name="annee" size="4" maxlength="30" value="'.$annee_base.'"><br />';
69
-		echo '<input type="submit" value="'.get_lang('Submit').'">';
70
-		echo '</form>';
71
-		echo '</div>';
59
+        Display::display_header($tool_name);
60
+        echo '<div style="align:center">';
61
+        Display::display_icon('group.gif', get_lang('LDAPSelectFilterOnUsersOU'));
62
+        echo get_lang('LDAPSelectFilterOnUsersOU');
63
+        //echo '<em>'.get_lang('ToDoThisYouMustEnterYearComponentAndComponentStep').'</em><br />';
64
+        ///echo get_lang('FollowEachOfTheseStepsStepByStep').'<br />';
65
+
66
+        echo '<form method="get" action="'.api_get_self().'"><br />';
67
+        echo '<em>'.get_lang('LDAPOUAttributeFilter').' :</em> ';
68
+        echo '<input  type="text" name="annee" size="4" maxlength="30" value="'.$annee_base.'"><br />';
69
+        echo '<input type="submit" value="'.get_lang('Submit').'">';
70
+        echo '</form>';
71
+        echo '</div>';
72 72
 
73 73
 }
74 74
 /*
@@ -200,71 +200,71 @@  discard block
 block discarded – undo
200 200
 */
201 201
 elseif(!empty($annee) && empty($course))
202 202
 {
203
-	Display::display_header($tool_name);
204
-	echo '<div style="align:center">';
205
-	echo Display::return_icon('course.png', get_lang('SelectCourseToImportUsersTo')).' '.get_lang('SelectCourseToImportUsersTo').'<br />';
206
-	echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
207
-	echo '<select name="course">';
208
-	$courses = CourseManager::get_courses_list();
209
-	foreach($courses as $row)
210
-	{
211
-		echo '<option value="'.$row['code'].'">'.api_htmlentities($row['title']).'</option>';
212
-	}
213
-	echo '</select>';
214
-	echo '<input type="submit" value="'.get_lang('Submit').'">';
215
-	echo '</form>';
216
-	echo '</div>';
203
+    Display::display_header($tool_name);
204
+    echo '<div style="align:center">';
205
+    echo Display::return_icon('course.png', get_lang('SelectCourseToImportUsersTo')).' '.get_lang('SelectCourseToImportUsersTo').'<br />';
206
+    echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
207
+    echo '<select name="course">';
208
+    $courses = CourseManager::get_courses_list();
209
+    foreach($courses as $row)
210
+    {
211
+        echo '<option value="'.$row['code'].'">'.api_htmlentities($row['title']).'</option>';
212
+    }
213
+    echo '</select>';
214
+    echo '<input type="submit" value="'.get_lang('Submit').'">';
215
+    echo '</form>';
216
+    echo '</div>';
217 217
 }
218 218
 // form4  annee != 0; composante != 0 etape != 0
219 219
 //elseif ($annee <> "" && $composante <> "" && $etape <> "" && $listeok != 'yes') {
220 220
 elseif (!empty($annee) && !empty($course) && empty($_POST['confirmed']))
221 221
 {
222
-	Display::display_header($tool_name);
223
-	echo '<div style="align: center;">';
224
-	echo '<br />';
225
-	echo '<br />';
226
-	echo '<h3>'.Display::return_icon('group.gif', get_lang('SelectStudents')).' '.get_lang('SelectStudents').'</h3>';
227
-	//echo "Connection ...";
228
-	$ds = ldap_connect($ldap_host, $ldap_port) or die(get_lang('LDAPConnectionError'));
229
-	ldap_set_version($ds);
230
-
231
-	if ($ds) {
232
-
233
-		$r = false;
234
-		$res = ldap_handle_bind($ds, $r);
235
-
236
-		//$sr = @ ldap_search($ds, "ou=people,$LDAPbasedn", "(|(edupersonprimaryorgunitdn=ou=$etape,ou=$annee,ou=diploma,o=Paris1,$LDAPbasedn)(edupersonprimaryorgunitdn=ou=02PEL,ou=$annee,ou=diploma,o=Paris1,$LDAPbasedn))");
237
-		//echo "(ou=*$annee,ou=$composante)";
238
-		$sr = @ ldap_search($ds, $ldap_basedn, "(ou=*$annee)");
239
-
240
-		$info = ldap_get_entries($ds, $sr);
241
-
242
-		for ($key = 0; $key < $info["count"]; $key ++) {
243
-			$nom_form[] = $info[$key]["sn"][0];
244
-			$prenom_form[] = $info[$key]["givenname"][0];
245
-			$email_form[] = $info[$key]["mail"][0];
246
-			// Get uid from dn
247
-			//$dn_array=ldap_explode_dn($info[$key]["dn"],1);
248
-			//$username_form[] = $dn_array[0]; // uid is first key
249
-			$username_form[] = $info[$key]['uid'][0];
250
-			$outab[] = $info[$key]["eduPersonPrimaryAffiliation"][0]; // Ici "student"
251
-			//$val = ldap_get_values_len($ds, $entry, "userPassword");
252
-			//$password_form[] = $val[0];
253
-			$password_form[] = $info[$key]['userPassword'][0];
254
-		}
255
-		ldap_unbind($ds);
256
-
257
-		/*-----------------------------------------------*/
258
-
259
-		asort($nom_form);
260
-		reset($nom_form);
261
-
262
-		$statut=5;
263
-		include ('ldap_form_add_users_group.php');
264
-	} else {
265
-		echo '<h4>'.get_lang('UnableToConnectTo').' '.$host.'</h4>';
266
-	}
267
-	echo '<br /><br />';
222
+    Display::display_header($tool_name);
223
+    echo '<div style="align: center;">';
224
+    echo '<br />';
225
+    echo '<br />';
226
+    echo '<h3>'.Display::return_icon('group.gif', get_lang('SelectStudents')).' '.get_lang('SelectStudents').'</h3>';
227
+    //echo "Connection ...";
228
+    $ds = ldap_connect($ldap_host, $ldap_port) or die(get_lang('LDAPConnectionError'));
229
+    ldap_set_version($ds);
230
+
231
+    if ($ds) {
232
+
233
+        $r = false;
234
+        $res = ldap_handle_bind($ds, $r);
235
+
236
+        //$sr = @ ldap_search($ds, "ou=people,$LDAPbasedn", "(|(edupersonprimaryorgunitdn=ou=$etape,ou=$annee,ou=diploma,o=Paris1,$LDAPbasedn)(edupersonprimaryorgunitdn=ou=02PEL,ou=$annee,ou=diploma,o=Paris1,$LDAPbasedn))");
237
+        //echo "(ou=*$annee,ou=$composante)";
238
+        $sr = @ ldap_search($ds, $ldap_basedn, "(ou=*$annee)");
239
+
240
+        $info = ldap_get_entries($ds, $sr);
241
+
242
+        for ($key = 0; $key < $info["count"]; $key ++) {
243
+            $nom_form[] = $info[$key]["sn"][0];
244
+            $prenom_form[] = $info[$key]["givenname"][0];
245
+            $email_form[] = $info[$key]["mail"][0];
246
+            // Get uid from dn
247
+            //$dn_array=ldap_explode_dn($info[$key]["dn"],1);
248
+            //$username_form[] = $dn_array[0]; // uid is first key
249
+            $username_form[] = $info[$key]['uid'][0];
250
+            $outab[] = $info[$key]["eduPersonPrimaryAffiliation"][0]; // Ici "student"
251
+            //$val = ldap_get_values_len($ds, $entry, "userPassword");
252
+            //$password_form[] = $val[0];
253
+            $password_form[] = $info[$key]['userPassword'][0];
254
+        }
255
+        ldap_unbind($ds);
256
+
257
+        /*-----------------------------------------------*/
258
+
259
+        asort($nom_form);
260
+        reset($nom_form);
261
+
262
+        $statut=5;
263
+        include ('ldap_form_add_users_group.php');
264
+    } else {
265
+        echo '<h4>'.get_lang('UnableToConnectTo').' '.$host.'</h4>';
266
+    }
267
+    echo '<br /><br />';
268 268
     echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';
269 269
     echo '<br /><br />';
270 270
     echo '</div>';
@@ -272,27 +272,27 @@  discard block
 block discarded – undo
272 272
 }
273 273
 elseif (!empty($annee) && !empty($course) && ($_POST['confirmed']=='yes'))
274 274
 {
275
-	$id=$_POST['username_form'];
276
-	$UserList=array();
277
-	$userid_match_login = array();
278
-	foreach ($id as $form_index=>$user_id)
279
-	{
280
-		if(is_array($_POST['checkboxes']) && in_array($form_index,array_values($_POST['checkboxes'])))
281
-		{
282
-			$tmp = ldap_add_user($user_id);
283
-			$UserList[]= $tmp;
284
-			$userid_match_login[$tmp] = $user_id;
285
-		}
286
-	}
287
-	if (!empty($_POST['course']))
288
-	{
289
-		foreach($UserList as $user_id)
290
-		{
291
-			CourseManager::add_user_to_course($user_id,$_POST['course']);
292
-		}
293
-		header('Location: course_information.php?code='.Security::remove_XSS($_POST['course']));
294
-	}
295
-	/*
275
+    $id=$_POST['username_form'];
276
+    $UserList=array();
277
+    $userid_match_login = array();
278
+    foreach ($id as $form_index=>$user_id)
279
+    {
280
+        if(is_array($_POST['checkboxes']) && in_array($form_index,array_values($_POST['checkboxes'])))
281
+        {
282
+            $tmp = ldap_add_user($user_id);
283
+            $UserList[]= $tmp;
284
+            $userid_match_login[$tmp] = $user_id;
285
+        }
286
+    }
287
+    if (!empty($_POST['course']))
288
+    {
289
+        foreach($UserList as $user_id)
290
+        {
291
+            CourseManager::add_user_to_course($user_id,$_POST['course']);
292
+        }
293
+        header('Location: course_information.php?code='.Security::remove_XSS($_POST['course']));
294
+    }
295
+    /*
296 296
 	else
297 297
 	{
298 298
 		Display :: display_header($tool_name);
@@ -311,13 +311,13 @@  discard block
 block discarded – undo
311 311
 		Display :: display_normal_message($message,false);
312 312
 	}
313 313
 	*/
314
-	else
315
-	{
316
-		Display::display_header($tool_name);
317
-		$message=get_lang('NoUserAdded');
318
-		Display :: display_normal_message($message,false);
319
-	}
320
-	echo '<br /><br />';
314
+    else
315
+    {
316
+        Display::display_header($tool_name);
317
+        $message=get_lang('NoUserAdded');
318
+        Display :: display_normal_message($message,false);
319
+    }
320
+    echo '<br /><br />';
321 321
     echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';
322 322
     echo '<br /><br />';
323 323
 }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * Copyright (c) 2007 Mustapha Alouani (supervised by Michel Moreau-Belliard)
7 7
  */
8 8
 // resetting the course id
9
-$cidReset=true;
9
+$cidReset = true;
10 10
 require_once __DIR__.'/../inc/global.inc.php';
11 11
 // setting the section (for the tabs)
12 12
 $this_section = SECTION_PLATFORM_ADMIN;
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 api_protect_admin_script();
16 16
 require('../auth/ldap/authldap.php');
17 17
 
18
-$annee_base=date('Y');
18
+$annee_base = date('Y');
19 19
 
20 20
 $tool_name = get_lang('LDAPImport');
21 21
 // setting breadcrumbs
22
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23 23
 
24 24
 $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
25 25
 var buttoncheck = 1;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 $annee = $_GET['annee'];
47 47
 $composante = $_GET['composante'];
48
-$etape =  $_GET['etape'];
48
+$etape = $_GET['etape'];
49 49
 $course = $_POST['course'];
50 50
 
51 51
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	echo '</div>';
196 196
 }
197 197
 */
198
-elseif(!empty($annee) && empty($course))
198
+elseif (!empty($annee) && empty($course))
199 199
 {
200 200
 	Display::display_header($tool_name);
201 201
 	echo '<div style="align:center">';
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
204 204
 	echo '<select name="course">';
205 205
 	$courses = CourseManager::get_courses_list();
206
-	foreach($courses as $row)
206
+	foreach ($courses as $row)
207 207
 	{
208 208
 		echo '<option value="'.$row['code'].'">'.api_htmlentities($row['title']).'</option>';
209 209
 	}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 		$info = ldap_get_entries($ds, $sr);
238 238
 
239
-		for ($key = 0; $key < $info["count"]; $key ++) {
239
+		for ($key = 0; $key < $info["count"]; $key++) {
240 240
 			$nom_form[] = $info[$key]["sn"][0];
241 241
 			$prenom_form[] = $info[$key]["givenname"][0];
242 242
 			$email_form[] = $info[$key]["mail"][0];
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 		asort($nom_form);
257 257
 		reset($nom_form);
258 258
 
259
-		$statut=5;
259
+		$statut = 5;
260 260
 		include ('ldap_form_add_users_group.php');
261 261
 	} else {
262 262
 		echo '<h4>'.get_lang('UnableToConnectTo').' '.$host.'</h4>';
@@ -267,25 +267,25 @@  discard block
 block discarded – undo
267 267
     echo '</div>';
268 268
 
269 269
 }
270
-elseif (!empty($annee) && !empty($course) && ($_POST['confirmed']=='yes'))
270
+elseif (!empty($annee) && !empty($course) && ($_POST['confirmed'] == 'yes'))
271 271
 {
272
-	$id=$_POST['username_form'];
273
-	$UserList=array();
272
+	$id = $_POST['username_form'];
273
+	$UserList = array();
274 274
 	$userid_match_login = array();
275 275
 	foreach ($id as $form_index=>$user_id)
276 276
 	{
277
-		if(is_array($_POST['checkboxes']) && in_array($form_index,array_values($_POST['checkboxes'])))
277
+		if (is_array($_POST['checkboxes']) && in_array($form_index, array_values($_POST['checkboxes'])))
278 278
 		{
279 279
 			$tmp = ldap_add_user($user_id);
280
-			$UserList[]= $tmp;
280
+			$UserList[] = $tmp;
281 281
 			$userid_match_login[$tmp] = $user_id;
282 282
 		}
283 283
 	}
284 284
 	if (!empty($_POST['course']))
285 285
 	{
286
-		foreach($UserList as $user_id)
286
+		foreach ($UserList as $user_id)
287 287
 		{
288
-			CourseManager::add_user_to_course($user_id,$_POST['course']);
288
+			CourseManager::add_user_to_course($user_id, $_POST['course']);
289 289
 		}
290 290
 		header('Location: course_information.php?code='.Security::remove_XSS($_POST['course']));
291 291
 	}
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
 	else
312 312
 	{
313 313
 		Display::display_header($tool_name);
314
-		$message=get_lang('NoUserAdded');
315
-		Display :: display_normal_message($message,false);
314
+		$message = get_lang('NoUserAdded');
315
+		Display :: display_normal_message($message, false);
316 316
 	}
317 317
 	echo '<br /><br />';
318 318
     echo '<a href="ldap_import_students.php?annee=&composante=&etape=">'.get_lang('BackToNewSearch').'</a>';
Please login to merge, or discard this patch.
main/admin/access_url_add_usergroup_to_url.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
                   <?php
88 88
                     echo Display::get_alphabet_options($firstLetterUserGroup);
89 89
                     echo Display::get_numeric_options(0, 9, $firstLetterUserGroup);
90
-                  ?>
90
+                    ?>
91 91
             </select>
92 92
         </td>
93 93
         <td width="20%">&nbsp;</td>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 $tbl_course = Database:: get_main_table(TABLE_MAIN_COURSE);
31 31
 
32 32
 $tool_name = get_lang('AddUserGroupToURL');
33
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
34
-$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
33
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
34
+$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
35 35
 
36 36
 Display::display_header($tool_name);
37 37
 
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 
47 47
 if (isset($_POST['form_sent']) && $_POST['form_sent']) {
48 48
     $form_sent = $_POST['form_sent'];
49
-    $userGroups = is_array($_POST['user_group_list']) ? $_POST['user_group_list'] : array() ;
50
-    $urlList = is_array($_POST['url_list']) ? $_POST['url_list'] : array() ;
49
+    $userGroups = is_array($_POST['user_group_list']) ? $_POST['user_group_list'] : array();
50
+    $urlList = is_array($_POST['url_list']) ? $_POST['url_list'] : array();
51 51
     $firstLetterUserGroup = $_POST['first_letter_user_group'];
52 52
 
53 53
     if ($form_sent == 1) {
Please login to merge, or discard this patch.
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,10 @@  discard block
 block discarded – undo
99 99
         <td width="40%" align="center">
100 100
         <select name="user_group_list[]" multiple="multiple" size="20" style="width:400px;">
101 101
 		<?php foreach ($dbUserGroups as $item) { ?>
102
-			<option value="<?php echo $item['id']; ?>" <?php if (in_array($item['id'], $courses)) echo 'selected="selected"'; ?>><?php echo $item['name']; ?>
102
+			<option value="<?php echo $item['id']; ?>" <?php if (in_array($item['id'], $courses)) {
103
+    echo 'selected="selected"';
104
+}
105
+?>><?php echo $item['name']; ?>
103 106
             </option>
104 107
         <?php } ?>
105 108
     </select>
@@ -110,7 +113,10 @@  discard block
 block discarded – undo
110 113
    <td width="40%" align="center">
111 114
     <select name="url_list[]" multiple="multiple" size="20" style="width:300px;">
112 115
 		<?php foreach ($db_urls as $url_obj) { ?>
113
-        <option value="<?php echo $url_obj['id']; ?>" <?php if (in_array($url_obj['id'], $url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?>
116
+        <option value="<?php echo $url_obj['id']; ?>" <?php if (in_array($url_obj['id'], $url_list)) {
117
+    echo 'selected="selected"';
118
+}
119
+?>><?php echo $url_obj['url']; ?>
114 120
         </option>
115 121
 		<?php } ?>
116 122
     </select>
Please login to merge, or discard this patch.
main/admin/course_intro_pdf_import.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,26 +90,26 @@
 block discarded – undo
90 90
 {
91 91
     $baseDir = api_get_path(SYS_ARCHIVE_PATH);
92 92
     $uploadPath = 'pdfimport/';
93
-    $errors = array ();
93
+    $errors = array();
94 94
     if (!is_dir($baseDir.$uploadPath)) {
95 95
         @mkdir($baseDir.$uploadPath);
96 96
     }
97
-    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024*1024*1024)) {
97
+    if (!unzip_uploaded_file($_FILES['import_file'], $uploadPath, $baseDir, 1024 * 1024 * 1024)) {
98 98
         error_log('Could not unzip uploaded file in '.__FILE__.', line '.__LINE__);
99 99
         return $errors;
100 100
     }
101 101
     $list = scandir($baseDir.$uploadPath);
102 102
     $i = 0;
103 103
     foreach ($list as $file) {
104
-        if (substr($file,0,1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
104
+        if (substr($file, 0, 1) == '.' or !is_file($baseDir.$uploadPath.$file)) {
105 105
             continue;
106 106
         }
107
-        $parts = preg_split('/_/',$file);
107
+        $parts = preg_split('/_/', $file);
108 108
         $course = api_get_course_info($parts[0]);
109 109
         if (count($course) > 0) {
110 110
             // Build file info because handle_uploaded_document() needs it (name, type, size, tmp_name)
111 111
             $fileSize = filesize($baseDir.$uploadPath.$file);
112
-            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2],0,-4));
112
+            $docId = add_document($course, $subDir.'/'.$file, 'file', $fileSize, $parts[1].' '.substr($parts[2], 0, -4));
113 113
             if ($docId > 0) {
114 114
                 if (!is_file($baseDir.$uploadPath.$file)) {
115 115
                     error_log($baseDir.$uploadPath.$file.' does not exists in '.__FILE__);
Please login to merge, or discard this patch.
main/admin/add_courses_to_usergroup.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -229,31 +229,31 @@  discard block
 block discarded – undo
229 229
   <td align="center">
230 230
   <div id="content_source">
231 231
       <?php
232
-      if (!($add_type=='multiple')) {
232
+        if (!($add_type=='multiple')) {
233 233
         ?>
234 234
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
235 235
         <div id="ajax_list_users_single"></div>
236 236
         <?php
237
-      } else {
238
-      ?>
237
+        } else {
238
+        ?>
239 239
       <div id="ajax_list_multiple">
240 240
         <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
241 241
       </div>
242 242
     <?php
243
-      }
244
-     ?>
243
+        }
244
+        ?>
245 245
   </div>
246 246
   </td>
247 247
   <td width="10%" valign="middle" align="center">
248 248
   <?php
249
-  if ($ajax_search) {
250
-  ?>
249
+    if ($ajax_search) {
250
+    ?>
251 251
     <button class="btn bt-default" type="button" onclick="remove_item(document.getElementById('elements_in'))" >
252 252
         <em class="fa fa-arrow-left"></em>
253 253
     </button>
254 254
   <?php
255
-  } else {
256
-  ?>
255
+    } else {
256
+    ?>
257 257
     <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))">
258 258
         <em class="fa fa-arrow-right"></em>
259 259
     </button>
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
         <em class="fa fa-arrow-left"></em>
263 263
     </button>
264 264
     <?php
265
-  }
266
-  ?>
265
+    }
266
+    ?>
267 267
     <br /><br /><br /><br /><br /><br />
268 268
   </td>
269 269
   <td align="center">
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,10 @@
 block discarded – undo
192 192
 
193 193
 ?>
194 194
 
195
-<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();"';}?>>
195
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
196
+    echo '&add=true' ;
197
+}
198
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
196 199
 
197 200
 <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
198 201
 echo Display::input('hidden', 'id', $id);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 api_protect_admin_script(true);
20 20
 
21 21
 // Setting breadcrumbs.
22
-$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
22
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
24 24
 
25 25
 // Setting the name of the tool.
26 26
 $tool_name = get_lang('SubscribeClassToCourses');
27 27
 
28 28
 $add_type = 'multiple';
29
-if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
29
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
30 30
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
31 31
 }
32 32
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
99 99
 $searchForm->addHeader(get_lang('AdvancedSearch'));
100
-$renderer =& $searchForm->defaultRenderer();
100
+$renderer = & $searchForm->defaultRenderer();
101 101
 $searchForm->addElement('hidden', 'id', $id);
102 102
 foreach ($filters as $param) {
103 103
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 //checking for extra field with filter on
143 143
 
144
-function search($needle,$type)
144
+function search($needle, $type)
145 145
 {
146 146
     global $elements_in;
147 147
     $xajax_response = new xajaxResponse();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 }
181 181
 
182 182
 echo '<div class="actions">';
183
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
183
+echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
184 184
 echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search'));
185 185
 echo '</div>';
186 186
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 ?>
192 192
 
193
-<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();"';}?>>
193
+<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();"'; }?>>
194 194
 
195 195
 <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
196 196
 echo Display::input('hidden', 'id', $id);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
   <td align="center"><b><?php echo get_lang('CoursesInGroup') ?> :</b></td>
210 210
 </tr>
211 211
 
212
-<?php if ($add_type=='multiple') { ?>
212
+<?php if ($add_type == 'multiple') { ?>
213 213
 <tr>
214 214
 <td align="center">
215 215
 <?php echo get_lang('FirstLetterCourseTitle'); ?> :
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
   <td align="center">
228 228
   <div id="content_source">
229 229
       <?php
230
-      if (!($add_type=='multiple')) {
230
+      if (!($add_type == 'multiple')) {
231 231
         ?>
232 232
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
233 233
         <div id="ajax_list_users_single"></div>
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
       } else {
236 236
       ?>
237 237
       <div id="ajax_list_multiple">
238
-        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
238
+        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
239 239
       </div>
240 240
     <?php
241 241
       }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
   </td>
267 267
   <td align="center">
268 268
 <?php
269
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
269
+    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false);
270 270
     unset($sessionUsersList);
271 271
 ?>
272 272
  </td>
Please login to merge, or discard this patch.
main/admin/usergroup_user_import.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         foreach ($mandatory_fields as $field) {
27 27
             if (!isset($user_class[$field]) || strlen($user_class[$field]) == 0) {
28
-                $user_class['error'] = get_lang($field . 'Mandatory');
28
+                $user_class['error'] = get_lang($field.'Mandatory');
29 29
                 $errors[] = $user_class;
30 30
             }
31 31
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 // 2.1.1 Check whether code exists in DB
38 38
                 $exists = $usergroup->usergroup_exists($user_class['ClassName']);
39 39
                 if (!$exists) {
40
-                    $user_class['error'] = get_lang('CodeDoesNotExists') . ': ' . $user_class['ClassName'];
40
+                    $user_class['error'] = get_lang('CodeDoesNotExists').': '.$user_class['ClassName'];
41 41
                     $errors[] = $user_class;
42 42
                 } else {
43 43
                     $classcodes[$user_class['CourseCode']] = 1;
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
         if (!UserManager::is_username_empty($user_class['UserName'])) {
50 50
             // 3.1. Check whether username is too long.
51 51
             if (UserManager::is_username_too_long($user_class['UserName'])) {
52
-                $user_class['error'] = get_lang('UserNameTooLong') . ': ' . $user_class['UserName'];
52
+                $user_class['error'] = get_lang('UserNameTooLong').': '.$user_class['UserName'];
53 53
                 $errors[] = $user_class;
54 54
             }
55 55
 
56 56
             $username = UserManager::purify_username($user_class['UserName'], $purification_option_for_usernames);
57 57
             // 3.2. Check whether username exists.
58 58
             if (UserManager::is_username_available($username)) {
59
-                $user_class['error'] = get_lang('UnknownUser') . ': ' . $username;
59
+                $user_class['error'] = get_lang('UnknownUser').': '.$username;
60 60
                 $errors[] = $user_class;
61 61
             }
62 62
         }
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
             $class_name = $user_data['class_name'];
106 106
             $user_list_name = $user_data['user_list_name'];
107 107
             $usergroup->subscribe_users_to_usergroup($class_id, $user_list, $deleteUsersNotInList);
108
-            $message .= Display::return_message(get_lang('Class') . ': ' . $class_name . '<br />', 'normal', false);
109
-            $message .= Display::return_message(get_lang('Users') . ': ' . implode(', ', $user_list_name));
108
+            $message .= Display::return_message(get_lang('Class').': '.$class_name.'<br />', 'normal', false);
109
+            $message .= Display::return_message(get_lang('Users').': '.implode(', ', $user_list_name));
110 110
         }
111 111
     }
112 112
     return $message;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 $this_section = SECTION_PLATFORM_ADMIN;
129 129
 api_protect_admin_script(true);
130 130
 
131
-$tool_name = get_lang('AddUsersToAClass') . ' CSV';
131
+$tool_name = get_lang('AddUsersToAClass').' CSV';
132 132
 
133 133
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
134 134
 $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 if (count($errors) != 0) {
165 165
     $error_message = "\n";
166 166
     foreach ($errors as $index => $error_class_user) {
167
-        $error_message .= get_lang('Line') . ' ' . $error_class_user['line'] . ': ' . $error_class_user['error'] . '</b>';
167
+        $error_message .= get_lang('Line').' '.$error_class_user['line'].': '.$error_class_user['error'].'</b>';
168 168
         $error_message .= "<br />";
169 169
     }
170 170
     $error_message .= "\n";
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 }
173 173
 $form->display();
174 174
 ?>
175
-<p><?php echo get_lang('CSVMustLookLike') . ' (' . get_lang('MandatoryFields') . ')'; ?> :</p>
175
+<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
176 176
 <pre>
177 177
 <b>UserName</b>;<b>ClassName</b>
178 178
 jdoe;class01
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
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 // setting the name of the tool
23 23
 $tool_name = get_lang('CommandLineInterpreter');
24 24
 // setting breadcrumbs
25
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
25
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
26 26
 // including the header file (which includes the banner itself)
27 27
 Display :: display_header($tool_name);
28 28
 switch ($_GET["cmd"]) {
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.