Completed
Push — master ( f173a6...4a27fe )
by Angel Fernando Quiroz
37:49 queued 04:39
created
plugin/sepe/src/wsse/soap-wsse.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         if ($this->secNode == NULL) {
60 60
             $headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header');
61 61
             $header = $headers->item(0);
62
-            if (! $header) {
62
+            if (!$header) {
63 63
                 $header = $this->soapDoc->createElementNS($this->soapNS, $this->soapPFX.':Header');
64 64
                 $this->envelope->insertBefore($header, $this->envelope->firstChild);
65 65
             }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                     break;
73 73
                 }
74 74
             }
75
-            if (! $secnode) {
75
+            if (!$secnode) {
76 76
                 $secnode = $this->soapDoc->createElementNS(self::WSSENS, self::WSSEPFX.':Security');
77 77
                 ///if (isset($secnode) && !empty($secnode)) {
78 78
                     $header->appendChild($secnode);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 if ($bMustUnderstand) {
81 81
                     $secnode->setAttributeNS($this->soapNS, $this->soapPFX.':mustUnderstand', '1');
82 82
                 }
83
-                if (! empty($setActor)) {
83
+                if (!empty($setActor)) {
84 84
                     $ename = 'actor';
85 85
                     if ($this->soapNS == 'http://www.w3.org/2003/05/soap-envelope') {
86 86
                         $ename = 'role';
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         return $this->secNode;
94 94
     }
95 95
 
96
-    public function __construct($doc, $bMustUnderstand = TRUE, $setActor=NULL) {
96
+    public function __construct($doc, $bMustUnderstand = TRUE, $setActor = NULL) {
97 97
         $this->soapDoc = $doc;
98 98
         $this->envelope = $doc->documentElement;
99 99
         $this->soapNS = $this->envelope->namespaceURI;
@@ -104,22 +104,22 @@  discard block
 block discarded – undo
104 104
         $this->locateSecurityHeader($bMustUnderstand, $setActor);
105 105
     }
106 106
 
107
-    public function addTimestamp($secondsToExpire=3600) {
107
+    public function addTimestamp($secondsToExpire = 3600) {
108 108
         /* Add the WSU timestamps */
109 109
         $security = $this->locateSecurityHeader();
110 110
 
111 111
         $timestamp = $this->soapDoc->createElementNS(self::WSUNS, self::WSUPFX.':Timestamp');
112 112
         $security->insertBefore($timestamp, $security->firstChild);
113 113
         $currentTime = time();
114
-        $created = $this->soapDoc->createElementNS(self::WSUNS,  self::WSUPFX.':Created', gmdate("Y-m-d\TH:i:s", $currentTime).'Z');
114
+        $created = $this->soapDoc->createElementNS(self::WSUNS, self::WSUPFX.':Created', gmdate("Y-m-d\TH:i:s", $currentTime).'Z');
115 115
         $timestamp->appendChild($created);
116
-        if (! is_null($secondsToExpire)) {
117
-            $expire = $this->soapDoc->createElementNS(self::WSUNS,  self::WSUPFX.':Expires', gmdate("Y-m-d\TH:i:s", $currentTime + $secondsToExpire).'Z');
116
+        if (!is_null($secondsToExpire)) {
117
+            $expire = $this->soapDoc->createElementNS(self::WSUNS, self::WSUPFX.':Expires', gmdate("Y-m-d\TH:i:s", $currentTime + $secondsToExpire).'Z');
118 118
             $timestamp->appendChild($expire);
119 119
         }
120 120
     }
121 121
 
122
-    public function addUserToken($userName, $password=NULL, $passwordDigest=FALSE) {
122
+    public function addUserToken($userName, $password = NULL, $passwordDigest = FALSE) {
123 123
         if ($passwordDigest && empty($password)) {
124 124
             throw new Exception("Cannot calculate the digest without a password");
125 125
         }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $token = $this->soapDoc->createElementNS(self::WSSENS, self::WSSEPFX.':UsernameToken');
130 130
         $security->insertBefore($token, $security->firstChild);
131 131
 
132
-        $username = $this->soapDoc->createElementNS(self::WSSENS,  self::WSSEPFX.':Username', $userName);
132
+        $username = $this->soapDoc->createElementNS(self::WSSENS, self::WSSEPFX.':Username', $userName);
133 133
         $token->appendChild($username);
134 134
 
135 135
         /* Generate nonce - create a 256 bit session key to be used */
@@ -141,22 +141,22 @@  discard block
 block discarded – undo
141 141
         if ($password) {
142 142
             $passType = self::WSUNAME.'#PasswordText';
143 143
             if ($passwordDigest) {
144
-                $password = base64_encode(sha1($nonce.$createdate. $password, true));
144
+                $password = base64_encode(sha1($nonce.$createdate.$password, true));
145 145
                 $passType = self::WSUNAME.'#PasswordDigest';
146 146
             }
147
-            $passwordNode = $this->soapDoc->createElementNS(self::WSSENS,  self::WSSEPFX.':Password', $password);
147
+            $passwordNode = $this->soapDoc->createElementNS(self::WSSENS, self::WSSEPFX.':Password', $password);
148 148
             $token->appendChild($passwordNode);
149 149
             $passwordNode->setAttribute('Type', $passType);
150 150
         }
151 151
 
152
-        $nonceNode = $this->soapDoc->createElementNS(self::WSSENS,  self::WSSEPFX.':Nonce', base64_encode($nonce));
152
+        $nonceNode = $this->soapDoc->createElementNS(self::WSSENS, self::WSSEPFX.':Nonce', base64_encode($nonce));
153 153
         $token->appendChild($nonceNode);
154 154
 
155
-        $created = $this->soapDoc->createElementNS(self::WSUNS,  self::WSUPFX.':Created', $createdate);
155
+        $created = $this->soapDoc->createElementNS(self::WSUNS, self::WSUPFX.':Created', $createdate);
156 156
         $token->appendChild($created);
157 157
     }
158 158
 
159
-    public function addBinaryToken($cert, $isPEMFormat=TRUE, $isDSig=TRUE) {
159
+    public function addBinaryToken($cert, $isPEMFormat = TRUE, $isDSig = TRUE) {
160 160
         $security = $this->locateSecurityHeader();
161 161
         $data = XMLSecurityDSig::get509XCert($cert, $isPEMFormat);
162 162
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     }
172 172
 
173 173
     public function attachTokentoSig($token) {
174
-        if (! ($token instanceof DOMElement)) {
174
+        if (!($token instanceof DOMElement)) {
175 175
             throw new Exception('Invalid parameter: BinarySecurityToken element expected');
176 176
         }
177 177
         $objXMLSecDSig = new XMLSecurityDSig();
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $query = "./secdsig:KeyInfo";
182 182
             $nodeset = $this->SOAPXPath->query($query, $objDSig);
183 183
             $keyInfo = $nodeset->item(0);
184
-            if (! $keyInfo) {
184
+            if (!$keyInfo) {
185 185
                 $keyInfo = $objXMLSecDSig->createNewSignNode('KeyInfo');
186 186
                 $objDSig->appendChild($keyInfo);
187 187
             }
@@ -236,22 +236,22 @@  discard block
 block discarded – undo
236 236
 
237 237
         $insertTop = TRUE;
238 238
         if (is_array($options) && isset($options["insertBefore"])) {
239
-            $insertTop = (bool)$options["insertBefore"];
239
+            $insertTop = (bool) $options["insertBefore"];
240 240
         }
241 241
         $objDSig->appendSignature($this->secNode, $insertTop);
242 242
 
243 243
 /* New suff */
244 244
 
245 245
         if (is_array($options)) {
246
-            if (! empty($options["KeyInfo"]) ) {
247
-                if (! empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
246
+            if (!empty($options["KeyInfo"])) {
247
+                if (!empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
248 248
                     $sigNode = $this->secNode->firstChild->nextSibling;
249 249
                     $objDoc = $sigNode->ownerDocument;
250 250
                     $keyInfo = $sigNode->ownerDocument->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
251 251
                     $sigNode->appendChild($keyInfo);
252
-				    $tokenRef = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX . ':SecurityTokenReference');
252
+				    $tokenRef = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX.':SecurityTokenReference');
253 253
 				    $keyInfo->appendChild($tokenRef);
254
-				    $reference = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX . ':KeyIdentifier');
254
+				    $reference = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX.':KeyIdentifier');
255 255
 				    $reference->setAttribute("ValueType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier");
256 256
 				    $reference->setAttribute("EncodingType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary");
257 257
                     $tokenRef->appendChild($reference);
@@ -271,17 +271,17 @@  discard block
 block discarded – undo
271 271
     }
272 272
 
273 273
     public function addEncryptedKey($node, $key, $token, $options = NULL) {
274
-        if (! $key->encKey) {
274
+        if (!$key->encKey) {
275 275
             return FALSE;
276 276
         }
277 277
         $encKey = $key->encKey;
278 278
         $security = $this->locateSecurityHeader();
279 279
         $doc = $security->ownerDocument;
280
-        if (! $doc->isSameNode($encKey->ownerDocument)) {
280
+        if (!$doc->isSameNode($encKey->ownerDocument)) {
281 281
             $key->encKey = $security->ownerDocument->importNode($encKey, TRUE);
282 282
             $encKey = $key->encKey;
283 283
         }
284
-        if (! empty($key->guid)) {
284
+        if (!empty($key->guid)) {
285 285
             return TRUE;
286 286
         }
287 287
 
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
         $keyInfo->appendChild($tokenRef);
315 315
 /* New suff */
316 316
         if (is_array($options)) {
317
-            if (! empty($options["KeyInfo"]) ) {
318
-                if (! empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
319
-				    $reference = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX . ':KeyIdentifier');
317
+            if (!empty($options["KeyInfo"])) {
318
+                if (!empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
319
+				    $reference = $objDoc->createElementNS(self::WSSENS, self::WSSEPFX.':KeyIdentifier');
320 320
 				    $reference->setAttribute("ValueType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier");
321 321
 				    $reference->setAttribute("EncodingType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary");
322 322
 				    $tokenRef->appendChild($reference);
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     public function AddReference($baseNode, $guid) {
346 346
         $refList = NULL;
347 347
         $child = $baseNode->firstChild;
348
-        while($child) {
348
+        while ($child) {
349 349
             if (($child->namespaceURI == XMLSecEnc::XMLENCNS) && ($child->localName == 'ReferenceList')) {
350 350
                 $refList = $child;
351 351
                 break;
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         $encNode->setAttribute('Id', $guid);
384 384
 
385 385
         $refNode = $encNode->firstChild;
386
-        while($refNode && $refNode->nodeType != XML_ELEMENT_NODE) {
386
+        while ($refNode && $refNode->nodeType != XML_ELEMENT_NODE) {
387 387
             $refNode = $refNode->nextSibling;
388 388
         }
389 389
         if ($refNode) {
@@ -394,12 +394,12 @@  discard block
 block discarded – undo
394 394
         }
395 395
     }
396 396
 
397
-    public function encryptSoapDoc($siteKey, $objKey, $options=NULL, $encryptSignature=TRUE) {
397
+    public function encryptSoapDoc($siteKey, $objKey, $options = NULL, $encryptSignature = TRUE) {
398 398
 
399 399
 		$enc = new XMLSecEnc();
400 400
 
401 401
 		$xpath = new DOMXPath($this->envelope->ownerDocument);
402
-		if ($encryptSignature ==  FALSE) {
402
+		if ($encryptSignature == FALSE) {
403 403
 			$nodes = $xpath->query('//*[local-name()="Body"]');
404 404
 		} else {
405 405
 			$nodes = $xpath->query('//*[local-name()="Signature"] | //*[local-name()="Body"]');
@@ -430,9 +430,9 @@  discard block
 block discarded – undo
430 430
 		$privKey_isCert = FALSE;
431 431
 
432 432
 		if (is_array($options)) {
433
-			$privKey = (! empty($options["keys"]["private"]["key"]) ? $options["keys"]["private"]["key"] : NULL);
434
-			$privKey_isFile = (! empty($options["keys"]["private"]["isFile"]) ? TRUE : FALSE);
435
-			$privKey_isCert = (! empty($options["keys"]["private"]["isCert"])  ? TRUE : FALSE);
433
+			$privKey = (!empty($options["keys"]["private"]["key"]) ? $options["keys"]["private"]["key"] : NULL);
434
+			$privKey_isFile = (!empty($options["keys"]["private"]["isFile"]) ? TRUE : FALSE);
435
+			$privKey_isCert = (!empty($options["keys"]["private"]["isCert"]) ? TRUE : FALSE);
436 436
 		}
437 437
 
438 438
 		$objenc = new XMLSecEnc();
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 		if ($node = $nodes->item(0)) {
449 449
 			$objenc = new XMLSecEnc();
450 450
 			$objenc->setNode($node);
451
-		    if (! $objKey = $objenc->locateKey()) {
451
+		    if (!$objKey = $objenc->locateKey()) {
452 452
 		        throw new Exception("Unable to locate algorithm for this Encrypted Key");
453 453
 		    }
454 454
 		    $objKey->isEncrypted = TRUE;
Please login to merge, or discard this patch.
main/work/work.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4587,7 +4587,7 @@  discard block
 block discarded – undo
4587 4587
         $form->addHtml('<div id="option2" style="display: none;">');
4588 4588
     }
4589 4589
 
4590
-    $timeNextWeek = time()+86400*7;
4590
+    $timeNextWeek = time() + 86400 * 7;
4591 4591
     $nextWeek = substr(api_get_local_time($timeNextWeek), 0, 10);
4592 4592
     if (!isset($defaults['expires_on'])) {
4593 4593
         $date = substr($nextWeek, 0, 10);
@@ -4599,7 +4599,7 @@  discard block
 block discarded – undo
4599 4599
     $form->addElement('checkbox', 'enableEndDate', null, get_lang('EnableEndDate'), 'id="end_date"');
4600 4600
 
4601 4601
     if (!isset($defaults['ends_on'])) {
4602
-        $nextDay = substr(api_get_local_time($timeNextWeek+86400), 0, 10);
4602
+        $nextDay = substr(api_get_local_time($timeNextWeek + 86400), 0, 10);
4603 4603
         $date = substr($nextDay, 0, 10);
4604 4604
         $defaults['ends_on'] = $date.' 23:59';
4605 4605
     }
Please login to merge, or discard this patch.
main/course_progress/thematic_controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
                 case 'export_single_thematic':
247 247
                     $theme = $thematic->get_thematic_list($thematic_id);
248 248
                     $plans = $thematic->get_thematic_plan_data($theme['id']);
249
-                    $plans = array_filter($plans, function ($plan) {
249
+                    $plans = array_filter($plans, function($plan) {
250 250
                         return !empty($plan['description']);
251 251
                     });
252 252
                     $advances = $thematic->get_thematic_advance_by_thematic_id($theme['id']);
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Settings/AbstractSettingsSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function setMultipleAllowedTypes($allowedTypes, $builder)
16 16
     {
17
-        foreach ($allowedTypes as $name => $type)  {
17
+        foreach ($allowedTypes as $name => $type) {
18 18
             $builder->setAllowedTypes($name, $type);
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
main/lp/lp_controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     ) {
40 40
         $htmlHeadXtra[] = '<script>
41 41
     <!--
42
-        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path() . '\';
42
+        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path().'\';
43 43
     -->
44 44
     </script>';
45 45
     $htmlHeadXtra[] = api_get_js('js/jquery.frameready.js');
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     if (isset($_REQUEST['action']) && !in_array($_REQUEST['action'], ['list', 'view', 'view_category'])) {
338 338
         if (!empty($_REQUEST['lp_id'])) {
339 339
             $_REQUEST['action'] = 'view';
340
-        } elseif($_REQUEST['action'] == 'view_category') {
340
+        } elseif ($_REQUEST['action'] == 'view_category') {
341 341
             $_REQUEST['action'] = 'view_category';
342 342
         } else {
343 343
             $_REQUEST['action'] = 'list';
Please login to merge, or discard this patch.
main/admin/settings.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -674,7 +674,7 @@
 block discarded – undo
674 674
     // Get a list of all current 'Plugins' settings
675 675
     $plugin_list = $appPlugin->read_plugins_from_path();
676 676
 
677
-    var_dump($plugin_list);exit;
677
+    var_dump($plugin_list); exit;
678 678
     $installed_plugins = array();
679 679
 
680 680
     foreach ($plugin_list as $plugin) {
Please login to merge, or discard this patch.
main/document/showinframes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -328,12 +328,12 @@
 block discarded – undo
328 328
 $file_url_web = $file_url.'?'.api_get_cidreq();
329 329
 
330 330
 if (in_array(strtolower($pathinfo['extension']), array('html', "htm"))) {
331
-    echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank">' . get_lang('CutPasteLink') . '</a>';
331
+    echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>';
332 332
 }
333 333
 
334 334
 if ($show_web_odf) {
335 335
     $browser = api_get_navigator();
336
-    $pdfUrl = api_get_path(WEB_LIBRARY_JS_PATH) . 'ViewerJS/index.html#' . $file_url;
336
+    $pdfUrl = api_get_path(WEB_LIBRARY_JS_PATH).'ViewerJS/index.html#'.$file_url;
337 337
     if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) {
338 338
         $pdfUrl = $file_url;
339 339
     }
Please login to merge, or discard this patch.
main/inc/lib/api.lib.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
                 $sys_course_code =
890 890
                     isset($_SESSION['_course']['sysCode'])  // User is inside a course?
891 891
                         ? $_SESSION['_course']['sysCode']   // Yes, then use course's directory name.
892
-                        : '{SYS_COURSE_CODE}';              // No, then use a fake code, it may be processed later.
892
+                        : '{SYS_COURSE_CODE}'; // No, then use a fake code, it may be processed later.
893 893
                 $path = $matches[1].'courses/'.$sys_course_code.'/document/'.str_replace('//', '/', $matches[3].'/'.$matches[2]);
894 894
             }
895 895
         }
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 
1328 1328
     if (api_get_setting('extended_profile') === 'true') {
1329 1329
         $result['competences'] = $user->getCompetences();
1330
-        $result['diplomas']  = $user->getDiplomas();
1330
+        $result['diplomas'] = $user->getDiplomas();
1331 1331
         $result['teach'] = $user->getTeach();
1332 1332
         $result['openarea'] = $user->getOpenarea();
1333 1333
     }
@@ -2365,7 +2365,7 @@  discard block
 block discarded – undo
2365 2365
             $filename = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content.txt';
2366 2366
             if (file_exists($filename)) {
2367 2367
                 $value = file_get_contents($filename);
2368
-                    return $value ;
2368
+                    return $value;
2369 2369
             } else {
2370 2370
                 return '';
2371 2371
             }
@@ -2374,7 +2374,7 @@  discard block
 block discarded – undo
2374 2374
             $filename = api_get_path(SYS_PATH).api_get_home_path().'footer_extra_content.txt';
2375 2375
             if (file_exists($filename)) {
2376 2376
                 $value = file_get_contents($filename);
2377
-                return $value ;
2377
+                return $value;
2378 2378
             } else {
2379 2379
                 return '';
2380 2380
             }
@@ -4448,7 +4448,7 @@  discard block
 block discarded – undo
4448 4448
     // This configuration value is set by the vchamilo plugin
4449 4449
     $virtualTheme = api_get_configuration_value('virtual_css_theme_folder');
4450 4450
 
4451
-    $readCssFolder = function ($dir) use ($virtualTheme) {
4451
+    $readCssFolder = function($dir) use ($virtualTheme) {
4452 4452
         $finder = new Finder();
4453 4453
         $themes = $finder->directories()->in($dir)->depth(0)->sortByName();
4454 4454
         $list = [];
@@ -4609,7 +4609,7 @@  discard block
 block discarded – undo
4609 4609
     if (is_file($dirname) || is_link($dirname)) {
4610 4610
         $res = unlink($dirname);
4611 4611
         if ($res === false) {
4612
-            error_log(__FILE__.' line '.__LINE__.': '.((bool)ini_get('track_errors') ? $php_errormsg : 'Error not recorded because track_errors is off in your php.ini'), 0);
4612
+            error_log(__FILE__.' line '.__LINE__.': '.((bool) ini_get('track_errors') ? $php_errormsg : 'Error not recorded because track_errors is off in your php.ini'), 0);
4613 4613
         }
4614 4614
         return $res;
4615 4615
     }
@@ -4646,7 +4646,7 @@  discard block
 block discarded – undo
4646 4646
     if ($delete_only_content_in_folder == false) {
4647 4647
         $res = rmdir($dirname);
4648 4648
         if ($res === false) {
4649
-            error_log(__FILE__.' line '.__LINE__.': '.((bool)ini_get('track_errors') ? $php_errormsg : 'error not recorded because track_errors is off in your php.ini'), 0);
4649
+            error_log(__FILE__.' line '.__LINE__.': '.((bool) ini_get('track_errors') ? $php_errormsg : 'error not recorded because track_errors is off in your php.ini'), 0);
4650 4650
         }
4651 4651
     }
4652 4652
     return $res;
@@ -6515,7 +6515,7 @@  discard block
 block discarded – undo
6515 6515
 
6516 6516
         //languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
6517 6517
         $jqgrid_langs = array(
6518
-            'bg', 'bg1251', 'cat','cn','cs','da','de','el','en','es','fa','fi','fr','gl','he','hu','is','it','ja','nl','no','pl','pt-br','pt','ro','ru','sk','sr','sv','tr','ua'
6518
+            'bg', 'bg1251', 'cat', 'cn', 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'gl', 'he', 'hu', 'is', 'it', 'ja', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru', 'sk', 'sr', 'sv', 'tr', 'ua'
6519 6519
         );
6520 6520
 
6521 6521
         if (in_array($platform_isocode, $jqgrid_langs)) {
@@ -6550,7 +6550,7 @@  discard block
 block discarded – undo
6550 6550
 
6551 6551
     // jquery datepicker
6552 6552
     if (in_array('datepicker', $libraries)) {
6553
-        $languaje   = 'en-GB';
6553
+        $languaje = 'en-GB';
6554 6554
         $platform_isocode = strtolower(api_get_language_isocode());
6555 6555
 
6556 6556
         // languages supported by jqgrid see files in main/inc/lib/javascript/jqgrid/js/i18n
@@ -7930,7 +7930,7 @@  discard block
 block discarded – undo
7930 7930
             $mail->SMTPSecure = $platform_email['SMTP_SECURE'];
7931 7931
         }
7932 7932
     }
7933
-    $mail->SMTPDebug = isset($platform_email['SMTP_DEBUG'])?$platform_email['SMTP_DEBUG']:0;
7933
+    $mail->SMTPDebug = isset($platform_email['SMTP_DEBUG']) ? $platform_email['SMTP_DEBUG'] : 0;
7934 7934
 
7935 7935
     // 5 = low, 1 = high
7936 7936
     $mail->Priority = 3;
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
             Database::query($sql);
519 519
 
520 520
             // Update the table session_rel_course
521
-            $sql = "SELECT COUNT(*) FROM " . Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER) . "
521
+            $sql = "SELECT COUNT(*) FROM ".Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER)."
522 522
                     WHERE session_id = '$session_id' AND c_id = '$course_id' AND status<>2";
523 523
             $row = Database::fetch_array(@Database::query($sql));
524 524
             $count = $row[0];
@@ -2407,11 +2407,11 @@  discard block
 block discarded – undo
2407 2407
             Category::deleteCategoryFromCourse($courseId);
2408 2408
 
2409 2409
             // Delete the course from the database
2410
-            $sql = "DELETE FROM gradebook_link WHERE c_id = '" . $courseId . "'";
2410
+            $sql = "DELETE FROM gradebook_link WHERE c_id = '".$courseId."'";
2411 2411
             Database::query($sql);
2412 2412
 
2413 2413
             // Delete the course from the database
2414
-            $sql = "DELETE FROM $table_course WHERE code = '" . $codeFiltered . "'";
2414
+            $sql = "DELETE FROM $table_course WHERE code = '".$codeFiltered."'";
2415 2415
             Database::query($sql);
2416 2416
 
2417 2417
             // delete extra course fields
@@ -4223,7 +4223,7 @@  discard block
 block discarded – undo
4223 4223
         }
4224 4224
 
4225 4225
         if (api_get_setting('display_coursecode_in_courselist') === 'true') {
4226
-            $session_title .= ' (' . $course_info['visual_code'] . ') ';
4226
+            $session_title .= ' ('.$course_info['visual_code'].') ';
4227 4227
         }
4228 4228
 
4229 4229
         if (api_get_setting('display_teacher_in_courselist') === 'true') {
@@ -5935,7 +5935,7 @@  discard block
 block discarded – undo
5935 5935
     {
5936 5936
         $category_id = intval($category_id);
5937 5937
         $info = Database::fetch_array(
5938
-            Database::query('SELECT c_id FROM ' . Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY) . '
5938
+            Database::query('SELECT c_id FROM '.Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY).'
5939 5939
             WHERE id=' . $category_id), 'ASSOC'
5940 5940
         );
5941 5941
         return $info ? $info['c_id'] : false;
Please login to merge, or discard this patch.