Completed
Pull Request — 1.11.x (#1628)
by José
97:30 queued 69:06
created
main/upload/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
 	api_not_allowed(true);
39 39
 }
40 40
 
41
-$courseDir = $_course['path'] . "/document";
41
+$courseDir = $_course['path']."/document";
42 42
 $sys_course_path = api_get_path(SYS_COURSE_PATH);
43
-$base_work_dir = $sys_course_path . $courseDir;
43
+$base_work_dir = $sys_course_path.$courseDir;
44 44
 $noPHP_SELF = true;
45 45
 $max_filled_space = DocumentManager::get_course_quota();
46 46
 
Please login to merge, or discard this patch.
main/document/download_scorm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 $doc_url = str_replace(' ', '+', $doc_url);
40 40
 $doc_url = str_replace(array('../', '\\..', '\\0', '..\\'), array('', '', '', ''), $doc_url); //echo $doc_url;
41 41
 
42
-if (strpos($doc_url,'../') || strpos($doc_url,'/..')) {
42
+if (strpos($doc_url, '../') || strpos($doc_url, '/..')) {
43 43
     $doc_url = '';
44 44
 }
45 45
 
Please login to merge, or discard this patch.
main/inc/global.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     if (!$alreadyInstalled) {
48 48
         $global_error_code = 2;
49 49
         // The system has not been installed yet.
50
-        require_once __DIR__ . '/../inc/global_error_message.inc.php';
50
+        require_once __DIR__.'/../inc/global_error_message.inc.php';
51 51
         die();
52 52
     }
53 53
 }
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
     $request_url_root = '';
159 159
     if (empty($_SERVER['HTTP_HOST'])) {
160 160
         if (empty($_SERVER['SERVER_NAME'])) {
161
-            $request_url_root = $protocol . 'localhost/';
161
+            $request_url_root = $protocol.'localhost/';
162 162
         } else {
163
-            $request_url_root = $protocol . $_SERVER['SERVER_NAME'] . '/';
163
+            $request_url_root = $protocol.$_SERVER['SERVER_NAME'].'/';
164 164
         }
165 165
     } else {
166 166
         $request_url_root = $protocol.$_SERVER['HTTP_HOST'].'/';
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     }
455 455
 
456 456
     if (!empty($language_priority1) && api_get_language_from_type($language_priority1) !== false) {
457
-        $language_interface =  api_get_language_from_type($language_priority1);
457
+        $language_interface = api_get_language_from_type($language_priority1);
458 458
     } else {
459 459
         if (isset($_course['language'])) {
460 460
             $language_interface = $_course['language'];
Please login to merge, or discard this patch.
main/inc/ajax/record_audio_rtc.ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,16 +25,16 @@
 block discarded – undo
25 25
 $audioFileName = Database::escape_string($audioFileName);
26 26
 $audioFileName = api_replace_dangerous_char($audioFileName);
27 27
 $audioFileName = disable_dangerous_file($audioFileName);
28
-$audioDir  = Security::remove_XSS($audioDir);
28
+$audioDir = Security::remove_XSS($audioDir);
29 29
 
30
-$dirBaseDocuments = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document';
31
-$saveDir = $dirBaseDocuments . $audioDir;
30
+$dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document';
31
+$saveDir = $dirBaseDocuments.$audioDir;
32 32
 
33 33
 if (!is_dir($saveDir)) {
34 34
     DocumentManager::createDefaultAudioFolder($courseInfo);
35 35
 }
36 36
 
37
-$documentPath = $saveDir . '/' . $audioFileName;
37
+$documentPath = $saveDir.'/'.$audioFileName;
38 38
 
39 39
 $file['file'] = $file;
40 40
 
Please login to merge, or discard this patch.
main/inc/ajax/record_audio_wami.ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 // Do not use here check Fileinfo method because return: text/plain
49 49
 
50 50
 $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
51
-$saveDir = $dirBaseDocuments . $wamidir;
51
+$saveDir = $dirBaseDocuments.$wamidir;
52 52
 
53 53
 if (!is_dir($saveDir)) {
54 54
     DocumentManager::createDefaultAudioFolder($_course);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 ob_start();
89 89
 
90 90
 // Strangely the file path changes with a double extension
91
-copy($documentPath, $documentPath . '.wav');
91
+copy($documentPath, $documentPath.'.wav');
92 92
 
93 93
 $documentData = DocumentManager::upload_document(
94 94
     $file,
Please login to merge, or discard this patch.
main/document/showinframes.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
         );
150 150
     }
151 151
 } else {
152
-    foreach($document_data['parents'] as $document_sub_data) {
153
-        if (!isset($_GET['createdir']) && $document_sub_data['id'] ==  $document_data['id']) {
152
+    foreach ($document_data['parents'] as $document_sub_data) {
153
+        if (!isset($_GET['createdir']) && $document_sub_data['id'] == $document_data['id']) {
154 154
             $document_sub_data['document_url'] = '#';
155 155
         }
156 156
         $interbreadcrumb[] = array(
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 }
181 181
 $js_glossary_in_documents = '';
182 182
 
183
-$js_glossary_in_documents =	'
183
+$js_glossary_in_documents = '
184 184
   $.frameReady(function(){
185 185
    //  $("<div>I am a div courses</div>").prependTo("body");
186 186
   }, "top.mainFrame",
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 // PDF should be displayed with viewerJS
201 201
 $web_odf_supported_files[] = 'pdf';
202 202
 if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
203
-    $show_web_odf  = true;
203
+    $show_web_odf = true;
204 204
     /*
205 205
     $htmlHeadXtra[] = api_get_js('webodf/webodf.js');
206 206
     $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/webodf/webodf.css');
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     $htmlHeadXtra[] = api_get_js('highlight/highlight.pack.js');
244 244
     $htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css');
245 245
     $htmlHeadXtra[] = api_get_css(
246
-        api_get_path(WEB_LIBRARY_PATH) . 'javascript/highlight/styles/github.css'
246
+        api_get_path(WEB_LIBRARY_PATH).'javascript/highlight/styles/github.css'
247 247
     );
248 248
     $htmlHeadXtra[] = '
249 249
     <script>
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 $execute_iframe = true;
255 255
 if ($jplayer_supported) {
256 256
     $extension = api_strtolower($pathinfo['extension']);
257
-    if ($extension == 'mp4')  {
257
+    if ($extension == 'mp4') {
258 258
         $extension = 'm4v';
259 259
     }
260 260
     $js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/';
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     $execute_iframe = false;
296 296
 }
297 297
 
298
-$is_freemind_available = $pathinfo['extension']=='mm' && api_get_setting('enable_freemind') == 'true';
298
+$is_freemind_available = $pathinfo['extension'] == 'mm' && api_get_setting('enable_freemind') == 'true';
299 299
 if ($is_freemind_available) {
300 300
     $execute_iframe = false;
301 301
 }
@@ -339,18 +339,18 @@  discard block
 block discarded – undo
339 339
 $file_url_web = $file_url.'?'.api_get_cidreq();
340 340
 
341 341
 if (in_array(strtolower($pathinfo['extension']), array('html', "htm"))) {
342
-    echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank">' . get_lang('CutPasteLink') . '</a>';
342
+    echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>';
343 343
 }
344 344
 
345 345
 if ($show_web_odf) {
346 346
     $browser = api_get_navigator();
347
-    $pdfUrl = api_get_path(WEB_LIBRARY_PATH) . 'javascript/ViewerJS/index.html#' . $file_url;
347
+    $pdfUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html#'.$file_url;
348 348
     if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) {
349 349
         $pdfUrl = $file_url;
350 350
     }
351 351
     echo '<div id="viewerJS">';
352 352
     echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen style="width:100%;"
353
-            src="' . $pdfUrl. '">
353
+            src="' . $pdfUrl.'">
354 354
         </iframe>';
355 355
     echo '</div>';
356 356
 } elseif (!$originIsLearnpath) {
Please login to merge, or discard this patch.
main/document/show_content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,12 +90,12 @@
 block discarded – undo
90 90
 $file_url_web = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$header_file.'?'.api_get_cidreq();
91 91
 $pathinfo = pathinfo($header_file);
92 92
 
93
-if ($pathinfo['extension']=='swf') {
94
-	$width='83%';
95
-	$height='83%';
93
+if ($pathinfo['extension'] == 'swf') {
94
+	$width = '83%';
95
+	$height = '83%';
96 96
 } else {
97
-	$width='100%';
98
-	$height='100%';
97
+	$width = '100%';
98
+	$height = '100%';
99 99
 }
100 100
 
101 101
 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>';
Please login to merge, or discard this patch.
main/admin/usergroups.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
 //Add the JS needed to use the jqgrid
16 16
 $htmlHeadXtra[] = api_get_jqgrid_js();
17 17
 // setting breadcrumbs
18
-$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
18
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
19 19
 $action = isset($_GET['action']) ? $_GET['action'] : null;
20 20
 if ($action == 'add') {
21
-    $interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
22
-    $interbreadcrumb[] = array('url' => '#','name' => get_lang('Add'));
21
+    $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
22
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add'));
23 23
 } elseif ($action == 'edit') {
24
-    $interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
25
-    $interbreadcrumb[] = array('url' => '#','name' => get_lang('Edit'));
24
+    $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
25
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit'));
26 26
 } else {
27
-    $interbreadcrumb[] = array('url' => '#','name' => get_lang('Classes'));
27
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Classes'));
28 28
 }
29 29
 
30 30
 // The header.
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 );
56 56
 
57 57
 //Column config
58
-$column_model   = array(
59
-    array('name'=>'name',           'index'=>'name',        'width'=>'35',  'align'=>'left'),
60
-    array('name'=>'users',    		'index'=>'users', 		'width'=>'15',  'align'=>'left'),
61
-    array('name'=>'courses',    	'index'=>'courses', 	'width'=>'15',  'align'=>'left'),
62
-    array('name'=>'sessions',    	'index'=>'sessions', 	'width'=>'15',  'align'=>'left'),
63
-    array('name'=>'group_type',    	'index'=>'group_type', 	'width'=>'15',  'align'=>'center'),
64
-    array('name'=>'actions',        'index'=>'actions',     'width'=>'20',  'align'=>'center', 'sortable'=>'false','formatter'=>'action_formatter'),
58
+$column_model = array(
59
+    array('name'=>'name', 'index'=>'name', 'width'=>'35', 'align'=>'left'),
60
+    array('name'=>'users', 'index'=>'users', 'width'=>'15', 'align'=>'left'),
61
+    array('name'=>'courses', 'index'=>'courses', 'width'=>'15', 'align'=>'left'),
62
+    array('name'=>'sessions', 'index'=>'sessions', 'width'=>'15', 'align'=>'left'),
63
+    array('name'=>'group_type', 'index'=>'group_type', 'width'=>'15', 'align'=>'center'),
64
+    array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'center', 'sortable'=>'false', 'formatter'=>'action_formatter'),
65 65
 );
66 66
 
67 67
 //Autowidth
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
 //With this function we can add actions to the jgrid
74 74
 $action_links = 'function action_formatter (cellvalue, options, rowObject) {
75 75
     return \''
76
-    .' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass'), null, ICON_SIZE_MEDIUM) . '</a>'
77
-    .' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses'), null, ICON_SIZE_MEDIUM) . '</a>'
78
-    .' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions'), null, ICON_SIZE_MEDIUM) . '</a>'
79
-    .' <a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_SMALL) . '</a>'
80
-    .' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL) . '</a>\';
76
+    .' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass'), null, ICON_SIZE_MEDIUM).'</a>'
77
+    .' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses'), null, ICON_SIZE_MEDIUM).'</a>'
78
+    .' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions'), null, ICON_SIZE_MEDIUM).'</a>'
79
+    .' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_SMALL).'</a>'
80
+    .' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL).'</a>\';
81 81
 }';
82 82
 
83 83
 ?>
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     } else {
129 129
         echo '<div class="actions">';
130 130
         echo '<a href="'.api_get_self().'">'.
131
-                Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
131
+                Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
132 132
         echo '</div>';
133 133
         $token = Security::get_token();
134 134
         $form->addElement('hidden', 'sec_token');
Please login to merge, or discard this patch.
src/Chamilo/PageBundle/Controller/PageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         return $this->render(
44 44
             '@ChamiloPage/latest.html.twig',
45
-            [ 'pages' => $pagesToShow ]
45
+            ['pages' => $pagesToShow]
46 46
         );
47 47
     }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.