Test Setup Failed
Push — master ( 0dd6e1...79885b )
by Stefan
05:34
created
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.
config/ConfAssistant-template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                     ], 
93 93
                 'condition' => TRUE],
94 94
             'OpenRoaming®' => [
95
-                'ssid' => [],     /* OpenRoaming has left SSIDs behind */
95
+                'ssid' => [], /* OpenRoaming has left SSIDs behind */
96 96
                 'oi' => [
97 97
                     '5A03BA0000', /* OpenRoaming/AllIdentities/SettlementFree/NoPersonalData/BaselineQoS */
98 98
                     '5A03BA0800', /* OpenRoaming/EduIdentities/SettlementFree/NoPersonalData/BaselineQoS */
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
             'db' => 'radacct',
187 187
             'user' => 'someuser',
188 188
             'pass' => 'somepass',
189
-            'readonly' => TRUE,],
189
+            'readonly' => TRUE, ],
190 190
         'RADIUS_2' => [
191 191
             'host' => 'auth-2.hosted.eduroam.org',
192 192
             'db' => 'radacct',
193 193
             'user' => 'someuser',
194 194
             'pass' => 'somepass',
195
-            'readonly' => TRUE,],
195
+            'readonly' => TRUE, ],
196 196
     ];
197 197
 
198 198
     /**
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/overview_user.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 namespace core;
23 23
 
24
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
24
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
25 25
 
26 26
 $instMgmt = new \core\UserManagement();
27 27
 $deco = new \web\lib\admin\PageDecoration();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-<?php echo "" . _("Unique Identifier") ?>
62
+<?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
     <div>
73 73
         <?php
74 74
         if (\config\Master::DB['USER']['readonly'] === FALSE) {
75
-            echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>";
75
+            echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>";
76 76
         }
77 77
 
78 78
         if ($user->isFederationAdmin()) {
79
-            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>";
79
+            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>";
80 80
         }
81 81
         if ($user->isSuperadmin()) {
82
-            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>";
82
+            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>";
83 83
         }
84 84
         ?>
85 85
     </div>
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
93 93
             $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual
94 94
         }
95
-        $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>";
95
+        $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>";
96 96
     } else {
97 97
         $helptext = "";
98 98
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         // we need to run the Federation constructor
102 102
         $cat = new \core\CAT;
103 103
         /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale)
104
-        echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant) . "</h2>";
104
+        echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant)."</h2>";
105 105
         $instlist = [];
106 106
         $my_idps = [];
107 107
         $myFeds = [];
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         }
125 125
         ?>
126 126
         <table class='user_overview'>
127
-            <caption><?php echo sprintf(_("%s Management Overview"),$uiElements->nomenclatureParticipant);?></caption>
127
+            <caption><?php echo sprintf(_("%s Management Overview"), $uiElements->nomenclatureParticipant); ?></caption>
128 128
             <tr>
129 129
                 <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureParticipant); ?></th>
130 130
                 <th scope="col"><?php echo sprintf(_("Other admins of this %s"), $uiElements->nomenclatureParticipant); ?></th>
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             <?php
145 145
             foreach ($myFeds as $fed_id => $fed_name) {
146 146
 /// nomenclature 'fed', fed name, nomenclature 'inst'
147
-                echo "<tr><td colspan='4'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureParticipant) . "</strong></td></tr>";
147
+                echo "<tr><td colspan='4'><strong>".sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureParticipant)."</strong></td></tr>";
148 148
 
149 149
                 $fedOrganisations = $my_idps[$fed_id];
150 150
                 asort($fedOrganisations);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                     $the_inst = $oneinst['object'];
154 154
 
155 155
                     echo "<tr>"
156
-                    . "<td>" . $oneinst['name'] . "</td>";
156
+                    . "<td>".$oneinst['name']."</td>";
157 157
                     echo "<td>";
158 158
                     $admins = $the_inst->listOwners();
159 159
                     $blessedUser = FALSE;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                             $coadmin = new \core\User($username['ID']);
163 163
                             $coadmin_name = $coadmin->getAttributes('user:realname');
164 164
                             if (count($coadmin_name) > 0) {
165
-                                echo $coadmin_name[0]['value'] . "<br/>";
165
+                                echo $coadmin_name[0]['value']."<br/>";
166 166
                                 unset($admins[$number]);
167 167
                             }
168 168
                         } else { // don't list self
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                         }
178 178
                         echo "</td><td>";
179 179
                         if ($blessedUser && \config\Master::DB['INST']['readonly'] === FALSE) {
180
-                            echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>";
180
+                            echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>";
181 181
                         }
182 182
                         echo "</td></tr>";
183 183
                     }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                     echo "</td><td>"; // danger zone 
218 218
                     ?>
219 219
                     <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'>
220
-                        <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( \config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button>
220
+                        <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed)." " : "").sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button>
221 221
                     </form>
222 222
                     <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'>
223 223
                         <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART; ?>' onclick="return confirm('<?php echo sprintf(_("This action will delete all properties of the %s and start over the configuration from scratch. Do you really want to reset all settings of the %s %s?"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureParticipant, $my_inst->name); ?>')"><?php echo sprintf(_("Reset all %s settings"), $uiElements->nomenclatureParticipant); ?></button>
@@ -227,32 +227,32 @@  discard block
 block discarded – undo
227 227
                 }
228 228
                 $otherAdminCount = count($admins); // only the unnamed remain
229 229
                 if ($otherAdminCount > 0) {
230
-                    echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount),$otherAdminCount);
230
+                    echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount), $otherAdminCount);
231 231
                 }
232 232
                 echo "</td><td>";
233 233
                 $isAdminMgmtAvailable = FALSE;
234 234
                 if ($blessedUser && CONFIG['DB']['INST']['readonly'] === FALSE) {
235 235
                     $isAdminMgmtAvailable = TRUE;
236 236
                 }
237
-                echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit' ". ($isAdminMgmtAvailable ? "" : "disabled") .">" . _("Add/Remove Administrators") . "</button></form></div>";
237
+                echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit' ".($isAdminMgmtAvailable ? "" : "disabled").">"._("Add/Remove Administrators")."</button></form></div>";
238 238
                 echo "</td></tr>";
239 239
             }
240 240
             ?>
241 241
         </table>
242 242
         <?php
243 243
     } else {
244
-        echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>";
244
+        echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>";
245 245
     }
246 246
     if (\config\Master::DB['INST']['readonly'] === FALSE) {
247 247
         if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL) {
248
-            echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>";
248
+            echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>";
249 249
             echo "<hr/>
250 250
              <div style='white-space: nowrap;'>
251 251
                 <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" .
252
-            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant) .
252
+            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant).
253 253
             "        <input type='text' id='token' name='token'/>
254 254
                     <button type='submit'>" .
255
-            _("Go!") . "
255
+            _("Go!")."
256 256
                     </button>
257 257
                 </form>
258 258
              </div>";
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             <div style='white-space: nowrap;'>
262 262
         <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'>
263 263
                 <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" .
264
-            sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant) . "
264
+            sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant)."
265 265
             </button>
266 266
         </form>
267 267
         </div>";
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.
web/admin/edit_participant.php 1 patch
Spacing   +35 added lines, -35 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();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 $inst_name = $my_inst->name;
40 40
 
41 41
 if ($wizardStyle) {
42
-    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'],  $uiElements->nomenclatureParticipant));
42
+    echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant));
43 43
 } else {
44 44
     echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant, $inst_name));
45 45
 }
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         ?>
81 81
     </h1>
82 82
     <div class='infobox'>
83
-        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption;?></h2>
83
+        <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption; ?></h2>
84 84
         <table>
85
-            <caption><?php echo $tablecaption;?></caption>
85
+            <caption><?php echo $tablecaption; ?></caption>
86 86
             <tr>
87
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
88
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
89
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
87
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
88
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
89
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
90 90
             </tr>
91 91
 
92 92
             <tr>
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
         </table>
102 102
     </div>
103 103
     <?php
104
-    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'>
105
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
104
+    echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'>
105
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
106 106
 
107 107
     if ($wizardStyle) {
108
-        echo "<p>" .
109
-        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>";
108
+        echo "<p>".
109
+        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>";
110 110
     }
111 111
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, \core\Options::LEVEL_IDP);
112 112
     ?>
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
115 115
         <?php
116 116
         if ($wizardStyle) {
117
-            echo "<p>" .
118
-            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>
117
+            echo "<p>".
118
+            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>
119 119
                       <ul>
120
-                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>
121
-                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."),$uiElements->nomenclatureParticipant) . "</li>";
120
+                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>
121
+                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $uiElements->nomenclatureParticipant)."</li>";
122 122
             echo "</ul>";
123 123
         }
124 124
         echo $optionDisplay->prefilledOptionTable("general");
@@ -132,44 +132,44 @@  discard block
 block discarded – undo
132 132
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
133 133
         <?php
134 134
         if ($wizardStyle) {
135
-            echo "<p>" .
136
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>
135
+            echo "<p>".
136
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>
137 137
           <ul>";
138 138
             echo "<li>";
139
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
139
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
140 140
             if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
141 141
                 $ssidlist = "";
142 142
                 foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
143
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
143
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
144 144
                 }
145 145
                 $ssidlist = substr($ssidlist, 2);
146 146
                 echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
147
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
147
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID"));
148 148
             } else {
149 149
                 echo _("Please configure which SSIDs should be configured in the installers.");
150 150
             }
151
-            echo " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
151
+            echo " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
152 152
             echo "</li>";
153 153
 
154 154
             echo "<li>";
155
-            echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
155
+            echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
156 156
             if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
157 157
                 $consortiumlist = "";
158 158
                 foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
159
-                    $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
159
+                    $consortiumlist .= ", '<strong>".$oi."</strong>'";
160 160
                 }
161 161
                 $consortiumlist = substr($consortiumlist, 2);
162 162
                 echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist);
163 163
 
164
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
164
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
165 165
             } else {
166 166
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
167 167
             }
168 168
             echo "</li>";
169
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
170
-            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
169
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
170
+            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
171 171
             "</li>";
172
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
172
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
173 173
             . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
174 174
             . "</li>";
175 175
             echo "</ul>";
@@ -185,16 +185,16 @@  discard block
 block discarded – undo
185 185
             echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
186 186
             
187 187
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
188
-                echo "<p>" .
188
+                echo "<p>".
189 189
                         
190
-                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."),$uiElements->nomenclatureParticipant)  . "</p>" .
191
-                "<p>" .
192
-                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
190
+                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $uiElements->nomenclatureParticipant)."</p>".
191
+                "<p>".
192
+                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
193 193
                 if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
194
-                echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>";
194
+                echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>";
195 195
                 }
196 196
             } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
197
-                echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
197
+                echo "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
198 198
             }
199 199
             
200 200
         }
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
205 205
     <?php
206 206
     if ($wizardStyle) {
207
-        echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>";
207
+        echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>";
208 208
     } else {
209
-        echo "<div><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_user.php\"'>" . _("Discard changes") . "</button></div></form>";
209
+        echo "<div><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_user.php\"'>"._("Discard changes")."</button></div></form>";
210 210
     }
211 211
     echo $deco->footer();
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.
core/common/OutsideComm.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $mail->WordWrap = 72;
83 83
         $mail->isHTML(FALSE);
84 84
         $mail->CharSet = 'UTF-8';
85
-        $configuredFrom = \config\Master::APPEARANCE['from-mail'] . "";
85
+        $configuredFrom = \config\Master::APPEARANCE['from-mail']."";
86 86
         $mail->From = $configuredFrom;
87 87
 // are we fancy? i.e. S/MIME signing?
88 88
         if (isset(\config\Master::MAILSETTINGS['certfilename'], \config\Master::MAILSETTINGS['keyfilename'], \config\Master::MAILSETTINGS['keypass'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
124 124
             return OutsideComm::MAILDOMAIN_NO_MX;
125 125
         }
126
-        $loggerInstance->debug(5, "Domain: $domain MX: " . /** @scrutinizer ignore-type */ print_r($mx, TRUE));
126
+        $loggerInstance->debug(5, "Domain: $domain MX: "./** @scrutinizer ignore-type */ print_r($mx, TRUE));
127 127
         // create a pool of A and AAAA records for all the MXes
128 128
         $ipAddrs = [];
129 129
         foreach ($mx as $onemx) {
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $ipAddrs[] = $oneipv4['ip'];
134 134
             }
135 135
             foreach ($v6list as $oneipv6) {
136
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
136
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
137 137
             }
138 138
         }
139 139
         if (count($ipAddrs) == 0) {
140 140
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
141 141
             return OutsideComm::MAILDOMAIN_NO_HOST;
142 142
         }
143
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . /** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
143
+        $loggerInstance->debug(5, "Domain: $domain Addrs: "./** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
144 144
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
145 145
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
146 146
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
194 194
             case 'Nexmo':
195 195
                 // taken from https://docs.nexmo.com/messaging/sms-api
196
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
196
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
197 197
                                 [
198 198
                                     'api_key' => \config\ConfAssistant::SMSSETTINGS['username'],
199 199
                                     'api_secret' => \config\ConfAssistant::SMSSETTINGS['password'],
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
220 220
                     return OutsideComm::SMS_NOTSENT;
221 221
                 }
222
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
222
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
223 223
 
224 224
                 $totalFailures = 0;
225 225
                 foreach ($decoded_response['messages'] as $message) {
226 226
                     if ($message['status'] == 0) {
227
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
227
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
228 228
                     } else {
229
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
229
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
230 230
                         $totalFailures++;
231 231
                     }
232 232
                 }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             $proto = "https://";
296 296
         }
297 297
         // then, send out the mail
298
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
298
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
299 299
         // default means we don't have a Reply-To.
300 300
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
301 301
 
@@ -303,8 +303,8 @@  discard block
 block discarded – undo
303 303
             // see if we are supposed to add a custom message
304 304
             $customtext = $federation->getAttributes('fed:custominvite');
305 305
             if (count($customtext) > 0) {
306
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
307
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
306
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
307
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
308 308
             }
309 309
             // and add Reply-To already now
310 310
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
         }
321 321
         $productname = \config\Master::APPEARANCE['productname'];
322 322
         $consortium = \config\ConfAssistant::CONSORTIUM['display_name'];
323
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72) . "\n\n" .
324
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
325
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72) . "\n\n" .
326
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/\n\n" .
327
-                _("and enter the invitation token") . "\n\n" .
328
-                $newtoken . "\n\n$replyToMessage\n\n" .
329
-                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" .
330
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72) . "\n\n" .
323
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72)."\n\n".
324
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
325
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72)."\n\n".
326
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/\n\n".
327
+                _("and enter the invitation token")."\n\n".
328
+                $newtoken."\n\n$replyToMessage\n\n".
329
+                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n".
330
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72)."\n\n".
331 331
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), $consortium);
332 332
 
333 333
 
334 334
 // who to whom?
335
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
335
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
336 336
 
337 337
         if (isset(\config\Master::APPEARANCE['invitation-bcc-mail']) && \config\Master::APPEARANCE['invitation-bcc-mail'] !== NULL) {
338 338
             $mail->addBCC(\config\Master::APPEARANCE['invitation-bcc-mail']);
Please login to merge, or discard this patch.
core/common/Entity.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function __construct()
111 111
     {
112 112
         $this->loggerInstance = new Logging();
113
-        $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n");
113
+        $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n");
114 114
         $this->languageInstance = new Language();
115 115
         Entity::intoThePotatoes("core");
116 116
         // some config elements are displayable. We need some dummies to 
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $dummy_organisation2a = _("organization");
130 130
         $dummy_organisation3 = _("entity");
131 131
         // and do something useless with the strings so that there's no "unused" complaint
132
-        if (strlen($dummy_NRO . $dummy_inst1 . $dummy_inst2 . $dummy_inst3 . $dummy_hotspot1 . $dummy_hotspot2 . $dummy_hotspot3 . $dummy_organisation1 . $dummy_organisation2 . $dummy_organisation2a . $dummy_organisation3) < 0) {
132
+        if (strlen($dummy_NRO.$dummy_inst1.$dummy_inst2.$dummy_inst3.$dummy_hotspot1.$dummy_hotspot2.$dummy_hotspot3.$dummy_organisation1.$dummy_organisation2.$dummy_organisation2a.$dummy_organisation3) < 0) {
133 133
             throw new Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole.");
134 134
         }
135
-        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . "";
136
-        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution'] . "";
137
-        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'] . "";
138
-        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] . "";
135
+        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation']."";
136
+        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution']."";
137
+        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot']."";
138
+        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant']."";
139 139
         Entity::$nomenclature_fed = _($xyzVariableFed);
140 140
         Entity::$nomenclature_inst = _($xyzVariableInst);
141 141
         Entity::$nomenclature_hotspot = _($xyzVariableHotspot);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function __destruct()
153 153
     {
154
-        (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n");
154
+        (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n");
155 155
     }
156 156
 
157 157
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1)
185 185
     {
186 186
         $loggerInstance = new Logging();
187
-        $name = md5(time() . rand());
187
+        $name = md5(time().rand());
188 188
         $path = ROOT;
189 189
         switch ($purpose) {
190 190
             case 'silverbullet':
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             default:
203 203
                 throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n");
204 204
         }
205
-        $tmpDir = $path . '/' . $name;
205
+        $tmpDir = $path.'/'.$name;
206 206
         $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n");
207 207
         if (!mkdir($tmpDir, 0700, true)) {
208 208
             if ($failIsFatal) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function rrmdir($dir)
225 225
     {
226
-        foreach (glob($dir . '/*') as $file) {
226
+        foreach (glob($dir.'/*') as $file) {
227 227
             if (is_dir($file)) {
228 228
                 Entity::rrmdir($file);
229 229
             } else {
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
         }
250 250
         // these substr() are guaranteed to yield actual string data, as the
251 251
         // base string is an MD5 hash - has sufficient length
252
-        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-';
253
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-';
254
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-';
255
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-';
252
+        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-';
253
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-';
254
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-';
255
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-';
256 256
         $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12);
257
-        return $prefix . $uuid;
257
+        return $prefix.$uuid;
258 258
     }
259 259
 
260 260
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         for ($i = count($trace); $i--; $i > 0) {
296 296
             if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) {
297 297
                 if ($showTrace) {
298
-                    echo "FOUND caller: " . /** @scrutinizer ignore-type */ print_r($trace[$i], true) . " - class is " . $trace[$i]['class'];
298
+                    echo "FOUND caller: "./** @scrutinizer ignore-type */ print_r($trace[$i], true)." - class is ".$trace[$i]['class'];
299 299
                 }
300 300
                 $caller = $trace[$i];
301 301
                 break;
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
         // otherwise, on the filename relative to ROOT
306 306
         $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT));
307 307
         if ($showTrace === TRUE) {
308
-            echo "<pre>" . /** @scrutinizer ignore-type */ print_r($trace, true) . "</pre>";
309
-            echo "CLASS = " . $myName . "<br/>";
308
+            echo "<pre>"./** @scrutinizer ignore-type */ print_r($trace, true)."</pre>";
309
+            echo "CLASS = ".$myName."<br/>";
310 310
         }
311 311
         if (preg_match("/diag/", $myName) == 1) {
312 312
             $ret = "diagnostics";
@@ -340,10 +340,10 @@  discard block
 block discarded – undo
340 340
         if ($catalogue === NULL) {
341 341
             $theCatalogue = Entity::determineOwnCatalogue($trace);
342 342
             textdomain($theCatalogue);
343
-            bindtextdomain($theCatalogue, ROOT . "/translation/");
343
+            bindtextdomain($theCatalogue, ROOT."/translation/");
344 344
         } else {
345 345
             textdomain($catalogue);
346
-            bindtextdomain($catalogue, ROOT . "/translation/");
346
+            bindtextdomain($catalogue, ROOT."/translation/");
347 347
         }
348 348
     }
349 349
 
Please login to merge, or discard this patch.