Completed
Push — 1.10.x ( c82817...6a93c3 )
by Yannick
202:42 queued 149:59
created
main/admin/ldap_users_list.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 }
31 31
 */
32 32
 
33
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
33
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
34 34
 $tool_name = get_lang('SearchLDAPUsers');
35 35
 //Display :: display_header($tool_name); //cannot display now as we need to redirect
36 36
 //api_display_tool_title($tool_name);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 if (isset ($_GET['action']))
39 39
 {
40 40
 	$check = Security::check_token('get');
41
-	if($check)
41
+	if ($check)
42 42
 	{
43 43
 		switch ($_GET['action'])
44 44
 		{
@@ -59,41 +59,41 @@  discard block
 block discarded – undo
59 59
 				break;
60 60
 			case 'lock' :
61 61
 				Display :: display_header($tool_name);
62
-				$message=lock_unlock_user('lock',$_GET['user_id']);
62
+				$message = lock_unlock_user('lock', $_GET['user_id']);
63 63
 				Display :: display_normal_message($message);
64 64
 				break;
65 65
 			case 'unlock';
66 66
 				Display :: display_header($tool_name);
67
-				$message=lock_unlock_user('unlock',$_GET['user_id']);
67
+				$message = lock_unlock_user('unlock', $_GET['user_id']);
68 68
 				Display :: display_normal_message($message);
69 69
 				break;
70 70
 			case 'add_user';
71
-				$id=$_GET['id'];
72
-				$UserList=array();
71
+				$id = $_GET['id'];
72
+				$UserList = array();
73 73
 				$userid_match_login = array();
74 74
 				foreach ($id as $user_id) {
75 75
 					$tmp = ldap_add_user($user_id);
76
-					$UserList[]= $tmp;
76
+					$UserList[] = $tmp;
77 77
 					$userid_match_login[$tmp] = $user_id;
78 78
 				}
79
-				if (isset($_GET['id_session']) && ($_GET['id_session'] == strval(intval($_GET['id_session']))) && ($_GET['id_session']>0)) {
79
+				if (isset($_GET['id_session']) && ($_GET['id_session'] == strval(intval($_GET['id_session']))) && ($_GET['id_session'] > 0)) {
80 80
 					ldap_add_user_to_session($UserList, $_GET['id_session']);
81 81
 					header('Location: resume_session.php?id_session='.$_GET['id_session']);
82 82
 				} else {
83 83
 					Display :: display_header($tool_name);
84
-					if(count($userid_match_login)>0)
84
+					if (count($userid_match_login) > 0)
85 85
 					{
86
-						$message=get_lang('LDAPUsersAddedOrUpdated').':<br />';
87
-						foreach($userid_match_login as $user_id => $login)
86
+						$message = get_lang('LDAPUsersAddedOrUpdated').':<br />';
87
+						foreach ($userid_match_login as $user_id => $login)
88 88
 						{
89 89
 							$message .= '- '.$login.'<br />';
90 90
 						}
91 91
 					}
92 92
 					else
93 93
 					{
94
-						$message=get_lang('NoUserAdded');
94
+						$message = get_lang('NoUserAdded');
95 95
 					}
96
-					Display :: display_normal_message($message,false);
96
+					Display :: display_normal_message($message, false);
97 97
 				}
98 98
 				break;
99 99
 			default :
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 if (isset ($_POST['action']))
114 114
 {
115 115
 	$check = Security::check_token('get');
116
-	if($check)
116
+	if ($check)
117 117
 	{
118 118
 		switch ($_POST['action'])
119 119
 		{
@@ -122,15 +122,15 @@  discard block
 block discarded – undo
122 122
 				$number_of_deleted_users = 0;
123 123
 				foreach ($_POST['id'] as $index => $user_id)
124 124
 				{
125
-					if($user_id != $_user['user_id'])
125
+					if ($user_id != $_user['user_id'])
126 126
 					{
127
-						if(UserManager :: delete_user($user_id))
127
+						if (UserManager :: delete_user($user_id))
128 128
 						{
129 129
 							$number_of_deleted_users++;
130 130
 						}
131 131
 					}
132 132
 				}
133
-				if($number_of_selected_users == $number_of_deleted_users)
133
+				if ($number_of_selected_users == $number_of_deleted_users)
134 134
 				{
135 135
 					Display :: display_normal_message(get_lang('SelectedUsersDeleted'));
136 136
 				}
@@ -142,17 +142,17 @@  discard block
 block discarded – undo
142 142
 			case 'add_user' :
143 143
 				$number_of_selected_users = count($_POST['id']);
144 144
 				$number_of_added_users = 0;
145
-				$UserList=array();
145
+				$UserList = array();
146 146
 				foreach ($_POST['id'] as $index => $user_id)
147 147
 				{
148
-					if($user_id != $_user['user_id'])
148
+					if ($user_id != $_user['user_id'])
149 149
 					{
150 150
 						$UserList[] = ldap_add_user($user_id);
151 151
 					}
152 152
 				}
153
-				if (isset($_GET['id_session']) && (trim($_GET['id_session'])!=""))
153
+				if (isset($_GET['id_session']) && (trim($_GET['id_session']) != ""))
154 154
 					addUserToSession($UserList, $_GET['id_session']);
155
-				if(count($UserList)>0)
155
+				if (count($UserList) > 0)
156 156
 				{
157 157
 					Display :: display_normal_message(count($UserList)." ".get_lang('LDAPUsersAdded'));
158 158
 				}
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 	}
168 168
 }
169 169
 
170
-$form = new FormValidator('advanced_search','get');
171
-$form->addText('keyword_username',get_lang('LoginName'),false);
170
+$form = new FormValidator('advanced_search', 'get');
171
+$form->addText('keyword_username', get_lang('LoginName'), false);
172 172
 if (api_is_western_name_order())
173 173
 {
174 174
 	$form->addText('keyword_firstname', get_lang('FirstName'), false);
@@ -176,20 +176,20 @@  discard block
 block discarded – undo
176 176
 }
177 177
 else
178 178
 {
179
-	$form->addText('keyword_lastname',get_lang('LastName'),false);
180
-	$form->addText('keyword_firstname',get_lang('FirstName'),false);
179
+	$form->addText('keyword_lastname', get_lang('LastName'), false);
180
+	$form->addText('keyword_firstname', get_lang('FirstName'), false);
181 181
 }
182 182
 if (isset($_GET['id_session']))
183
-	$form->addElement('hidden','id_session',$_GET['id_session']);
183
+	$form->addElement('hidden', 'id_session', $_GET['id_session']);
184 184
 
185 185
 $type = array();
186 186
 $type["all"] = get_lang('All');
187
-$type["employee"]  = get_lang('Teacher');
187
+$type["employee"] = get_lang('Teacher');
188 188
 $type["student"] = get_lang('Student');
189 189
 
190
-$form->addElement('select','keyword_type',get_lang('Status'),$type);
190
+$form->addElement('select', 'keyword_type', get_lang('Status'), $type);
191 191
 // Structure a rajouer ??
192
-$form->addElement('submit','submit',get_lang('Ok'));
192
+$form->addElement('submit', 'submit', get_lang('Ok'));
193 193
 //$defaults['keyword_active'] = 1;
194 194
 //$defaults['keyword_inactive'] = 1;
195 195
 //$form->setDefaults($defaults);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 //$table->set_column_filter(5, 'email_filter');
226 226
 //$table->set_column_filter(5, 'active_filter');
227 227
 $table->set_column_filter(5, 'modify_filter');
228
-$table->set_form_actions(array ('add_user' => get_lang('AddLDAPUsers')));
228
+$table->set_form_actions(array('add_user' => get_lang('AddLDAPUsers')));
229 229
 $table->display();
230 230
 
231 231
 /*
Please login to merge, or discard this patch.
main/admin/filler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $nameTools = get_lang('PlatformAdmin');
23 23
 
24 24
 // setting breadcrumbs
25
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => $nameTools);
25
+$interbreadcrumb[] = array("url" => 'index.php', "name" => $nameTools);
26 26
 
27 27
 // setting the name of the tool
28 28
 $nameTools = get_lang('DataFiller');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 Display::display_header($nameTools);
48 48
 
49 49
 $result = '';
50
-if (count($output)>0) {
50
+if (count($output) > 0) {
51 51
     $result = '<div class="filler-report">'."\n";
52 52
     $result .= '<h3>'.$output[0]['title'].'</h3>'."\n";
53 53
     $result .= '<table>';
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
     }
59 59
     $result .= '</table>';
60 60
     $result .= '</div>';
61
-    Display::display_normal_message($result,false);
61
+    Display::display_normal_message($result, false);
62 62
 }
63 63
 ?>
64 64
 <div id="datafiller" class="actions">
65
-  <h4><?php echo Display::return_icon('bug.png',get_lang('DataFiller'),null,ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4>
66
-  <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');?></div>
65
+  <h4><?php echo Display::return_icon('bug.png', get_lang('DataFiller'), null, ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4>
66
+  <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls'); ?></div>
67 67
   <ul class="fillers">
68
-    <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png',get_lang('FillUsers'),null,ICON_SIZE_SMALL).' '.get_lang('FillUsers');?></a></li>
69
-    <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png',get_lang('FillCourses'),null,ICON_SIZE_SMALL).' '.get_lang('FillCourses');?></a></li>
68
+    <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png', get_lang('FillUsers'), null, ICON_SIZE_SMALL).' '.get_lang('FillUsers'); ?></a></li>
69
+    <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.get_lang('FillCourses'); ?></a></li>
70 70
   </ul>
71 71
 </div>
72 72
 <?php
Please login to merge, or discard this patch.
main/admin/access_url_edit_course_category_to_url.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 
25 25
 // Setting breadcrumbs
26 26
 $tool_name = get_lang('EditUserGroupToURL');
27
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
28
-$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
27
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
28
+$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs'));
29 29
 
30 30
 $add_type = 'multiple';
31 31
 if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 }
73 73
 </script>';
74 74
 
75
-$form_sent=0;
76
-$errorMsg='';
77
-$UserList=$SessionList = array();
78
-$users=$sessions = array();
75
+$form_sent = 0;
76
+$errorMsg = '';
77
+$UserList = $SessionList = array();
78
+$users = $sessions = array();
79 79
 
80 80
 if (isset($_POST['form_sent']) && $_POST['form_sent']) {
81 81
     $form_sent = $_POST['form_sent'];
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     foreach ($userGroups as $item) {
119 119
         if ($item['access_url_id'] == $access_url_id) {
120
-            $userGroupList[$item['id']] = $item ;
120
+            $userGroupList[$item['id']] = $item;
121 121
         }
122 122
     }
123 123
     $noUserGroupList = getCourseCategoryNotInList(array_keys($userGroupList));
@@ -153,11 +153,11 @@  discard block
 block discarded – undo
153 153
         if (!empty($access_url_id)) {
154 154
             if ($url_obj[0] == $access_url_id) {
155 155
                 $checked = 'selected=true';
156
-                $url_selected=$url_obj[1];
156
+                $url_selected = $url_obj[1];
157 157
             }
158 158
         }
159
-        if ($url_obj['active']==1) { ?>
160
-            <option <?php echo $checked;?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?>
159
+        if ($url_obj['active'] == 1) { ?>
160
+            <option <?php echo $checked; ?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?>
161 161
             </option>
162 162
         <?php
163 163
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
   <td align="center"><b><?php echo get_lang('CourseCategoryInPlatform') ?> :</b>
181 181
   </td>
182 182
   <td></td>
183
-  <td align="center"><b><?php printf(get_lang('CourseCategoryListInX'),$url_selected); ?></b></td>
183
+  <td align="center"><b><?php printf(get_lang('CourseCategoryListInX'), $url_selected); ?></b></td>
184 184
 </tr>
185 185
 
186 186
 <tr>
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
   <td align="center">
226 226
   <select id="destination_users" name="course_list[]" multiple="multiple" size="15" style="width:380px;">
227 227
 <?php
228
-foreach($userGroupList as $item) {
228
+foreach ($userGroupList as $item) {
229 229
 ?>
230 230
 	<option value="<?php echo $item['id']; ?>">
231 231
         <?php echo $item['name']; ?>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 	<td colspan="3" align="center">
241 241
 		<br />
242 242
 		<?php
243
-		if(isset($_GET['add']))
243
+		if (isset($_GET['add']))
244 244
 			echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>';
245 245
 		else
246 246
 			echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>';
Please login to merge, or discard this patch.
main/admin/add_users_to_group.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 api_protect_admin_script(true);
17 17
 
18 18
 // setting breadcrumbs
19
-$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
20
-$interbreadcrumb[] = array('url' => 'group_list.php','name' => get_lang('GroupList'));
19
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
20
+$interbreadcrumb[] = array('url' => 'group_list.php', 'name' => get_lang('GroupList'));
21 21
 
22 22
 // Database Table Definitions
23
-$tbl_group			= Database::get_main_table(TABLE_MAIN_GROUP);
24
-$tbl_user			= Database::get_main_table(TABLE_MAIN_USER);
25
-$tbl_group_rel_user	= Database::get_main_table(TABLE_USERGROUP_REL_USER);
26
-$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
23
+$tbl_group = Database::get_main_table(TABLE_MAIN_GROUP);
24
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
25
+$tbl_group_rel_user = Database::get_main_table(TABLE_USERGROUP_REL_USER);
26
+$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
27 27
 $needle = null;
28 28
 $user_anonymous = api_get_anonymous_id();
29 29
 
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
         } else {
84 84
             $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
85 85
         }
86
-        $xajax_response->addAssign('ajax_destination_list','innerHTML', api_utf8_encode($return_destination));
86
+        $xajax_response->addAssign('ajax_destination_list', 'innerHTML', api_utf8_encode($return_destination));
87 87
     } else {
88 88
         $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
89
-        $xajax_response->addAssign('ajax_destination_list','innerHTML', api_utf8_encode($return_destination));
89
+        $xajax_response->addAssign('ajax_destination_list', 'innerHTML', api_utf8_encode($return_destination));
90 90
 
91 91
         if ($type == 'single') {
92
-            $return.= '';
93
-            $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
92
+            $return .= '';
93
+            $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
94 94
         } else {
95 95
             $return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
96 96
             $xajax_response->addAssign('ajax_origin_list_multiple', 'innerHTML', api_utf8_encode($return_origin));
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
                     }
118 118
                 }
119 119
                 $rs_single = Database::query($sql);
120
-                $i=0;
120
+                $i = 0;
121 121
                 while ($user = Database :: fetch_array($rs_single)) {
122 122
                     $i++;
123
-                    if ($i<=10) {
123
+                    if ($i <= 10) {
124 124
                         $person_name = api_get_person_name($user['firstname'], $user['lastname']);
125 125
                         $return .= '<a href="javascript: void(0);" onclick="javascript: add_user(\''.$user['user_id'].'\',\''.$person_name.' ('.$user['username'].')'.'\')">'.$person_name.' ('.$user['username'].')</a><br />';
126 126
                     } else {
127 127
                         $return .= '...<br />';
128 128
                     }
129 129
                 }
130
-                $xajax_response->addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
130
+                $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
131 131
             } else {
132 132
                 $xajax_response->addAlert(get_lang('YouMustChooseARelationType'));
133 133
                 $xajax_response->addClear('user_to_add', 'value');
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 </script>';
203 203
 
204 204
 $form_sent = 0;
205
-$errorMsg = $firstLetterUser = $firstLetterSession='';
205
+$errorMsg = $firstLetterUser = $firstLetterSession = '';
206 206
 $UserList = $SessionList = array();
207 207
 $users = $sessions = array();
208 208
 $noPHP_SELF = true;
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $rs_destination = Database::query($sql);
257 257
         if (Database::num_rows($rs_destination) > 0) {
258 258
             while ($row_destination_list = Database::fetch_array($rs_destination)) {
259
-                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
259
+                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list;
260 260
             }
261 261
         }
262 262
     }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         $rs_destination = Database::query($sql);
341 341
         if (Database::num_rows($rs_destination) > 0) {
342 342
             while ($row_destination_list = Database::fetch_array($rs_destination)) {
343
-                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list ;
343
+                $sessionUsersList[$row_destination_list['user_id']] = $row_destination_list;
344 344
             }
345 345
         }
346 346
     }
@@ -359,20 +359,20 @@  discard block
 block discarded – undo
359 359
 	<?php echo $link_add_type_unique ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple ?>
360 360
 </div>
361 361
 
362
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $group_id; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
362
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $group_id; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
363 363
 <?php echo '<legend>'.$tool_name.' ('.$group_info['name'].')</legend>'; ?>
364
-<?php if ($add_type=='multiple') { ?>
364
+<?php if ($add_type == 'multiple') { ?>
365 365
 <select name="relation" id="relation" onchange="xajax_search_users(document.getElementById('firstLetterUser').value,'multiple',this.value)">
366 366
 <?php } else { ?>
367 367
 <select name="relation" id="relation" onchange="xajax_search_users(document.getElementById('user_to_add').value,'single',this.value);">
368 368
 <?php } ?>
369 369
 <option value=""><?php echo get_lang('SelectARelationType')?></option>
370
-<option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_ADMIN)?'selected=selected':'') ?> > <?php echo get_lang('Admin') ?></option>
371
-<option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_READER)?'selected=selected':'') ?> > <?php echo get_lang('Reader') ?></option>
372
-<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_PENDING_INVITATION)?'selected=selected':'') ?> > <?php echo get_lang('PendingInvitation') ?></option>
373
-<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER)?'selected=selected':'') ?> > <?php echo get_lang('WaitingForAdminResponse') ?></option>
374
-<option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_MODERATOR)?'selected=selected':'') ?> > <?php echo get_lang('Moderator') ?></option>
375
-<option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation']==GROUP_USER_PERMISSION_HRM)?'selected=selected':'') ?> > <?php echo get_lang('Drh') ?></option>
370
+<option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_ADMIN) ? 'selected=selected' : '') ?> > <?php echo get_lang('Admin') ?></option>
371
+<option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_READER) ? 'selected=selected' : '') ?> > <?php echo get_lang('Reader') ?></option>
372
+<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_PENDING_INVITATION) ? 'selected=selected' : '') ?> > <?php echo get_lang('PendingInvitation') ?></option>
373
+<option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER) ? 'selected=selected' : '') ?> > <?php echo get_lang('WaitingForAdminResponse') ?></option>
374
+<option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_MODERATOR) ? 'selected=selected' : '') ?> > <?php echo get_lang('Moderator') ?></option>
375
+<option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($_POST['relation']) && $_POST['relation'] == GROUP_USER_PERMISSION_HRM) ? 'selected=selected' : '') ?> > <?php echo get_lang('Drh') ?></option>
376 376
 </select>
377 377
 <input type="hidden" name="form_sent" value="1" />
378 378
 <input type="hidden" name="id" value="<?php echo $group_id ?>" />
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
   <td>&nbsp;</td>
392 392
   <td align="center"><b><?php echo get_lang('UsersInGroup') ?> :</b></td>
393 393
 </tr>
394
-<?php if ($add_type=='multiple') { ?>
394
+<?php if ($add_type == 'multiple') { ?>
395 395
 <tr>
396 396
 <td align="center">
397 397
 <?php echo get_lang('FirstLetterUser'); ?> :
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
   <td align="center">
413 413
   <div id="content_source">
414 414
   	  <?php
415
-  	  if (!($add_type=='multiple')) {
415
+  	  if (!($add_type == 'multiple')) {
416 416
   	  	?>
417 417
 		<input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single',document.getElementById('relation').value)" />
418 418
 		<div id="ajax_list_users_single"></div>
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	  <select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">
424 424
 		<?php
425 425
 		if (!empty($nosessionUsersList)) {
426
-			foreach($nosessionUsersList as $enreg) {
426
+			foreach ($nosessionUsersList as $enreg) {
427 427
 			?>
428 428
 				<option value="<?php echo $enreg['user_id']; ?>"  > <?php echo $enreg['firstname'].' '.$enreg['lastname'].' ('.$enreg['username'].')'; ?></option>
429 429
 			<?php
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
   <select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;">
460 460
 	<?php
461 461
 	if (!empty($sessionUsersList)) {
462
-		foreach($sessionUsersList as $enreg) { ?>
462
+		foreach ($sessionUsersList as $enreg) { ?>
463 463
 			<option value="<?php echo $enreg['user_id']; ?>">
464 464
                 <?php echo $enreg['firstname'].' '.$enreg['lastname'].' ('.$enreg['username'].')'; ?>
465 465
             </option>
Please login to merge, or discard this patch.
main/admin/system_announcements.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 // Setting the section (for the tabs).
16 16
 $this_section = SECTION_PLATFORM_ADMIN;
17
-$_SESSION['this_section']=$this_section;
17
+$_SESSION['this_section'] = $this_section;
18 18
 
19 19
 $action = isset($_GET['action']) ? $_GET['action'] : null;
20 20
 $action_todo = false;
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 if (!empty($action)) {
38
-    $interbreadcrumb[] = array ("url" => "system_announcements.php", "name" => get_lang('SystemAnnouncements'));
38
+    $interbreadcrumb[] = array("url" => "system_announcements.php", "name" => get_lang('SystemAnnouncements'));
39 39
     if ($action == 'add') {
40
-        $interbreadcrumb[] = array ("url" => '#', "name" => get_lang('AddAnnouncement'));
40
+        $interbreadcrumb[] = array("url" => '#', "name" => get_lang('AddAnnouncement'));
41 41
     }
42 42
     if ($action == 'edit') {
43
-        $interbreadcrumb[] = array ("url" => '#', "name" => get_lang('Edit'));
43
+        $interbreadcrumb[] = array("url" => '#', "name" => get_lang('Edit'));
44 44
     }
45 45
 } else {
46 46
     $tool_name = get_lang('SystemAnnouncements');
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 }
67 67
 
68 68
 // Actions
69
-switch($action) {
69
+switch ($action) {
70 70
     case 'make_visible':
71 71
     case 'make_invisible':
72 72
         $status = false;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         Display :: display_confirmation_message(get_lang('AnnouncementDeleted'));
82 82
         break;
83 83
     case 'delete_selected':
84
-        foreach($_POST['id'] as $index => $id) {
84
+        foreach ($_POST['id'] as $index => $id) {
85 85
             SystemAnnouncementManager :: delete_announcement($id);
86 86
         }
87 87
         Display :: display_confirmation_message(get_lang('AnnouncementDeleted'));
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
     $language_list = api_get_languages();
138 138
     $language_list_with_keys = array();
139 139
     $language_list_with_keys['all'] = get_lang('All');
140
-    for ($i=0; $i<count($language_list['name']) ; $i++) {
140
+    for ($i = 0; $i < count($language_list['name']); $i++) {
141 141
         $language_list_with_keys[$language_list['folder'][$i]] = $language_list['name'][$i];
142 142
     }
143 143
 
144
-    $form->addElement('select', 'lang',get_lang('Language'), $language_list_with_keys);
144
+    $form->addElement('select', 'lang', get_lang('Language'), $language_list_with_keys);
145 145
     $form->addHtmlEditor(
146 146
         'content',
147 147
         get_lang('Content'),
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 
158 158
     $group = array();
159 159
 
160
-    $group[]= $form->createElement('checkbox', 'visible_teacher', null, get_lang('Teacher'));
161
-    $group[]= $form->createElement('checkbox', 'visible_student', null, get_lang('Student'));
162
-    $group[]= $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest'));
160
+    $group[] = $form->createElement('checkbox', 'visible_teacher', null, get_lang('Teacher'));
161
+    $group[] = $form->createElement('checkbox', 'visible_student', null, get_lang('Student'));
162
+    $group[] = $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest'));
163 163
 
164 164
     $form->addGroup($group, null, get_lang('Visible'), '');
165 165
 
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
 
183 183
     $form->addElement('checkbox', 'send_mail', null, get_lang('SendMail'));
184 184
 
185
-    if (isset($_REQUEST['action']) && $_REQUEST['action']=='add') {
185
+    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') {
186 186
         $form->addElement('checkbox', 'add_to_calendar', null, get_lang('AddToCalendar'));
187
-        $text=get_lang('AddNews');
188
-        $class='add';
187
+        $text = get_lang('AddNews');
188
+        $class = 'add';
189 189
         $form->addElement('hidden', 'action', 'add');
190 190
 
191 191
     } elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') {
192
-        $text=get_lang('EditNews');
193
-        $class='save';
192
+        $text = get_lang('EditNews');
193
+        $class = 'save';
194 194
         $form->addElement('hidden', 'action', 'edit');
195 195
     }
196 196
     $form->addElement('checkbox', 'send_email_test', null, get_lang('SendOnlyAnEmailToMySelfToTest'));
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
 if ($show_announcement_list) {
282 282
     $announcements = SystemAnnouncementManager :: get_all_announcements();
283
-    $announcement_data = array ();
283
+    $announcement_data = array();
284 284
     foreach ($announcements as $index => $announcement) {
285 285
         $row = array();
286 286
         $row[] = $announcement->id;
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
         $row[] = $announcement->title;
289 289
         $row[] = api_convert_and_format_date($announcement->date_start);
290 290
         $row[] = api_convert_and_format_date($announcement->date_end);
291
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
292
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=". ($announcement->visible_student  ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
293
-        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest  ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
291
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=".($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
292
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=".($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
293
+        $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=".($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>";
294 294
 
295 295
         $row[] = $announcement->lang;
296 296
         $row[] = "<a href=\"?action=edit&id=".$announcement->id."\">".Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a> <a href=\"?action=delete&id=".$announcement->id."\"  onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)."</a>";
Please login to merge, or discard this patch.
main/admin/course_category.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
             ) {
32 32
                 deleteNode($categoryId);
33 33
                 Display::addFlash(Display::return_message(get_lang('Deleted')));
34
-                header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
34
+                header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
35 35
                 exit();
36 36
             }
37 37
         } else {
38 38
             deleteNode($categoryId);
39 39
             Display::addFlash(Display::return_message(get_lang('Deleted')));
40
-            header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
40
+            header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
41 41
             exit();
42 42
         }
43 43
     } elseif (($action == 'add' || $action == 'edit') && isset($_POST['formSent']) && $_POST['formSent']) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
     } elseif ($action == 'moveUp') {
68 68
         moveNodeUp($categoryId, $_GET['tree_pos'], $category);
69
-        header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
69
+        header('Location: '.api_get_self().'?category='.Security::remove_XSS($category));
70 70
         Display::addFlash(Display::return_message(get_lang('Updated')));
71 71
         exit();
72 72
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         $form_title = ($action == 'add') ? get_lang('AddACategory') : get_lang('EditNode');
97 97
         if (!empty($category)) {
98
-            $form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category);
98
+            $form_title .= ' '.get_lang('Into').' '.Security::remove_XSS($category);
99 99
         }
100 100
         $url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.Security::remove_XSS($categoryId);
101 101
         $form = new FormValidator('course_category', 'post', $url);
Please login to merge, or discard this patch.
main/admin/skills_profile.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $skill_profile   = new SkillProfile();
25 25
 $skill_rel_user  = new SkillRelUser();
26 26
 
27
-$url  = api_get_path(WEB_AJAX_PATH).'skill.ajax.php';
27
+$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php';
28 28
 
29 29
 $tpl = new Template(get_lang('Skills'));
30 30
 
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
         $_SESSION['skills'] = $skills;
56 56
 
57 57
     } else {
58
-        $skills = isset($_SESSION['skills']) ? $_SESSION['skills']: array();
58
+        $skills = isset($_SESSION['skills']) ? $_SESSION['skills'] : array();
59 59
     }
60 60
 } else {
61
-    $skills = isset($_SESSION['skills']) ? $_SESSION['skills']: array();
61
+    $skills = isset($_SESSION['skills']) ? $_SESSION['skills'] : array();
62 62
 }
63 63
 
64 64
 $user_list = array();
65 65
 $count_skills = count($skills);
66 66
 
67
-$users  = $skill_rel_user->get_user_by_skills($skills);
67
+$users = $skill_rel_user->get_user_by_skills($skills);
68 68
 
69 69
 if (!empty($users)) {
70 70
     foreach ($users as $user) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $user_list[$user['user_id']]['user'] = $user_info;
73 73
         $my_user_skills = $skill_rel_user->get_user_skills($user['user_id']);
74 74
         $user_skills = array();
75
-        $found_counts = 0 ;
75
+        $found_counts = 0;
76 76
         foreach ($my_user_skills as $my_skill) {
77 77
             $found = false;
78 78
             if (in_array($my_skill['skill_id'], $skills)) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $user_list[$user['user_id']]['total_found_skills'] = $found_counts;
90 90
     }
91 91
     $ordered_user_list = array();
92
-    foreach($user_list as $user_id => $user_data) {
92
+    foreach ($user_list as $user_id => $user_data) {
93 93
         $ordered_user_list[$user_data['total_found_skills']][] = $user_data;
94 94
     }
95 95
     if (!empty($ordered_user_list)) {
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
 
104 104
 if (!empty($skills)) {
105 105
     $counter = 0;
106
-    foreach($skills as $hidden_skill_id) {
106
+    foreach ($skills as $hidden_skill_id) {
107 107
         $form->addElement('hidden', 'hidden_skills[]', $hidden_skill_id);
108 108
         $counter++;
109 109
     }
110 110
 }
111 111
 
112 112
 if (!empty($skills)) {
113
-    foreach($skills as $my_skill) {
113
+    foreach ($skills as $my_skill) {
114 114
         $total_skills_to_search[$my_skill] = $my_skill;
115 115
     }
116 116
 }
Please login to merge, or discard this patch.
main/admin/configure_extensions.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@  discard block
 block discarded – undo
4 4
  * Edition of extensions configuration
5 5
  * @package chamilo.admin
6 6
  */
7
-$cidReset=true;
7
+$cidReset = true;
8 8
 require_once '../inc/global.inc.php';
9
-$this_section=SECTION_PLATFORM_ADMIN;
9
+$this_section = SECTION_PLATFORM_ADMIN;
10 10
 api_protect_admin_script();
11
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
11
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
12 12
 // Database Table Definitions
13 13
 $tbl_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
14 14
 $message = '';
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 					WHERE variable="service_visio"
22 22
 					AND subkey="active"';
23 23
 			$rs = Database::query($sql);
24
-			if (Database::affected_rows($rs)>0) {
24
+			if (Database::affected_rows($rs) > 0) {
25 25
 				// select all the courses and insert the tool inside
26 26
 				$sql = 'SELECT id FROM '.Database::get_main_table(TABLE_MAIN_COURSE);
27 27
 				$rs = Database::query($sql);
28
-				while($row = Database::fetch_array($rs)){
29
-					if(!empty($_POST['visio_host'])) {
28
+				while ($row = Database::fetch_array($rs)) {
29
+					if (!empty($_POST['visio_host'])) {
30 30
 						$tool_table = Database::get_course_table(TABLE_TOOL_LIST);
31 31
 						$select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'";
32 32
 						$selectres = Database::query($select);
33
-						if (Database::num_rows($selectres)<1) {
33
+						if (Database::num_rows($selectres) < 1) {
34 34
 							$sql = 'INSERT INTO '.$tool_table.' SET
35 35
 							        c_id =  '.$row['id'].',
36 36
 									name="'.TOOL_VISIO_CONFERENCE.'",
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 						}
46 46
 						$select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'";
47 47
 						$selectres = Database::query($select);
48
-						if(Database::num_rows($selectres)<1) {
48
+						if (Database::num_rows($selectres) < 1) {
49 49
 							$sql = 'INSERT INTO '.$tool_table.' SET
50 50
 							        c_id =  '.$row['id'].',
51 51
 									name="'.TOOL_VISIO_CLASSROOM.'",
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 			$rs = Database::query($sql);
83 83
 
84 84
 			$sql = 'UPDATE '.$tbl_settings_current.' SET
85
-					selected_value="'.($_POST['visio_use_rtmpt']=='true'?'true':'false').'"
85
+					selected_value="'.($_POST['visio_use_rtmpt'] == 'true' ? 'true' : 'false').'"
86 86
 					WHERE variable="service_visio"
87 87
 					AND subkey="visio_use_rtmpt"';
88 88
 			$rs = Database::query($sql);
89 89
 
90
-			if(empty($message)) {
90
+			if (empty($message)) {
91 91
 				$message = get_lang('ServiceReconfigured');
92 92
 			}
93 93
 			break;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 			$rs = Database::query($sql);
102 102
 
103
-			if (Database::affected_rows($rs)>0){
103
+			if (Database::affected_rows($rs) > 0) {
104 104
 				$message = get_lang('ServiceActivated');
105 105
 			}
106 106
 
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
 		WHERE variable LIKE "service_%" AND subkey="active" and selected_value="true"';
154 154
 
155 155
 $rs = Database::query($sql);
156
-while($row = Database::fetch_array($rs)){
156
+while ($row = Database::fetch_array($rs)) {
157 157
 	$listActiveServices[] = $row['variable'];
158 158
 }
159 159
 
160 160
 // javascript to handle accordion behaviour
161 161
 $javascript_message = '';
162
-if(!empty($message)){
162
+if (!empty($message)) {
163 163
 	$javascript_message =
164 164
 	'
165 165
 	document.getElementById("message").style.display = "block";
166 166
 	var timer = setTimeout(hideMessage,5000);
167 167
 	';
168 168
 }
169
-$htmlHeadXtra[]= '
169
+$htmlHeadXtra[] = '
170 170
 <script type="text/javascript">
171 171
 var listeDiv;
172 172
 var extensionsHeader = new Array();
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 ?>
216 216
 <div id="message" style="display: none">
217 217
 	<?php
218
-	if(!empty($message))
218
+	if (!empty($message))
219 219
 		Display::display_normal_message($message)
220 220
 	?>
221 221
 </div>
@@ -330,13 +330,13 @@  discard block
 block discarded – undo
330 330
 						$renderer = $form -> defaultRenderer();
331 331
 						$renderer -> setElementTemplate('<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>');
332 332
 						//$form -> addElement('html','<br /><br />');
333
-						if(in_array('service_ppt2lp',$listActiveServices))
333
+						if (in_array('service_ppt2lp', $listActiveServices))
334 334
 						{
335 335
 							$sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.'
336 336
 									WHERE variable = "service_ppt2lp"
337 337
 									AND subkey <> "active"';
338 338
 							$rs = Database::query($sql);
339
-							while($row = Database::fetch_array($rs,'ASSOC'))
339
+							while ($row = Database::fetch_array($rs, 'ASSOC'))
340 340
 							{
341 341
 								$defaults[$row['subkey']] = $row['selected_value'];
342 342
 							}
Please login to merge, or discard this patch.
main/admin/extra_field_options.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 $htmlHeadXtra[] = api_get_jqgrid_js();
19 19
 
20 20
 // setting breadcrumbs
21
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
21
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22 22
 
23 23
 $tool_name = null;
24 24
 
@@ -39,23 +39,23 @@  discard block
 block discarded – undo
39 39
 $token = Security::get_token();
40 40
 
41 41
 if ($action == 'add') {
42
-    $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName);
43
-    $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'],'name' => $extra_field_info['display_text']);
44
-    $interbreadcrumb[]=array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions'));
45
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
42
+    $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName);
43
+    $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'], 'name' => $extra_field_info['display_text']);
44
+    $interbreadcrumb[] = array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions'));
45
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add'));
46 46
 } elseif ($action == 'edit') {
47
-    $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName);
48
-    $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'],'name' => $extra_field_info['display_text']);
49
-    $interbreadcrumb[]=array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions'));
47
+    $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName);
48
+    $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'], 'name' => $extra_field_info['display_text']);
49
+    $interbreadcrumb[] = array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions'));
50 50
 
51
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
51
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit'));
52 52
 } else {
53
-    $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName);
54
-    $interbreadcrumb[]=array(
53
+    $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName);
54
+    $interbreadcrumb[] = array(
55 55
         'url' =>  'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'],
56 56
         'name' => $extra_field_info['display_text']
57 57
     );
58
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('EditExtraFieldOptions'));
58
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditExtraFieldOptions'));
59 59
 }
60 60
 
61 61
 //jqgrid will use this URL to do the selects
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
 
109 109
 //With this function we can add actions to the jgrid (edit, delete, etc)
110 110
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
111
-    return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
112
-    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("ConfirmYourChoice"))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
111
+    return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
112
+    '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("ConfirmYourChoice"))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
113 113
     '\';
114 114
  }';
115 115
 
116
-$htmlHeadXtra[]='<script>
116
+$htmlHeadXtra[] = '<script>
117 117
 $(function() {
118 118
     // grid definition see the $obj->display() function
119 119
     '.Display::grid_js(
Please login to merge, or discard this patch.