Completed
Push — 1.11.x ( a69e20...60645e )
by José
113:03 queued 73:51
created
main/inc/lib/javascript/svgedit/extensions/savefile_config.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 api_protect_course_script();
19 19
 api_block_anonymous_users();
20 20
 
21
-if(!isset($_POST['output_svg']) && !isset($_POST['output_png'])) {
22
-    api_not_allowed();//from Chamilo
21
+if (!isset($_POST['output_svg']) && !isset($_POST['output_png'])) {
22
+    api_not_allowed(); //from Chamilo
23 23
     die();
24 24
 }
25 25
 
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 //get SVG-Edit values
46
-$filename = $file;//from svg-edit
47
-$extension = $suffix;// from svg-edit
48
-$content = $contents;//from svg-edit
46
+$filename = $file; //from svg-edit
47
+$extension = $suffix; // from svg-edit
48
+$content = $contents; //from svg-edit
49 49
 
50
-$title = Database::escape_string(str_replace('_',' ',$filename));
50
+$title = Database::escape_string(str_replace('_', ' ', $filename));
51 51
 
52 52
 //get Chamilo variables
53 53
 
54 54
 if (!isset($_SESSION['draw_dir']) && !isset($_SESSION['whereami'])) {
55
-    api_not_allowed();//from Chamilo
55
+    api_not_allowed(); //from Chamilo
56 56
     die();
57 57
 }
58 58
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 $relativeUrlPath = $_SESSION['draw_dir'];
62 62
 $currentTool = $_SESSION['whereami'];
63 63
 $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
64
-$saveDir=$dirBaseDocuments.$_SESSION['draw_dir'];
64
+$saveDir = $dirBaseDocuments.$_SESSION['draw_dir'];
65 65
 
66 66
 // a bit title security
67 67
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 */
95 95
 
96 96
 //checks if the file exists, then rename the new
97
-if (file_exists($saveDir.'/'.$filename.'.'.$extension) && $currentTool=='document/createdraw') {
97
+if (file_exists($saveDir.'/'.$filename.'.'.$extension) && $currentTool == 'document/createdraw') {
98 98
     $message = get_lang('FileExistsChangeToSave');
99 99
     $params = array(
100 100
         'message' => $message,
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
 $documentPath = $saveDir.'/'.$drawFileName;
111 111
 
112 112
 //add new document to disk
113
-file_put_contents( $documentPath, $contents );
113
+file_put_contents($documentPath, $contents);
114 114
 
115
-if ($currentTool=='document/createdraw') {
115
+if ($currentTool == 'document/createdraw') {
116 116
     //add document to database
117 117
     $doc_id = add_document($_course, $relativeUrlPath.'/'.$drawFileName, 'file', filesize($documentPath), $title);
118 118
     api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id);
119 119
 
120
-} elseif($currentTool=='document/editdraw') {
120
+} elseif ($currentTool == 'document/editdraw') {
121 121
 
122 122
     //check path
123
-    if (!isset($_SESSION['draw_file'])){
124
-        api_not_allowed();//from Chamilo
123
+    if (!isset($_SESSION['draw_file'])) {
124
+        api_not_allowed(); //from Chamilo
125 125
         die();
126 126
     }
127
-    if ($_SESSION['draw_file'] == $drawFileName ){
127
+    if ($_SESSION['draw_file'] == $drawFileName) {
128 128
         $document_id = DocumentManager::get_document_id($_course, $relativeUrlPath.'/'.$drawFileName);
129 129
         update_existing_document($_course, $document_id, filesize($documentPath), null);
130 130
         api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentUpdated', $_user['user_id'], $groupId, null, null, null, $current_session_id);
Please login to merge, or discard this patch.
main/auth/cas/authcas.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 * Gets all the info via the ldap module (ldap has to work)
6 6
 
7 7
 */
8
-require_once api_get_path(SYS_PATH) . 'main/auth/cas/cas_var.inc.php';
9
-require_once api_get_path(SYS_PATH) . 'main/auth/external_login/ldap.inc.php';
10
-require_once api_get_path(SYS_PATH) . 'main/auth/external_login/functions.inc.php';
8
+require_once api_get_path(SYS_PATH).'main/auth/cas/cas_var.inc.php';
9
+require_once api_get_path(SYS_PATH).'main/auth/external_login/ldap.inc.php';
10
+require_once api_get_path(SYS_PATH).'main/auth/external_login/functions.inc.php';
11 11
 
12 12
 /**
13 13
  * @return true if cas is configured
@@ -187,14 +187,14 @@  discard block
 block discarded – undo
187 187
  */
188 188
 function get_cas_direct_URL($in_course_code)
189 189
 {
190
-    return api_get_path(WEB_PATH) . 'main/auth/cas/logincas.php?firstpage=' . $in_course_code;
190
+    return api_get_path(WEB_PATH).'main/auth/cas/logincas.php?firstpage='.$in_course_code;
191 191
 }
192 192
 
193 193
 function getCASLogoHTML()
194 194
 {
195 195
     $out_res = "";
196 196
     if (api_get_setting("casLogoURL") != "") {
197
-        $out_res = "<img src='" . api_get_setting("casLogoURL") . "' alt='CAS Logo' />";
197
+        $out_res = "<img src='".api_get_setting("casLogoURL")."' alt='CAS Logo' />";
198 198
     }
199 199
     return $out_res;
200 200
 }
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
 // hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
34 34
 //
35 35
 if (!$_SERVER['REQUEST_URI']) {
36
-    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
36
+    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
37 37
 }
38 38
 
39 39
 //
40 40
 // another one by Vangelis Haniotakis also to make phpCAS work with PHP5
41 41
 //
42 42
 if (version_compare(PHP_VERSION, '5', '>=')) {
43
-    require_once(dirname(__FILE__) . '/CAS/domxml-php4-to-php5.php');
43
+    require_once(dirname(__FILE__).'/CAS/domxml-php4-to-php5.php');
44 44
 }
45 45
 
46 46
 /**
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 // ########################################################################
323 323
 
324 324
 // include client class
325
-include_once(dirname(__FILE__) . '/CAS/client.php');
325
+include_once(dirname(__FILE__).'/CAS/client.php');
326 326
 
327 327
 // ########################################################################
328 328
 //  INTERFACE CLASS
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
         phpCAS:: traceBegin();
373 373
         if (is_object($PHPCAS_CLIENT)) {
374
-            phpCAS:: error($PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . $PHPCAS_INIT_CALL['file'] . ':' . $PHPCAS_INIT_CALL['line'] . ')');
374
+            phpCAS:: error($PHPCAS_INIT_CALL['method'].'() has already been called (at '.$PHPCAS_INIT_CALL['file'].':'.$PHPCAS_INIT_CALL['line'].')');
375 375
         }
376 376
         if (gettype($server_version) != 'string') {
377 377
             phpCAS:: error('type mismatched for parameter $server_version (should be `string\')');
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
             'done' => true,
393 393
             'file' => $dbg[0]['file'],
394 394
             'line' => $dbg[0]['line'],
395
-            'method' => __CLASS__ . '::' . __FUNCTION__
395
+            'method' => __CLASS__.'::'.__FUNCTION__
396 396
         );
397 397
 
398 398
         // initialize the global object $PHPCAS_CLIENT
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
         phpCAS:: traceBegin();
423 423
         if (is_object($PHPCAS_CLIENT)) {
424
-            phpCAS:: error($PHPCAS_INIT_CALL['method'] . '() has already been called (at ' . $PHPCAS_INIT_CALL['file'] . ':' . $PHPCAS_INIT_CALL['line'] . ')');
424
+            phpCAS:: error($PHPCAS_INIT_CALL['method'].'() has already been called (at '.$PHPCAS_INIT_CALL['file'].':'.$PHPCAS_INIT_CALL['line'].')');
425 425
         }
426 426
         if (gettype($server_version) != 'string') {
427 427
             phpCAS:: error('type mismatched for parameter $server_version (should be `string\')');
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
             'done' => true,
443 443
             'file' => $dbg[0]['file'],
444 444
             'line' => $dbg[0]['line'],
445
-            'method' => __CLASS__ . '::' . __FUNCTION__
445
+            'method' => __CLASS__.'::'.__FUNCTION__
446 446
         );
447 447
 
448 448
         // initialize the global object $PHPCAS_CLIENT
@@ -477,10 +477,10 @@  discard block
 block discarded – undo
477 477
         if (empty ($filename)) {
478 478
             if (preg_match('/^Win.*/', getenv('OS'))) {
479 479
                 if (isset ($_ENV['TMP'])) {
480
-                    $debugDir = $_ENV['TMP'] . '/';
480
+                    $debugDir = $_ENV['TMP'].'/';
481 481
                 } else {
482 482
                     if (isset ($_ENV['TEMP'])) {
483
-                        $debugDir = $_ENV['TEMP'] . '/';
483
+                        $debugDir = $_ENV['TEMP'].'/';
484 484
                     } else {
485 485
                         $debugDir = '';
486 486
                     }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
             } else {
489 489
                 $debugDir = DEFAULT_DEBUG_DIR;
490 490
             }
491
-            $filename = $debugDir . 'phpCAS.log';
491
+            $filename = $debugDir.'phpCAS.log';
492 492
         }
493 493
 
494 494
         if (empty ($PHPCAS_DEBUG['unique_id'])) {
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             for ($i = 0; $i < $PHPCAS_DEBUG['indent']; $i++) {
537 537
                 $indent_str .= '|    ';
538 538
             }
539
-            error_log($PHPCAS_DEBUG['unique_id'] . ' ' . $indent_str . $str . "\n", 3, $PHPCAS_DEBUG['filename']);
539
+            error_log($PHPCAS_DEBUG['unique_id'].' '.$indent_str.$str."\n", 3, $PHPCAS_DEBUG['filename']);
540 540
         }
541 541
 
542 542
     }
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                 }
567 567
             }
568 568
         }
569
-        echo "<br />\n<b>phpCAS error</b>: <font color=\"FF0000\"><b>" . __CLASS__ . "::" . $function . '(): ' . htmlentities($msg) . "</b></font> in <b>" . $file . "</b> on line <b>" . $line . "</b><br />\n";
569
+        echo "<br />\n<b>phpCAS error</b>: <font color=\"FF0000\"><b>".__CLASS__."::".$function.'(): '.htmlentities($msg)."</b></font> in <b>".$file."</b> on line <b>".$line."</b><br />\n";
570 570
         phpCAS:: trace($msg);
571 571
         phpCAS:: traceExit();
572 572
         exit ();
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
     function trace($str)
579 579
     {
580 580
         $dbg = phpCAS:: backtrace();
581
-        phpCAS:: log($str . ' [' . basename($dbg[1]['file']) . ':' . $dbg[1]['line'] . ']');
581
+        phpCAS:: log($str.' ['.basename($dbg[1]['file']).':'.$dbg[1]['line'].']');
582 582
     }
583 583
 
584 584
     /**
@@ -591,9 +591,9 @@  discard block
 block discarded – undo
591 591
         $dbg = phpCAS:: backtrace();
592 592
         $str = '=> ';
593 593
         if (!empty ($dbg[2]['class'])) {
594
-            $str .= $dbg[2]['class'] . '::';
594
+            $str .= $dbg[2]['class'].'::';
595 595
         }
596
-        $str .= $dbg[2]['function'] . '(';
596
+        $str .= $dbg[2]['function'].'(';
597 597
         if (is_array($dbg[2]['args'])) {
598 598
             foreach ($dbg[2]['args'] as $index => $arg) {
599 599
                 if ($index != 0) {
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
                 $str .= str_replace("\n", "", var_export($arg, true));
603 603
             }
604 604
         }
605
-        $str .= ') [' . basename($dbg[2]['file']) . ':' . $dbg[2]['line'] . ']';
605
+        $str .= ') ['.basename($dbg[2]['file']).':'.$dbg[2]['line'].']';
606 606
         phpCAS:: log($str);
607 607
         $PHPCAS_DEBUG['indent']++;
608 608
     }
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
         $PHPCAS_DEBUG['indent']--;
620 620
         $dbg = phpCAS:: backtrace();
621 621
         $str = '';
622
-        $str .= '<= ' . str_replace("\n", "", var_export($res, true));
622
+        $str .= '<= '.str_replace("\n", "", var_export($res, true));
623 623
         phpCAS:: log($str);
624 624
     }
625 625
 
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
     {
659 659
         global $PHPCAS_CLIENT;
660 660
         if (!is_object($PHPCAS_CLIENT)) {
661
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
661
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
662 662
         }
663 663
         if (gettype($lang) != 'string') {
664 664
             phpCAS:: error('type mismatched for parameter $lang (should be `string\')');
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
     {
704 704
         global $PHPCAS_CLIENT;
705 705
         if (!is_object($PHPCAS_CLIENT)) {
706
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
706
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
707 707
         }
708 708
         if (gettype($header) != 'string') {
709 709
             phpCAS:: error('type mismatched for parameter $header (should be `string\')');
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
     {
721 721
         global $PHPCAS_CLIENT;
722 722
         if (!is_object($PHPCAS_CLIENT)) {
723
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
723
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
724 724
         }
725 725
         if (gettype($footer) != 'string') {
726 726
             phpCAS:: error('type mismatched for parameter $footer (should be `string\')');
@@ -750,13 +750,13 @@  discard block
 block discarded – undo
750 750
 
751 751
         phpCAS:: traceBegin();
752 752
         if (!is_object($PHPCAS_CLIENT)) {
753
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
753
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
754 754
         }
755 755
         if (!$PHPCAS_CLIENT->isProxy()) {
756
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
756
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
757 757
         }
758 758
         if ($PHPCAS_AUTH_CHECK_CALL['done']) {
759
-            phpCAS:: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
759
+            phpCAS:: error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
760 760
         }
761 761
         if (gettype($format) != 'string') {
762 762
             phpCAS:: error('type mismatched for parameter $format (should be `string\')');
@@ -796,13 +796,13 @@  discard block
 block discarded – undo
796 796
 
797 797
         phpCAS:: traceBegin();
798 798
         if (!is_object($PHPCAS_CLIENT)) {
799
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
799
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
800 800
         }
801 801
         if (!$PHPCAS_CLIENT->isProxy()) {
802
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
802
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
803 803
         }
804 804
         if ($PHPCAS_AUTH_CHECK_CALL['done']) {
805
-            phpCAS:: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
805
+            phpCAS:: error('this method should only be called before '.$PHPCAS_AUTH_CHECK_CALL['method'].'() (called at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].')');
806 806
         }
807 807
         if (gettype($user) != 'string') {
808 808
             phpCAS:: error('type mismatched for parameter $user (should be `string\')');
@@ -857,16 +857,16 @@  discard block
 block discarded – undo
857 857
 
858 858
         phpCAS:: traceBegin();
859 859
         if (!is_object($PHPCAS_CLIENT)) {
860
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
860
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
861 861
         }
862 862
         if (!$PHPCAS_CLIENT->isProxy()) {
863
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
863
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
864 864
         }
865 865
         if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
866
-            phpCAS:: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
866
+            phpCAS:: error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
867 867
         }
868 868
         if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
869
-            phpCAS:: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
869
+            phpCAS:: error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
870 870
         }
871 871
         if (gettype($url) != 'string') {
872 872
             phpCAS:: error('type mismatched for parameter $url (should be `string\')');
@@ -901,16 +901,16 @@  discard block
 block discarded – undo
901 901
 
902 902
         phpCAS:: traceBegin();
903 903
         if (!is_object($PHPCAS_CLIENT)) {
904
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
904
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
905 905
         }
906 906
         if (!$PHPCAS_CLIENT->isProxy()) {
907
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
907
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
908 908
         }
909 909
         if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
910
-            phpCAS:: error('this method should only be called after the programmer is sure the user has been authenticated (by calling ' . __CLASS__ . '::checkAuthentication() or ' . __CLASS__ . '::forceAuthentication()');
910
+            phpCAS:: error('this method should only be called after the programmer is sure the user has been authenticated (by calling '.__CLASS__.'::checkAuthentication() or '.__CLASS__.'::forceAuthentication()');
911 911
         }
912 912
         if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
913
-            phpCAS:: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
913
+            phpCAS:: error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
914 914
         }
915 915
         if (gettype($url) != 'string') {
916 916
             phpCAS:: error('type mismatched for parameter $url (should be `string\')');
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
     {
948 948
         global $PHPCAS_CLIENT;
949 949
         if (!is_object($PHPCAS_CLIENT)) {
950
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
950
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
951 951
         }
952 952
         if (gettype($n) != 'integer') {
953 953
             phpCAS:: error('type mismatched for parameter $header (should be `string\')');
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 
966 966
         phpCAS:: traceBegin();
967 967
         if (!is_object($PHPCAS_CLIENT)) {
968
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
968
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
969 969
         }
970 970
 
971 971
         $auth = $PHPCAS_CLIENT->checkAuthentication();
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
             'done' => true,
977 977
             'file' => $dbg[0]['file'],
978 978
             'line' => $dbg[0]['line'],
979
-            'method' => __CLASS__ . '::' . __FUNCTION__,
979
+            'method' => __CLASS__.'::'.__FUNCTION__,
980 980
             'result' => $auth
981 981
         );
982 982
         phpCAS:: traceEnd($auth);
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 
995 995
         phpCAS:: traceBegin();
996 996
         if (!is_object($PHPCAS_CLIENT)) {
997
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
997
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
998 998
         }
999 999
 
1000 1000
         $auth = $PHPCAS_CLIENT->forceAuthentication();
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
             'done' => true,
1006 1006
             'file' => $dbg[0]['file'],
1007 1007
             'line' => $dbg[0]['line'],
1008
-            'method' => __CLASS__ . '::' . __FUNCTION__,
1008
+            'method' => __CLASS__.'::'.__FUNCTION__,
1009 1009
             'result' => $auth
1010 1010
         );
1011 1011
 
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
             phpCAS:: trace('user is not authenticated, redirecting to the CAS server');
1014 1014
             $PHPCAS_CLIENT->forceAuthentication();
1015 1015
         } else {
1016
-            phpCAS:: trace('no need to authenticate (user `' . phpCAS:: getUser() . '\' is already authenticated)');
1016
+            phpCAS:: trace('no need to authenticate (user `'.phpCAS:: getUser().'\' is already authenticated)');
1017 1017
         }
1018 1018
 
1019 1019
         phpCAS:: traceEnd();
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
 
1030 1030
         phpCAS:: traceBegin();
1031 1031
         if (!is_object($PHPCAS_CLIENT)) {
1032
-            phpCAS:: error('this method should not be called before' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1032
+            phpCAS:: error('this method should not be called before'.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1033 1033
         }
1034 1034
 
1035 1035
         // store where the authentication has been checked and the result
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
             'done' => true,
1039 1039
             'file' => $dbg[0]['file'],
1040 1040
             'line' => $dbg[0]['line'],
1041
-            'method' => __CLASS__ . '::' . __FUNCTION__,
1041
+            'method' => __CLASS__.'::'.__FUNCTION__,
1042 1042
             'result' => $auth
1043 1043
         );
1044 1044
 
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
      */
1052 1052
     function authenticate()
1053 1053
     {
1054
-        phpCAS:: error('this method is deprecated. You should use ' . __CLASS__ . '::forceAuthentication() instead');
1054
+        phpCAS:: error('this method is deprecated. You should use '.__CLASS__.'::forceAuthentication() instead');
1055 1055
     }
1056 1056
 
1057 1057
     /**
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
 
1067 1067
         phpCAS:: traceBegin();
1068 1068
         if (!is_object($PHPCAS_CLIENT)) {
1069
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1069
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1070 1070
         }
1071 1071
 
1072 1072
         // call the isAuthenticated method of the global $PHPCAS_CLIENT object
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
             'done' => true,
1079 1079
             'file' => $dbg[0]['file'],
1080 1080
             'line' => $dbg[0]['line'],
1081
-            'method' => __CLASS__ . '::' . __FUNCTION__,
1081
+            'method' => __CLASS__.'::'.__FUNCTION__,
1082 1082
             'result' => $auth
1083 1083
         );
1084 1084
         phpCAS:: traceEnd($auth);
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
     {
1096 1096
         global $PHPCAS_CLIENT;
1097 1097
         if (!is_object($PHPCAS_CLIENT)) {
1098
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1098
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1099 1099
         }
1100 1100
         return ($PHPCAS_CLIENT->isSessionAuthenticated());
1101 1101
     }
@@ -1111,13 +1111,13 @@  discard block
 block discarded – undo
1111 1111
     {
1112 1112
         global $PHPCAS_CLIENT, $PHPCAS_AUTH_CHECK_CALL;
1113 1113
         if (!is_object($PHPCAS_CLIENT)) {
1114
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1114
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1115 1115
         }
1116 1116
         if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
1117
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
1117
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
1118 1118
         }
1119 1119
         if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
1120
-            phpCAS:: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
1120
+            phpCAS:: error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
1121 1121
         }
1122 1122
         return $PHPCAS_CLIENT->getUser();
1123 1123
     }
@@ -1133,13 +1133,13 @@  discard block
 block discarded – undo
1133 1133
     {
1134 1134
         global $PHPCAS_CLIENT, $PHPCAS_AUTH_CHECK_CALL;
1135 1135
         if (!is_object($PHPCAS_CLIENT)) {
1136
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1136
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1137 1137
         }
1138 1138
         if (!$PHPCAS_AUTH_CHECK_CALL['done']) {
1139
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::forceAuthentication() or ' . __CLASS__ . '::isAuthenticated()');
1139
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::forceAuthentication() or '.__CLASS__.'::isAuthenticated()');
1140 1140
         }
1141 1141
         if (!$PHPCAS_AUTH_CHECK_CALL['result']) {
1142
-            phpCAS:: error('authentication was checked (by ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ') but the method returned FALSE');
1142
+            phpCAS:: error('authentication was checked (by '.$PHPCAS_AUTH_CHECK_CALL['method'].'() at '.$PHPCAS_AUTH_CHECK_CALL['file'].':'.$PHPCAS_AUTH_CHECK_CALL['line'].') but the method returned FALSE');
1143 1143
         }
1144 1144
         return $PHPCAS_CLIENT->getAttributes();
1145 1145
     }
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
     {
1152 1152
         global $PHPCAS_CLIENT;
1153 1153
         if (!is_object($PHPCAS_CLIENT)) {
1154
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1154
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1155 1155
         }
1156 1156
         return ($PHPCAS_CLIENT->handleLogoutRequests($check_client, $allowed_clients));
1157 1157
     }
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
     {
1167 1167
         global $PHPCAS_CLIENT;
1168 1168
         if (!is_object($PHPCAS_CLIENT)) {
1169
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1169
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1170 1170
         }
1171 1171
         return $PHPCAS_CLIENT->getServerLoginURL();
1172 1172
     }
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
         phpCAS:: traceBegin();
1183 1183
         if (!is_object($PHPCAS_CLIENT)) {
1184 1184
             phpCAS:: error('this method should only be called after
1185
-							' . __CLASS__ . '::client()');
1185
+							' . __CLASS__.'::client()');
1186 1186
         }
1187 1187
         if (gettype($url) != 'string') {
1188 1188
             phpCAS:: error('type mismatched for parameter $url (should be
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
         phpCAS:: traceBegin();
1205 1205
         if (!is_object($PHPCAS_CLIENT)) {
1206 1206
             phpCAS:: error('this method should only be called after
1207
-							' . __CLASS__ . '::client()');
1207
+							' . __CLASS__.'::client()');
1208 1208
         }
1209 1209
         if (gettype($url) != 'string') {
1210 1210
             phpCAS:: error('type mismatched for parameter $url (should be
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
         phpCAS:: traceBegin();
1227 1227
         if (!is_object($PHPCAS_CLIENT)) {
1228 1228
             phpCAS:: error('this method should only be called after
1229
-							' . __CLASS__ . '::client()');
1229
+							' . __CLASS__.'::client()');
1230 1230
         }
1231 1231
         if (gettype($url) != 'string') {
1232 1232
             phpCAS:: error('type mismatched for parameter $url (should be
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
         phpCAS:: traceBegin();
1248 1248
         if (!is_object($PHPCAS_CLIENT)) {
1249 1249
             phpCAS:: error('this method should only be called after
1250
-							' . __CLASS__ . '::client()');
1250
+							' . __CLASS__.'::client()');
1251 1251
         }
1252 1252
         if (gettype($url) != 'string') {
1253 1253
             phpCAS:: error('type mismatched for parameter $url (should be
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
     {
1268 1268
         global $PHPCAS_CLIENT;
1269 1269
         if (!is_object($PHPCAS_CLIENT)) {
1270
-            phpCAS:: error('this method should not be called before ' . __CLASS__ . '::client() or ' . __CLASS__ . '::proxy()');
1270
+            phpCAS:: error('this method should not be called before '.__CLASS__.'::client() or '.__CLASS__.'::proxy()');
1271 1271
         }
1272 1272
         return $PHPCAS_CLIENT->getServerLogoutURL();
1273 1273
     }
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
         phpCAS:: traceBegin();
1284 1284
         if (!is_object($PHPCAS_CLIENT)) {
1285 1285
             phpCAS:: error('this method should only be called after
1286
-							' . __CLASS__ . '::client()');
1286
+							' . __CLASS__.'::client()');
1287 1287
         }
1288 1288
         if (gettype($url) != 'string') {
1289 1289
             phpCAS:: error('type mismatched for parameter $url (should be
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
         global $PHPCAS_CLIENT;
1304 1304
         phpCAS:: traceBegin();
1305 1305
         if (!is_object($PHPCAS_CLIENT)) {
1306
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1306
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1307 1307
         }
1308 1308
         $parsedParams = array();
1309 1309
         if ($params != "") {
@@ -1334,7 +1334,7 @@  discard block
 block discarded – undo
1334 1334
         global $PHPCAS_CLIENT;
1335 1335
         phpCAS:: traceBegin();
1336 1336
         if (!is_object($PHPCAS_CLIENT)) {
1337
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1337
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1338 1338
         }
1339 1339
         if (!is_string($service)) {
1340 1340
             phpCAS:: error('type mismatched for parameter $service (should be `string\')');
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
         global $PHPCAS_CLIENT;
1356 1356
         phpCAS:: traceBegin();
1357 1357
         if (!is_object($PHPCAS_CLIENT)) {
1358
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1358
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1359 1359
         }
1360 1360
         if (!is_string($url)) {
1361 1361
             phpCAS:: error('type mismatched for parameter $url (should be `string\')');
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
         global $PHPCAS_CLIENT;
1378 1378
         phpCAS:: traceBegin();
1379 1379
         if (!is_object($PHPCAS_CLIENT)) {
1380
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1380
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1381 1381
         }
1382 1382
         if (!is_string($service)) {
1383 1383
             phpCAS:: error('type mismatched for parameter $service (should be `string\')');
@@ -1404,10 +1404,10 @@  discard block
 block discarded – undo
1404 1404
         global $PHPCAS_CLIENT;
1405 1405
         phpCAS:: traceBegin();
1406 1406
         if (!is_object($PHPCAS_CLIENT)) {
1407
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
1407
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
1408 1408
         }
1409 1409
         if (!$PHPCAS_CLIENT->isProxy()) {
1410
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
1410
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
1411 1411
         }
1412 1412
         if (gettype($url) != 'string') {
1413 1413
             phpCAS:: error('type mismatched for parameter $url (should be `string\')');
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
         global $PHPCAS_CLIENT;
1428 1428
         phpCAS:: traceBegin();
1429 1429
         if (!is_object($PHPCAS_CLIENT)) {
1430
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
1430
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
1431 1431
         }
1432 1432
         if (gettype($url) != 'string') {
1433 1433
             phpCAS:: error('type mismatched for parameter $url (should be `string\')');
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
     {
1444 1444
         global $PHPCAS_CLIENT;
1445 1445
         if (!is_object($PHPCAS_CLIENT)) {
1446
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
1446
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
1447 1447
         }
1448 1448
         return ($PHPCAS_CLIENT->getURL());
1449 1449
     }
@@ -1455,7 +1455,7 @@  discard block
 block discarded – undo
1455 1455
     {
1456 1456
         global $PHPCAS_CLIENT;
1457 1457
         if (!is_object($PHPCAS_CLIENT)) {
1458
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::proxy()');
1458
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::proxy()');
1459 1459
         }
1460 1460
         if (gettype($target_service) != 'string') {
1461 1461
             phpCAS:: error('type mismatched for parameter $target_service(should be `string\')');
@@ -1473,7 +1473,7 @@  discard block
 block discarded – undo
1473 1473
         global $PHPCAS_CLIENT;
1474 1474
         phpCAS:: traceBegin();
1475 1475
         if (!is_object($PHPCAS_CLIENT)) {
1476
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1476
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1477 1477
         }
1478 1478
         if (gettype($cert) != 'string') {
1479 1479
             phpCAS:: error('type mismatched for parameter $cert (should be `string\')');
@@ -1492,7 +1492,7 @@  discard block
 block discarded – undo
1492 1492
         global $PHPCAS_CLIENT;
1493 1493
         phpCAS:: traceBegin();
1494 1494
         if (!is_object($PHPCAS_CLIENT)) {
1495
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1495
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1496 1496
         }
1497 1497
         if (gettype($cert) != 'string') {
1498 1498
             phpCAS:: error('type mismatched for parameter $cert (should be `string\')');
@@ -1509,7 +1509,7 @@  discard block
 block discarded – undo
1509 1509
         global $PHPCAS_CLIENT;
1510 1510
         phpCAS:: traceBegin();
1511 1511
         if (!is_object($PHPCAS_CLIENT)) {
1512
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1512
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1513 1513
         }
1514 1514
         $PHPCAS_CLIENT->setNoCasServerValidation();
1515 1515
         phpCAS:: traceEnd();
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
         global $PHPCAS_CLIENT;
1529 1529
         phpCAS:: traceBegin();
1530 1530
         if (!is_object($PHPCAS_CLIENT)) {
1531
-            phpCAS:: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1531
+            phpCAS:: error('this method should only be called after '.__CLASS__.'::client() or'.__CLASS__.'::proxy()');
1532 1532
         }
1533 1533
         $PHPCAS_CLIENT->setExtraCurlOption($key, $value);
1534 1534
         phpCAS:: traceEnd();
Please login to merge, or discard this patch.
main/inc/lib/usergroup.lib.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             ";
83 83
             $result = Database::query($sql);
84 84
             if (Database::num_rows($result)) {
85
-                $row  = Database::fetch_array($result);
85
+                $row = Database::fetch_array($result);
86 86
 
87 87
                 return $row['count'];
88 88
             }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             ";
103 103
             $result = Database::query($sql);
104 104
             if (Database::num_rows($result)) {
105
-                $row  = Database::fetch_array($result);
105
+                $row = Database::fetch_array($result);
106 106
                 return $row['count'];
107 107
             }
108 108
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             ";
128 128
             $result = Database::query($sql);
129 129
             if (Database::num_rows($result)) {
130
-                $row  = Database::fetch_array($result);
130
+                $row = Database::fetch_array($result);
131 131
                 return $row['count'];
132 132
             }
133 133
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             ";
149 149
             $result = Database::query($sql);
150 150
             if (Database::num_rows($result)) {
151
-                $row  = Database::fetch_array($result);
151
+                $row = Database::fetch_array($result);
152 152
                 return $row['count'];
153 153
             }
154 154
 
@@ -529,13 +529,13 @@  discard block
 block discarded – undo
529 529
                 INNER JOIN {$this->table} g
530 530
                 ON (u.usergroup_id = g.id)
531 531
                 ";
532
-            $where =  array('where' => array('user_id = ? AND access_url_id = ? ' => array($userId, $urlId)));
532
+            $where = array('where' => array('user_id = ? AND access_url_id = ? ' => array($userId, $urlId)));
533 533
         } else {
534 534
             $from = $this->usergroup_rel_user_table." u
535 535
                 INNER JOIN {$this->table} g
536 536
                 ON (u.usergroup_id = g.id)
537 537
                 ";
538
-            $where =  array('where' => array('user_id = ?' => $userId));
538
+            $where = array('where' => array('user_id = ?' => $userId));
539 539
         }
540 540
 
541 541
         if ($filterByType !== null) {
@@ -568,10 +568,10 @@  discard block
 block discarded – undo
568 568
             $urlId = api_get_current_access_url_id();
569 569
             $from = $this->usergroup_rel_user_table." u
570 570
                     INNER JOIN {$this->access_url_rel_usergroup} a ON (a.usergroup_id AND u.usergroup_id)";
571
-            $where =  array('where' => array('user_id = ? AND access_url_id = ? ' => array($userId, $urlId)));
571
+            $where = array('where' => array('user_id = ? AND access_url_id = ? ' => array($userId, $urlId)));
572 572
         } else {
573 573
             $from = $this->usergroup_rel_user_table." u ";
574
-            $where =  array('where' => array('user_id = ?' => $userId));
574
+            $where = array('where' => array('user_id = ?' => $userId));
575 575
         }
576 576
 
577 577
         $results = Database::select(
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
             }
858 858
             $result = $new_result;
859 859
         }
860
-        $columns = array('name', 'users', 'courses','sessions', 'group_type');
860
+        $columns = array('name', 'users', 'courses', 'sessions', 'group_type');
861 861
 
862 862
         if (!in_array($sidx, $columns)) {
863 863
             $sidx = 'name';
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
                 }
1264 1264
             }
1265 1265
         }
1266
-        $response->addAssign('ajax_list_courses','innerHTML', api_utf8_encode($return));
1266
+        $response->addAssign('ajax_list_courses', 'innerHTML', api_utf8_encode($return));
1267 1267
 
1268 1268
         return $response;
1269 1269
     }
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
      * @param string style css
1373 1373
      * @return array with the file and the style of an image i.e $array['file'] $array['style']
1374 1374
      */
1375
-    public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM , $style = '')
1375
+    public function get_picture_group($id, $picture_file, $height, $size_picture = GROUP_IMAGE_SIZE_MEDIUM, $style = '')
1376 1376
     {
1377 1377
         $picture = array();
1378 1378
         $picture['style'] = $style;
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
             if (file_exists($file) && !is_dir($file)) {
1416 1416
                 $picture['file'] = $image_array['dir'].$picture_file;
1417 1417
             } else {
1418
-                $picture['file'] = Display::returnIconPath('group_na.png',64);
1418
+                $picture['file'] = Display::returnIconPath('group_na.png', 64);
1419 1419
             }
1420 1420
         }
1421 1421
         return $picture;
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
      */
1486 1486
     public function getAllowedPictureExtensions()
1487 1487
     {
1488
-        return $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif');
1488
+        return $allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif');
1489 1489
     }
1490 1490
 
1491 1491
     /**
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
         if (empty($user_id)) {
1520 1520
             $user_id = api_get_user_id();
1521 1521
         }
1522
-        $user_role	= $this->get_user_group_role($user_id, $group_id);
1522
+        $user_role = $this->get_user_group_role($user_id, $group_id);
1523 1523
         if (in_array($user_role, array(GROUP_USER_PERMISSION_ADMIN))) {
1524 1524
             return true;
1525 1525
         } else {
@@ -1537,7 +1537,7 @@  discard block
 block discarded – undo
1537 1537
         if (empty($user_id)) {
1538 1538
             $user_id = api_get_user_id();
1539 1539
         }
1540
-        $user_role	= $this->get_user_group_role($user_id, $group_id);
1540
+        $user_role = $this->get_user_group_role($user_id, $group_id);
1541 1541
         if (in_array($user_role, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
1542 1542
             return true;
1543 1543
         } else {
@@ -1564,7 +1564,7 @@  discard block
 block discarded – undo
1564 1564
             GROUP_USER_PERMISSION_READER,
1565 1565
             GROUP_USER_PERMISSION_HRM,
1566 1566
         );
1567
-        $user_role	= self::get_user_group_role($user_id, $group_id);
1567
+        $user_role = self::get_user_group_role($user_id, $group_id);
1568 1568
         if (in_array($user_role, $roles)) {
1569 1569
             return true;
1570 1570
         } else {
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
      * */
1582 1582
     public function get_user_group_role($user_id, $group_id)
1583 1583
     {
1584
-        $table_group_rel_user= $this->usergroup_rel_user_table;
1584
+        $table_group_rel_user = $this->usergroup_rel_user_table;
1585 1585
         $return_value = 0;
1586 1586
         if (!empty($user_id) && !empty($group_id)) {
1587 1587
             $sql = "SELECT relation_type FROM $table_group_rel_user
@@ -1589,8 +1589,8 @@  discard block
 block discarded – undo
1589 1589
                         usergroup_id = ".intval($group_id)." AND
1590 1590
                         user_id = ".intval($user_id)." ";
1591 1591
             $result = Database::query($sql);
1592
-            if (Database::num_rows($result)>0) {
1593
-                $row = Database::fetch_array($result,'ASSOC');
1592
+            if (Database::num_rows($result) > 0) {
1593
+                $row = Database::fetch_array($result, 'ASSOC');
1594 1594
                 $return_value = $row['relation_type'];
1595 1595
             }
1596 1596
         }
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
         if (is_array($user_list) && is_array($group_list)) {
1646 1646
             foreach ($group_list as $group_id) {
1647 1647
                 foreach ($user_list as $user_id) {
1648
-                    $role = self::get_user_group_role($user_id,$group_id);
1648
+                    $role = self::get_user_group_role($user_id, $group_id);
1649 1649
                     if ($role == 0) {
1650 1650
                         $sql = "INSERT INTO $table_url_rel_group
1651 1651
 		               			SET
@@ -1676,7 +1676,7 @@  discard block
 block discarded – undo
1676 1676
     public function delete_user_rel_group($user_id, $group_id)
1677 1677
     {
1678 1678
         $table = $this->usergroup_rel_user_table;
1679
-        $sql= "DELETE FROM $table
1679
+        $sql = "DELETE FROM $table
1680 1680
                WHERE
1681 1681
                 user_id = ".intval($user_id)." AND
1682 1682
                 usergroup_id = ".intval($group_id)."  ";
@@ -1732,7 +1732,7 @@  discard block
 block discarded – undo
1732 1732
 
1733 1733
         $sql = "UPDATE $table_group_rel_user
1734 1734
    				SET relation_type = ".intval($relation_type)."
1735
-                WHERE user_id = $user_id AND usergroup_id = $group_id" ;
1735
+                WHERE user_id = $user_id AND usergroup_id = $group_id";
1736 1736
         Database::query($sql);
1737 1737
     }
1738 1738
 
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
         if (Database::num_rows($result) > 0) {
1775 1775
             while ($row = Database::fetch_array($result, 'ASSOC')) {
1776 1776
                 if ($with_image) {
1777
-                    $picture = self::get_picture_group($row['id'], $row['picture'],80);
1777
+                    $picture = self::get_picture_group($row['id'], $row['picture'], 80);
1778 1778
                     $img = '<img src="'.$picture['file'].'" />';
1779 1779
                     $row['picture'] = $img;
1780 1780
                 }
@@ -1810,11 +1810,11 @@  discard block
 block discarded – undo
1810 1810
 				ORDER BY count DESC
1811 1811
 				LIMIT $num";
1812 1812
 
1813
-        $result=Database::query($sql);
1813
+        $result = Database::query($sql);
1814 1814
         $array = array();
1815 1815
         while ($row = Database::fetch_array($result, 'ASSOC')) {
1816 1816
             if ($with_image) {
1817
-                $picture = self::get_picture_group($row['id'], $row['picture'],80);
1817
+                $picture = self::get_picture_group($row['id'], $row['picture'], 80);
1818 1818
                 $img = '<img src="'.$picture['file'].'" />';
1819 1819
                 $row['picture'] = $img;
1820 1820
             }
@@ -1859,11 +1859,11 @@  discard block
 block discarded – undo
1859 1859
                 ORDER BY created_at DESC
1860 1860
                 LIMIT $num ";
1861 1861
 
1862
-        $result=Database::query($sql);
1862
+        $result = Database::query($sql);
1863 1863
         $array = array();
1864 1864
         while ($row = Database::fetch_array($result, 'ASSOC')) {
1865 1865
             if ($with_image) {
1866
-                $picture = self::get_picture_group($row['id'], $row['picture'],80);
1866
+                $picture = self::get_picture_group($row['id'], $row['picture'], 80);
1867 1867
                 $img = '<img src="'.$picture['file'].'" />';
1868 1868
                 $row['picture'] = $img;
1869 1869
             }
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
         $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
1898 1898
         $group_id = intval($group_id);
1899 1899
 
1900
-        if (empty($group_id)){
1900
+        if (empty($group_id)) {
1901 1901
             return array();
1902 1902
         }
1903 1903
 
@@ -1912,9 +1912,9 @@  discard block
 block discarded – undo
1912 1912
             $where_relation_condition = '';
1913 1913
         } else {
1914 1914
             $new_relation_type = array();
1915
-            foreach($relation_type as $rel) {
1915
+            foreach ($relation_type as $rel) {
1916 1916
                 $rel = intval($rel);
1917
-                $new_relation_type[] ="'$rel'";
1917
+                $new_relation_type[] = "'$rel'";
1918 1918
             }
1919 1919
             $relation_type = implode(',', $new_relation_type);
1920 1920
             if (!empty($relation_type))
@@ -1958,7 +1958,7 @@  discard block
 block discarded – undo
1958 1958
         $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
1959 1959
         $group_id = intval($group_id);
1960 1960
 
1961
-        if (empty($group_id)){
1961
+        if (empty($group_id)) {
1962 1962
             return array();
1963 1963
         }
1964 1964
 
@@ -1969,7 +1969,7 @@  discard block
 block discarded – undo
1969 1969
 			    WHERE gu.usergroup_id= $group_id
1970 1970
 			    ORDER BY relation_type, firstname";
1971 1971
 
1972
-        $result=Database::query($sql);
1972
+        $result = Database::query($sql);
1973 1973
         $array = array();
1974 1974
         while ($row = Database::fetch_array($result, 'ASSOC')) {
1975 1975
             $array[$row['id']] = $row;
@@ -1998,33 +1998,33 @@  discard block
 block discarded – undo
1998 1998
             case GROUP_USER_PERMISSION_READER:
1999 1999
                 // I'm just a reader
2000 2000
                 $relation_group_title = get_lang('IAmAReader');
2001
-                $links .=  '<li class="'. ($show == 'invite_friends' ? 'active' : '') .'"><a href="group_invitation.php?id='.$group_id.'">'.
2002
-                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')) . get_lang('InviteFriends') . '</a></li>';
2003
-                $links .=  '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2004
-                            Display::return_icon('group_leave.png', get_lang('LeaveGroup')) . get_lang('LeaveGroup') . '</a></li>';
2001
+                $links .= '<li class="'.($show == 'invite_friends' ? 'active' : '').'"><a href="group_invitation.php?id='.$group_id.'">'.
2002
+                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
2003
+                $links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2004
+                            Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
2005 2005
                 if (UserGroup::canLeave($group_info)) {
2006
-                    $links .=  '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2007
-                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')) . get_lang('LeaveGroup') . '</a></li>';
2006
+                    $links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2007
+                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
2008 2008
                 }
2009 2009
                 break;
2010 2010
             case GROUP_USER_PERMISSION_ADMIN:
2011 2011
                 $relation_group_title = get_lang('IAmAnAdmin');
2012
-                $links .=  '<li class="'. ($show == 'group_edit' ? 'active' : '') .'"><a href="group_edit.php?id='.$group_id.'">'.
2013
-                            Display::return_icon('group_edit.png', get_lang('EditGroup')) . get_lang('EditGroup') . '</a></li>';
2014
-                $links .=  '<li class="'. ($show == 'member_list' ? 'active' : '') .'"><a href="group_waiting_list.php?id='.$group_id.'">'.
2015
-                            Display::return_icon('waiting_list.png', get_lang('WaitingList')) . get_lang('WaitingList') . '</a></li>';
2016
-                $links .=  '<li class="'. ($show == 'invite_friends' ? 'active' : '') .'"><a href="group_invitation.php?id='.$group_id.'">'.
2017
-                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')) . get_lang('InviteFriends') . '</a></li>';
2012
+                $links .= '<li class="'.($show == 'group_edit' ? 'active' : '').'"><a href="group_edit.php?id='.$group_id.'">'.
2013
+                            Display::return_icon('group_edit.png', get_lang('EditGroup')).get_lang('EditGroup').'</a></li>';
2014
+                $links .= '<li class="'.($show == 'member_list' ? 'active' : '').'"><a href="group_waiting_list.php?id='.$group_id.'">'.
2015
+                            Display::return_icon('waiting_list.png', get_lang('WaitingList')).get_lang('WaitingList').'</a></li>';
2016
+                $links .= '<li class="'.($show == 'invite_friends' ? 'active' : '').'"><a href="group_invitation.php?id='.$group_id.'">'.
2017
+                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
2018 2018
                 if (UserGroup::canLeave($group_info)) {
2019 2019
                     $links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2020
-                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')) . get_lang('LeaveGroup') . '</a></li>';
2020
+                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
2021 2021
                 }
2022 2022
                 break;
2023 2023
             case GROUP_USER_PERMISSION_PENDING_INVITATION:
2024 2024
 //				$links .=  '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouHaveBeenInvitedJoinNow').'</span></a></li>';
2025 2025
                 break;
2026 2026
             case GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER:
2027
-                $relation_group_title =  get_lang('WaitingForAdminResponse');
2027
+                $relation_group_title = get_lang('WaitingForAdminResponse');
2028 2028
                 break;
2029 2029
             case GROUP_USER_PERMISSION_MODERATOR:
2030 2030
                 $relation_group_title = get_lang('IAmAModerator');
@@ -2032,28 +2032,28 @@  discard block
 block discarded – undo
2032 2032
                 //$links .=  '<li><a href="groups.php?id='.$group_id.'">'.				Display::return_icon('message_list.png', get_lang('MessageList'), array('hspace'=>'6')).'<span class="'.($show=='messages_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MessageList').'</span></a></li>';
2033 2033
                 //$links .=  '<li><a href="group_members.php?id='.$group_id.'">'.		Display::return_icon('member_list.png', get_lang('MemberList'), array('hspace'=>'6')).'<span class="'.($show=='member_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MemberList').'</span></a></li>';
2034 2034
                 if ($group_info['visibility'] == GROUP_PERMISSION_CLOSED) {
2035
-                    $links .=  '<li><a href="group_waiting_list.php?id='.$group_id.'">'.
2036
-                                Display::return_icon('waiting_list.png', get_lang('WaitingList')) . get_lang('WaitingList') . '</a></li>';
2035
+                    $links .= '<li><a href="group_waiting_list.php?id='.$group_id.'">'.
2036
+                                Display::return_icon('waiting_list.png', get_lang('WaitingList')).get_lang('WaitingList').'</a></li>';
2037 2037
                 }
2038
-                $links .=  '<li><a href="group_invitation.php?id='.$group_id.'">'.
2039
-                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')) . get_lang('InviteFriends') . '</a></li>';
2038
+                $links .= '<li><a href="group_invitation.php?id='.$group_id.'">'.
2039
+                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
2040 2040
                 if (UserGroup::canLeave($group_info)) {
2041
-                    $links .=  '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2042
-                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')) . get_lang('LeaveGroup') . '</a></li>';
2041
+                    $links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2042
+                        Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
2043 2043
                 }
2044 2044
                 break;
2045 2045
             case GROUP_USER_PERMISSION_HRM:
2046 2046
                 $relation_group_title = get_lang('IAmAHRM');
2047 2047
                 $links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax" title="'.get_lang('ComposeMessage').'" data-size="lg" data-title="'.get_lang('ComposeMessage').'">'.
2048
-                            Display::return_icon('new-message.png', get_lang('NewTopic')) . get_lang('NewTopic') . '</a></li>';
2049
-                $links .=  '<li><a href="group_view.php?id='.$group_id.'">'.
2050
-                            Display::return_icon('message_list.png', get_lang('MessageList')) . get_lang('MessageList') . '</a></li>';
2051
-                $links .=  '<li><a href="group_invitation.php?id='.$group_id.'">'.
2052
-                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')) . get_lang('InviteFriends') . '</a></li>';
2053
-                $links .=  '<li><a href="group_members.php?id='.$group_id.'">'.
2054
-                            Display::return_icon('member_list.png', get_lang('MemberList')) . get_lang('MemberList') . '</a></li>';
2055
-                $links .=  '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2056
-                            Display::return_icon('delete_data.gif', get_lang('LeaveGroup')) . get_lang('LeaveGroup') . '</a></li>';
2048
+                            Display::return_icon('new-message.png', get_lang('NewTopic')).get_lang('NewTopic').'</a></li>';
2049
+                $links .= '<li><a href="group_view.php?id='.$group_id.'">'.
2050
+                            Display::return_icon('message_list.png', get_lang('MessageList')).get_lang('MessageList').'</a></li>';
2051
+                $links .= '<li><a href="group_invitation.php?id='.$group_id.'">'.
2052
+                            Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
2053
+                $links .= '<li><a href="group_members.php?id='.$group_id.'">'.
2054
+                            Display::return_icon('member_list.png', get_lang('MemberList')).get_lang('MemberList').'</a></li>';
2055
+                $links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
2056
+                            Display::return_icon('delete_data.gif', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
2057 2057
                 break;
2058 2058
             default:
2059 2059
                 //$links .=  '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('JoinGroup'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('JoinGroup').'</a></span></li>';
@@ -2090,14 +2090,14 @@  discard block
 block discarded – undo
2090 2090
      */
2091 2091
     public function get_groups_by_user_count($user_id = '', $relation_type = GROUP_USER_PERMISSION_READER, $with_image = false)
2092 2092
     {
2093
-        $table_group_rel_user	= $this->usergroup_rel_user_table;
2094
-        $tbl_group				= $this->table;
2095
-        $user_id 				= intval($user_id);
2093
+        $table_group_rel_user = $this->usergroup_rel_user_table;
2094
+        $tbl_group = $this->table;
2095
+        $user_id = intval($user_id);
2096 2096
 
2097 2097
         if ($relation_type == 0) {
2098 2098
             $where_relation_condition = '';
2099 2099
         } else {
2100
-            $relation_type 			= intval($relation_type);
2100
+            $relation_type = intval($relation_type);
2101 2101
             $where_relation_condition = "AND gu.relation_type = $relation_type ";
2102 2102
         }
2103 2103
 
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
         }
2171 2171
 
2172 2172
         $direction = 'ASC';
2173
-        if (!in_array($direction, array('ASC','DESC'))) {
2173
+        if (!in_array($direction, array('ASC', 'DESC'))) {
2174 2174
             $direction = 'ASC';
2175 2175
         }
2176 2176
 
@@ -2181,8 +2181,8 @@  discard block
 block discarded – undo
2181 2181
         $sql .= " LIMIT $from,$number_of_items";
2182 2182
 
2183 2183
         $res = Database::query($sql);
2184
-        if (Database::num_rows($res)> 0) {
2185
-            while ($row = Database::fetch_array($res,'ASSOC')) {
2184
+        if (Database::num_rows($res) > 0) {
2185
+            while ($row = Database::fetch_array($res, 'ASSOC')) {
2186 2186
                 if (!in_array($row['id'], $return)) {
2187 2187
                     $return[$row['id']] = $row;
2188 2188
                 }
@@ -2207,7 +2207,7 @@  discard block
 block discarded – undo
2207 2207
             if ($i == $max_level) {
2208 2208
                 $select_part .= "rg$rg_number.group_id as id_$rg_number ";
2209 2209
             } else {
2210
-                $select_part .="rg$rg_number.group_id as id_$rg_number, ";
2210
+                $select_part .= "rg$rg_number.group_id as id_$rg_number, ";
2211 2211
             }
2212 2212
             if ($i == 1) {
2213 2213
                 $cond_part .= "FROM $t_rel_group rg0 LEFT JOIN $t_rel_group rg$i on rg$rg_number.group_id = rg$i.subgroup_id ";
@@ -2395,7 +2395,7 @@  discard block
 block discarded – undo
2395 2395
         $nameList = '<ul class="list-unstyled">';
2396 2396
 
2397 2397
         foreach ($groupsNameListParsed as $name) {
2398
-            $nameList .= '<li>' . Display::span($name, ['class' => 'label label-info']) . '</li>';
2398
+            $nameList .= '<li>'.Display::span($name, ['class' => 'label label-info']).'</li>';
2399 2399
         }
2400 2400
 
2401 2401
         $nameList .= '</ul>';
Please login to merge, or discard this patch.
main/inc/ajax/sequence.ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     try {
45 45
                         $graphImage = $graphviz->createImageHtml($graph);
46 46
                     } catch (UnexpectedValueException $e) {
47
-                        error_log($e->getMessage() . ' - Graph could not be rendered in resources sequence because GraphViz command "dot" could not be executed - Make sure graphviz is installed.');
47
+                        error_log($e->getMessage().' - Graph could not be rendered in resources sequence because GraphViz command "dot" could not be executed - Make sure graphviz is installed.');
48 48
                         $graphImage = '<p class="text-center"><small>'.get_lang('MissingChartLibraryPleaseCheckLog').'</small></p>';
49 49
                     }
50 50
                     echo $graphImage;
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
                         );
91 91
                     }
92 92
 
93
-                    $link = '<div class="parent" data-id="' . $id . '">';
93
+                    $link = '<div class="parent" data-id="'.$id.'">';
94 94
                     $link .= '<div class="big-icon">';
95 95
                     $link .= $image;
96
-                    $link .= '<div class="sequence-course">' . $sessionInfo['name'] . '</div>';
97
-                    $link .= '<a href="#" class="sequence-id">' . $id . '</a>';
96
+                    $link .= '<div class="sequence-course">'.$sessionInfo['name'].'</div>';
97
+                    $link .= '<a href="#" class="sequence-id">'.$id.'</a>';
98 98
                     $link .= $linkDelete;
99 99
                     $link .= $linkUndo;
100 100
                     $link .= '</div></div>';
Please login to merge, or discard this patch.
main/admin/skill.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 $listAction = api_get_self();
19 19
 
20
-$action =  '';
20
+$action = '';
21 21
 if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete'])) {
22 22
     $action = $_GET['action'];
23 23
 }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 }
53 53
 $formToDisplay = $form->returnForm();
54 54
 
55
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
56
-$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('ManageSkillsLevels'));
55
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
56
+$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('ManageSkillsLevels'));
57 57
 
58 58
 $tpl = new Template($action);
59 59
 switch ($action) {
Please login to merge, or discard this patch.
main/admin/skill_profile.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 $listAction = api_get_self();
19 19
 
20
-$action =  '';
20
+$action = '';
21 21
 if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete', 'move_up', 'move_down'])) {
22 22
     $action = $_GET['action'];
23 23
 }
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 }
44 44
 $formToDisplay = $form->returnForm();
45 45
 
46
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
47
-$interbreadcrumb[] = array ('url' => 'skill.php', 'name' => get_lang('ManageSkillsLevels'));
48
-$interbreadcrumb[] = array ('url' =>  api_get_self(), 'name' => get_lang('SkillProfile'));
46
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
47
+$interbreadcrumb[] = array('url' => 'skill.php', 'name' => get_lang('ManageSkillsLevels'));
48
+$interbreadcrumb[] = array('url' =>  api_get_self(), 'name' => get_lang('SkillProfile'));
49 49
 
50 50
 $tpl = new Template($action);
51 51
 switch ($action) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $position = $item->getPosition();
57 57
 
58 58
         if (!empty($position)) {
59
-            $item->setPosition($position-1);
59
+            $item->setPosition($position - 1);
60 60
         }
61 61
         $em->persist($item);
62 62
         $em->flush();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $position = $item->getPosition();
71 71
 
72
-        $item->setPosition($position+1);
72
+        $item->setPosition($position + 1);
73 73
 
74 74
         $em->persist($item);
75 75
         $em->flush();
Please login to merge, or discard this patch.
main/document/create_audio.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -63,35 +63,35 @@  discard block
 block discarded – undo
63 63
 }
64 64
 
65 65
 if ($dir[0] != '/') {
66
-    $dir = '/' . $dir;
66
+    $dir = '/'.$dir;
67 67
 }
68 68
 
69 69
 if ($dir[strlen($dir) - 1] != '/') {
70 70
     $dir .= '/';
71 71
 }
72 72
 
73
-$filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document' . $dir;
73
+$filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir;
74 74
 
75 75
 if (!is_dir($filepath)) {
76
-    $filepath = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document/';
76
+    $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
77 77
     $dir = '/';
78 78
 }
79 79
 
80 80
 //groups //TODO: clean
81 81
 if (!empty($groupId)) {
82 82
     $interbreadcrumb[] = array(
83
-        "url" => "../group/group_space.php?" . api_get_cidreq(),
83
+        "url" => "../group/group_space.php?".api_get_cidreq(),
84 84
         "name" => get_lang('GroupSpace')
85 85
     );
86 86
     $group = GroupManager:: get_group_properties($groupId);
87 87
     $path = explode('/', $dir);
88
-    if ('/' . $path[1] != $group['directory']) {
88
+    if ('/'.$path[1] != $group['directory']) {
89 89
         api_not_allowed(true);
90 90
     }
91 91
 }
92 92
 
93 93
 $interbreadcrumb[] = array(
94
-    "url" => "./document.php?curdirpath=" . urlencode($dir) . "&" . api_get_cidreq(),
94
+    "url" => "./document.php?curdirpath=".urlencode($dir)."&".api_get_cidreq(),
95 95
     "name" => get_lang('Documents')
96 96
 );
97 97
 
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
 
129 129
 $dir_acum = '';
130 130
 for ($i = 0; $i < $array_len; $i++) {
131
-    $url_dir = 'document.php?&curdirpath=' . $dir_acum . $dir_array[$i];
131
+    $url_dir = 'document.php?&curdirpath='.$dir_acum.$dir_array[$i];
132 132
     //Max char 80
133 133
     $url_to_who = cut($dir_array[$i], 80);
134 134
     $interbreadcrumb[] = array('url' => $url_dir, 'name' => $url_to_who);
135
-    $dir_acum .= $dir_array[$i] . '/';
135
+    $dir_acum .= $dir_array[$i].'/';
136 136
 }
137 137
 
138 138
 $service = isset($_GET['service']) ? $_GET['service'] : 'pediaphon';
@@ -140,15 +140,15 @@  discard block
 block discarded – undo
140 140
 Display:: display_header($nameTools, 'Doc');
141 141
 
142 142
 echo '<div class="actions">';
143
-echo '<a href="document.php?id=' . $document_id . '">' .
144
-    Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), '',
145
-        ICON_SIZE_MEDIUM) . '</a>';
143
+echo '<a href="document.php?id='.$document_id.'">'.
144
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '',
145
+        ICON_SIZE_MEDIUM).'</a>';
146 146
 
147
-echo '<a href="create_audio.php?' . api_get_cidreq() . '&id=' . $document_id . '&service=pediaphon">' .
148
-    Display::return_icon('pediaphon.png', get_lang('Pediaphon'), '', ICON_SIZE_MEDIUM) . '</a>';
147
+echo '<a href="create_audio.php?'.api_get_cidreq().'&id='.$document_id.'&service=pediaphon">'.
148
+    Display::return_icon('pediaphon.png', get_lang('Pediaphon'), '', ICON_SIZE_MEDIUM).'</a>';
149 149
 
150
-echo '<a href="create_audio.php?' . api_get_cidreq() . '&id=' . $document_id . '&service=google">' .
151
-    Display::return_icon('google.png', get_lang('GoogleAudio'), '', ICON_SIZE_MEDIUM) . '</a>';
150
+echo '<a href="create_audio.php?'.api_get_cidreq().'&id='.$document_id.'&service=google">'.
151
+    Display::return_icon('google.png', get_lang('GoogleAudio'), '', ICON_SIZE_MEDIUM).'</a>';
152 152
 echo '</div>';
153 153
 ?>
154 154
     <!-- javascript and styles for textareaCounter-->
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
 $selected_language = null;
214 214
 
215 215
 while ($row = Database::fetch_array($result_select)) {
216
-    $options[$row['isocode']] = $row['original_name'] . ' (' . $row['english_name'] . ')';
216
+    $options[$row['isocode']] = $row['original_name'].' ('.$row['english_name'].')';
217 217
     if (in_array($row['isocode'], array('de', 'en', 'es', 'fr'))) {
218
-        $options_pedia[$row['isocode']] = $row['original_name'] . ' (' . $row['english_name'] . ')';
218
+        $options_pedia[$row['isocode']] = $row['original_name'].' ('.$row['english_name'].')';
219 219
     }
220 220
 }
221 221
 
222 222
 if ($service == 'google') {
223
-    $selected_language = api_get_language_isocode();//lang default is the course language
223
+    $selected_language = api_get_language_isocode(); //lang default is the course language
224 224
 
225 225
     $form = new FormValidator('form1', 'post', api_get_self().'?'.api_get_cidreq(), '', array('id' => 'form1'));
226 226
     $form->addHeader(get_lang('HelpText2Audio'));
@@ -272,16 +272,16 @@  discard block
 block discarded – undo
272 272
         var voices = new Array()
273 273
 
274 274
         <!--German -->
275
-        voices['de'] = ["<?php echo get_lang('Female') . ' (de1)'; ?>|de1", "<?php echo get_lang('Male') . ' (de2)'; ?>|de2", "<?php echo get_lang('Female') . ' (de3)'; ?>|de3", "<?php echo get_lang('Male') . ' (de4)'; ?>|de4", "<?php echo get_lang('Female') . ' (de5)'; ?>|de5", "<?php echo get_lang('Male') . ' (de6)'; ?>|de6", "<?php echo get_lang('Female') . ' (de7)'; ?>|de7", "<?php echo get_lang('Female') . ' (de8 HQ)'; ?>|de8"]
275
+        voices['de'] = ["<?php echo get_lang('Female').' (de1)'; ?>|de1", "<?php echo get_lang('Male').' (de2)'; ?>|de2", "<?php echo get_lang('Female').' (de3)'; ?>|de3", "<?php echo get_lang('Male').' (de4)'; ?>|de4", "<?php echo get_lang('Female').' (de5)'; ?>|de5", "<?php echo get_lang('Male').' (de6)'; ?>|de6", "<?php echo get_lang('Female').' (de7)'; ?>|de7", "<?php echo get_lang('Female').' (de8 HQ)'; ?>|de8"]
276 276
 
277 277
         <!--English -->
278
-        voices['en'] = ["<?php echo get_lang('Male') . ' (en1)'; ?>|en1", "<?php echo get_lang('Male') . ' (en2 HQ)'; ?>|en2", "<?php echo get_lang('Female') . ' (us1)'; ?>|us1", "<?php echo get_lang('Male') . ' (us2)'; ?>|us2", "<?php echo get_lang('Male') . ' (us3)'; ?>|us3", "<?php echo get_lang('Female') . '(us4 HQ)'; ?>|us4"]
278
+        voices['en'] = ["<?php echo get_lang('Male').' (en1)'; ?>|en1", "<?php echo get_lang('Male').' (en2 HQ)'; ?>|en2", "<?php echo get_lang('Female').' (us1)'; ?>|us1", "<?php echo get_lang('Male').' (us2)'; ?>|us2", "<?php echo get_lang('Male').' (us3)'; ?>|us3", "<?php echo get_lang('Female').'(us4 HQ)'; ?>|us4"]
279 279
 
280 280
         <!--Spanish -->
281
-        voices['es'] = ["<?php echo get_lang('Male') . ' (es5 HQ)'; ?>|es5"]
281
+        voices['es'] = ["<?php echo get_lang('Male').' (es5 HQ)'; ?>|es5"]
282 282
 
283 283
         <!--French -->
284
-        voices['fr'] = ["<?php echo get_lang('Female') . ' (fr8 HQ)'; ?>|fr8"]
284
+        voices['fr'] = ["<?php echo get_lang('Female').' (fr8 HQ)'; ?>|fr8"]
285 285
 
286 286
         $(document).ready(function () {
287 287
             $('.lang').on('change', function () {
@@ -312,11 +312,11 @@  discard block
 block discarded – undo
312 312
  */
313 313
 function downloadMP3_google($filepath, $dir)
314 314
 {
315
-    $location = 'create_audio.php?' . api_get_cidreq() . '&id=' . intval($_POST['id']) . '&service=google';
315
+    $location = 'create_audio.php?'.api_get_cidreq().'&id='.intval($_POST['id']).'&service=google';
316 316
 
317 317
     //security
318 318
     if (!isset($_POST['lang']) && !isset($_POST['text']) && !isset($_POST['title']) && !isset($filepath) && !isset($dir)) {
319
-        echo '<script>window.location.href="' . $location . '"</script>';
319
+        echo '<script>window.location.href="'.$location.'"</script>';
320 320
         return;
321 321
     }
322 322
 
@@ -326,33 +326,33 @@  discard block
 block discarded – undo
326 326
     $clean_title = trim($_POST['title']);
327 327
     $clean_text = trim($_POST['text']);
328 328
     if (empty($clean_title) || empty($clean_text)) {
329
-        echo '<script>window.location.href="' . $location . '"</script>';
329
+        echo '<script>window.location.href="'.$location.'"</script>';
330 330
         
331 331
         return;
332 332
     }
333 333
     $clean_title = Security::remove_XSS($clean_title);
334 334
     $clean_title = Database::escape_string($clean_title);
335
-    $clean_title = str_replace(' ', '_', $clean_title);//compound file names
335
+    $clean_title = str_replace(' ', '_', $clean_title); //compound file names
336 336
 
337 337
     $clean_text = Security::remove_XSS($clean_text);
338 338
     $clean_lang = Security::remove_XSS($_POST['lang']);
339 339
 
340 340
     $extension = 'mp3';
341
-    $audio_filename = $clean_title . '.' . $extension;
341
+    $audio_filename = $clean_title.'.'.$extension;
342 342
     $audio_title = str_replace('_', ' ', $clean_title);
343 343
 
344 344
     //prevent duplicates
345
-    if (file_exists($filepath . '/' . $clean_title . '.' . $extension)) {
345
+    if (file_exists($filepath.'/'.$clean_title.'.'.$extension)) {
346 346
         $i = 1;
347
-        while (file_exists($filepath . '/' . $clean_title . '_' . $i . '.' . $extension)) {
347
+        while (file_exists($filepath.'/'.$clean_title.'_'.$i.'.'.$extension)) {
348 348
             $i++;
349 349
         }
350
-        $audio_filename = $clean_title . '_' . $i . '.' . $extension;
351
-        $audio_title = $clean_title . '_' . $i . '.' . $extension;
350
+        $audio_filename = $clean_title.'_'.$i.'.'.$extension;
351
+        $audio_title = $clean_title.'_'.$i.'.'.$extension;
352 352
         $audio_title = str_replace('_', ' ', $audio_title);
353 353
     }
354 354
 
355
-    $documentPath = $filepath . '/' . $audio_filename;
355
+    $documentPath = $filepath.'/'.$audio_filename;
356 356
 
357 357
     $clean_text = api_replace_dangerous_char($clean_text);
358 358
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
     $proxySettings = api_get_configuration_value('proxy_settings');
363 363
     $key = api_get_configuration_value('translate_app_google_key');
364
-    $url = "https://www.googleapis.com/language/translate/v2?key=$key&" . $clean_lang . "&target=$clean_lang&q=" . urlencode($clean_text) . "";
364
+    $url = "https://www.googleapis.com/language/translate/v2?key=$key&".$clean_lang."&target=$clean_lang&q=".urlencode($clean_text)."";
365 365
 
366 366
     if (empty($proxySettings)) {
367 367
         $content = file_get_contents($url);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
     $relativeUrlPath = $dir;
382 382
     $doc_id = add_document(
383 383
         $_course,
384
-        $relativeUrlPath . $audio_filename,
384
+        $relativeUrlPath.$audio_filename,
385 385
         'file',
386 386
         filesize($documentPath),
387 387
         $audio_title
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     );
401 401
     Display::display_confirmation_message(get_lang('DocumentCreated'));
402 402
     //return to location
403
-    echo '<script>window.location.href="' . $location . '"</script>';
403
+    echo '<script>window.location.href="'.$location.'"</script>';
404 404
 }
405 405
 
406 406
 /**
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
  */
414 414
 function downloadMP3_pediaphon($filepath, $dir)
415 415
 {
416
-    $location = 'create_audio.php?' . api_get_cidreq() . '&id=' . intval($_POST['id']) . '&service=pediaphon';
416
+    $location = 'create_audio.php?'.api_get_cidreq().'&id='.intval($_POST['id']).'&service=pediaphon';
417 417
     //security
418 418
     if (!isset($_POST['lang']) && !isset($_POST['text']) && !isset($_POST['title']) && !isset($filepath) && !isset($dir)) {
419
-        echo '<script>window.location.href="' . $location . '"</script>';
419
+        echo '<script>window.location.href="'.$location.'"</script>';
420 420
         return;
421 421
     }
422 422
     $_course = api_get_course_info();
@@ -426,33 +426,33 @@  discard block
 block discarded – undo
426 426
     $clean_text = trim($_POST['text']);
427 427
     $clean_voices = Security::remove_XSS($_POST['voices']);
428 428
     if (empty($clean_title) || empty($clean_text) || empty($clean_voices)) {
429
-        echo '<script>window.location.href="' . $location . '"</script>';
429
+        echo '<script>window.location.href="'.$location.'"</script>';
430 430
 
431 431
         return;
432 432
     }
433 433
     $clean_title = Security::remove_XSS($clean_title);
434 434
     $clean_title = Database::escape_string($clean_title);
435
-    $clean_title = str_replace(' ', '_', $clean_title);//compound file names
435
+    $clean_title = str_replace(' ', '_', $clean_title); //compound file names
436 436
     $clean_text = Security::remove_XSS($clean_text);
437 437
     $clean_lang = Security::remove_XSS($_POST['lang']);
438 438
     $clean_speed = Security::remove_XSS($_POST['speed']);
439 439
 
440 440
     $extension = 'mp3';
441
-    $audio_filename = $clean_title . '.' . $extension;
441
+    $audio_filename = $clean_title.'.'.$extension;
442 442
     $audio_title = str_replace('_', ' ', $clean_title);
443 443
 
444 444
     //prevent duplicates
445
-    if (file_exists($filepath . '/' . $clean_title . '.' . $extension)) {
445
+    if (file_exists($filepath.'/'.$clean_title.'.'.$extension)) {
446 446
         $i = 1;
447
-        while (file_exists($filepath . '/' . $clean_title . '_' . $i . '.' . $extension)) {
447
+        while (file_exists($filepath.'/'.$clean_title.'_'.$i.'.'.$extension)) {
448 448
             $i++;
449 449
         }
450
-        $audio_filename = $clean_title . '_' . $i . '.' . $extension;
451
-        $audio_title = $clean_title . '_' . $i . '.' . $extension;
450
+        $audio_filename = $clean_title.'_'.$i.'.'.$extension;
451
+        $audio_title = $clean_title.'_'.$i.'.'.$extension;
452 452
         $audio_title = str_replace('_', ' ', $audio_title);
453 453
     }
454 454
 
455
-    $documentPath = $filepath . '/' . $audio_filename;
455
+    $documentPath = $filepath.'/'.$audio_filename;
456 456
     $clean_text = api_replace_dangerous_char($clean_text);
457 457
 
458 458
     //adding the file
@@ -461,17 +461,17 @@  discard block
 block discarded – undo
461 461
         $url_pediaphon = 'http://www.pediaphon.org/~bischoff/radiopedia/sprich_multivoice.cgi';
462 462
         $find_t2v = '/http\:\/\/www\.pediaphon\.org\/\~bischoff\/radiopedia\/mp3\/(.*)\.mp3\"/';
463 463
     } else {
464
-        $url_pediaphon = 'http://www.pediaphon.org/~bischoff/radiopedia/sprich_multivoice_' . $clean_lang . '.cgi';//en, es, fr
465
-        $find_t2v = '/http\:\/\/www\.pediaphon\.org\/\~bischoff\/radiopedia\/mp3\/' . $clean_lang . '\/(.*)\.mp3\"/';
464
+        $url_pediaphon = 'http://www.pediaphon.org/~bischoff/radiopedia/sprich_multivoice_'.$clean_lang.'.cgi'; //en, es, fr
465
+        $find_t2v = '/http\:\/\/www\.pediaphon\.org\/\~bischoff\/radiopedia\/mp3\/'.$clean_lang.'\/(.*)\.mp3\"/';
466 466
     }
467 467
 
468
-    $data = "stimme=" . $clean_voices . "&inputtext=" . $clean_text . "&speed=" . $clean_speed . "&go=speak";
468
+    $data = "stimme=".$clean_voices."&inputtext=".$clean_text."&speed=".$clean_speed."&go=speak";
469 469
     $opts = array(
470 470
         'http' =>
471 471
             array(
472 472
                 'method' => 'POST',
473 473
                 'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
474
-                "Content-Length: " . strlen($data) . "\r\n",
474
+                "Content-Length: ".strlen($data)."\r\n",
475 475
                 'content' => $data
476 476
             )
477 477
     );
@@ -515,5 +515,5 @@  discard block
 block discarded – undo
515 515
     );
516 516
     Display::display_confirmation_message(get_lang('DocumentCreated'));
517 517
     //return to location
518
-    echo '<script>window.location.href="' . $location . '"</script>';
518
+    echo '<script>window.location.href="'.$location.'"</script>';
519 519
 }
Please login to merge, or discard this patch.
main/badge/issued_all.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $skillId = isset($_GET['skill']) ? intval($_GET['skill']) : 0;
14 14
 
15 15
 if (!$userId || !$skillId) {
16
-    header('Location: ' . api_get_path(WEB_PATH));
16
+    header('Location: '.api_get_path(WEB_PATH));
17 17
     exit;
18 18
 }
19 19
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         Display::return_message(get_lang('NoResults'), 'error')
32 32
     );
33 33
 
34
-    header('Location: ' . api_get_path(WEB_PATH));
34
+    header('Location: '.api_get_path(WEB_PATH));
35 35
     exit;
36 36
 }
37 37
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $entityManager->persist($skillIssue);
168 168
         $entityManager->flush();
169 169
 
170
-        header("Location: " . $skillIssue->getIssueUrlAll());
170
+        header("Location: ".$skillIssue->getIssueUrlAll());
171 171
         exit;
172 172
     }
173 173
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $entityManager->persist($skillUserComment);
199 199
         $entityManager->flush();
200 200
 
201
-        header("Location: " . $skillIssue->getIssueUrlAll());
201
+        header("Location: ".$skillIssue->getIssueUrlAll());
202 202
         exit;
203 203
     }
204 204
 
@@ -214,11 +214,11 @@  discard block
 block discarded – undo
214 214
             $backpack = $configBackpack;
215 215
         }
216 216
 
217
-        $htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>';
217
+        $htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>';
218 218
         $objSkill = new Skill();
219 219
         $assertionUrl = $skillIssueInfo['badge_assertion'];
220 220
         $skills = $objSkill->get($skillId);
221
-        $unbakedBadge = api_get_path(SYS_UPLOAD_PATH) . "badges/".$skills['icon'];
221
+        $unbakedBadge = api_get_path(SYS_UPLOAD_PATH)."badges/".$skills['icon'];
222 222
         if (!is_file($unbakedBadge)) {
223 223
             $unbakedBadge = api_get_path(WEB_CODE_PATH).'img/icons/128/badges-default.png';
224 224
         }
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
                 mkdir($bakedBadge, api_get_permissions_for_new_directories(), true);
237 237
             }
238 238
             $skillRelUserId = $skillIssueInfo['id'];
239
-            if (!file_exists($bakedBadge . "/badge_" . $skillRelUserId)) {
240
-                file_put_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png", $bakedInfo);
239
+            if (!file_exists($bakedBadge."/badge_".$skillRelUserId)) {
240
+                file_put_contents($bakedBadge."/badge_".$skillRelUserId.".png", $bakedInfo);
241 241
             }
242 242
 
243 243
             //Process to validate a baked badge
244
-            $badgeContent = file_get_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png");
244
+            $badgeContent = file_get_contents($bakedBadge."/badge_".$skillRelUserId.".png");
245 245
             $verifyBakedBadge = $png->extractBadgeInfo($badgeContent);
246 246
             if (!is_array($verifyBakedBadge)) {
247 247
                 $badgeInfoError = true;
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
             if (!$badgeInfoError) {
251 251
                 $personalBadge = UserManager::getUserPathById($userId, "web");
252
-                $personalBadge = $personalBadge."badges/badge_" . $skillRelUserId . ".png";
252
+                $personalBadge = $personalBadge."badges/badge_".$skillRelUserId.".png";
253 253
             }
254 254
         }
255 255
     }
Please login to merge, or discard this patch.