Completed
Push — 1.11.x ( 6904fa...6a92e6 )
by José
525:44 queued 484:20
created
src/Chamilo/CoreBundle/Entity/SkillRelUser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function getIssueUrl()
457 457
     {
458
-        return api_get_path(WEB_PATH) . "badge/{$this->id}";
458
+        return api_get_path(WEB_PATH)."badge/{$this->id}";
459 459
     }
460 460
 
461 461
     /**
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      */
465 465
     public function getIssueUrlAll()
466 466
     {
467
-        return api_get_path(WEB_PATH) . "skill/{$this->skill->getId()}/user/{$this->user->getId()}";
467
+        return api_get_path(WEB_PATH)."skill/{$this->skill->getId()}/user/{$this->user->getId()}";
468 468
     }
469 469
 
470 470
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      */
474 474
     public function getAssertionUrl()
475 475
     {
476
-        $url = api_get_path(WEB_CODE_PATH) . "badge/assertion.php?";
476
+        $url = api_get_path(WEB_CODE_PATH)."badge/assertion.php?";
477 477
 
478 478
         $url .= http_build_query(array(
479 479
             'user' => $this->user->getId(),
Please login to merge, or discard this patch.
main/document/edit_draw.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $dir = str_replace('\\', '/', $dir);
38 38
 
39 39
 /* Constants & Variables */
40
-$current_session_id=api_get_session_id();
40
+$current_session_id = api_get_session_id();
41 41
 $group_id = api_get_group_id();
42 42
 
43 43
 //path for svg-edit save
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 $file = basename($get_file);
51 51
 $temp_file = explode(".", $file);
52 52
 $filename = $temp_file[0];
53
-$nameTools = get_lang('EditDocument') . ': ' . $filename;
54
-$courseDir = $_course['path'] . '/document';
53
+$nameTools = get_lang('EditDocument').': '.$filename;
54
+$courseDir = $_course['path'].'/document';
55 55
 $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
56 56
 
57 57
 /*	Other initialization code */
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 Display :: display_header($nameTools, 'Doc');
126 126
 echo '<div class="actions">';
127 127
 echo '<a href="document.php?id='.$parent_id.'">'.
128
-    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
128
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
129 129
 echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&origin=editdraw">'.
130
-    Display::return_icon('edit.png',get_lang('Rename').'/'.get_lang('Comments'),'',ICON_SIZE_MEDIUM).'</a>';
130
+    Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comments'), '', ICON_SIZE_MEDIUM).'</a>';
131 131
 echo '</div>';
132 132
 
133 133
 if (api_browser_support('svg')) {
134 134
 	//automatic loading the course language
135 135
 	$svgedit_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
136
-	$langsvgedit  = api_get_language_isocode();
136
+	$langsvgedit = api_get_language_isocode();
137 137
 	$langsvgedit = isset($svgedit_code_translation_table[$langsvgedit]) ? $svgedit_code_translation_table[$langsvgedit] : $langsvgedit;
138 138
 	$langsvgedit = file_exists(api_get_path(LIBRARY_PATH).'javascript/svgedit/locale/lang.'.$langsvgedit.'.js') ? $langsvgedit : 'en';
139 139
 	$svg_url = api_get_path(WEB_LIBRARY_PATH).'javascript/svgedit/svg-editor.php?url=../../../../../courses/'.$courseDir.$dir.$file.'&lang='.$langsvgedit;
Please login to merge, or discard this patch.
main/inc/lib/diagnoser.lib.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 {
16 16
     const STATUS_OK = 1;
17 17
     const STATUS_WARNING = 2;
18
-    const STATUS_ERROR 	= 3;
18
+    const STATUS_ERROR = 3;
19 19
     const STATUS_INFORMATION = 4;
20 20
 
21 21
     /**
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
                 $html .= '<li>';
43 43
             }
44 44
             $params['section'] = $section;
45
-            $html .='<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
45
+            $html .= '<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
46 46
         }
47 47
 
48 48
         $html .= '</ul><div class="tab-pane">';
49 49
 
50
-        $data = call_user_func(array($this, 'get_' . $currentSection . '_data'));
50
+        $data = call_user_func(array($this, 'get_'.$currentSection.'_data'));
51 51
         echo $html;
52 52
 
53 53
         if ($currentSection != 'paths') {
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $array = array();
116 116
         $writable_folders = array(
117
-            api_get_path(SYS_APP_PATH) .'cache',
117
+            api_get_path(SYS_APP_PATH).'cache',
118 118
             api_get_path(SYS_COURSE_PATH),
119
-            api_get_path(SYS_APP_PATH) .'home',
120
-            api_get_path(SYS_APP_PATH) .'upload/users/',
121
-            api_get_path(SYS_PATH) .'main/default_course_document/images/',
119
+            api_get_path(SYS_APP_PATH).'home',
120
+            api_get_path(SYS_APP_PATH).'upload/users/',
121
+            api_get_path(SYS_PATH).'main/default_course_document/images/',
122 122
         );
123 123
         foreach ($writable_folders as $index => $folder) {
124 124
             $writable = is_writable($folder);
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 
138 138
         $exists = file_exists(api_get_path(SYS_CODE_PATH).'install');
139 139
         $status = $exists ? self :: STATUS_WARNING : self :: STATUS_OK;
140
-        $array[] = $this->build_setting($status, '[FILES]', get_lang('DirectoryExists') . ': /install', 'http://be2.php.net/file_exists', $exists, 0, 'yes_no', get_lang('DirectoryShouldBeRemoved'));
140
+        $array[] = $this->build_setting($status, '[FILES]', get_lang('DirectoryExists').': /install', 'http://be2.php.net/file_exists', $exists, 0, 'yes_no', get_lang('DirectoryShouldBeRemoved'));
141 141
 
142 142
         $app_version = api_get_setting('chamilo_database_version');
143
-        $array[] = $this->build_setting(self :: STATUS_INFORMATION, '[DB]', 'chamilo_database_version', '#', $app_version, 0, null,  'Chamilo DB version');
143
+        $array[] = $this->build_setting(self :: STATUS_INFORMATION, '[DB]', 'chamilo_database_version', '#', $app_version, 0, null, 'Chamilo DB version');
144 144
 
145 145
         $access_url_id = api_get_current_access_url_id();
146 146
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                     $message2 .= get_lang('SpaceUsedOnSystemCannotBeMeasuredOnWindows');
153 153
                 } else {
154 154
                     $dir = api_get_path(SYS_PATH);
155
-                    $du = exec('du -sh ' . $dir, $err);
155
+                    $du = exec('du -sh '.$dir, $err);
156 156
                     list($size, $none) = explode("\t", $du);
157 157
                     $limit = $_configuration[$access_url_id]['hosting_limit_disk_space'];
158 158
                     $message2 .= sprintf(get_lang('TotalSpaceUsedByPortalXLimitIsYMB'), $size, $limit);
@@ -236,33 +236,33 @@  discard block
 block discarded – undo
236 236
         $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo'));
237 237
 
238 238
         $setting = ini_get('max_execution_time');
239
-        $req_setting = '300 (' . get_lang('Minimum') . ')';
239
+        $req_setting = '300 ('.get_lang('Minimum').')';
240 240
         $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING;
241 241
         $array[] = $this->build_setting($status, '[INI]', 'max_execution_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-execution-time', $setting, $req_setting, null, get_lang('MaxExecutionTimeInfo'));
242 242
 
243 243
         $setting = ini_get('max_input_time');
244
-        $req_setting = '300 (' . get_lang('Minimum') . ')';
244
+        $req_setting = '300 ('.get_lang('Minimum').')';
245 245
         $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING;
246 246
         $array[] = $this->build_setting($status, '[INI]', 'max_input_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-input-time', $setting, $req_setting, null, get_lang('MaxInputTimeInfo'));
247 247
 
248 248
         $setting = ini_get('memory_limit');
249 249
         $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M';
250 250
         $status = self :: STATUS_ERROR;
251
-        if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT)
251
+        if ((float) $setting >= REQUIRED_MIN_MEMORY_LIMIT)
252 252
             $status = self :: STATUS_OK;
253 253
         $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo'));
254 254
 
255 255
         $setting = ini_get('post_max_size');
256 256
         $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M';
257 257
         $status = self :: STATUS_ERROR;
258
-        if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE)
258
+        if ((float) $setting >= REQUIRED_MIN_POST_MAX_SIZE)
259 259
             $status = self :: STATUS_OK;
260 260
         $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo'));
261 261
 
262 262
         $setting = ini_get('upload_max_filesize');
263 263
         $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M';
264 264
         $status = self :: STATUS_ERROR;
265
-        if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE)
265
+        if ((float) $setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE)
266 266
             $status = self :: STATUS_OK;
267 267
         $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo'));
268 268
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
277 277
         $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo'));
278 278
 
279
-        if (api_check_browscap()){$setting = true;}else{$setting=false;}
279
+        if (api_check_browscap()) {$setting = true; } else {$setting = false; }
280 280
         $req_setting = true;
281 281
         $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING;
282 282
         $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo'));
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
             $loaded = extension_loaded($extension);
334 334
             $status = $loaded ? self :: STATUS_OK : self :: STATUS_ERROR;
335
-            $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension') . ': ' . $extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment);
335
+            $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension').': '.$extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment);
336 336
         }
337 337
 
338 338
         return $array;
@@ -455,9 +455,9 @@  discard block
 block discarded – undo
455 455
         $formatted_expected_value = $expected_value;
456 456
 
457 457
         if ($formatter) {
458
-            if (method_exists($this, 'format_' . $formatter)) {
459
-                $formatted_current_value = call_user_func(array($this, 'format_' . $formatter), $current_value);
460
-                $formatted_expected_value = call_user_func(array($this, 'format_' . $formatter), $expected_value);
458
+            if (method_exists($this, 'format_'.$formatter)) {
459
+                $formatted_current_value = call_user_func(array($this, 'format_'.$formatter), $current_value);
460
+                $formatted_expected_value = call_user_func(array($this, 'format_'.$formatter), $expected_value);
461 461
             }
462 462
         }
463 463
 
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
      */
473 473
     public function get_link($title, $url)
474 474
     {
475
-        return '<a href="' . $url . '" target="about:bank">' . $title . '</a>';
475
+        return '<a href="'.$url.'" target="about:bank">'.$title.'</a>';
476 476
     }
477 477
 
478 478
     public function format_yes_no_optional($value)
479 479
     {
480 480
     	$return = '';
481
-    	switch($value) {
481
+    	switch ($value) {
482 482
      		case 0:
483 483
      			$return = get_lang('No');
484 484
      			break;
Please login to merge, or discard this patch.
main/inc/lib/exercise_show_functions.lib.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 </td>
55 55
 
56 56
                 <?php
57
-                if (!api_is_allowed_to_edit(null,true) && $feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
57
+                if (!api_is_allowed_to_edit(null, true) && $feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
58 58
                     <td>
59 59
                         <?php
60 60
                         $comm = Event::get_comments($id, $questionId);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $showTotalScoreAndUserChoices
83 83
     ) {
84 84
         if (empty($id)) {
85
-            echo '<tr><td>'. Security::remove_XSS($answer).'</td></tr>';
85
+            echo '<tr><td>'.Security::remove_XSS($answer).'</td></tr>';
86 86
         } else {
87 87
         ?>
88 88
             <tr>
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
                 </td>
94 94
 
95 95
             <?php
96
-            if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
96
+            if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { ?>
97 97
                 <td>
98 98
                     <?php
99
-                    $comm = Event::get_comments($id,$questionId);
99
+                    $comm = Event::get_comments($id, $questionId);
100 100
                     ?>
101 101
                 </td>
102 102
             <?php } ?>
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if (isset($fileUrl)) {
152 152
             echo '
153 153
                 <tr>
154
-                    <td><audio src="' . $fileUrl . '" controls></audio></td>
154
+                    <td><audio src="' . $fileUrl.'" controls></audio></td>
155 155
                 </tr>
156 156
             ';
157 157
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             echo '</tr>';
163 163
             if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
164 164
                 echo '<tr>';
165
-                echo Display::tag('td',get_lang('notCorrectedYet'), array('width'=>'45%'));
165
+                echo Display::tag('td', get_lang('notCorrectedYet'), array('width'=>'45%'));
166 166
                 echo '</tr>';
167 167
             } else {
168 168
                 echo '<tr><td>&nbsp;</td></tr>';
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
             }
176 176
             echo '</td>';
177 177
 
178
-            if (!api_is_allowed_to_edit(null,true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
178
+            if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
179 179
                 echo '<td>';
180
-                $comm = Event::get_comments($id,$questionId);
180
+                $comm = Event::get_comments($id, $questionId);
181 181
                 echo '</td>';
182 182
             }
183 183
             echo '</tr>';
@@ -306,12 +306,12 @@  discard block
 block discarded – undo
306 306
             }
307 307
         }
308 308
 
309
-        $icon = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
310
-		$icon .= $studentChoice?'_on':'_off';
309
+        $icon = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio' : 'checkbox';
310
+		$icon .= $studentChoice ? '_on' : '_off';
311 311
 		$icon .= '.gif';
312 312
 
313
-		$iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio':'checkbox';
314
-		$iconAnswer .= $answerCorrect?'_on':'_off';
313
+		$iconAnswer = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION)) ? 'radio' : 'checkbox';
314
+		$iconAnswer .= $answerCorrect ? '_on' : '_off';
315 315
 		$iconAnswer .= '.gif';
316 316
 
317 317
 		?>
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 			?>
352 352
 		</td>
353 353
 			<?php
354
-		    if ($ans==1) {
355
-		        $comm = Event::get_comments($id,$questionId);
354
+		    if ($ans == 1) {
355
+		        $comm = Event::get_comments($id, $questionId);
356 356
 			}
357 357
 		    ?>
358 358
 		 <?php } else { ?>
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
             ?>
456 456
         </td>
457 457
             <?php
458
-            if ($ans==1) {
458
+            if ($ans == 1) {
459 459
                 $comm = Event::get_comments($id, $questionId);
460 460
             }
461 461
             ?>
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
             ?>
559 559
         </td>
560 560
             <?php
561
-            if ($ans==1) {
562
-                $comm = Event::get_comments($id,$questionId);
561
+            if ($ans == 1) {
562
+                $comm = Event::get_comments($id, $questionId);
563 563
             }
564 564
             ?>
565 565
          <?php } else { ?>
Please login to merge, or discard this patch.
plugin/vchamilo/lib.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     if (preg_match('#https?://#', $url)) {
167 167
         header('location: '.$url);
168 168
     } else {
169
-        header('location: ' . api_get_path(WEB_PATH).$url);
169
+        header('location: '.api_get_path(WEB_PATH).$url);
170 170
     }
171 171
     exit;
172 172
 }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 function vchamilo_drop_databases(&$vchamilo)
240 240
 {
241 241
     if (is_array($vchamilo)) {
242
-        $vchamilo = (object)$vchamilo;
242
+        $vchamilo = (object) $vchamilo;
243 243
     }
244 244
 
245 245
     if (empty($vchamilo->main_database)) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
     $dbs = array($vchamilo->main_database);
272 272
 
273
-    foreach($dbs as $adb){
273
+    foreach ($dbs as $adb) {
274 274
         Display::addFlash(Display::return_message("Creating DB $adb"));
275 275
         $sql = str_replace('%DATABASE%', $adb, $createstatement);
276 276
         Database::query($sql);
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     $phppgm = str_replace("\"", '', $phppgm);
297 297
     $pgm = str_replace("/", DIRECTORY_SEPARATOR, $pgm);
298 298
 
299
-    if (!is_executable($phppgm)){
299
+    if (!is_executable($phppgm)) {
300 300
         print_error('databasecommanddoesnotmatchanexecutablefile');
301 301
         return false;
302 302
     }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     }
314 314
 
315 315
     // Making the command line (see 'vconfig.php' file for defining the right paths).
316
-    $sqlcmd = $pgm.' -h'.$vchamilodata->db_host.(isset($vchamilodata->db_port) ? ' -P'.$vchamilodata->db_port.' ' : ' ' );
316
+    $sqlcmd = $pgm.' -h'.$vchamilodata->db_host.(isset($vchamilodata->db_port) ? ' -P'.$vchamilodata->db_port.' ' : ' ');
317 317
     $sqlcmd .= '-u'.$vchamilodata->db_user.' '.$vchamilodata->db_password;
318 318
     $sqlcmd .= '%DATABASE% < ';
319 319
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 function vchamilo_dump_databases($vchamilo, $outputfilerad)
365 365
 {
366 366
     // Separating host and port, if sticked.
367
-    if (strstr($vchamilo->db_host, ':') !== false){
367
+    if (strstr($vchamilo->db_host, ':') !== false) {
368 368
         list($host, $port) = split(':', $vchamilo->db_host);
369 369
     } else {
370 370
         $host = $vchamilo->db_host;
@@ -388,15 +388,15 @@  discard block
 block discarded – undo
388 388
     //if ($CFG->ostype == 'WINDOWS') {
389 389
     if (false) {
390 390
         $cmd_main = "-h{$host} -P{$port} -u{$vchamilo->db_user} {$pass} {$vchamilo->main_database}";
391
-        $cmds[] = $cmd_main . ' > ' . $outputfilerad;
391
+        $cmds[] = $cmd_main.' > '.$outputfilerad;
392 392
     } else {
393 393
         $cmd_main = "-h{$host} -P{$port} -u{$vchamilo->db_user} {$pass} {$vchamilo->main_database}";
394
-        $cmds[] = $cmd_main . ' > ' . escapeshellarg($outputfilerad);
394
+        $cmds[] = $cmd_main.' > '.escapeshellarg($outputfilerad);
395 395
     }
396 396
 
397 397
     $mysqldumpcmd = vchamilo_get_config('vchamilo', 'cmd_mysqldump', true);
398 398
 
399
-    $pgm = !empty($mysqldumpcmd) ? stripslashes($mysqldumpcmd) : false ;
399
+    $pgm = !empty($mysqldumpcmd) ? stripslashes($mysqldumpcmd) : false;
400 400
 
401 401
     if (!$pgm) {
402 402
         $message = "Database dump command not available check here: ";
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         }
419 419
 
420 420
         // executing all commands
421
-        foreach ($cmds as $cmd){
421
+        foreach ($cmds as $cmd) {
422 422
 
423 423
             // Final command.
424 424
             $cmd = $pgm.' '.$cmd;
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
         include_once $_configuration['root_sys'].'local/ent_installer/static_settings.php';
630 630
     }
631 631
 
632
-    if ($isplugin){
632
+    if ($isplugin) {
633 633
         $configkey = $module.'_'.$key;
634 634
     } else {
635 635
         $configkey = $key;
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 
644 644
         if (empty($config)) {
645 645
             Display::addFlash(Display::return_message("Wrap to static setting $module,$configkey "));
646
-            if (array_key_exists($key, $static_settings)){
646
+            if (array_key_exists($key, $static_settings)) {
647 647
                 return $static_settings[$key];
648 648
             }
649 649
         }
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
                 return str_replace('{$a}', $a, $fallbackstrings[$key]);
729 729
             }
730 730
             if (is_array($a)) {
731
-                $a = (object)$a;
731
+                $a = (object) $a;
732 732
             }
733 733
             if (is_object($a)) {
734 734
                 return replace_string_vars($a, $fallbackstrings[$key]);
@@ -739,10 +739,10 @@  discard block
 block discarded – undo
739 739
         if (is_scalar($a)) {
740 740
             return str_replace('{$a}', $a, $strings[$key]);
741 741
         }
742
-        if (is_array($a)){
743
-            $a = (object)$a;
742
+        if (is_array($a)) {
743
+            $a = (object) $a;
744 744
         }
745
-        if (is_object($a)){
745
+        if (is_object($a)) {
746 746
             return replace_string_vars($a, $strings[$key]);
747 747
         }
748 748
         debugging('String insertion not supported', 1);
@@ -752,26 +752,26 @@  discard block
 block discarded – undo
752 752
     }
753 753
 }
754 754
 
755
-function replace_string_vars($a, $str){
755
+function replace_string_vars($a, $str) {
756 756
     preg_match_all('/{\$a-\>(.+?)}/', $str, $matches);
757
-    if (!empty($matches[1])){
758
-        foreach($matches[1] as $replacekey){
757
+    if (!empty($matches[1])) {
758
+        foreach ($matches[1] as $replacekey) {
759 759
             $str = str_replace('{$a->'.$replacekey.'}', $a->$replacekey, $str);
760 760
         }
761 761
     }
762 762
     return $str;
763 763
 }
764 764
 
765
-function print_error($key, $component = '', $passthru = false, $extrainfo = ''){
765
+function print_error($key, $component = '', $passthru = false, $extrainfo = '') {
766 766
     global $debuglevel;
767 767
     global $debugdisplay;
768 768
 
769
-    if ($component === null){
769
+    if ($component === null) {
770 770
         $str = $key;
771 771
     } else {
772 772
         $str = get_string($string, $component);
773 773
     }
774
-    ctrace('ERROR: '. $str);
774
+    ctrace('ERROR: '.$str);
775 775
 }
776 776
 
777 777
 function debugging($message, $level) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 
781 781
     if ($level <= $debuglevel) {
782 782
         ctrace('DEBUG: '.$message);
783
-        if ($debugdisplay >= 3){
783
+        if ($debugdisplay >= 3) {
784 784
             debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
785 785
         }
786 786
     }
@@ -861,12 +861,12 @@  discard block
 block discarded – undo
861 861
 
862 862
     // Item not found for this access_url, we have to check if the whole thing is missing
863 863
     // (in which case we ignore the insert) or if there *is* a record but just for access_url = 1
864
-    $insert = "INSERT INTO $t_settings " .
865
-        "(variable,selected_value," .
866
-        "type,category," .
867
-        "subkey,title," .
868
-        "comment,scope," .
869
-        "subkeytext,access_url,access_url_changeable)" .
864
+    $insert = "INSERT INTO $t_settings ".
865
+        "(variable,selected_value,".
866
+        "type,category,".
867
+        "subkey,title,".
868
+        "comment,scope,".
869
+        "subkeytext,access_url,access_url_changeable)".
870 870
         " VALUES ('$var','$val',";
871 871
     if (isset($type)) {
872 872
         $type = Database::escape_string($type);
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
         return $value;
943 943
 
944 944
     } else if (is_string($value)) {
945
-        if ((string)(int)$value === $value) {
945
+        if ((string) (int) $value === $value) {
946 946
             // shortcut
947 947
             return $value;
948 948
         }
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
 
1082 1082
 function param_filter_type($value, $type)
1083 1083
 {
1084
-    switch($type) {
1084
+    switch ($type) {
1085 1085
         case 0:
1086 1086
             return $value; // no filtering
1087 1087
         case PARAM_BOOL:
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
     $cmdSql = vchamilo_get_config('vchamilo', 'cmd_mysql');
1131 1131
     $cmdMySql = vchamilo_get_config('vchamilo', 'cmd_mysqldump');
1132 1132
 
1133
-    if (empty($coursePath) || empty($homePath) || empty($archivePath) || empty($cmdSql)|| empty($cmdMySql)) {
1133
+    if (empty($coursePath) || empty($homePath) || empty($archivePath) || empty($cmdSql) || empty($cmdMySql)) {
1134 1134
         api_not_allowed(true, 'You have to complete all plugin settings.');
1135 1135
     }
1136 1136
 }
Please login to merge, or discard this patch.
main/inc/lib/course_description.lib.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         $sql = "SELECT MAX(description_type) as MAX
178 178
                 FROM $tbl_course_description
179
-		        WHERE c_id = $course_id AND session_id='" . $this->session_id . "'";
179
+		        WHERE c_id = $course_id AND session_id='".$this->session_id."'";
180 180
         $rs = Database::query($sql);
181 181
         $max = Database::fetch_array($rs);
182 182
         $description_type = $max['MAX'] + 1;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             'session_id' => $this->session_id
212 212
         ];
213 213
 
214
-        $last_id  = Database::insert($table, $params);
214
+        $last_id = Database::insert($table, $params);
215 215
 
216 216
         if ($last_id > 0) {
217 217
             $sql = "UPDATE $table SET id = iid WHERE iid = $last_id";
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             );
228 228
         }
229 229
 
230
-        return ($last_id > 0)?1:0;
230
+        return ($last_id > 0) ? 1 : 0;
231 231
     }
232 232
 
233 233
     /**
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
         $sql = "DELETE FROM $tbl_course_description
320 320
 			 	WHERE
321 321
 			 	    c_id = $course_id AND
322
-			 	    id = '" . intval($this->id) . "' AND
323
-			 	    session_id = '" . intval($this->session_id) . "'";
322
+			 	    id = '".intval($this->id)."' AND
323
+			 	    session_id = '" . intval($this->session_id)."'";
324 324
         $result = Database::query($sql);
325 325
         $affected_rows = Database::affected_rows($result);
326 326
         if ($this->id > 0) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         $course_id = api_get_course_int_id();
350 350
 
351 351
         $sql = "SELECT id FROM $tbl_course_description
352
-		        WHERE c_id = $course_id AND description_type = '" . intval($description_type) . "'";
352
+		        WHERE c_id = $course_id AND description_type = '".intval($description_type)."'";
353 353
         $rs = Database::query($sql);
354 354
         $row = Database::fetch_array($rs);
355 355
         $description_id = $row['id'];
Please login to merge, or discard this patch.
plugin/courselegal/plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
  * @author Imanol Losada Oriol <[email protected]>
6 6
  * @package chamilo.plugin.skype
7 7
  */
8
-require_once __DIR__ . '/config.php';
8
+require_once __DIR__.'/config.php';
9 9
 
10 10
 Skype::create()->install();
Please login to merge, or discard this patch.
plugin/courseblock/plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
  * @author Imanol Losada Oriol <[email protected]>
6 6
  * @package chamilo.plugin.skype
7 7
  */
8
-require_once __DIR__ . '/config.php';
8
+require_once __DIR__.'/config.php';
9 9
 
10 10
 Skype::create()->install();
Please login to merge, or discard this patch.
plugin/courseblock/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 
4
-require_once dirname(__FILE__) . '/config.php';
4
+require_once dirname(__FILE__).'/config.php';
5 5
 
6 6
 if (!api_is_platform_admin()) {
7 7
     die ('You must have admin permissions to install plugins');
Please login to merge, or discard this patch.