Passed
Push — 1.10.x ( b8d3c5...c1c0ee )
by Angel Fernando Quiroz
296:52 queued 257:06
created
main/document/show_content.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -91,16 +91,16 @@
 block discarded – undo
91 91
 $pathinfo = pathinfo($header_file);
92 92
 
93 93
 if ($pathinfo['extension']=='wav' && preg_match('/_chnano_.wav/i', $file_url_web) && api_get_setting('enable_nanogong') == 'true'){
94
-	echo '<div align="center">';
95
-		echo '<br/>';
96
-		echo '<applet id="applet" archive="../inc/lib/nanogong/nanogong.jar" code="gong.NanoGong" width="160" height="95" >';
97
-			echo '<param name="SoundFileURL" value="'.$file_url_web.'" />';
98
-			echo '<param name="ShowSaveButton" value="false" />';
99
-			echo '<param name="ShowTime" value="true" />';
100
-			echo '<param name="ShowRecordButton" value="false" />';
101
-		echo '</applet>';
102
-	echo '</div>';
94
+    echo '<div align="center">';
95
+        echo '<br/>';
96
+        echo '<applet id="applet" archive="../inc/lib/nanogong/nanogong.jar" code="gong.NanoGong" width="160" height="95" >';
97
+            echo '<param name="SoundFileURL" value="'.$file_url_web.'" />';
98
+            echo '<param name="ShowSaveButton" value="false" />';
99
+            echo '<param name="ShowTime" value="true" />';
100
+            echo '<param name="ShowRecordButton" value="false" />';
101
+        echo '</applet>';
102
+    echo '</div>';
103 103
 } else {
104
-	if ($pathinfo['extension']=='swf') { $width='83%'; $height='83%';} else {$width='100%'; $height='100%';}
105
-	echo '<iframe border="0" frameborder="0" scrolling="no" style="width:'.$width.'; height:'.$height.';background-color:#ffffff;" id="mainFrame" name="mainFrame" src="'.$file_url_web.'?'.api_get_cidreq().'&amp;rand='.mt_rand(1, 1000).'"></iframe>';
104
+    if ($pathinfo['extension']=='swf') { $width='83%'; $height='83%';} else {$width='100%'; $height='100%';}
105
+    echo '<iframe border="0" frameborder="0" scrolling="no" style="width:'.$width.'; height:'.$height.';background-color:#ffffff;" id="mainFrame" name="mainFrame" src="'.$file_url_web.'?'.api_get_cidreq().'&amp;rand='.mt_rand(1, 1000).'"></iframe>';
106 106
 }
Please login to merge, or discard this patch.
main/upload/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $result = $objExercise->read($exercise_id);
18 18
 
19 19
 if (!$result) {
20
-	api_not_allowed(true);
20
+    api_not_allowed(true);
21 21
 }
22 22
 
23 23
 $interbreadcrumb[] = array(
Please login to merge, or discard this patch.
main/upload/upload.document.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
  */
49 49
 //user has submitted a file
50 50
 if (isset($_FILES['user_upload'])) {
51
-	$upload_ok = process_uploaded_file($_FILES['user_upload']);
52
-	if ($upload_ok) {
53
-		//file got on the server without problems, now process it
51
+    $upload_ok = process_uploaded_file($_FILES['user_upload']);
52
+    if ($upload_ok) {
53
+        //file got on the server without problems, now process it
54 54
         $new_path = handle_uploaded_document(
55 55
             $_course,
56 56
             $_FILES['user_upload'],
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
             $_POST['unzip'],
63 63
             $_POST['if_exists']
64 64
         );
65
-    	$new_comment = isset($_POST['comment']) ? trim($_POST['comment']) : '';
66
-    	$new_title = isset($_POST['title']) ? trim($_POST['title']) : '';
65
+        $new_comment = isset($_POST['comment']) ? trim($_POST['comment']) : '';
66
+        $new_title = isset($_POST['title']) ? trim($_POST['title']) : '';
67 67
 
68
-    	if ($new_path && ($new_comment || $new_title))
69
-    	if (($docid = DocumentManager::get_document_id($_course, $new_path))) {
70
-        	$table_document = Database::get_course_table(TABLE_DOCUMENT);
71
-        	$ct = '';
72
-        	if ($new_comment) $ct .= ", comment='$new_comment'";
73
-        	if ($new_title)   $ct .= ", title='$new_title'";
74
-        	Database::query("UPDATE $table_document SET" . substr($ct, 1) ." WHERE id = '$docid'");
75
-    	}
68
+        if ($new_path && ($new_comment || $new_title))
69
+        if (($docid = DocumentManager::get_document_id($_course, $new_path))) {
70
+            $table_document = Database::get_course_table(TABLE_DOCUMENT);
71
+            $ct = '';
72
+            if ($new_comment) $ct .= ", comment='$new_comment'";
73
+            if ($new_title)   $ct .= ", title='$new_title'";
74
+            Database::query("UPDATE $table_document SET" . substr($ct, 1) ." WHERE id = '$docid'");
75
+        }
76 76
         //check for missing images in html files
77 77
         $missing_files = check_for_missing_files($base_work_dir.$_POST['curdirpath'].$new_path);
78 78
         if ($missing_files)  {
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 }
129 129
 //they want to create a directory
130 130
 if (isset($_POST['create_dir']) && $_POST['dirname']!='') {
131
-	$added_slash = ($path=='/')?'':'/';
132
-	$dir_name = $path.$added_slash.api_replace_dangerous_char($_POST['dirname']);
131
+    $added_slash = ($path=='/')?'':'/';
132
+    $dir_name = $path.$added_slash.api_replace_dangerous_char($_POST['dirname']);
133 133
     $created_dir = create_unexisting_directory(
134 134
         $_course,
135 135
         $_user['user_id'],
@@ -149,15 +149,15 @@  discard block
 block discarded – undo
149 149
 }
150 150
 
151 151
 if (isset($_GET['createdir'])) {
152
-	//create the form that asks for the directory name
153
-	$new_folder_text = '<form action="'.api_get_self().'" method="POST">';
154
-	$new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>';
155
-	$new_folder_text .= get_lang('NewDir') .' ';
156
-	$new_folder_text .= '<input type="text" name="dirname"/>';
157
-	$new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>';
158
-	$new_folder_text .= '</form>';
159
-	//show the form
160
-	Display::display_normal_message($new_folder_text);
152
+    //create the form that asks for the directory name
153
+    $new_folder_text = '<form action="'.api_get_self().'" method="POST">';
154
+    $new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>';
155
+    $new_folder_text .= get_lang('NewDir') .' ';
156
+    $new_folder_text .= '<input type="text" name="dirname"/>';
157
+    $new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>';
158
+    $new_folder_text .= '</form>';
159
+    //show the form
160
+    Display::display_normal_message($new_folder_text);
161 161
 } else {	//give them a link to create a directory
162 162
 ?>
163 163
 	<p>
Please login to merge, or discard this patch.
main/auth/lostPassword.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $result = $objExercise->read($exercise_id);
18 18
 
19 19
 if (!$result) {
20
-	api_not_allowed(true);
20
+    api_not_allowed(true);
21 21
 }
22 22
 
23 23
 $interbreadcrumb[] = array(
Please login to merge, or discard this patch.
main/admin/access_url_edit_users_to_url.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
     ?>
262 262
     <option value="<?php echo $enreg['user_id']; ?>"><?php echo $enreg['username'].' - '.api_get_person_name($enreg['firstname'], $enreg['lastname']); ?></option>
263 263
     <?php
264
-     }
264
+        }
265 265
     unset($nosessionUsersList);
266 266
     ?>
267 267
     </select>
Please login to merge, or discard this patch.
main/admin/ldap_users_synchro.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@
 block discarded – undo
60 60
 
61 61
 <?php
62 62
 if (isset($action) && ($action=="synchro")) {
63
-	$included=true;
64
-	require('ldap_synchro.php');
65
-	Display :: display_normal_message($message,false);
63
+    $included=true;
64
+    require('ldap_synchro.php');
65
+    Display :: display_normal_message($message,false);
66 66
 }
67 67
 Display::display_footer();
68 68
 ?>
Please login to merge, or discard this patch.
main/admin/archive_cleanup.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -24,39 +24,39 @@
 block discarded – undo
24 24
 $message = null;
25 25
 
26 26
 if ($form->validate()) {
27
-	$archive_path = api_get_path(SYS_ARCHIVE_PATH);
28
-	$htaccess = @file_get_contents($archive_path.'.htaccess');
29
-	$result = rmdirr($archive_path, true, true);
27
+    $archive_path = api_get_path(SYS_ARCHIVE_PATH);
28
+    $htaccess = @file_get_contents($archive_path.'.htaccess');
29
+    $result = rmdirr($archive_path, true, true);
30 30
 
31
-	\Chamilo\CoreBundle\Composer\ScriptHandler::dumpCssFiles();
31
+    \Chamilo\CoreBundle\Composer\ScriptHandler::dumpCssFiles();
32 32
 
33
-	if (!empty($htaccess)) {
34
-		@file_put_contents($archive_path.'/.htaccess', $htaccess);
35
-	}
36
-	if ($result) {
37
-		$message = 'ArchiveDirCleanupSucceeded';
38
-		$type = 'confirmation';
39
-	} else {
40
-		$message = 'ArchiveDirCleanupFailed';
41
-		$type = 'error';
42
-	}
33
+    if (!empty($htaccess)) {
34
+        @file_put_contents($archive_path.'/.htaccess', $htaccess);
35
+    }
36
+    if ($result) {
37
+        $message = 'ArchiveDirCleanupSucceeded';
38
+        $type = 'confirmation';
39
+    } else {
40
+        $message = 'ArchiveDirCleanupFailed';
41
+        $type = 'error';
42
+    }
43 43
 
44
-	header('Location: '.api_get_self().'?msg='.$message.'&type='.$type);
45
-	exit;
44
+    header('Location: '.api_get_self().'?msg='.$message.'&type='.$type);
45
+    exit;
46 46
 }
47 47
 
48 48
 Display::display_header(get_lang('ArchiveDirCleanup'));
49 49
 Display::display_warning_message(get_lang('ArchiveDirCleanupDescr'));
50 50
 
51 51
 if (isset($_GET['msg']) && isset($_GET['type'])) {
52
-	if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed')))
53
-	switch($_GET['type']) {
54
-		case 'error':
55
-			$message = Display::return_message(get_lang($_GET['msg']), 'error');
56
-			break;
57
-		case 'confirmation':
58
-			$message = Display::return_message(get_lang($_GET['msg']), 'confirm');
59
-	}
52
+    if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed')))
53
+    switch($_GET['type']) {
54
+        case 'error':
55
+            $message = Display::return_message(get_lang($_GET['msg']), 'error');
56
+            break;
57
+        case 'confirmation':
58
+            $message = Display::return_message(get_lang($_GET['msg']), 'confirm');
59
+    }
60 60
 }
61 61
 
62 62
 if (!empty($message)) {
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
@@ -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.
main/admin/event_controller.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     }
32 32
 
33 33
     public function deleteAction($id) {
34
-         $event_email_template = new EventEmailTemplate();
34
+            $event_email_template = new EventEmailTemplate();
35 35
         return $event_email_template->delete($id);
36 36
     }
37 37
 }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                         array('name'=>'language_id',        'index'=>'language_id',        'width'=>'80',   'align'=>'left'),
74 74
                         array('name'=>'activated',        'index'=>'activated',        'width'=>'80',   'align'=>'left'),
75 75
                         array('name'=>'actions',        'index'=>'actions',     'width'=>'100')
76
-                       );
76
+                        );
77 77
 //Autowidth
78 78
 $extra_params['autowidth'] = 'true';
79 79
 //height auto
Please login to merge, or discard this patch.