Passed
Push — 1.10.x ( 51b3f0...0b3bd8 )
by Yannick
116:33 queued 61:35
created
main/admin/ldap_form_add_users_group.php 1 patch
Braces   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,16 +14,14 @@  discard block
 block discarded – undo
14 14
 	if($statut==1)
15 15
 	{
16 16
 		echo get_lang('EmailNotifySubscription').': <input type="checkbox" name="mailling" value="1" checked="checked"><i>'.get_lang('DontUnchek').'</i>';
17
-	}
18
-	else
17
+	} else
19 18
 	{
20 19
 		echo '<input type="hidden" name="mailling" value="1">';
21 20
 	}
22 21
 if(!empty($course))
23 22
 {
24 23
 	echo '<input type="hidden" name="course" value="'.Security::remove_XSS($course).'">';
25
-}
26
-elseif(!empty($id_session))
24
+} elseif(!empty($id_session))
27 25
 {
28 26
 	echo '<input type="hidden" name="id_session" value="'.Security::remove_XSS($id_session).'">';
29 27
 }
@@ -42,7 +40,11 @@  discard block
 block discarded – undo
42 40
 	  '</tr>'."\n";
43 41
 while (list ($key, $val) = each($nom_form)) {
44 42
 	$nbre=$nbre+1;
45
-	if($nbre & 1) $ndiv=2; else $ndiv=3;
43
+	if($nbre & 1) {
44
+	    $ndiv=2;
45
+	} else {
46
+	    $ndiv=3;
47
+	}
46 48
 	echo '<tr align="center" id="header'.$ndiv.'">';
47 49
 	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
48 50
 	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
@@ -50,8 +52,7 @@  discard block
 block discarded – undo
50 52
 	{
51 53
 		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
52 54
 		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
53
-	}
54
-	else
55
+	} else
55 56
 	{
56 57
 		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
57 58
 		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
Please login to merge, or discard this patch.
main/admin/user_update_import.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -462,7 +462,10 @@
 block discarded – undo
462 462
         <blockquote>
463 463
             <pre>
464 464
                 <b>UserName</b>;LastName;FirstName;Email;NewUserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;Active;Language;Courses;ClassId;
465
-                xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br />
465
+                xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) {
466
+    echo implode(';', $list_reponse).';';
467
+}
468
+?></span>xxx1|xxx2|xxx3;1;<br />
466 469
             </pre>
467 470
         </blockquote>
468 471
     <p><?php
Please login to merge, or discard this patch.
main/admin/sub_language.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,8 +200,9 @@
 block discarded – undo
200 200
 					continue;
201 201
 				}
202 202
 
203
-				if (is_array($variable_value))
204
-					echo $lang_file;
203
+				if (is_array($variable_value)) {
204
+									echo $lang_file;
205
+				}
205 206
 				$founded = false;
206 207
 				if ($search_in_english && $search_in_variable) {
207 208
 					// searching the item in the parent tool
Please login to merge, or discard this patch.
main/admin/group_list.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -412,8 +412,9 @@
 block discarded – undo
412 412
     //$table->set_column_filter(6, 'status_filter');
413 413
     //$table->set_column_filter(7, 'active_filter');
414 414
     //$table->set_column_filter(8, 'modify_filter');
415
-    if (api_is_platform_admin())
416
-        $table->set_form_actions(array('delete' => get_lang('DeleteFromPlatform')));
415
+    if (api_is_platform_admin()) {
416
+            $table->set_form_actions(array('delete' => get_lang('DeleteFromPlatform')));
417
+    }
417 418
     $table->display();
418 419
 }
419 420
 Display :: display_footer();
Please login to merge, or discard this patch.
main/admin/settings.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -533,8 +533,9 @@
 block discarded – undo
533 533
             }
534 534
             break;
535 535
         default:
536
-            if (isset($form))
537
-                $form->display();
536
+            if (isset($form)) {
537
+                            $form->display();
538
+            }
538 539
     }
539 540
 }
540 541
 
Please login to merge, or discard this patch.
main/admin/group_edit.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,7 @@
 block discarded – undo
109 109
 	$picture_uri = $group_data['picture_uri'];
110 110
 	if ($group['delete_picture']) {
111 111
 		$picture_uri = GroupPortalManager::delete_group_picture($group_id);
112
-		}
113
-	elseif (!empty($picture['name'])) {
112
+		} elseif (!empty($picture['name'])) {
114 113
         $picture_uri = GroupPortalManager::update_group_picture(
115 114
             $group_id,
116 115
             $_FILES['picture']['name'],
Please login to merge, or discard this patch.
main/admin/access_url_edit_courses_to_url.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,8 +108,9 @@  discard block
 block discarded – undo
108 108
 
109 109
 api_display_tool_title($tool_name);
110 110
 
111
-if (isset($_GET['action']) && $_GET['action'] == 'show_message')
111
+if (isset($_GET['action']) && $_GET['action'] == 'show_message') {
112 112
 	Display :: display_normal_message(Security::remove_XSS(stripslashes($_GET['message'])));
113
+}
113 114
 
114 115
 $no_course_list = $course_list = array();
115 116
 $ajax_search = $add_type == 'unique' ? true : false;
@@ -261,10 +262,11 @@  discard block
 block discarded – undo
261 262
 				<td colspan="3" align="center">
262 263
 					<br />
263 264
 					<?php
264
-					if(isset($_GET['add']))
265
-						echo '<button class="btn btn-default" onclick="valide()" >'.get_lang('AddCoursesToURL').'</button>';
266
-					else
267
-						echo '<button class="btn btn-default" onclick="valide()" >'.get_lang('EditCoursesToURL').'</button>';
265
+					if(isset($_GET['add'])) {
266
+											echo '<button class="btn btn-default" onclick="valide()" >'.get_lang('AddCoursesToURL').'</button>';
267
+					} else {
268
+											echo '<button class="btn btn-default" onclick="valide()" >'.get_lang('EditCoursesToURL').'</button>';
269
+					}
268 270
 					?>
269 271
 				</td>
270 272
 			</tr>
Please login to merge, or discard this patch.
main/admin/archive_cleanup.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,10 +49,11 @@
 block discarded – undo
49 49
 Display::display_warning_message(get_lang('ArchiveDirCleanupDescr'));
50 50
 
51 51
 if (isset($_GET['msg']) && isset($_GET['type'])) {
52
-	if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed')))
53
-	switch($_GET['type']) {
52
+	if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed'))) {
53
+		switch($_GET['type']) {
54 54
 		case 'error':
55 55
 			$message = Display::return_message(get_lang($_GET['msg']), 'error');
56
+	}
56 57
 			break;
57 58
 		case 'confirmation':
58 59
 			$message = Display::return_message(get_lang($_GET['msg']), 'confirm');
Please login to merge, or discard this patch.
main/admin/subscribe_user2class.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
                 exit();
64 64
             }
65 65
         } elseif ($remove_from_class) {
66
-            if (count($right_user_list) == 0)
67
-                $error_message = get_lang('AtLeastOneUser');
68
-            else {
66
+            if (count($right_user_list) == 0) {
67
+                            $error_message = get_lang('AtLeastOneUser');
68
+            } else {
69 69
                 foreach ($right_user_list as $index => $user_id) {
70 70
                     ClassManager :: unsubscribe_user($user_id, $class_id);
71 71
                 }
@@ -122,7 +122,10 @@  discard block
 block discarded – undo
122 122
                 <?php
123 123
                 foreach ($left_users as $user) {
124 124
                     ?>
125
-                        <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $left_user_list)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option>
125
+                        <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $left_user_list)) {
126
+    echo 'selected="selected"';
127
+}
128
+?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option>
126 129
                         <?php
127 130
                     }
128 131
                     ?>
@@ -138,7 +141,10 @@  discard block
 block discarded – undo
138 141
                     <?php
139 142
                     foreach ($right_users as $user) {
140 143
                         ?>
141
-                        <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $right_user_list)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option>
144
+                        <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $right_user_list)) {
145
+    echo 'selected="selected"';
146
+}
147
+?>><?php echo api_get_person_name($user['firstname'], $user['lastname']) . ' (' . $user['username'] . ')'; ?></option>
142 148
     <?php
143 149
 }
144 150
 ?>
Please login to merge, or discard this patch.