@@ -5,7 +5,7 @@ |
||
5 | 5 | * @package chamilo.plugin.ims_lti |
6 | 6 | */ |
7 | 7 | |
8 | -if (!api_is_platform_admin()) { |
|
8 | +if (!api_is_platform_admin()) { |
|
9 | 9 | die ('You must have admin permissions to uninstall plugins'); |
10 | 10 | } |
11 | 11 |
@@ -13,7 +13,8 @@ |
||
13 | 13 | * @package Chamilo\CoreBundle\Entity\Repository |
14 | 14 | * @author Angel Fernando Quiroz Campos <[email protected]> |
15 | 15 | */ |
16 | -class TrackECourseAccessRepository extends EntityRepository { |
|
16 | +class TrackECourseAccessRepository extends EntityRepository |
|
17 | +{ |
|
17 | 18 | |
18 | 19 | /** |
19 | 20 | * Get the last registered access by an user |
@@ -108,7 +108,8 @@ discard block |
||
108 | 108 | * @return void |
109 | 109 | * @author Dmitry (dio) Levashov |
110 | 110 | **/ |
111 | - protected function configure() { |
|
111 | + protected function configure() |
|
112 | + { |
|
112 | 113 | parent::configure(); |
113 | 114 | |
114 | 115 | if (($tmp = $this->options['tmpPath'])) { |
@@ -136,7 +137,8 @@ discard block |
||
136 | 137 | * @return void |
137 | 138 | * @author Dmitry (dio) Levashov |
138 | 139 | **/ |
139 | - public function umount() { |
|
140 | + public function umount() |
|
141 | + { |
|
140 | 142 | return true; |
141 | 143 | } |
142 | 144 | |
@@ -277,7 +279,8 @@ discard block |
||
277 | 279 | * @return array |
278 | 280 | * @author Dmitry (dio) Levashov |
279 | 281 | **/ |
280 | - protected function getParents($path) { |
|
282 | + protected function getParents($path) |
|
283 | + { |
|
281 | 284 | $parents = array(); |
282 | 285 | |
283 | 286 | while ($path) { |
@@ -300,9 +303,11 @@ discard block |
||
300 | 303 | * @return string |
301 | 304 | * @author Troex Nevelin |
302 | 305 | **/ |
303 | - protected function loadFilePath($path) { |
|
306 | + protected function loadFilePath($path) |
|
307 | + { |
|
304 | 308 | $realPath = realpath($path); |
305 | - if (DIRECTORY_SEPARATOR == '\\') { // windows |
|
309 | + if (DIRECTORY_SEPARATOR == '\\') { |
|
310 | +// windows |
|
306 | 311 | $realPath = str_replace('\\', '\\\\', $realPath); |
307 | 312 | } |
308 | 313 | return $this->db->real_escape_string($realPath); |
@@ -317,7 +322,8 @@ discard block |
||
317 | 322 | * @return array |
318 | 323 | * @author Dmitry (dio) Levashov |
319 | 324 | **/ |
320 | - protected function doSearch($path, $q, $mimes) { |
|
325 | + protected function doSearch($path, $q, $mimes) |
|
326 | + { |
|
321 | 327 | return array(); |
322 | 328 | } |
323 | 329 | |
@@ -331,7 +337,8 @@ discard block |
||
331 | 337 | * @return string |
332 | 338 | * @author Dmitry (dio) Levashov |
333 | 339 | **/ |
334 | - protected function _dirname($path) { |
|
340 | + protected function _dirname($path) |
|
341 | + { |
|
335 | 342 | return ($stat = $this->stat($path)) ? ($stat['phash'] ? $this->decode($stat['phash']) : $this->root) : false; |
336 | 343 | } |
337 | 344 | |
@@ -342,7 +349,8 @@ discard block |
||
342 | 349 | * @return string |
343 | 350 | * @author Dmitry (dio) Levashov |
344 | 351 | **/ |
345 | - protected function _basename($path) { |
|
352 | + protected function _basename($path) |
|
353 | + { |
|
346 | 354 | return ($stat = $this->stat($path)) ? $stat['name'] : false; |
347 | 355 | } |
348 | 356 | |
@@ -354,7 +362,8 @@ discard block |
||
354 | 362 | * @return string |
355 | 363 | * @author Troex Nevelin |
356 | 364 | **/ |
357 | - protected function _normpath($path) { |
|
365 | + protected function _normpath($path) |
|
366 | + { |
|
358 | 367 | return $path; |
359 | 368 | } |
360 | 369 | |
@@ -365,7 +374,8 @@ discard block |
||
365 | 374 | * @return string |
366 | 375 | * @author Dmitry (dio) Levashov |
367 | 376 | **/ |
368 | - protected function _relpath($path) { |
|
377 | + protected function _relpath($path) |
|
378 | + { |
|
369 | 379 | return $path; |
370 | 380 | } |
371 | 381 | |
@@ -376,7 +386,8 @@ discard block |
||
376 | 386 | * @return string |
377 | 387 | * @author Dmitry (dio) Levashov |
378 | 388 | **/ |
379 | - protected function _abspath($path) { |
|
389 | + protected function _abspath($path) |
|
390 | + { |
|
380 | 391 | return $path; |
381 | 392 | } |
382 | 393 | |
@@ -387,7 +398,8 @@ discard block |
||
387 | 398 | * @return string |
388 | 399 | * @author Dmitry (dio) Levashov |
389 | 400 | **/ |
390 | - protected function _path($path) { |
|
401 | + protected function _path($path) |
|
402 | + { |
|
391 | 403 | if (($file = $this->stat($path)) == false) { |
392 | 404 | return ''; |
393 | 405 | } |
@@ -409,7 +421,8 @@ discard block |
||
409 | 421 | * @return bool |
410 | 422 | * @author Dmitry (dio) Levashov |
411 | 423 | **/ |
412 | - protected function _inpath($path, $parent) { |
|
424 | + protected function _inpath($path, $parent) |
|
425 | + { |
|
413 | 426 | return $path == $parent |
414 | 427 | ? true |
415 | 428 | : in_array($parent, $this->getParents($path)); |
@@ -424,7 +437,8 @@ discard block |
||
424 | 437 | * @return bool |
425 | 438 | * @author Dmitry (dio) Levashov |
426 | 439 | **/ |
427 | - protected function _subdirs($path) { |
|
440 | + protected function _subdirs($path) |
|
441 | + { |
|
428 | 442 | return ($stat = $this->stat($path)) && isset($stat['dirs']) ? $stat['dirs'] : false; |
429 | 443 | } |
430 | 444 | |
@@ -437,7 +451,8 @@ discard block |
||
437 | 451 | * @return string |
438 | 452 | * @author Dmitry (dio) Levashov |
439 | 453 | **/ |
440 | - protected function _dimensions($path, $mime) { |
|
454 | + protected function _dimensions($path, $mime) |
|
455 | + { |
|
441 | 456 | return ($stat = $this->stat($path)) && isset($stat['width']) && isset($stat['height']) ? $stat['width'].'x'.$stat['height'] : ''; |
442 | 457 | } |
443 | 458 | |
@@ -450,7 +465,8 @@ discard block |
||
450 | 465 | * @return array |
451 | 466 | * @author Dmitry (dio) Levashov |
452 | 467 | **/ |
453 | - protected function _scandir($path) { |
|
468 | + protected function _scandir($path) |
|
469 | + { |
|
454 | 470 | return isset($this->dirsCache[$path]) |
455 | 471 | ? $this->dirsCache[$path] |
456 | 472 | : $this->cacheDir($path); |
@@ -464,7 +480,8 @@ discard block |
||
464 | 480 | * @return resource|false |
465 | 481 | * @author Dmitry (dio) Levashov |
466 | 482 | **/ |
467 | - protected function _fopen($path, $mode = 'rb') { |
|
483 | + protected function _fopen($path, $mode = 'rb') |
|
484 | + { |
|
468 | 485 | $fp = $this->tmbPath |
469 | 486 | ? @fopen($this->tmpname($path), 'w+') |
470 | 487 | : @tmpfile(); |
@@ -491,7 +508,8 @@ discard block |
||
491 | 508 | * @return bool |
492 | 509 | * @author Dmitry (dio) Levashov |
493 | 510 | **/ |
494 | - protected function _fclose($fp, $path = '') { |
|
511 | + protected function _fclose($fp, $path = '') |
|
512 | + { |
|
495 | 513 | @fclose($fp); |
496 | 514 | if ($path) { |
497 | 515 | @unlink($this->tmpname($path)); |
@@ -508,35 +526,40 @@ discard block |
||
508 | 526 | * @return string|bool |
509 | 527 | * @author Dmitry (dio) Levashov |
510 | 528 | **/ |
511 | - protected function _mkdir($path, $name) { |
|
529 | + protected function _mkdir($path, $name) |
|
530 | + { |
|
512 | 531 | return $this->make($path, $name, 'directory') ? $this->_joinPath($path, $name) : false; |
513 | 532 | } |
514 | 533 | |
515 | 534 | /** |
516 | 535 | * {@inheritdoc} |
517 | 536 | */ |
518 | - protected function _mkfile($path, $name) { |
|
537 | + protected function _mkfile($path, $name) |
|
538 | + { |
|
519 | 539 | return false; |
520 | 540 | } |
521 | 541 | |
522 | 542 | /** |
523 | 543 | * {@inheritdoc} |
524 | 544 | */ |
525 | - protected function _symlink($target, $path, $name) { |
|
545 | + protected function _symlink($target, $path, $name) |
|
546 | + { |
|
526 | 547 | return false; |
527 | 548 | } |
528 | 549 | |
529 | 550 | /** |
530 | 551 | * {@inheritdoc} |
531 | 552 | */ |
532 | - protected function _copy($source, $targetDir, $name) { |
|
553 | + protected function _copy($source, $targetDir, $name) |
|
554 | + { |
|
533 | 555 | return false; |
534 | 556 | } |
535 | 557 | |
536 | 558 | /** |
537 | 559 | * {@inheritdoc} |
538 | 560 | */ |
539 | - protected function _move($source, $targetDir, $name) { |
|
561 | + protected function _move($source, $targetDir, $name) |
|
562 | + { |
|
540 | 563 | return false; |
541 | 564 | } |
542 | 565 | |
@@ -547,7 +570,8 @@ discard block |
||
547 | 570 | * @return bool |
548 | 571 | * @author Dmitry (dio) Levashov |
549 | 572 | **/ |
550 | - protected function _unlink($path) { |
|
573 | + protected function _unlink($path) |
|
574 | + { |
|
551 | 575 | return false; |
552 | 576 | return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime!="directory" LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows; |
553 | 577 | } |
@@ -559,7 +583,8 @@ discard block |
||
559 | 583 | * @return bool |
560 | 584 | * @author Dmitry (dio) Levashov |
561 | 585 | **/ |
562 | - protected function _rmdir($path) { |
|
586 | + protected function _rmdir($path) |
|
587 | + { |
|
563 | 588 | return false; |
564 | 589 | return $this->query(sprintf('DELETE FROM %s WHERE id=%d AND mime="directory" LIMIT 1', $this->tbf, $path)) && $this->db->affected_rows; |
565 | 590 | } |
@@ -570,7 +595,8 @@ discard block |
||
570 | 595 | * @return void |
571 | 596 | * @author Dmitry Levashov |
572 | 597 | **/ |
573 | - protected function _setContent($path, $fp) { |
|
598 | + protected function _setContent($path, $fp) |
|
599 | + { |
|
574 | 600 | rewind($fp); |
575 | 601 | $fstat = fstat($fp); |
576 | 602 | $size = $fstat['size']; |
@@ -579,14 +605,16 @@ discard block |
||
579 | 605 | /** |
580 | 606 | * {@inheritdoc} |
581 | 607 | */ |
582 | - protected function _save($fp, $dir, $name, $stat) { |
|
608 | + protected function _save($fp, $dir, $name, $stat) |
|
609 | + { |
|
583 | 610 | return false; |
584 | 611 | } |
585 | 612 | |
586 | 613 | /** |
587 | 614 | * {@inheritdoc} |
588 | 615 | */ |
589 | - protected function _getContents($path) { |
|
616 | + protected function _getContents($path) |
|
617 | + { |
|
590 | 618 | return false; |
591 | 619 | //return ($res = $this->query(sprintf('SELECT content FROM %s WHERE id=%d', $this->tbf, $path))) && ($r = $res->fetch_assoc()) ? $r['content'] : false; |
592 | 620 | } |
@@ -599,7 +627,8 @@ discard block |
||
599 | 627 | * @return bool |
600 | 628 | * @author Dmitry (dio) Levashov |
601 | 629 | **/ |
602 | - protected function _filePutContents($path, $content) { |
|
630 | + protected function _filePutContents($path, $content) |
|
631 | + { |
|
603 | 632 | return false; |
604 | 633 | //return $this->query(sprintf('UPDATE %s SET content="%s", size=%d, mtime=%d WHERE id=%d LIMIT 1', $this->tbf, $this->db->real_escape_string($content), strlen($content), time(), $path)); |
605 | 634 | } |
@@ -607,35 +636,40 @@ discard block |
||
607 | 636 | /** |
608 | 637 | * {@inheritdoc} |
609 | 638 | */ |
610 | - protected function _checkArchivers() { |
|
639 | + protected function _checkArchivers() |
|
640 | + { |
|
611 | 641 | return; |
612 | 642 | } |
613 | 643 | |
614 | 644 | /** |
615 | 645 | * {@inheritdoc} |
616 | 646 | */ |
617 | - protected function _unpack($path, $arc) { |
|
647 | + protected function _unpack($path, $arc) |
|
648 | + { |
|
618 | 649 | return; |
619 | 650 | } |
620 | 651 | |
621 | 652 | /** |
622 | 653 | * {@inheritdoc} |
623 | 654 | */ |
624 | - protected function _findSymlinks($path) { |
|
655 | + protected function _findSymlinks($path) |
|
656 | + { |
|
625 | 657 | return false; |
626 | 658 | } |
627 | 659 | |
628 | 660 | /** |
629 | 661 | * {@inheritdoc} |
630 | 662 | */ |
631 | - protected function _extract($path, $arc) { |
|
663 | + protected function _extract($path, $arc) |
|
664 | + { |
|
632 | 665 | return false; |
633 | 666 | } |
634 | 667 | |
635 | 668 | /** |
636 | 669 | * {@inheritdoc} |
637 | 670 | */ |
638 | - protected function _archive($dir, $files, $name, $arc) { |
|
671 | + protected function _archive($dir, $files, $name, $arc) |
|
672 | + { |
|
639 | 673 | return false; |
640 | 674 | } |
641 | 675 |
@@ -8,7 +8,8 @@ |
||
8 | 8 | namespace Chamilo\ThemeBundle\Model; |
9 | 9 | |
10 | 10 | |
11 | -interface TaskInterface { |
|
11 | +interface TaskInterface |
|
12 | +{ |
|
12 | 13 | |
13 | 14 | public function getColor(); |
14 | 15 | public function getProgress(); |
@@ -13,7 +13,8 @@ |
||
13 | 13 | * |
14 | 14 | * @package Chamilo\ThemeBundle\Model |
15 | 15 | */ |
16 | -interface MenuItemInterface { |
|
16 | +interface MenuItemInterface |
|
17 | +{ |
|
17 | 18 | /** |
18 | 19 | * @return mixed |
19 | 20 | */ |
@@ -11,7 +11,8 @@ |
||
11 | 11 | |
12 | 12 | use Symfony\Component\HttpFoundation\Request; |
13 | 13 | |
14 | -class ExceptionController extends \Symfony\Bundle\TwigBundle\Controller\ExceptionController { |
|
14 | +class ExceptionController extends \Symfony\Bundle\TwigBundle\Controller\ExceptionController |
|
15 | +{ |
|
15 | 16 | |
16 | 17 | |
17 | 18 | /** |
@@ -11,7 +11,8 @@ |
||
11 | 11 | use Symfony\Component\Config\Loader\Loader; |
12 | 12 | use Symfony\Component\Config\Loader\LoaderResolverInterface; |
13 | 13 | |
14 | -class MenuLoader extends Loader { |
|
14 | +class MenuLoader extends Loader |
|
15 | +{ |
|
15 | 16 | |
16 | 17 | /** |
17 | 18 | * Loads a resource. |
@@ -69,7 +69,8 @@ |
||
69 | 69 | if (!isset($this->registered[$id])) { |
70 | 70 | continue; |
71 | 71 | } // unregistered |
72 | - if (!$this->hasDependencies($id)) { // standalone |
|
72 | + if (!$this->hasDependencies($id)) { |
|
73 | +// standalone |
|
73 | 74 | $this->queued[] = $this->registered[$id]; |
74 | 75 | $this->resolved[$id] = true; |
75 | 76 |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | * Returns the best match between available languages and visitor preferences |
13 | 13 | * @return string the best match as 2-chars code, null when none match |
14 | 14 | */ |
15 | -function get_preferred_language($available_langs) { |
|
15 | +function get_preferred_language($available_langs) |
|
16 | +{ |
|
16 | 17 | // Parsing the Accept-languages HTTP header |
17 | 18 | $langs = array(); |
18 | 19 | foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $httplang) { |
@@ -41,6 +42,7 @@ discard block |
||
41 | 42 | /** |
42 | 43 | * Get a language variable in a specific language |
43 | 44 | */ |
44 | -function custompages_get_lang($variable) { |
|
45 | +function custompages_get_lang($variable) |
|
46 | +{ |
|
45 | 47 | return get_lang($variable, null, $_SESSION['user_language_choice']); |
46 | 48 | } |