Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
main/admin/cli.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 $this_section = SECTION_PLATFORM_ADMIN;
12 12
 // User permissions
13 13
 api_protect_admin_script();
14
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
15 15
 Display :: display_header(get_lang('SystemStatus'));
16 16
 $diag = new Diagnoser();
17 17
 $diag->show_html();
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 switch ($_GET["cmd"]) {
29 29
     case "clear_stapi":
30 30
       echo "Are you sure you are willing to erease all storage api data (no backup)? <a href='cli.php?cmd=clear_stapi_confirm' >Yes</a>";
31
-      break;
31
+        break;
32 32
     case "clear_stapi_confirm":
33 33
       Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES));
34
-      Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK));
35
-      echo "Done";
36
-      break;
34
+        Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK));
35
+        echo "Done";
36
+        break;
37 37
     default:
38 38
       echo "UNKNOWN COMMAND";
39
-      break;
39
+        break;
40 40
 }
41 41
 /**
42 42
  * Footer 
Please login to merge, or discard this patch.
main/admin/add_sessions_to_usergroup.php 3 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,10 @@
 block discarded – undo
144 144
 echo '</div>';
145 145
 ?>
146 146
 
147
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
147
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
148
+    echo '&add=true' ;
149
+}
150
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
148 151
 <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>';
149 152
 
150 153
 if ($add_type=='multiple') {
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
       <option value = "%">--</option>
198 198
       <?php
199 199
         echo Display :: get_alphabet_options();
200
-      ?>
200
+        ?>
201 201
      </select>
202 202
 </td>
203 203
 <td align="center">&nbsp;</td>
@@ -207,31 +207,31 @@  discard block
 block discarded – undo
207 207
   <td align="center">
208 208
   <div id="content_source">
209 209
       <?php
210
-      if (!($add_type=='multiple')) {
210
+        if (!($add_type=='multiple')) {
211 211
         ?>
212 212
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
213 213
         <div id="ajax_list_users_single"></div>
214 214
         <?php
215
-      } else {
216
-      ?>
215
+        } else {
216
+        ?>
217 217
       <div id="ajax_list_multiple">
218 218
         <?php echo Display::select('session_not_in_promotion_name',$session_not_in_promotion, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'session_not_in_promotion','size'=>'15px'),false); ?>
219 219
       </div>
220 220
     <?php
221
-      }
222
-     ?>
221
+        }
222
+        ?>
223 223
   </div>
224 224
   </td>
225 225
   <td width="10%" valign="middle" align="center">
226 226
   <?php
227
-  if ($ajax_search) {
228
-  ?>
227
+    if ($ajax_search) {
228
+    ?>
229 229
     <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('session_in_promotion'))" >
230 230
         <em class="fa fa-arrow-left"></em>
231 231
     </button>
232 232
   <?php
233
-  } else {
234
-  ?>
233
+    } else {
234
+    ?>
235 235
     <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))">
236 236
         <em class="fa fa-arrow-right"></em>
237 237
     </button>
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
         <em class="fa fa-arrow-left"></em>
241 241
     </button>
242 242
     <?php
243
-  }
244
-  ?>
243
+    }
244
+    ?>
245 245
     <br /><br /><br /><br /><br /><br />
246 246
   </td>
247 247
   <td align="center">
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 api_protect_admin_script(true);
22 22
 
23 23
 // setting breadcrumbs
24
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
25
-$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Classes'));
24
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
25
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
26 26
 
27 27
 // Database Table Definitions
28 28
 
29 29
 // setting the name of the tool
30
-$tool_name=get_lang('SubscribeClassToSessions');
30
+$tool_name = get_lang('SubscribeClassToSessions');
31 31
 
32 32
 $add_type = 'multiple';
33
-if(isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
33
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
34 34
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
35 35
 }
36 36
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 function display_advanced_search () {
66 66
         if ($("#advancedSearch").css("display") == "none") {
67 67
                 $("#advancedSearch").css("display","block");
68
-                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
68
+                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif', get_lang('Hide'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
69 69
         } else {
70 70
                 $("#advancedSearch").css("display","none");
71
-                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
71
+                $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
72 72
         }
73 73
 }
74 74
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 $form_sent  = 0;
84 84
 $errorMsg   = '';
85
-$sessions=array();
85
+$sessions = array();
86 86
 $usergroup = new UserGroup();
87 87
 $id = intval($_GET['id']);
88 88
 if (isset($_POST['form_sent']) && $_POST['form_sent']) {
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 $session_list       = SessionManager::get_sessions_list(array(), array('name'));
104 104
 
105 105
 //api_display_tool_title($tool_name.' ('.$session_info['name'].')');
106
-$elements_not_in = $elements_in= array();
106
+$elements_not_in = $elements_in = array();
107 107
 
108 108
 if (!empty($session_list)) {
109
-    foreach($session_list as $session) {
109
+    foreach ($session_list as $session) {
110 110
         if (in_array($session['id'], $session_list_in)) {
111 111
             $elements_in[$session['id']] = $session['name'];
112 112
         } else {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 //checking for extra field with filter on
121 121
 
122
-function search_usergroup_sessions($needle,$type) {
122
+function search_usergroup_sessions($needle, $type) {
123 123
     global $elements_in;
124 124
     $xajax_response = new xajaxResponse();
125 125
     $return = '';
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
                 array('s.name' => array('operator' => 'LIKE', 'value' => "$needle%"))
135 135
             );
136 136
         }
137
-        $i=0;
137
+        $i = 0;
138 138
         if ($type != 'single') {
139 139
             $return .= '<select id="elements_not_in" name="elements_not_in_name[]" multiple="multiple" size="15" style="width:360px;">';
140 140
 
141
-            foreach ($session_list as $row ) {
141
+            foreach ($session_list as $row) {
142 142
                 if (!in_array($row['id'], array_keys($elements_in))) {
143 143
                     $return .= '<option value="'.$row['id'].'">'.$row['name'].'</option>';
144 144
                 }
145 145
             }
146 146
             $return .= '</select>';
147
-            $xajax_response -> addAssign('ajax_list_multiple','innerHTML',api_utf8_encode($return));
147
+            $xajax_response -> addAssign('ajax_list_multiple', 'innerHTML', api_utf8_encode($return));
148 148
         }
149 149
     }
150 150
 
@@ -156,30 +156,30 @@  discard block
 block discarded – undo
156 156
 
157 157
 $add = (empty($_GET['add']) ? '' : Security::remove_XSS($_GET['add']));
158 158
 if ($add_type == 'multiple') {
159
-    $link_add_type_unique = '<a href="' . api_get_self() . '?add=' . $add . '&add_type=unique">'.
159
+    $link_add_type_unique = '<a href="'.api_get_self().'?add='.$add.'&add_type=unique">'.
160 160
         Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
161 161
     $link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
162 162
 } else {
163 163
     $link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
164
-    $link_add_type_multiple = '<a href="' . api_get_self() . '?add=' . $add . '&add_type=multiple">'.
164
+    $link_add_type_multiple = '<a href="'.api_get_self().'?add='.$add.'&add_type=multiple">'.
165 165
         Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
166 166
 }
167 167
 
168 168
 echo '<div class="actions">';
169
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
169
+echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
170 170
 echo '<a href="javascript://" class="advanced_parameters" style="margin-top: 8px" onclick="display_advanced_search();"><span id="img_plus_and_minus">&nbsp;'.
171
-    Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'</span></a>';
171
+    Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).' '.get_lang('AdvancedSearch').'</span></a>';
172 172
 echo '</div>';
173
-echo '<div id="advancedSearch" style="display: none">'. get_lang('SearchSessions'); ?> :
173
+echo '<div id="advancedSearch" style="display: none">'.get_lang('SearchSessions'); ?> :
174 174
      <input name="SearchSession" onchange = "xajax_search_usergroup_sessions(this.value,'searchbox')" onkeyup="this.onchange()">
175 175
      </div>
176
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
176
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
177 177
 <?php
178 178
 echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
179
-echo Display::input('hidden','id',$id);
180
-echo Display::input('hidden','form_sent','1');
181
-echo Display::input('hidden','add_type',null);
182
-if(!empty($errorMsg)) {
179
+echo Display::input('hidden', 'id', $id);
180
+echo Display::input('hidden', 'form_sent', '1');
181
+echo Display::input('hidden', 'add_type', null);
182
+if (!empty($errorMsg)) {
183 183
     Display::display_normal_message($errorMsg); //main API
184 184
 }
185 185
 ?>
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
   <td align="center"><b><?php echo get_lang('SessionsInGroup') ?> :</b></td>
193 193
 </tr>
194 194
 
195
-<?php if ($add_type=='multiple') { ?>
195
+<?php if ($add_type == 'multiple') { ?>
196 196
 <tr>
197 197
 <td align="center">
198 198
 <?php echo get_lang('FirstLetterSessions'); ?> :
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
   <td align="center">
212 212
   <div id="content_source">
213 213
       <?php
214
-      if (!($add_type=='multiple')) {
214
+      if (!($add_type == 'multiple')) {
215 215
         ?>
216 216
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
217 217
         <div id="ajax_list_users_single"></div>
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
       } else {
220 220
       ?>
221 221
       <div id="ajax_list_multiple">
222
-        <?php echo Display::select('elements_not_in_name',$elements_not_in, '',array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
222
+        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
223 223
       </div>
224 224
     <?php
225 225
       }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
   </td>
251 251
   <td align="center">
252 252
 <?php
253
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
253
+    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false);
254 254
     unset($sessionUsersList);
255 255
 ?>
256 256
  </td>
Please login to merge, or discard this patch.
main/admin/inactive_user_list.php 2 patches
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
     @author Andre Boivin base code
5 5
 	@author Julio Montoya fixing lot of little details
6 6
 	@todo this script is not ready for a production use that's why I'm commenting the function delete_inactive_student
7
-
8
-*	@package chamilo.admin
7
+ *	@package chamilo.admin
9 8
 *	script pour effacer les user inactif depuis x temps
10 9
 */
11 10
 $cidReset = true;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 Display :: display_header($tool_name);
24 24
 
25 25
 //On sélectionne les user élèves
26
-$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
26
+$sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname ";
27 27
 $result = Database::query($sql);
28 28
 
29 29
 while ($row = Database::fetch_array($result)) {
Please login to merge, or discard this patch.
main/admin/course_request_accepted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     $from = intval($from);
115 115
     $number_of_items = intval($number_of_items);
116 116
     $column = intval($column);
117
-    $direction = !in_array(strtolower(trim($direction)), ['asc','desc']) ? 'asc' : $direction;
117
+    $direction = !in_array(strtolower(trim($direction)), ['asc', 'desc']) ? 'asc' : $direction;
118 118
 
119 119
     $sql = "SELECT
120 120
                 id AS col0,
Please login to merge, or discard this patch.
main/social/skills_wheel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$load_user";
38 38
 $tpl->assign('wheel_url', $url);
39 39
 
40
-$url  = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
40
+$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
41 41
 $tpl->assign('url', $url);
42 42
 $tpl->assign('isAdministration', true);
43 43
 
Please login to merge, or discard this patch.
main/group/import.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 require_once '../inc/global.inc.php';
14 14
 $this_section = SECTION_COURSES;
15
-$current_course_tool  = TOOL_GROUP;
15
+$current_course_tool = TOOL_GROUP;
16 16
 
17 17
 // Notice for unauthorized people.
18 18
 api_protect_course_script(true);
Please login to merge, or discard this patch.
main/survey/ch_dropdown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             $options[$key] = $value;
22 22
         }
23 23
 
24
-        $name = 'question' . $questionData['question_id'];
24
+        $name = 'question'.$questionData['question_id'];
25 25
 
26 26
         $form->addSelect(
27 27
             $name, null, $options
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_courses_to_url_functions.lib.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,17 +44,17 @@
 block discarded – undo
44 44
                     ORDER BY name, id
45 45
                     LIMIT 11';
46 46
             $rs = Database::query($sql);
47
-            $i=0;
47
+            $i = 0;
48 48
             while ($session = Database :: fetch_array($rs)) {
49 49
                 $i++;
50
-                if ($i<=10) {
50
+                if ($i <= 10) {
51 51
                      $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
55 55
             }
56 56
         }
57
-        $xajax_response -> addAssign('ajax_list_courses','innerHTML',api_utf8_encode($return));
57
+        $xajax_response -> addAssign('ajax_list_courses', 'innerHTML', api_utf8_encode($return));
58 58
         return $xajax_response;
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,17 +38,17 @@
 block discarded – undo
38 38
             $needle = Database::escape_string($needle);
39 39
             // search courses where username or firstname or lastname begins likes $needle
40 40
             $sql = 'SELECT code, title FROM '.$tbl_course.' u '.
41
-                   ' WHERE (title LIKE "'.$needle.'%" '.
42
-                   ' OR code LIKE "'.$needle.'%" '.
43
-                   ' ) '.
44
-                   ' ORDER BY title, code '.
45
-                   ' LIMIT 11';
41
+                    ' WHERE (title LIKE "'.$needle.'%" '.
42
+                    ' OR code LIKE "'.$needle.'%" '.
43
+                    ' ) '.
44
+                    ' ORDER BY title, code '.
45
+                    ' LIMIT 11';
46 46
             $rs = Database::query($sql);
47 47
             $i=0;
48 48
             while ($course = Database :: fetch_array($rs)) {
49 49
                 $i++;
50 50
                 if ($i<=10) {
51
-                     $return .= '<a href="javascript: void(0);" onclick="javascript: add_user_to_url(\''.addslashes($course['code']).'\',\''.addslashes($course['title']).' ('.addslashes($course['code']).')'.'\')">'.$course['title'].' ('.$course['code'].')</a><br />';
51
+                        $return .= '<a href="javascript: void(0);" onclick="javascript: add_user_to_url(\''.addslashes($course['code']).'\',\''.addslashes($course['title']).' ('.addslashes($course['code']).')'.'\')">'.$course['title'].' ('.$course['code'].')</a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
Please login to merge, or discard this patch.
main/inc/lib/internationalization_database/transliteration/x03.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 // $Id: xfd.php,v 1.1.8.1 2008/06/12 20:34:32 smk Exp $
3 3
 
4 4
 return array(
5
-  'en' => array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
5
+    'en' => array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
6 6
     '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
7 7
     '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
8 8
     '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
Please login to merge, or discard this patch.