Test Setup Failed
Push — master ( 499243...624c0d )
by Maja
05:54
created
web/admin/edit_hotspot.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 if (!isset($_GET['deployment_id'])) {
39 39
     if (isset($_POST['consortium']) && count($myfed->getAttributes("fed:openroaming")) > 0) {
40 40
         $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']);
41
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
41
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier);
42 42
         exit(0);
43 43
     } else {
44 44
         throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!");
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if (in_array('OK', $response)) {
54 54
             $deployment->deactivate();
55 55
         }
56
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
56
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
57 57
         exit(0);
58 58
     }
59 59
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if (in_array('OK', $response)) {
63 63
             $deployment->activate();
64 64
         }
65
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
65
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
66 66
         exit(0);
67 67
     }
68 68
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $deployment->status = core\DeploymentManaged::INACTIVE;
84 84
             $response = $deployment->setRADIUSconfig();
85 85
         }
86
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
86
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
87 87
         exit(0);
88 88
     }
89 89
 }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     echo $uiElements->instLevelInfoBoxes($my_inst);
112 112
     $deploymentOptions = $deployment->getAttributes();
113 113
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
114
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
114
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
115 115
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
116 116
     ?>
117 117
     <fieldset class='option_container' id='managedsp_override'>
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 <!-- input for VLAN identifier for home users-->
144 144
                 <td>
145 145
                     <span id='vlan_label'>
146
-<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
146
+<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
147 147
                     </span>
148 148
                 </td>
149 149
                 <td>
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     </fieldset>
164 164
 
165 165
     <?php
166
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
166
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
167 167
     echo $deco->footer();
168 168
 
169 169
     
170 170
\ No newline at end of file
Please login to merge, or discard this patch.
core/DeploymentManaged.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id;
271 271
             }
272 272
             if ($clients > $maxSupportedClients * 0.9) {
273
-                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!");
273
+                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!");
274 274
             }
275 275
         }
276 276
         if (count($serverCandidates) == 0 && $federation != "DEFAULT") {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             return $this->findGoodServerLocation($adminLocation, "DEFAULT", $blacklistedServers);
280 280
         }
281 281
         if (count($serverCandidates) == 0) {
282
-            throw new Exception("No available server found for new SP! $federation " . /** @scrutinizer ignore-type */ print_r($serverCandidates, true));
282
+            throw new Exception("No available server found for new SP! $federation "./** @scrutinizer ignore-type */ print_r($serverCandidates, true));
283 283
         }
284 284
         // put the nearest server on top of the list
285 285
         ksort($serverCandidates);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $foundFreePort1 = 0;
308 308
         while ($foundFreePort1 == 0) {
309 309
             $portCandidate = random_int(1200, 65535);
310
-            $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '" . $ourserver . "' AND port_instance_1 = $portCandidate");
310
+            $check = $this->databaseHandle->exec("SELECT port_instance_1 FROM deployment WHERE radius_instance_1 = '".$ourserver."' AND port_instance_1 = $portCandidate");
311 311
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) {
312 312
                 $foundFreePort1 = $portCandidate;
313 313
             }
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
         $foundFreePort2 = 0;
317 317
         while ($foundFreePort2 == 0) {
318 318
             $portCandidate = random_int(1200, 65535);
319
-            $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '" . $ourSecondServer . "' AND port_instance_2 = $portCandidate");
319
+            $check = $this->databaseHandle->exec("SELECT port_instance_2 FROM deployment WHERE radius_instance_2 = '".$ourSecondServer."' AND port_instance_2 = $portCandidate");
320 320
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $check) == 0) {
321 321
                 $foundFreePort2 = $portCandidate;
322 322
             }
323 323
         }
324 324
         // and make up a shared secret that is halfways readable
325 325
         $futureSecret = $this->randomString(16, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
326
-        $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '" . $ourserver . "', radius_instance_2 = '" . $ourSecondServer . "', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier");
326
+        $this->databaseHandle->exec("UPDATE deployment SET radius_instance_1 = '".$ourserver."', radius_instance_2 = '".$ourSecondServer."', port_instance_1 = $foundFreePort1, port_instance_2 = $foundFreePort2, secret = '$futureSecret', consortium = '$this->consortium' WHERE deployment_id = $this->identifier");
327 327
         return ["port_instance_1" => $foundFreePort1, "port_instance_2" => $foundFreePort2, "secret" => $futureSecret, "radius_instance_1" => $ourserver, "radius_instance_2" => $ourserver];
328 328
     }
329 329
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     public function deactivate()
372 372
     {
373
-        $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::INACTIVE . " WHERE deployment_id = $this->identifier");
373
+        $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::INACTIVE." WHERE deployment_id = $this->identifier");
374 374
     }
375 375
 
376 376
     /**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      */
382 382
     public function activate()
383 383
     {
384
-        $this->databaseHandle->exec("UPDATE deployment SET status = " . DeploymentManaged::ACTIVE . " WHERE deployment_id = $this->identifier");
384
+        $this->databaseHandle->exec("UPDATE deployment SET status = ".DeploymentManaged::ACTIVE." WHERE deployment_id = $this->identifier");
385 385
     }
386 386
 
387 387
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     {
394 394
         $customAttrib = $this->getAttributes("managedsp:operatorname");
395 395
         if (count($customAttrib) == 0) {
396
-            return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix'];
396
+            return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix'];
397 397
         }
398 398
         return $customAttrib[0]["value"];
399 399
     }
@@ -409,13 +409,13 @@  discard block
 block discarded – undo
409 409
     {
410 410
 
411 411
         $hostname = "radius_hostname_$idx";
412
-        $ch = curl_init("http://" . $this->$hostname);
412
+        $ch = curl_init("http://".$this->$hostname);
413 413
         if ($ch === FALSE) {
414 414
             $res = 'FAILURE';
415 415
         } else {
416 416
             curl_setopt($ch, CURLOPT_POST, 1);
417 417
             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
418
-            $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ": $post\n");
418
+            $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.": $post\n");
419 419
             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
420 420
             curl_setopt($ch, CURLOPT_HEADER, 0);
421 421
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             $this->loggerInstance->debug(1, $this);
432 432
         }
433 433
         $this->loggerInstance->debug(1, "Database update");
434
-        $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = " . ($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE) . " WHERE deployment_id = $this->identifier");
434
+        $this->databaseHandle->exec("UPDATE deployment SET radius_status_$idx = ".($res == 'OK' ? \core\AbstractDeployment::RADIUS_OK : \core\AbstractDeployment::RADIUS_FAILURE)." WHERE deployment_id = $this->identifier");
435 435
         return $res;
436 436
     }
437 437
 
@@ -452,19 +452,19 @@  discard block
 block discarded – undo
452 452
         } else {
453 453
             $txt = $remove ? _('Profile dectivation failed') : _('Profile activation/modification failed');
454 454
         }
455
-        $txt = $txt . ' ';
455
+        $txt = $txt.' ';
456 456
         if (array_count_values($response)[$status] == 2) {
457
-            $txt = $txt . _('on both RADIUS servers: primary and backup') . '.';
457
+            $txt = $txt._('on both RADIUS servers: primary and backup').'.';
458 458
         } else {
459 459
             if ($response['res[1]'] == $status) {
460
-                $txt = $txt . _('on primary RADIUS server') . '.';
460
+                $txt = $txt._('on primary RADIUS server').'.';
461 461
             } else {
462
-                $txt = $txt . _('on backup RADIUS server') . '.';
462
+                $txt = $txt._('on backup RADIUS server').'.';
463 463
             }
464 464
         }
465 465
         $mail = \core\common\OutsideComm::mailHandle();
466 466
         $email = $this->getAttributes("support:email")[0]['value'];
467
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
467
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
468 468
         $mail->addAddress($email);
469 469
         if ($status == 'OK') {
470 470
             $mail->Subject = _('RADIUS profile update problem fixed');
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             return NULL;
499 499
         }
500 500
         $timeout = 10;
501
-        curl_setopt($ch, CURLOPT_URL, 'http://' . $host);
501
+        curl_setopt($ch, CURLOPT_URL, 'http://'.$host);
502 502
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
503 503
         curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
504 504
         curl_exec($ch);
@@ -590,35 +590,35 @@  discard block
 block discarded – undo
590 590
     {
591 591
         $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1;
592 592
         $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => ''));
593
-        $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . '&secret=' . $this->secret . '&country=' . $this->getAttributes("internal:country")[0]['value'] . '&';
593
+        $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier.'&secret='.$this->secret.'&country='.$this->getAttributes("internal:country")[0]['value'].'&';
594 594
         if ($remove) {
595
-            $toPostTemplate = $toPostTemplate . 'remove=1&';
595
+            $toPostTemplate = $toPostTemplate.'remove=1&';
596 596
         } else {
597 597
             if ($this->getAttributes("managedsp:operatorname")[0]['value'] ?? NULL) {
598
-                $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getAttributes("managedsp:operatorname")[0]['value'] . '&';
598
+                $toPostTemplate = $toPostTemplate.'operatorname='.$this->getAttributes("managedsp:operatorname")[0]['value'].'&';
599 599
             }
600 600
             if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) {
601 601
                 $allRealms = $this->getAllRealms();
602 602
                 if (!empty($allRealms)) {
603
-                    $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&';
604
-                    $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&';
603
+                    $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&';
604
+                    $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&';
605 605
                 }
606 606
             }
607 607
         }
608 608
         foreach (array_keys($toPost) as $key) {
609
-            $elem = 'port' . $key;
610
-            $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem;
609
+            $elem = 'port'.$key;
610
+            $toPost[$key] = $toPostTemplate.'port='.$this->$elem;
611 611
         }
612 612
         $response = array();
613 613
         foreach ($toPost as $key => $value) {
614
-            $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n");
615
-            $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
614
+            $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n");
615
+            $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]);
616 616
         }
617 617
         if ($onlyone) {
618
-            $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK;
618
+            $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK;
619 619
         }
620 620
         foreach (array('OK', 'FAILURE') as $status) {
621
-            if ( ( ($status == 'OK' && $notify) || ($status == 'FAILURE') ) && ( in_array($status, $response) ) ) {
621
+            if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && (in_array($status, $response))) {
622 622
                 $this->sendMailtoAdmin($remove, $response, $status);
623 623
             }
624 624
         }
Please login to merge, or discard this patch.
web/lib/admin/OptionParser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 $optionClass = \core\Options::instance();
102 102
                 $optionProps = $optionClass->optionType($optiontype);
103 103
                 $allowedValues = explode(',', substr($optionProps["flags"], 7));
104
-                if (in_array($incomingBinary,$allowedValues))  {
104
+                if (in_array($incomingBinary, $allowedValues)) {
105 105
                     return TRUE;
106 106
                 }
107 107
                 return FALSE;
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
                 case \core\Options::TYPECODE_TEXT:
347 347
                 case \core\Options::TYPECODE_COORDINATES:
348 348
                 case \core\Options::TYPECODE_INTEGER:
349
-                    $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']];
349
+                    $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']];
350 350
                     if (!empty($varName)) {
351 351
                         $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg']));
352 352
                         break;
353 353
                     }
354 354
                     continue 2;
355 355
                 case \core\Options::TYPECODE_BOOLEAN:
356
-                    $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN];
356
+                    $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN];
357 357
                     if (!empty($varName)) {
358 358
                         $contentValid = $this->validator->boolean($varName);
359 359
                         if ($contentValid) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                     }
367 367
                     continue 2;
368 368
                 case \core\Options::TYPECODE_STRING:
369
-                    $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
369
+                    $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
370 370
                     if (!empty($previsionalContent)) {
371 371
                         $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad);
372 372
                         if ($content === FALSE) {
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                     continue 2;
378 378
                     
379 379
                 case \core\Options::TYPECODE_ENUM_OPENROAMING:
380
-                    $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING];
380
+                    $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING];
381 381
                     if (!empty($previsionalContent)) {
382 382
                         $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad);
383 383
                         if ($content === FALSE) {
@@ -388,15 +388,15 @@  discard block
 block discarded – undo
388 388
                     continue 2;    
389 389
                 case \core\Options::TYPECODE_FILE:
390 390
                     // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file
391
-                    $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING];
391
+                    $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING];
392 392
                     if (!empty($reference)) { // was already in, by ROWID reference, extract
393 393
                         // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace)
394 394
                         $content = $this->validator->string(urldecode($reference), TRUE);
395 395
                         break;
396 396
                     }
397
-                    $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? "";
397
+                    $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? "";
398 398
                     if ($fileName != "") { // let's do the download
399
-                        $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName);
399
+                        $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName);
400 400
 
401 401
                         if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) {
402 402
                             $bad[] = $objValue;
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                     }
408 408
                     continue 2;
409 409
                 default:
410
-                    throw new Exception("Internal Error: Unknown option type " . $objValue . "!");
410
+                    throw new Exception("Internal Error: Unknown option type ".$objValue."!");
411 411
             }
412 412
             // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that.
413 413
             $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]];
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             \core\Options::TYPECODE_BOOLEAN => ["html" => "input type='checkbox'", "tail" => ''],
93 93
             \core\Options::TYPECODE_INTEGER => ["html" => "input type='number'", "tail" => ''],
94 94
             \core\Options::TYPECODE_STRING => ["html" => "input type='string'", "tail" => ''],
95
-            \core\Options::TYPECODE_ENUM_OPENROAMING => ["html" => "select", "tail" => "><option value='ask'>" . $this->enumPrettyPrints["ask"]  . "</option><option value='always'>" . $this->enumPrettyPrints["always"] . "</option></select"],
95
+            \core\Options::TYPECODE_ENUM_OPENROAMING => ["html" => "select", "tail" => "><option value='ask'>".$this->enumPrettyPrints["ask"]."</option><option value='always'>".$this->enumPrettyPrints["always"]."</option></select"],
96 96
             \core\Options::TYPECODE_TEXT => ["html" => "textarea cols='30' rows='3'", "tail" => '></textarea'],
97 97
         ];
98 98
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function prefilledOptionTable(string $attributePrefix, $fed)
108 108
     {
109
-        $retval = "<table id='expandable_$attributePrefix" . "_options'>";
109
+        $retval = "<table id='expandable_$attributePrefix"."_options'>";
110 110
 
111 111
         $prepopulate = [];
112 112
         foreach ($this->listOfOptions as $existingAttribute) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 $prepopulate[] = $existingAttribute;
115 115
             }
116 116
         }
117
-        if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values
117
+        if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values
118 118
             $retval .= $this->addOptionEdit($attributePrefix, $prepopulate);
119 119
         } else {
120 120
             $retval .= $this->addOptionNew($attributePrefix, $fed);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 $optiontypearray = $optioninfo->optionType($option['name']);
148 148
                 $loggerInstance = new \core\common\Logging();
149 149
                 $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n");
150
-                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']);
150
+                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']);
151 151
             }
152 152
         }
153 153
         return $retval;
@@ -246,18 +246,18 @@  discard block
 block discarded – undo
246 246
         }
247 247
         $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please throughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96");
248 248
         $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME);
249
-        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") .
250
-                " " .
251
-                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) .
252
-                " " .
253
-                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") .
254
-                " " .
249
+        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy").
250
+                " ".
251
+                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']).
252
+                " ".
253
+                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.").
254
+                " ".
255 255
                 _("Read the instructions in the wiki.");
256 256
         \core\common\Entity::outOfThePotatoes();
257 257
         if (!isset($descriptions[$input])) {
258 258
             return "";
259 259
         }
260
-        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>";
260
+        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>";
261 261
     }
262 262
 
263 263
     /**
@@ -271,19 +271,19 @@  discard block
 block discarded – undo
271 271
     private function selectElement($rowid, $list)
272 272
     {
273 273
         $jsmagic = "onchange='
274
-                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
274
+                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) {
275 275
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
276 276
                                    } else {
277 277
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\";
278 278
                                    }";
279 279
         foreach (array_keys($this->htmlDatatypeTexts) as $key) {
280
-            $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
281
-                                  document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\";
282
-                                  document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\";
283
-                                  document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\";
284
-                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\";
285
-                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\";
286
-                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\";
280
+            $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) {
281
+                                  document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\";
282
+                                  document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\";
283
+                                  document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\";
284
+                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\";
285
+                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\";
286
+                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\";
287 287
                              }
288 288
                              ";
289 289
             // hide all tooltips (each is a <span>, and there are no other <span>s)
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                 $value = array_shift($list);
315 315
                 $listtype = $optioninfo->optionType($value);
316 316
                 $retval .= $uiElements->displayName($value);
317
-                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>";
317
+                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>";
318 318
                 $activelisttype = $listtype;
319 319
                 $tooltips = $this->tooltip($rowid, $value, TRUE);
320 320
                 break;
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                 $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>";
323 323
                 foreach ($list as $value) {
324 324
                     $listtype = $optioninfo->optionType($value);
325
-                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
325
+                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' ";
326 326
                     if ($iterator == $this->optionIterator) {
327 327
                         $retval .= "selected='selected'";
328 328
                         $activelisttype = $listtype;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                     } else {
331 331
                         $tooltips .= $this->tooltip($rowid, $value, FALSE);
332 332
                     }
333
-                    $retval .= ">" . $uiElements->displayName($value) . "</option>";
333
+                    $retval .= ">".$uiElements->displayName($value)."</option>";
334 334
                     $iterator++;
335 335
                 }
336 336
 
@@ -356,9 +356,9 @@  discard block
 block discarded – undo
356 356
     private function selectLanguage($rowid, $makeVisible)
357 357
     {
358 358
         \core\common\Entity::intoThePotatoes();
359
-        $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
360
-            <option value='' name='select_language' selected>" . _("select language") . "</option>
361
-            <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
359
+        $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'>
360
+            <option value='' name='select_language' selected>" . _("select language")."</option>
361
+            <option value='C' name='all_languages'>" . _("default/other languages")."</option>";
362 362
         foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) {
363 363
             $thislang = $possibleLang['display'];
364 364
             $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>";
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
     {
380 380
         $retval = "";
381 381
         foreach ($this->htmlDatatypeTexts as $key => $type) {
382
-            $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">";
382
+            $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">";
383 383
         }
384 384
         return $retval;
385 385
     }
@@ -395,11 +395,11 @@  discard block
 block discarded – undo
395 395
     {
396 396
         // first column: the <select> element with the names of options and their field-toggling JS magic
397 397
         $selectorInfo = $this->selectElement($rowid, $list);
398
-        $retval = "<td>" . $selectorInfo["TEXT"] . "</td>";
398
+        $retval = "<td>".$selectorInfo["TEXT"]."</td>";
399 399
         // second column: the <select> element for language selection - only visible if the active option is multi-lang
400
-        $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>";
400
+        $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>";
401 401
         // third column: the actual input fields; the data type of the active option is visible, all others hidden
402
-        $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>";
402
+        $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>";
403 403
         return $retval;
404 404
     }
405 405
 
@@ -423,20 +423,20 @@  discard block
 block discarded – undo
423 423
         $retval .= "<td>";
424 424
         $uiElements = new UIElements();
425 425
         $listtype = $optioninfo->optionType($optionName);
426
-        $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName);
427
-        $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>";
428
-        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>";
426
+        $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName);
427
+        $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>";
428
+        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>";
429 429
 
430 430
         // language tag if any
431 431
         $retval .= "<td>";
432 432
         if ($listtype["flag"] == "ML") {
433 433
 
434
-            $language = "(" . strtoupper($optionLang) . ")";
434
+            $language = "(".strtoupper($optionLang).")";
435 435
             if ($optionLang == 'C') {
436 436
                 $language = _("(default/other languages)");
437 437
             }
438 438
             $retval .= $language;
439
-            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>";
439
+            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>";
440 440
         }
441 441
         $retval .= "</td>";
442 442
 // attribute content
@@ -446,12 +446,12 @@  discard block
 block discarded – undo
446 446
             case \core\Options::TYPECODE_COORDINATES:
447 447
                 $this->allLocationCount = $this->allLocationCount + 1;
448 448
                 // display of the locations varies by map provider
449
-                $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'];
449
+                $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'];
450 450
                 $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount);
451
-                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
451
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link";
452 452
                 break;
453 453
             case \core\Options::TYPECODE_FILE:
454
-                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
454
+                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>";
455 455
                 $uiElements = new UIElements();
456 456
                 switch ($optionName) {
457 457
                     case "eap:ca_file":
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
                 break;
474 474
             case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all
475 475
                 $displayedVariant = $this->enumPrettyPrints[$optionValue];
476
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
476
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
477 477
                 break;
478 478
             case \core\Options::TYPECODE_STRING:
479 479
             // fall-thorugh is intentional; mostly identical HTML code for the three types
@@ -481,11 +481,11 @@  discard block
 block discarded – undo
481 481
             // fall-thorugh is intentional; mostly identical HTML code for the three types
482 482
             case \core\Options::TYPECODE_TEXT:
483 483
                 $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical
484
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
484
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
485 485
                 break;
486 486
             case \core\Options::TYPECODE_BOOLEAN:
487 487
                 $displayedVariant = ($optionValue == "on" ? _("on") : _("off"));
488
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
488
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
489 489
                 break;
490 490
             default:
491 491
                 // this should never happen!
@@ -531,10 +531,10 @@  discard block
 block discarded – undo
531 531
        <td>
532 532
           <button type='button' class='delete' onclick='";
533 533
         if ($prefillValue !== NULL && $item == "general:geo_coordinates") {
534
-            $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord';
535
-            $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } ';
534
+            $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord';
535
+            $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } ';
536 536
         }
537
-        $retval .= 'deleteOption("option-S' . $rowid . '")';
537
+        $retval .= 'deleteOption("option-S'.$rowid.'")';
538 538
         $retval .= "'>-</button>
539 539
        </td>
540 540
     </tr>";
Please login to merge, or discard this patch.
core/UserAPI.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->installerPath = $cache['path'];
87 87
         if ($this->installerPath !== NULL && $token === NULL && $password === NULL) {
88 88
             $this->loggerInstance->debug(4, "Using cached installer for: $device\n");
89
-            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming";
89
+            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming";
90 90
             $installerProperties['mime'] = $cache['mime'];
91 91
         } else {
92 92
             $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $openRoaming, $token, $password);
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done");
180 180
             $installer = $dev->writeInstaller();
181 181
             $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete");
182
-            $iPath = $dev->FPATH . '/tmp/' . $installer;
182
+            $iPath = $dev->FPATH.'/tmp/'.$installer;
183 183
             if ($iPath && is_file($iPath)) {
184 184
                 if (isset($dev->options['mime'])) {
185 185
                     $out['mime'] = $dev->options['mime'];
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
                     $info = new \finfo();
188 188
                     $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE);
189 189
                 }
190
-                $this->installerPath = $dev->FPATH . '/' . $installer;
190
+                $this->installerPath = $dev->FPATH.'/'.$installer;
191 191
                 rename($iPath, $this->installerPath);
192 192
                 $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep();
193 193
                 $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap);
194 194
                 if (\config\Master::DEBUG_LEVEL < 4) {
195
-                    \core\common\Entity::rrmdir($dev->FPATH . '/tmp');
195
+                    \core\common\Entity::rrmdir($dev->FPATH.'/tmp');
196 196
                 }
197
-                $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . ", openRoaming: $openRoaming\n");
198
-                $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming";
197
+                $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap.", openRoaming: $openRoaming\n");
198
+                $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor&openroaming=$openRoaming";
199 199
             } else {
200
-                $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "openRoaming: $openRoaming\n");
200
+                $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."openRoaming: $openRoaming\n");
201 201
                 $out['link'] = 0;
202 202
             }
203 203
         }
@@ -321,13 +321,13 @@  discard block
 block discarded – undo
321 321
         $file = $this->installerPath;
322 322
         $filetype = $output['mime'];
323 323
         $this->loggerInstance->debug(4, "installer MIME type:$filetype\n");
324
-        header("Content-type: " . $filetype);
324
+        header("Content-type: ".$filetype);
325 325
         if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set
326
-            header('Content-Disposition: inline; filename="' . basename($file) . '"');
326
+            header('Content-Disposition: inline; filename="'.basename($file).'"');
327 327
         } else {
328 328
             header('Content-Transfer-Encoding: base64');
329 329
         }
330
-        header('Content-Length: ' . filesize($file));
330
+        header('Content-Length: '.filesize($file));
331 331
         ob_clean();
332 332
         flush();
333 333
         readfile($file);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE);
350 350
         $offset = 60 * 60 * 24 * 30;
351 351
         // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it
352
-        $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
352
+        $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT";
353 353
         $blob = $inputImage;
354 354
 
355 355
         if ($resize === TRUE) {
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         $filetype = 'image/png'; // default, only one code path where it can become different
406 406
         list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn);
407 407
         if ($resize) {
408
-            $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png';
408
+            $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png';
409 409
         }
410 410
         if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE
411 411
             $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n");
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
             if (!isset($device['match'])) {
518 518
                 continue;
519 519
             }
520
-            if (preg_match('/' . $device['match'] . '/', $browser)) {
520
+            if (preg_match('/'.$device['match'].'/', $browser)) {
521 521
                 return $this->returnDevice($devId, $device);
522 522
             }
523 523
         }
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     public function divSilverbullet() {
125 125
         $retval = "
126 126
 <div id='silverbullet'>"
127
-               .$this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
127
+               .$this->Gui->textTemplates->templates[user\SB_GO_AWAY].
128 128
                 "</div>
129 129
     ";
130 130
         return $retval;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
223 223
     <div id='profiles_h' class='sub_h'>".$this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
224 224
     </div>" .
225
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
225
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
226 226
                 "</div>";
227 227
     }
228 228
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function divInstitution($selectButton = TRUE) {
251 251
         $retval = "<div id='institution_name'>
252 252
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
253
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "") .
253
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
254 254
                 "</div>";
255 255
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
256 256
         return $retval;
Please login to merge, or discard this patch.