Completed
Push — 1.11.x ( 39b001...e53f2f )
by José
67:52 queued 35:49
created
main/admin/cli.php 1 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/subscribe_user2course.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
       <option value="">--</option>
298 298
       <?php
299 299
         echo Display :: get_alphabet_options($first_letter_user);
300
-      ?>
300
+        ?>
301 301
      </select>
302 302
     </td>
303 303
     <td width="20%">&nbsp;</td>
@@ -308,8 +308,8 @@  discard block
 block discarded – undo
308 308
      <select name="firstLetterCourse" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();">
309 309
       <option value="">--</option>
310 310
       <?php
311
-      echo Display :: get_alphabet_options($first_letter_course);
312
-      ?>
311
+        echo Display :: get_alphabet_options($first_letter_course);
312
+        ?>
313 313
      </select>
314 314
     </td>
315 315
    </tr>
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
             $userName = $officialCode.$userName;
326 326
         }
327 327
         echo $userName;
328
-      ?>
328
+        ?>
329 329
           </option>
330 330
     <?php } ?>
331 331
     </select>
Please login to merge, or discard this patch.
main/admin/inactive_user_list.php 1 patch
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
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
7 7
    I'm commenting the function delete_inactive_student
8
-
9
-*	@package chamilo.admin
8
+ *	@package chamilo.admin
10 9
 *	script pour effacer les user inactif depuis x temps
11 10
 */
12 11
 $cidReset = true;
Please login to merge, or discard this patch.
main/admin/specific_fields.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
 $table->set_column_filter(3, 'edit_filter');
43 43
 
44 44
 function edit_filter($id,$url_params,$row) {
45
-	global $charset;
46
-	$return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>';
47
-	$return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>';
48
-	return $return;
45
+    global $charset;
46
+    $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>';
47
+    $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>';
48
+    return $return;
49 49
 }
50 50
 
51 51
 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
52
-	delete_specific_field($_REQUEST['field_id']);
53
-	header('Location: specific_fields.php?message='.get_lang('FieldRemoved'));
52
+    delete_specific_field($_REQUEST['field_id']);
53
+    header('Location: specific_fields.php?message='.get_lang('FieldRemoved'));
54 54
     exit;
55 55
 }
56 56
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 echo Display::display_normal_message(get_lang('SpecificSearchFieldsIntro'));
62 62
 
63 63
 if(!empty($_GET['message'])) {
64
-  Display::display_confirmation_message($_GET['message']);
64
+    Display::display_confirmation_message($_GET['message']);
65 65
 }
66 66
 
67 67
 echo '<div class="actions">';
Please login to merge, or discard this patch.
main/admin/add_sessions_to_usergroup.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
       <option value = "%">--</option>
201 201
       <?php
202 202
         echo Display :: get_alphabet_options();
203
-      ?>
203
+        ?>
204 204
      </select>
205 205
 <?php echo '<br />'; ?>
206 206
 </td>
@@ -211,31 +211,31 @@  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>
218 218
         <?php
219
-      } else {
220
-      ?>
219
+        } else {
220
+        ?>
221 221
       <div id="ajax_list_multiple">
222 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
-      }
226
-     ?>
225
+        }
226
+        ?>
227 227
   </div>
228 228
   </td>
229 229
   <td width="10%" valign="middle" align="center">
230 230
   <?php
231
-  if ($ajax_search) {
232
-  ?>
231
+    if ($ajax_search) {
232
+    ?>
233 233
     <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('elements_in'))" >
234 234
         <em class="fa fa-arrow-left"></em>
235 235
     </button>
236 236
   <?php
237
-  } else {
238
-  ?>
237
+    } else {
238
+    ?>
239 239
     <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'))">
240 240
         <em class="fa fa-arrow-right"></em>
241 241
     </button>
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
         <em class="fa fa-arrow-left"></em>
245 245
     </button>
246 246
     <?php
247
-  }
248
-  ?>
247
+    }
248
+    ?>
249 249
     <br /><br /><br /><br /><br /><br />
250 250
   </td>
251 251
   <td align="center">
Please login to merge, or discard this patch.
main/group/group_edit.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,9 +167,9 @@
 block discarded – undo
167 167
 // possible : number_groups_left > 0 and is group member
168 168
 $possible_users = array();
169 169
 foreach ($complete_user_list as $index => $user) {
170
-     if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) {
170
+        if ($user['number_groups_left'] > 0 || in_array($user['user_id'], $selected_users)) {
171 171
         $possible_users[$user['user_id']] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
172
-     }
172
+        }
173 173
 }
174 174
 
175 175
 $group_members_element = $form->addElement(
Please login to merge, or discard this patch.
main/course_info/delete_course.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     $message .= '<p><a class="btn btn-primary" href="'.api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq().'">'.
45 45
         get_lang('No').'</a>&nbsp;<a class="btn btn-danger" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'.
46 46
         get_lang('Yes').'</a></p>';
47
-	$interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
47
+    $interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
48 48
 }
49 49
 
50 50
 $tpl = new Template($tool_name);
Please login to merge, or discard this patch.
main/document/edit_draw.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 //path for svg-edit save
47 47
 $_SESSION['draw_dir'] = Security::remove_XSS($dir);
48 48
 if ($_SESSION['draw_dir'] == '/') {
49
-	$_SESSION['draw_dir'] = '';
49
+    $_SESSION['draw_dir'] = '';
50 50
 }
51 51
 $_SESSION['draw_file'] = basename(Security::remove_XSS($file_path));
52 52
 $get_file = Security::remove_XSS($file_path);
@@ -62,26 +62,26 @@  discard block
 block discarded – undo
62 62
 /* Please, do not modify this dirname formatting */
63 63
 
64 64
 if (strstr($dir, '..')) {
65
-	$dir = '/';
65
+    $dir = '/';
66 66
 }
67 67
 
68 68
 if ($dir[0] == '.') {
69
-	$dir = substr($dir, 1);
69
+    $dir = substr($dir, 1);
70 70
 }
71 71
 
72 72
 if ($dir[0] != '/') {
73
-	$dir = '/'.$dir;
73
+    $dir = '/'.$dir;
74 74
 }
75 75
 
76 76
 if ($dir[strlen($dir) - 1] != '/') {
77
-	$dir .= '/';
77
+    $dir .= '/';
78 78
 }
79 79
 
80 80
 $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir;
81 81
 
82 82
 if (!is_dir($filepath)) {
83
-	$filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
84
-	$dir = '/';
83
+    $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
84
+    $dir = '/';
85 85
 }
86 86
 
87 87
 //groups //TODO:clean
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
         'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
91 91
         'name' => get_lang('GroupSpace'),
92 92
     );
93
-	$group_document = true;
94
-	$noPHP_SELF = true;
93
+    $group_document = true;
94
+    $noPHP_SELF = true;
95 95
 }
96 96
 
97 97
 $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 }
118 118
 
119 119
 $is_allowedToEdit = api_is_allowed_to_edit(null, true) || $groupRights ||
120
-	DocumentManager::is_my_shared_folder(api_get_user_id(), $dir, $current_session_id);
120
+    DocumentManager::is_my_shared_folder(api_get_user_id(), $dir, $current_session_id);
121 121
 
122 122
 if (!$is_allowedToEdit) {
123
-	api_not_allowed(true);
123
+    api_not_allowed(true);
124 124
 }
125 125
 
126 126
 Event::event_access_tool(TOOL_DOCUMENT);
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 echo '</div>';
135 135
 
136 136
 if (api_browser_support('svg')) {
137
-	//automatic loading the course language
138
-	$svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
139
-	$langsvgedit  = api_get_language_isocode();
140
-	$langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
141
-	$langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'javascript/svgedit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
142
-	$svg_url = api_get_path(WEB_LIBRARY_PATH).'javascript/svgedit/svg-editor.php?url=../../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit;
143
-	?>
137
+    //automatic loading the course language
138
+    $svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
139
+    $langsvgedit  = api_get_language_isocode();
140
+    $langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
141
+    $langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'javascript/svgedit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
142
+    $svg_url = api_get_path(WEB_LIBRARY_PATH).'javascript/svgedit/svg-editor.php?url=../../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit;
143
+    ?>
144 144
 	<script>
145 145
 	document.write ('<iframe id="frame" frameborder="0" scrolling="no" src="<?php echo  $svg_url; ?>" width="100%" height="100%"><noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>');
146 146
 	function resizeIframe() {
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 
159 159
     <?php
160 160
     echo '<noscript>';
161
-	echo '<iframe style="height: 550px; width: 100%;" scrolling="no" frameborder="0\' src="'.$svg_url.'"<noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
162
-	echo '</noscript>';
161
+    echo '<iframe style="height: 550px; width: 100%;" scrolling="no" frameborder="0\' src="'.$svg_url.'"<noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
162
+    echo '</noscript>';
163 163
 } else {
164
-	Display::display_error_message(get_lang('BrowserDontSupportsSVG'));
164
+    Display::display_error_message(get_lang('BrowserDontSupportsSVG'));
165 165
 }
166 166
 Display::display_footer();
Please login to merge, or discard this patch.
main/document/webcam_clip.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 //make some vars
38 38
 $webcamdir=$dir;
39 39
 if($webcamdir=="/"){
40
- $webcamdir="";
40
+    $webcamdir="";
41 41
 }
42 42
 
43 43
 
@@ -46,49 +46,49 @@  discard block
 block discarded – undo
46 46
 // Please, do not modify this dirname formatting
47 47
 
48 48
 if (strstr($dir, '..')) {
49
-	$dir = '/';
49
+    $dir = '/';
50 50
 }
51 51
 
52 52
 if ($dir[0] == '.') {
53
-	$dir = substr($dir, 1);
53
+    $dir = substr($dir, 1);
54 54
 }
55 55
 
56 56
 if ($dir[0] != '/') {
57
-	$dir = '/'.$dir;
57
+    $dir = '/'.$dir;
58 58
 }
59 59
 
60 60
 if ($dir[strlen($dir) - 1] != '/') {
61
-	$dir .= '/';
61
+    $dir .= '/';
62 62
 }
63 63
 
64 64
 $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir;
65 65
 
66 66
 if (!is_dir($filepath)) {
67
-	$filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
68
-	$dir = '/';
67
+    $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
68
+    $dir = '/';
69 69
 }
70 70
 
71 71
 $groupId = api_get_group_id();
72 72
 
73 73
 if (!empty($groupId)) {
74
-	$interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
75
-	$noPHP_SELF = true;
76
-	$group = GroupManager :: get_group_properties($groupId);
77
-	$path = explode('/', $dir);
78
-	if ('/'.$path[1] != $group['directory']) {
79
-		api_not_allowed(true);
80
-	}
74
+    $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
75
+    $noPHP_SELF = true;
76
+    $group = GroupManager :: get_group_properties($groupId);
77
+    $path = explode('/', $dir);
78
+    if ('/'.$path[1] != $group['directory']) {
79
+        api_not_allowed(true);
80
+    }
81 81
 }
82 82
 
83 83
 $interbreadcrumb[] = array ("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents'));
84 84
 
85 85
 if (!api_is_allowed_in_course()) {
86
-	api_not_allowed(true);
86
+    api_not_allowed(true);
87 87
 }
88 88
 
89 89
 if (!($is_allowed_to_edit || $groupRights ||
90
-	DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) {
91
-	api_not_allowed(true);
90
+    DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) {
91
+    api_not_allowed(true);
92 92
 }
93 93
 
94 94
 /*	Header */
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 
97 97
 $display_dir = $dir;
98 98
 if (isset ($group)) {
99
-	$display_dir = explode('/', $dir);
100
-	unset ($display_dir[0]);
101
-	unset ($display_dir[1]);
102
-	$display_dir = implode('/', $display_dir);
99
+    $display_dir = explode('/', $dir);
100
+    unset ($display_dir[0]);
101
+    unset ($display_dir[1]);
102
+    $display_dir = implode('/', $display_dir);
103 103
 }
104 104
 
105 105
 // Interbreadcrumb for the current directory root path
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 Display :: display_header($nameTools, 'Doc');
125 125
 echo '<div class="actions">';
126 126
 echo '<a href="document.php?id='.$document_id.'">'.
127
-	Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
127
+    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
128 128
 echo '</div>';
129 129
 ?>
130 130
 
Please login to merge, or discard this patch.