Test Setup Failed
Push — master ( 1cafb2...94d434 )
by Maja
06:14
created
web/admin/sanity_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $Tests = [
25 25
     'Directories',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 $uiElements = new \web\lib\admin\UIElements();
45 45
 
46
-if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL" ) {
46
+if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
47 47
     $Tests[] = 'Makensis';
48 48
     $Tests[] = 'Makensis=>NSISmodules';
49 49
 }
Please login to merge, or discard this patch.
devices/Devices-template.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                     'mime' => 'application/eap-config',
398 398
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
399 399
                             "geteduroam",
400
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"),
400
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"),
401 401
                 ],
402 402
             ],            
403 403
             
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
                     'mime' => 'application/eap-config',
412 412
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
413 413
                             "geteduroam",
414
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"),
414
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"),
415 415
                 ],
416 416
             ],  
417 417
             'android_4_7' => [
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
                     'mime' => 'application/eap-config',
425 425
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
426 426
                             "eduroamCAT",
427
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
427
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
428 428
                 ],
429 429
             ],            
430 430
             
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
                     'mime' => 'application/eap-config',
440 440
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
441 441
                             "eduroamCAT",
442
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
442
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
443 443
                 ],
444 444
             ],
445 445
             'android_pie' => [
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                     'mime' => 'application/eap-config',
454 454
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
455 455
                             "eduroamCAT",
456
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
456
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
457 457
                 ],
458 458
             ],
459 459
             'android_oreo' => [
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                     'mime' => 'application/eap-config',
468 468
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
469 469
                             "eduroamCAT",
470
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
470
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
471 471
                 ],
472 472
             ],
473 473
             'android_nougat' => [
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
                     'mime' => 'application/eap-config',
482 482
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
483 483
                             "eduroamCAT",
484
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
484
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
485 485
                 ],
486 486
             ],
487 487
             'android_marshmallow' => [
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
                     'mime' => 'application/eap-config',
496 496
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
497 497
                             "eduroamCAT",
498
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
498
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
499 499
                 ],
500 500
             ],
501 501
             'android_lollipop' => [
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
                     'mime' => 'application/eap-config',
510 510
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
511 511
                             "eduroamCAT",
512
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
512
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
513 513
                 ],
514 514
             ],
515 515
             'android_kitkat' => [
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
                     'mime' => 'application/eap-config',
524 524
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
525 525
                             "eduroamCAT",
526
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
526
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
527 527
                 ],
528 528
             ],
529 529
             'android_43' => [
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
                     'mime' => 'application/eap-config',
538 538
                     'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."),
539 539
                             "eduroamCAT",
540
-                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"),
540
+                            "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"),
541 541
                 ],
542 542
             ],
543 543
             'android_legacy' => [
Please login to merge, or discard this patch.
web/lib/user/TextTemplates.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,12 +89,12 @@
 block discarded – undo
89 89
         $this->templates[WELCOME_ABOARD_TERMS] = "";
90 90
         foreach ([
91 91
                 "eduroam" => [ 
92
-                      "TOU"  => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions",
93
-                      "PRIV" => "https://www.eduroam.org/privacy/",
92
+                        "TOU"  => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions",
93
+                        "PRIV" => "https://www.eduroam.org/privacy/",
94 94
                     ], 
95 95
                 "OpenRoaming" => [ 
96
-                      "TOU"  => "https://wballiance.com/openroaming/toc-2020/",
97
-                      "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
96
+                        "TOU"  => "https://wballiance.com/openroaming/toc-2020/",
97
+                        "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
98 98
                     ]
99 99
             ] as $consortium => $terms) {
100 100
             $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU'], $terms['PRIV']);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 const DOWNLOAD_REDIRECT_CONTINUE = 1054;
50 50
 const SB_GO_AWAY = 1060;
51 51
 const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061;
52
-const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062;
52
+const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062;
53 53
 
54 54
 
55 55
 /**
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
                       "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/",
97 97
                     ]
98 98
             ] as $consortium => $terms) {
99
-            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU'], $terms['PRIV']);
99
+            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU'], $terms['PRIV']);
100 100
         }
101 101
         // this would actually be a checkbox which grays out the actual download button until ACKed
102 102
         $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>";
103 103
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
104 104
         $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']);
105 105
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']);
106
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']);
106
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']);
107 107
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']);
108 108
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
109 109
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']);
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
53 53
         } else {
54 54
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
55
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
55
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
56 56
             echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
57 57
         }
58 58
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
         ?>
110 110
         <h1><?php $tablecaption = _("Submitted attributes for this profile"); echo $tablecaption; ?></h1>
111 111
         <table>
112
-            <caption><?php echo $tablecaption;?></caption>
112
+            <caption><?php echo $tablecaption; ?></caption>
113 113
             <tr>
114
-                <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th>
115
-                <th class="wai-invisible" scope="col"><?php echo _("Details");?></th>
114
+                <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th>
115
+                <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th>
116 116
             </tr>
117 117
             <?php
118 118
             $uiElements = new web\lib\admin\UIElements();
119 119
             // set realm info, if submitted
120 120
             if ($realm !== FALSE) {
121
-                $profile->setRealm($anonLocal . "@" . $realm);
121
+                $profile->setRealm($anonLocal."@".$realm);
122 122
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
123 123
             } else {
124 124
                 $profile->setRealm("");
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
145 145
                 } else {
146 146
                     $profile->setRealmcheckUser(true, $checkuser_name);
147
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
147
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
148 148
                 }
149 149
             } else {
150 150
                 $profile->setRealmCheckUser(false);
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
                 $extratext = "";
157 157
                 if (!empty($realm)) {
158 158
                     if ($hint !== FALSE) {
159
-                        $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
159
+                        $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
160 160
                     } else {
161
-                        $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
161
+                        $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
162 162
                     }
163 163
                 }
164
-                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext);
164
+                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext);
165 165
             } else {
166 166
                 $profile->setInputVerificationPreference(false, false);
167 167
             }
@@ -193,30 +193,30 @@  discard block
 block discarded – undo
193 193
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
194 194
             }
195 195
 
196
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
196
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
197 197
             // reload the profile to ingest new CA and server names if any; before checking EAP completeness
198 198
             $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier);
199 199
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
200 200
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
201 201
                     continue;
202 202
                 }
203
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
204
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
203
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
204
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
205 205
                     // add EAP type to profile as requested, but ...
206 206
                     $reloadedProfileNr1->addSupportedEapMethod($a, $priority);
207
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed");
207
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed");
208 208
                     // see if we can enable the EAP type, or if info is missing
209 209
                     $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a);
210 210
                     if ($eapcompleteness === true) {
211
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
211
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
212 212
                     } else {
213 213
                         $warntext = "";
214 214
                         if (is_array($eapcompleteness)) {
215 215
                             foreach ($eapcompleteness as $item) {
216
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
216
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
217 217
                             }
218 218
                         }
219
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
219
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
220 220
                     }
221 221
                 }
222 222
             }
@@ -227,23 +227,23 @@  discard block
 block discarded – undo
227 227
             if (count($significantChanges) > 0) {
228 228
                 $myInstOriginal = new \core\IdP($profile->institution);
229 229
                 // send a notification/alert mail to someone we know is in charge
230
-                $text = _("To whom it may concern,") . "\n\n";
230
+                $text = _("To whom it may concern,")."\n\n";
231 231
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
232
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
232
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
233 233
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
234
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
235
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
234
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
235
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
236 236
                 }
237 237
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
238 238
                     $text .= _("A new trusted root CA was added. The details are below:")."\n\n";
239
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
239
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
240 240
                 }
241 241
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
242
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
243
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
242
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
243
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
244 244
                 }
245
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
246
-                $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long'];
245
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
246
+                $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long'];
247 247
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
248 248
                 $fed = new core\Federation($myInstOriginal->federation);
249 249
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         <?php
262 262
         if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) {
263 263
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'>
264
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
264
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
265 265
     </form>";
266 266
         }
267 267
         echo $deco->footer();
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png");
61 61
         if ($location !== FALSE) {
62 62
             $retval .= "<div id='cat_logo'>
63
-            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
63
+            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
64 64
             <span>Configuration Assistant Tool</span>
65 65
             </div>";
66 66
         }
67
-        $retval .= "<div id='motd'>" . (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp') . "</div>";
67
+        $retval .= "<div id='motd'>".(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp')."</div>";
68 68
         $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png");
69 69
         if ($loc2 !== FALSE) {
70 70
             $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>";
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     public function divUserWelcome() {
88 88
         $retval = "
89 89
 <div id='user_welcome'> <!-- this information is shown just before the download -->
90
-    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong>
90
+    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong>
91 91
     <p>
92 92
     <span id='download_info'>
93 93
     <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime -->
94
-        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . "
94
+        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]."
95 95
     </span>
96
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . "
96
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]."
97 97
     <br/>
98 98
     <br/>";
99 99
         switch (\config\ConfAssistant::CONSORTIUM['name']) {
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
         }
105 105
         $retval .= "
106 106
     </p>
107
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . "
108
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . "
109
-    <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "") . "
107
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]."
108
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]."
109
+    <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "")."
110 110
     </p>
111 111
     <p>
112
-    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a>
112
+    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a>
113 113
     </p>
114 114
 </div> <!-- id='user_welcomer_page' -->
115 115
 ";
@@ -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;
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
     public function divTopWelcome() {
139 139
         $retval = '';
140 140
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
141
-            $retval = "<br><div id='top_invite_ad'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD] . "</div>";
141
+            $retval = "<br><div id='top_invite_ad'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD]."</div>";
142 142
         }
143 143
         return "
144 144
 <div id='welcome_top1'>
145
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . "
145
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]."
146 146
 </div>
147 147
 <div id='top_invite'>
148
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . "
148
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval."
149 149
 </div>";
150 150
     }
151 151
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         $retval = "
159 159
 <div id='roller'>
160 160
     <div id='slides'>
161
-        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span>
161
+        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
162 162
         <span id='line2'></span>
163 163
         <span id='line3'></span>
164 164
         <span id='line4'>";
@@ -220,9 +220,9 @@  discard block
 block discarded – undo
220 220
     public function divProfiles() {
221 221
         return "
222 222
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
223
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
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;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     public function divOtherinstallers() {
275 275
         $retval = "
276 276
 <div class='sub_h'>
277
-    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
277
+    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
278 278
          <table id='device_list' style='padding:0px;'>";
279 279
 
280 280
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -282,18 +282,18 @@  discard block
 block discarded – undo
282 282
             $deviceIndex = 0;
283 283
 
284 284
             $imgTag = "";
285
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
285
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
286 286
             if ($imgLocation !== FALSE) {
287
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
287
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
288 288
             }
289
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
289
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
290 290
             foreach ($deviceGroup as $d => $D) {
291 291
                 if ($deviceIndex) {
292 292
                     $retval .= '<tr>';
293 293
                 }
294
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
295
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
296
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
294
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
295
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
296
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
297 297
                 $deviceIndex++;
298 298
             }
299 299
             $retval .= "</tbody>";
@@ -313,15 +313,15 @@  discard block
 block discarded – undo
313 313
      * @return string
314 314
      */
315 315
     public function divGuessOs($operatingSystem) {
316
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
316
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
317 317
         $vendorstyle = "";
318 318
         if ($vendorlogo !== FALSE) {
319
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
319
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
320 320
         }
321 321
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
322 322
         $deleteImg = "";
323 323
         if ($deleteIcon !== FALSE) {
324
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
324
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
325 325
         }
326 326
         return "
327 327
 <div class='sub_h' id='guess_os'>
@@ -329,23 +329,23 @@  discard block
 block discarded – undo
329 329
     <table id='browser'>
330 330
         <tr>
331 331
             <td>
332
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
332
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
333 333
                     $deleteImg
334
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
334
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
335 335
                     </div>
336 336
                     <div class='download_button_text'>" .
337
-                $operatingSystem['display'] . "
337
+                $operatingSystem['display']."
338 338
                     </div>
339 339
                 </button>
340
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
340
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
341 341
           </td>
342 342
           <td style='vertical-align:top'>
343
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
343
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
344 344
           </td>
345 345
       </tr>
346 346
     </table> <!-- id='browser' -->
347 347
     <div class='sub_h'>
348
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
348
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
349 349
     </div>
350 350
 </div> <!-- id='guess_os' -->";
351 351
     }
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             </td>";
367 367
 
368 368
         if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
369
-            $retval .= "<td><a href='" . \config\Master::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
369
+            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
370 370
         }
371 371
         $retval .= "<td>";
372 372
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
core/SanityTests.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $this->test_result = [];
130 130
         $this->test_result['global'] = 0;
131 131
         // parse the schema file to find out the number of expected rows...
132
-        $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql");
132
+        $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql");
133 133
         $this->profileOptionCount = 0;
134 134
         $passedTheWindmill = FALSE;
135 135
         foreach ($schema as $schemaLine) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $this->out[$test] = [];
158 158
         $this->name = $test;
159
-        $m_name = 'test' . $test;
159
+        $m_name = 'test'.$test;
160 160
         $this->test_result[$test] = 0;
161 161
         if (!method_exists($this, $m_name)) {
162 162
             $this->storeTestResult(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>.");
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
     private function testPhp()
270 270
     {
271 271
         if (version_compare(phpversion(), $this->needversionPHP, '>=')) {
272
-            $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . ".");
272
+            $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion().".");
273 273
         } else {
274
-            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have " . phpversion() . ".");
274
+            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have ".phpversion().".");
275 275
         }
276 276
     }
277 277
     
@@ -284,12 +284,12 @@  discard block
 block discarded – undo
284 284
      */
285 285
     private function runConstantsTest($config)
286 286
     {
287
-        $templateConfig = file_get_contents(ROOT . "/config/$config-template.php");
288
-        $newTemplateConfig = preg_replace("/class *$config/", "class $config" . "_template", $templateConfig);
289
-        file_put_contents(ROOT . "/var/tmp/$config-template.php", $newTemplateConfig);
290
-        include(ROOT . "/var/tmp/$config-template.php");
291
-        unlink(ROOT . "/var/tmp/$config-template.php");
292
-        $rft = new \ReflectionClass("\config\\$config" . "_template");
287
+        $templateConfig = file_get_contents(ROOT."/config/$config-template.php");
288
+        $newTemplateConfig = preg_replace("/class *$config/", "class $config"."_template", $templateConfig);
289
+        file_put_contents(ROOT."/var/tmp/$config-template.php", $newTemplateConfig);
290
+        include(ROOT."/var/tmp/$config-template.php");
291
+        unlink(ROOT."/var/tmp/$config-template.php");
292
+        $rft = new \ReflectionClass("\config\\$config"."_template");
293 293
         $templateConstants = $rft->getConstants();
294 294
         $failResults = [];
295 295
         foreach ($templateConstants as $constant => $value) {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * Check if all required constants are set
307 307
      */
308 308
     private function testConfigConstants() {
309
-        set_error_handler(function ($severity, $message, $file, $line) {
309
+        set_error_handler(function($severity, $message, $file, $line) {
310 310
             throw new \ErrorException($message, $severity, $severity, $file, $line);
311 311
         });
312 312
         
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $failCount = $failCount + count($failResults);
318 318
             if (count($failResults) > 0) {
319 319
             $this->storeTestResult(\core\common\Entity::L_ERROR, 
320
-                    "<strong>The following constants are not set:</strong>" . implode(', ', $failResults));
320
+                    "<strong>The following constants are not set:</strong>".implode(', ', $failResults));
321 321
             }
322 322
         }
323 323
         
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             $this->storeTestResult(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly");
342 342
         } else {
343 343
             $rootFromScript = $m[1] === '' ? '/' : $m[1];
344
-            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . \config\Master::PATHS['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>");
344
+            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".\config\Master::PATHS['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>");
345 345
         }
346 346
     }
347 347
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         if (count($probeReturns) == 0) {
363 363
             $this->storeTestResult(common\Entity::L_OK, "All configured RADIUS/UDP probes are reachable.");
364 364
         } else {
365
-            $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: " . implode(', ', $probeReturns));
365
+            $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: ".implode(', ', $probeReturns));
366 366
         }
367 367
     }
368 368
 
@@ -380,9 +380,9 @@  discard block
 block discarded – undo
380 380
             $SSPconfig = \SimpleSAML\Configuration::getInstance();
381 381
             $sspVersion = explode('.', $SSPconfig->getVersion());
382 382
             if ((int) $sspVersion[0] >= $this->needversionSSP['major'] && (int) $sspVersion[1] >= $this->needversionSSP['minor']) {
383
-                $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion));
383
+                $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion));
384 384
             } else {
385
-                $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->needversionSSP));
385
+                $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->needversionSSP));
386 386
             }
387 387
         }
388 388
     }
@@ -440,8 +440,8 @@  discard block
 block discarded – undo
440 440
      */
441 441
     private function testLogdir()
442 442
     {
443
-        if (fopen(\config\Master::PATHS['logdir'] . "/debug.log", "a") == FALSE) {
444
-            $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>" . \config\Master::PATHS['logdir'] . "</strong> are not writable!");
443
+        if (fopen(\config\Master::PATHS['logdir']."/debug.log", "a") == FALSE) {
444
+            $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>".\config\Master::PATHS['logdir']."</strong> are not writable!");
445 445
         } else {
446 446
             $this->storeTestResult(\core\common\Entity::L_OK, "Log directory is writable.");
447 447
         }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         }
474 474
 
475 475
         $classname = 'Imagick';
476
-        if (class_exists('\\' . $classname)) {
476
+        if (class_exists('\\'.$classname)) {
477 477
             $this->storeTestResult(\core\common\Entity::L_OK, "PHP extension <strong>Imagick</strong> is installed.");
478 478
         } else {
479 479
             $this->storeTestResult(\core\common\Entity::L_ERROR, "PHP extension <strong>Imagick</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/package/imagick'>here</a>.");
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
     {
570 570
         $A = $this->getExecPath('openssl');
571 571
         if ($A['exec'] != "") {
572
-            $t = exec($A['exec'] . ' version');
572
+            $t = exec($A['exec'].' version');
573 573
             if ($A['exec_is'] == "EXPLICIT") {
574 574
                 $this->storeTestResult(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config.");
575 575
             } else {
@@ -597,14 +597,14 @@  discard block
 block discarded – undo
597 597
         }
598 598
         $A = $this->getExecPath('makensis');
599 599
         if ($A['exec'] != "") {
600
-            $t = exec($A['exec'] . ' -VERSION');
600
+            $t = exec($A['exec'].' -VERSION');
601 601
             if ($A['exec_is'] == "EXPLICIT") {
602 602
                 $this->storeTestResult(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config.");
603 603
             } else {
604 604
                 $this->storeTestResult(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config.");
605 605
             }
606 606
             $outputArray = [];
607
-            exec($A['exec'] . ' -HELP', $outputArray);
607
+            exec($A['exec'].' -HELP', $outputArray);
608 608
             $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray));
609 609
             if ($t1 == 1 && \config\ConfAssistant::NSIS_VERSION == 2) {
610 610
                 $this->storeTestResult(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!");
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         $NSIS_Module_status = [];
635 635
         foreach ($this->NSISModules as $module) {
636 636
             unset($out);
637
-            exec(\config\ConfAssistant::PATHS['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
637
+            exec(\config\ConfAssistant::PATHS['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
638 638
             if ($retval > 0) {
639 639
                 $NSIS_Module_status[$module] = 0;
640 640
             } else {
@@ -701,8 +701,8 @@  discard block
 block discarded – undo
701 701
         $locales = shell_exec("locale -a");
702 702
         $allthere = "";
703 703
         foreach (\config\Master::LANGUAGES as $onelanguage) {
704
-            if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) {
705
-                $allthere .= $onelanguage['locale'] . " ";
704
+            if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) {
705
+                $allthere .= $onelanguage['locale']." ";
706 706
             }
707 707
         }
708 708
         if ($allthere == "") {
@@ -716,47 +716,47 @@  discard block
 block discarded – undo
716 716
         ["SETTING" => \config\Master::APPEARANCE['from-mail'],
717 717
             "DEFVALUE" => "[email protected]",
718 718
             "COMPLAINTSTRING" => "APPEARANCE/from-mail ",
719
-            "REQUIRED" => FALSE,],
719
+            "REQUIRED" => FALSE, ],
720 720
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['url'],
721 721
             "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!",
722 722
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ",
723
-            "REQUIRED" => FALSE,],
723
+            "REQUIRED" => FALSE, ],
724 724
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['display'],
725 725
             "DEFVALUE" => "[email protected]",
726 726
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ",
727
-            "REQUIRED" => FALSE,],
727
+            "REQUIRED" => FALSE, ],
728 728
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['developer-mail'],
729 729
             "DEFVALUE" => "[email protected]",
730 730
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ",
731
-            "REQUIRED" => FALSE,],
731
+            "REQUIRED" => FALSE, ],
732 732
         ["SETTING" => \config\Master::APPEARANCE['abuse-mail'],
733 733
             "DEFVALUE" => "[email protected]",
734 734
             "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ",
735
-            "REQUIRED" => FALSE,],
735
+            "REQUIRED" => FALSE, ],
736 736
         ["SETTING" => \config\Master::APPEARANCE['MOTD'],
737 737
             "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!",
738 738
             "COMPLAINTSTRING" => "APPEARANCE/MOTD ",
739
-            "REQUIRED" => FALSE,],
739
+            "REQUIRED" => FALSE, ],
740 740
         ["SETTING" => \config\Master::APPEARANCE['webcert_CRLDP'],
741 741
             "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'],
742 742
             "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ",
743
-            "REQUIRED" => TRUE,],
743
+            "REQUIRED" => TRUE, ],
744 744
         ["SETTING" => \config\Master::APPEARANCE['webcert_OCSP'],
745 745
             "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'],
746 746
             "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ",
747
-            "REQUIRED" => TRUE,],
747
+            "REQUIRED" => TRUE, ],
748 748
         ["SETTING" => \config\Master::DB['INST']['host'],
749 749
             "DEFVALUE" => "db.host.example",
750 750
             "COMPLAINTSTRING" => "DB/INST ",
751
-            "REQUIRED" => TRUE,],
751
+            "REQUIRED" => TRUE, ],
752 752
         ["SETTING" => \config\Master::DB['INST']['host'],
753 753
             "DEFVALUE" => "db.host.example",
754 754
             "COMPLAINTSTRING" => "DB/USER ",
755
-            "REQUIRED" => TRUE,],
755
+            "REQUIRED" => TRUE, ],
756 756
         ["SETTING" => \config\Master::DB['EXTERNAL']['host'],
757 757
             "DEFVALUE" => "customerdb.otherhost.example",
758 758
             "COMPLAINTSTRING" => "DB/EXTERNAL ",
759
-            "REQUIRED" => FALSE,],
759
+            "REQUIRED" => FALSE, ],
760 760
     ];
761 761
 
762 762
     /**
@@ -785,11 +785,11 @@  discard block
 block discarded – undo
785 785
         if (isset(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'])) {
786 786
             foreach (\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'] as $cadata) {
787 787
                 foreach ($cadata['certificates'] as $cert_files) {
788
-                    if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) {
789
-                        $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " ";
788
+                    if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) {
789
+                        $defaultvalues .= "CERTIFICATE/".$cert_files['public']." ";
790 790
                     }
791
-                    if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) {
792
-                        $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " ";
791
+                    if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) {
792
+                        $defaultvalues .= "CERTIFICATE/".$cert_files['private']." ";
793 793
                     }
794 794
                 }
795 795
             }
@@ -882,14 +882,14 @@  discard block
 block discarded – undo
882 882
         if ($global_no_cache) {
883 883
             foreach ($Devs as $dev => $D) {
884 884
                 if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) {
885
-                    $no_cache_dev .= $dev . " ";
885
+                    $no_cache_dev .= $dev." ";
886 886
                     $no_cache_dev_count++;
887 887
                 }
888 888
             }
889 889
         } else {
890 890
             foreach ($Devs as $dev => $D) {
891 891
                 if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) {
892
-                    $no_cache_dev .= $dev . " ";
892
+                    $no_cache_dev .= $dev." ";
893 893
                     $no_cache_dev_count++;
894 894
                 }
895 895
             }
@@ -928,13 +928,13 @@  discard block
 block discarded – undo
928 928
         $mail->isHTML(FALSE);
929 929
         $mail->CharSet = 'UTF-8';
930 930
         $mail->From = \config\Master::APPEARANCE['from-mail'];
931
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
931
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
932 932
         $mail->addAddress(\config\Master::APPEARANCE['abuse-mail']);
933 933
         $mail->Subject = "testing CAT configuration mail";
934 934
         $mail->Body = "Testing CAT mailing\n";
935 935
         $sent = $mail->send();
936 936
         if ($sent) {
937
-            $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . \config\Master::APPEARANCE['abuse-mail'] . " mailbox if the message was receiced.");
937
+            $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".\config\Master::APPEARANCE['abuse-mail']." mailbox if the message was receiced.");
938 938
         } else {
939 939
             $this->storeTestResult(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS");
940 940
         }
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm",
137 137
             sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers",
138 138
             sprintf(_("Mint %s with CA on creation"), $this->nomenclatureInst) => "fed:minted_ca_file",
139
-            sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming",
139
+            sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming",
140 140
             _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget",
141 141
             $ssidText => "media:SSID",
142 142
             $passpointOiText => "media:consortium_OI",
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $find = array_keys($displayNames, $input, TRUE);
149 149
 
150 150
         if (count($find) == 0) { // this is an error! throw an Exception
151
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
151
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
152 152
         }
153 153
         \core\common\Entity::outOfThePotatoes();
154 154
         return $find[0];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach ($optionlist as $option) {
171 171
             $type = $optioninfo->optionType($option['name']);
172
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
172
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
173 173
                 // all non-multilang attribs get this assignment ...
174 174
                 $language = "";
175 175
                 $content = $option['value'];
@@ -187,19 +187,19 @@  discard block
 block discarded – undo
187 187
                         $locationMarkers[] = $coords;
188 188
                         break;
189 189
                     case "file":
190
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
190
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
191 191
                         switch ($option['name']) {
192 192
                             case "general:logo_file":
193 193
                             case "fed:logo_file":
194
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
194
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']);
195 195
                                 break;
196 196
                             case "eap:ca_file":
197 197
                             // fall-through intended: display both the same way
198 198
                             case "fed:minted_ca_file":
199
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
199
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']);
200 200
                                 break;
201 201
                             case "support:info_file":
202
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
202
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']);
203 203
                                 break;
204 204
                             default:
205 205
                         }
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
210 210
                             break;
211 211
                         }
212
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
212
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
213 213
                         break;
214 214
                     default:
215
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
215
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
216 216
                 }
217 217
             }
218 218
         }
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
             $locationCount = 0;
222 222
             foreach ($locationMarkers as $g) {
223 223
                 $locationCount++;
224
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
224
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
225 225
             }
226 226
             $marker .= '<\/markers>'; // some validator says this should be escaped
227 227
             $jMarker = json_encode($locationMarkers);
228
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
228
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
229 229
         }
230 230
         \core\common\Entity::outOfThePotatoes();
231 231
         return $retval;
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
         \core\common\Entity::intoThePotatoes();
242 242
         $idpoptions = $myInst->getAttributes();
243 243
         $retval = "<div class='infobox'>
244
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2>
244
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2>
245 245
         <table>
246 246
             <tr>
247 247
                 <td>
248
-                    " . _("Country:") . "
248
+                    " . _("Country:")."
249 249
                 </td>
250 250
                 <td>
251 251
                 </td>
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
         $retval .= $myFed->name;
256 256
         $retval .= "</strong>
257 257
                 </td>
258
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
258
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
259 259
         </table>
260 260
     </div>";
261 261
 
262 262
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
263 263
         foreach ($blocks as $block) {
264 264
             $retval .= "<div class='infobox'>
265
-            <h2>" . $block[1] . "</h2>
265
+            <h2>" . $block[1]."</h2>
266 266
             <table>" .
267
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
267
+                    $this->infoblock($idpoptions, $block[0], "IdP").
268 268
                     "</table>
269 269
         </div>";
270 270
         }
@@ -279,12 +279,12 @@  discard block
 block discarded – undo
279 279
      */
280 280
     private function displaySize(int $number) {
281 281
         if ($number > 1024 * 1024) {
282
-            return round($number / 1024 / 1024, 2) . " MiB";
282
+            return round($number / 1024 / 1024, 2)." MiB";
283 283
         }
284 284
         if ($number > 1024) {
285
-            return round($number / 1024, 2) . " KiB";
285
+            return round($number / 1024, 2)." KiB";
286 286
         }
287
-        return $number . " B";
287
+        return $number." B";
288 288
     }
289 289
 
290 290
     /**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $ref = $validator->databaseReference($cAReference);
339 339
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
340 340
         if (is_bool($rawResult)) { // we didn't actually get a CA!
341
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
341
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
342 342
             \core\common\Entity::outOfThePotatoes();
343 343
             return $retval;
344 344
         }
@@ -354,14 +354,14 @@  discard block
 block discarded – undo
354 354
 
355 355
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
356 356
         $details['name'] = preg_replace('/\//', "", $details['name']);
357
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
358
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
357
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
358
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
359 359
         if ($details['ca'] == 0 && $details['root'] != 1) {
360
-            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
360
+            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>";
361 361
             \core\common\Entity::outOfThePotatoes();
362 362
             return $retval;
363 363
         }
364
-        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>";
364
+        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>";
365 365
         \core\common\Entity::outOfThePotatoes();
366 366
         return $retval;
367 367
     }
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
      */
375 375
     public function previewImageinHTML($imageReference) {
376 376
         \core\common\Entity::intoThePotatoes();
377
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
377
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
378 378
         \core\common\Entity::outOfThePotatoes();
379 379
         return $retval;
380 380
     }
@@ -391,13 +391,13 @@  discard block
 block discarded – undo
391 391
         $ref = $validator->databaseReference($fileReference);
392 392
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
393 393
         if (is_bool($fileBlob)) { // we didn't actually get a file!
394
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
394
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
395 395
             \core\common\Entity::outOfThePotatoes();
396 396
             return $retval;
397 397
         }
398 398
         $decodedFileBlob = base64_decode($fileBlob);
399 399
         $fileinfo = new \finfo();
400
-        $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>";
400
+        $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>";
401 401
         \core\common\Entity::outOfThePotatoes();
402 402
         return $retval;
403 403
     }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             $retval .= "<tr><td>";
426 426
         }
427 427
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
428
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
428
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
429 429
         if (!$omittabletags) {
430 430
             $retval .= "</td><td>";
431 431
         }
@@ -507,8 +507,8 @@  discard block
 block discarded – undo
507 507
             return "";
508 508
         }
509 509
 
510
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
511
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
510
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
511
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
512 512
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
513 513
             return "";
514 514
         }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         imagecolorallocate($whiteimage, 255, 255, 255);
535 535
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
536 536
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
537
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
537
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
538 538
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
539 539
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
540 540
         ob_start();
@@ -584,9 +584,9 @@  discard block
 block discarded – undo
584 584
                 $message = "Your configuration appears to be fine.";
585 585
                 break;
586 586
             default:
587
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
587
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
588 588
         }
589
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
589
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
590 590
         foreach ($test->out as $testValue) {
591 591
             foreach ($testValue as $o) {
592 592
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
web/admin/edit_participant_result.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22 22
 
23
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $loggerInstance = new \core\common\Logging();
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 $myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
34 34
 $instId = $myInstOriginal->identifier;
35 35
 
36
-$hello = _("To whom it may concern,") . "\n\n";
37
-$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" .
38
-        _("Greetings, ") . "\n\n" .
36
+$hello = _("To whom it may concern,")."\n\n";
37
+$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n".
38
+        _("Greetings, ")."\n\n".
39 39
         \config\Master::APPEARANCE['productname_long'];
40 40
 
41 41
 switch ($_POST['submitbutton']) {
42 42
     case web\lib\common\FormElements::BUTTON_DELETE:
43 43
         $myInstOriginal->destroy();
44
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId);
44
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId);
45 45
         header("Location: overview_user.php");
46 46
         exit;
47 47
     case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART:
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         }
52 52
         // flush all IdP attributes and send user to creation wizard
53 53
         $myInstOriginal->flushAttributes();
54
-        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId);
55
-        $text = $hello .
56
-                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" .
54
+        $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId);
55
+        $text = $hello.
56
+                sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n".
57 57
                 $bye;
58 58
         $fed = new core\Federation($myInstOriginal->federation);
59 59
         foreach ($fed->listFederationAdmins() as $id) {
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
             exit(0);
73 73
         }
74 74
         $inst_name = $myInstOriginal->name;
75
-        echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>";
75
+        echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>";
76 76
         echo "<table>";
77 77
         echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES);
78 78
         echo "</table>";
79 79
 // delete cached logo, if present
80
-        $dir = ROOT . '/web/downloads/logos/';
81
-        $globResult = glob($dir . $myInstOriginal->identifier . "_*.png");
80
+        $dir = ROOT.'/web/downloads/logos/';
81
+        $globResult = glob($dir.$myInstOriginal->identifier."_*.png");
82 82
         if ($globResult === FALSE) { // we should catch the improbable error condition
83 83
             $globResult = [];
84 84
         }
85 85
         array_map('unlink', $globResult);
86 86
         $loggerInstance->debug(4, "UNLINK from $dir\n");
87
-        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed");
87
+        $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed");
88 88
 
89 89
 // re-instantiate ourselves... profiles need fresh data
90 90
         $myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']);
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
         if (count($significantChanges) > 0) {
94 94
             // send a notification/alert mail to someone we know is in charge
95 95
             /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
96
-            $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
96
+            $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
97 97
             if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) {
98
-                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst) . "\n\n";
99
-                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n";
98
+                $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureInst)."\n\n";
99
+                $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n";
100 100
             }
101 101
             $text .= $bye;
102 102
             // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
         if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
114 114
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) {
115
-                $ssids[] = $ssidname . " " . _("(WPA2/AES)");
115
+                $ssids[] = $ssidname." "._("(WPA2/AES)");
116 116
             }
117 117
         }
118 118
 
119 119
         foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) {
120
-            $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)");
120
+            $ssids[] = $ssidname['value']." "._("(WPA2/AES)");
121 121
         }
122 122
 
123 123
         echo "<table>";
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         if (count($ssids) > 0) {
126 126
             $printedlist = "";
127 127
             foreach ($ssids as $names) {
128
-                $printedlist = $printedlist . "$names ";
128
+                $printedlist = $printedlist."$names ";
129 129
             }
130 130
             echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured"));
131 131
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 // did we get an email address? then, show the silverbullet jumpstart button
154 154
                 // otherwise, issue a smartass comment
155 155
                 if (count($myInstReinstantiated->getAttributes("support:email")) > 0) {
156
-                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>";
156
+                    echo "<form method='post' action='edit_silverbullet.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>";
157 157
                 } else {
158 158
                     echo "<table>";
159 159
                     echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureInst), _("No support e-mail!"));
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
                 }
162 162
             }
163 163
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
164
-                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>";
164
+                echo "<br/><form method='post' action='edit_profile.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>";
165 165
             }
166 166
         }
167
-        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>";
167
+        echo "<br/><form method='post' action='overview_user.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>";
168 168
 
169 169
         break;
170 170
     default:
Please login to merge, or discard this patch.
config/Diagnostics-template.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
  */
35 35
 class Diagnostics
36 36
 {
37
-         /**
38
-         * Various paths.
39
-         * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
40
-         * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
41
-         *   See also NSIS_VERSION further down
42
-         * @var array
43
-         */
37
+            /**
38
+             * Various paths.
39
+             * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
40
+             * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
41
+             *   See also NSIS_VERSION further down
42
+             * @var array
43
+             */
44 44
         const PATHS = [
45 45
             'c_rehash' => 'c_rehash',
46 46
             'eapol_test' => 'eapol_test',
Please login to merge, or discard this patch.