Completed
Push — 1.11.x ( 55a6a1...a914dc )
by José
60:32 queued 35:06
created
main/messages/view_message.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,40 +7,40 @@
 block discarded – undo
7 7
 require_once __DIR__.'/../inc/global.inc.php';
8 8
 api_block_anonymous_users();
9 9
 if (api_get_setting('allow_message_tool')!='true') {
10
-	api_not_allowed();
10
+    api_not_allowed();
11 11
 }
12 12
 
13 13
 if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') {
14
-	$this_section = SECTION_SOCIAL;
15
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
16
-	$interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox'));
14
+    $this_section = SECTION_SOCIAL;
15
+    $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
16
+    $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox'));
17 17
 } else {
18
-	$this_section = SECTION_MYPROFILE;
19
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
18
+    $this_section = SECTION_MYPROFILE;
19
+    $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
20 20
 }
21 21
 
22 22
 $social_right_content = '';
23 23
 
24 24
 if (isset($_GET['f']) && $_GET['f']=='social') {
25
-	$social_parameter = '?f=social';
25
+    $social_parameter = '?f=social';
26 26
 } else {
27
-	if (api_get_setting('extended_profile') == 'true') {
28
-		$social_right_content .= '<div class="actions">';
27
+    if (api_get_setting('extended_profile') == 'true') {
28
+        $social_right_content .= '<div class="actions">';
29 29
 
30
-		if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') {
31
-			$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
30
+        if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') {
31
+            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
32 32
                 Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
33
-		}
34
-		if (api_get_setting('allow_message_tool') === 'true') {
35
-		    $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
33
+        }
34
+        if (api_get_setting('allow_message_tool') === 'true') {
35
+            $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
36 36
                 Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>';
37 37
             $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
38 38
                 Display::return_icon('inbox.png',get_lang('Inbox')).'</a>';
39 39
             $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
40 40
                 Display::return_icon('outbox.png',get_lang('Outbox')).'</a>';
41
-		}
42
-		$social_right_content .= '</div>';
43
-	}
41
+        }
42
+        $social_right_content .= '</div>';
43
+    }
44 44
 }
45 45
 
46 46
 if (empty($_GET['id'])) {
Please login to merge, or discard this patch.
main/messages/outbox.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,20 +9,20 @@  discard block
 block discarded – undo
9 9
 api_block_anonymous_users();
10 10
 
11 11
 if (isset($_GET['messages_page_nr'])) {
12
-	if (api_get_setting('allow_social_tool')=='true' &&
12
+    if (api_get_setting('allow_social_tool')=='true' &&
13 13
         api_get_setting('allow_message_tool')=='true'
14 14
     ) {
15
-		$social_link = '';
16
-		if ($_REQUEST['f']=='social') {
17
-			$social_link = '&f=social';
18
-		}
19
-		header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.'');
20
-		exit;
21
-	}
15
+        $social_link = '';
16
+        if ($_REQUEST['f']=='social') {
17
+            $social_link = '&f=social';
18
+        }
19
+        header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.'');
20
+        exit;
21
+    }
22 22
 }
23 23
 
24 24
 if (api_get_setting('allow_message_tool') != 'true') {
25
-	api_not_allowed();
25
+    api_not_allowed();
26 26
 }
27 27
 //jquery thickbox already called from main/inc/header.inc.php
28 28
 
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		MAIN CODE
51 51
 */
52 52
 if (isset($_GET['f']) && $_GET['f'] === 'social') {
53
-	$this_section = SECTION_SOCIAL;
54
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
55
-	$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
53
+    $this_section = SECTION_SOCIAL;
54
+    $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
55
+    $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
56 56
 } else {
57
-	$this_section = SECTION_MYPROFILE;
58
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
59
-	$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
57
+    $this_section = SECTION_MYPROFILE;
58
+    $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
59
+    $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
60 60
 }
61 61
 
62 62
 $actions = '';
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 
84 84
 if (isset($info_delete_outbox[0]) && trim($info_delete_outbox[0]) == 'delete') {
85 85
     for ($i = 1; $i <= $count_delete_outbox; $i++) {
86
-		MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]);
87
-	}
86
+        MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]);
87
+    }
88 88
     $message_box=get_lang('SelectedMessagesDeleted').
89 89
         '&nbsp
90 90
         <br><a href="../social/index.php?#remote-tab-3">'.
Please login to merge, or discard this patch.
main/gradebook/lib/be/category.class.php 1 patch
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -1583,7 +1583,6 @@  discard block
 block discarded – undo
1583 1583
      * @param string $course_code Course code (optional)
1584 1584
      * @param int    $session_id Session ID (optional)
1585 1585
      * @param bool   $order
1586
-
1587 1586
      * @return array Array of subcategories
1588 1587
      */
1589 1588
     public function get_subcategories($stud_id = null, $course_code = null, $session_id = null, $order = null)
@@ -1862,7 +1861,6 @@  discard block
 block discarded – undo
1862 1861
      * This function, locks a category , only one who can unlock it is
1863 1862
      * the platform administrator.
1864 1863
      * @param int locked 1 or unlocked 0
1865
-
1866 1864
      * @return boolean|null
1867 1865
      * */
1868 1866
     public function lock($locked)
Please login to merge, or discard this patch.
main/gradebook/lib/be/exerciselink.class.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
         in exercise/exercise.php, look for note-query-exe-results marker*/
195 195
         $session_id = $this->get_session_id();
196 196
         $courseId = $this->getCourseId();
197
-	    $exercise = new Exercise($courseId);
197
+        $exercise = new Exercise($courseId);
198 198
         $exercise->read($this->get_ref_id());
199 199
 
200 200
         if (!$this->is_hp) {
201 201
 
202
-		if ($exercise->exercise_was_added_in_lp == false) {
203
-			$sql = "SELECT * FROM $tblStats
202
+        if ($exercise->exercise_was_added_in_lp == false) {
203
+            $sql = "SELECT * FROM $tblStats
204 204
 			        WHERE
205 205
 			            exe_exo_id = ".intval($this->get_ref_id())." AND
206 206
 			            orig_lp_id = 0 AND
@@ -209,15 +209,15 @@  discard block
 block discarded – undo
209 209
 			            session_id = $session_id AND
210 210
                                     c_id = $courseId
211 211
                                 ";
212
-		    } else {
213
-		        $lpId = null;
214
-		        if (!empty($exercise->lpList)) {
215
-		            // Taking only the first LP
216
-		            $lpId = current($exercise->lpList);
217
-		            $lpId = $lpId['lp_id'];
218
-		        }
219
-
220
-		        $sql = "SELECT * FROM $tblStats
212
+            } else {
213
+                $lpId = null;
214
+                if (!empty($exercise->lpList)) {
215
+                    // Taking only the first LP
216
+                    $lpId = current($exercise->lpList);
217
+                    $lpId = $lpId['lp_id'];
218
+                }
219
+
220
+                $sql = "SELECT * FROM $tblStats
221 221
 		                WHERE
222 222
 		                    exe_exo_id = ".intval($this->get_ref_id())." AND
223 223
 		                    orig_lp_id = $lpId AND
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		                    session_id = $session_id AND
226 226
                                     c_id = $courseId
227 227
                                 ";
228
-		    }
228
+            }
229 229
 
230 230
             if (!empty($stud_id) && $type != 'ranking') {
231 231
                 $sql .= " AND exe_user_id = $stud_id ";
Please login to merge, or discard this patch.
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.