Passed
Push — release_2_0 ( f088f0...711d83 )
by Tomasz
07:54
created
core/SanityTests.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 use GeoIp2\Database\Reader;
49 49
 use \Exception;
50 50
 
51
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
52
-require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/PHPMailer.php";
53
-require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/SMTP.php";
51
+require_once dirname(dirname(__FILE__))."/config/_config.php";
52
+require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/PHPMailer.php";
53
+require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/SMTP.php";
54 54
 
55 55
 class SanityTests extends CAT {
56 56
     /* in this section set current CAT requirements */
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->test_result = [];
91 91
         $this->test_result['global'] = 0;
92 92
         // parse the schema file to find out the number of expected rows...
93
-        $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql");
93
+        $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql");
94 94
         $this->profile_option_ct = 0;
95 95
         $passedTheWindmill = FALSE;
96 96
         foreach ($schema as $schemaLine) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function test($test) {
117 117
         $this->out[$test] = [];
118 118
         $this->name = $test;
119
-        $m_name = $test . '_test';
119
+        $m_name = $test.'_test';
120 120
         $this->test_result[$test] = 0;
121 121
         if (!method_exists($this, $m_name)) {
122 122
             $this->testReturn(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>.");
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 $matchArray = [];
205 205
                 preg_match('/([^ ]+) ?/', $config['PATHS'][$pathToCheck], $matchArray);
206 206
                 $exe = $matchArray[1];
207
-                $the_path = exec("which " . $config['PATHS'][$pathToCheck]);
207
+                $the_path = exec("which ".$config['PATHS'][$pathToCheck]);
208 208
                 if ($the_path == $exe) {
209 209
                     $exec_is = "EXPLICIT";
210 210
                 } else {
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
      */
224 224
     private function php_test() {
225 225
         if (version_compare(phpversion(), $this->php_needversion, '>=')) {
226
-            $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . ".");
226
+            $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion().".");
227 227
         } else {
228
-            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->php_needversion, but you only have " . phpversion() . ".");
228
+            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->php_needversion, but you only have ".phpversion().".");
229 229
         }
230 230
     }
231 231
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             $this->testReturn(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly");
242 242
         } else {
243 243
             $rootFromScript = $m[1] === '' ? '/' : $m[1];
244
-            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . CONFIG['PATHS']['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>");
244
+            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".CONFIG['PATHS']['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>");
245 245
         }
246 246
     }
247 247
 
@@ -258,9 +258,9 @@  discard block
 block discarded – undo
258 258
             $SSPconfig = \SimpleSAML_Configuration::getInstance();
259 259
             $sspVersion = explode('.', $SSPconfig->getVersion());
260 260
             if ((int) $sspVersion[0] >= $this->ssp_needversion['major'] && (int) $sspVersion[1] >= $this->ssp_needversion['minor']) {
261
-                $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion));
261
+                $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion));
262 262
             } else {
263
-                $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->ssp_needversion));
263
+                $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->ssp_needversion));
264 264
             }
265 265
         }
266 266
     }
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
      * @return void
315 315
      */
316 316
     private function logdir_test() {
317
-        if (fopen(CONFIG['PATHS']['logdir'] . "/debug.log", "a") == FALSE) {
318
-            $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>" . CONFIG['PATHS']['logdir'] . "</strong> are not writable!");
317
+        if (fopen(CONFIG['PATHS']['logdir']."/debug.log", "a") == FALSE) {
318
+            $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>".CONFIG['PATHS']['logdir']."</strong> are not writable!");
319 319
         } else {
320 320
             $this->testReturn(\core\common\Entity::L_OK, "Log directory is writable.");
321 321
         }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     private function openssl_test() {
440 440
         $A = $this->getExecPath('openssl');
441 441
         if ($A['exec'] != "") {
442
-            $t = exec($A['exec'] . ' version');
442
+            $t = exec($A['exec'].' version');
443 443
             if ($A['exec_is'] == "EXPLICIT") {
444 444
                 $this->testReturn(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config.");
445 445
             } else {
@@ -466,14 +466,14 @@  discard block
 block discarded – undo
466 466
         }
467 467
         $A = $this->getExecPath('makensis');
468 468
         if ($A['exec'] != "") {
469
-            $t = exec($A['exec'] . ' -VERSION');
469
+            $t = exec($A['exec'].' -VERSION');
470 470
             if ($A['exec_is'] == "EXPLICIT") {
471 471
                 $this->testReturn(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config.");
472 472
             } else {
473 473
                 $this->testReturn(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config.");
474 474
             }
475 475
             $outputArray = [];
476
-            exec($A['exec'] . ' -HELP', $outputArray);
476
+            exec($A['exec'].' -HELP', $outputArray);
477 477
             $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray));
478 478
             if ($t1 == 1 && CONFIG_CONFASSISTANT['NSIS_VERSION'] == 2) {
479 479
                 $this->testReturn(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!");
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         $NSIS_Module_status = [];
503 503
         foreach ($this->NSIS_Modules as $module) {
504 504
             unset($out);
505
-            exec(CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
505
+            exec(CONFIG_CONFASSISTANT['PATHS']['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
506 506
             if ($retval > 0) {
507 507
                 $NSIS_Module_status[$module] = 0;
508 508
             } else {
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
         $locales = shell_exec("locale -a");
566 566
         $allthere = "";
567 567
         foreach (CONFIG['LANGUAGES'] as $onelanguage) {
568
-            if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) {
569
-                $allthere .= $onelanguage['locale'] . " ";
568
+            if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) {
569
+                $allthere .= $onelanguage['locale']." ";
570 570
             }
571 571
         }
572 572
         if ($allthere == "") {
@@ -580,47 +580,47 @@  discard block
 block discarded – undo
580 580
         ["SETTING" => CONFIG['APPEARANCE']['from-mail'],
581 581
             "DEFVALUE" => "[email protected]",
582 582
             "COMPLAINTSTRING" => "APPEARANCE/from-mail ",
583
-            "REQUIRED" => FALSE,],
583
+            "REQUIRED" => FALSE, ],
584 584
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['url'],
585 585
             "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!",
586 586
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ",
587
-            "REQUIRED" => FALSE,],
587
+            "REQUIRED" => FALSE, ],
588 588
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['display'],
589 589
             "DEFVALUE" => "[email protected]",
590 590
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ",
591
-            "REQUIRED" => FALSE,],
591
+            "REQUIRED" => FALSE, ],
592 592
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['developer-mail'],
593 593
             "DEFVALUE" => "[email protected]",
594 594
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ",
595
-            "REQUIRED" => FALSE,],
595
+            "REQUIRED" => FALSE, ],
596 596
         ["SETTING" => CONFIG['APPEARANCE']['abuse-mail'],
597 597
             "DEFVALUE" => "[email protected]",
598 598
             "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ",
599
-            "REQUIRED" => FALSE,],
599
+            "REQUIRED" => FALSE, ],
600 600
         ["SETTING" => CONFIG['APPEARANCE']['MOTD'],
601 601
             "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!",
602 602
             "COMPLAINTSTRING" => "APPEARANCE/MOTD ",
603
-            "REQUIRED" => FALSE,],
603
+            "REQUIRED" => FALSE, ],
604 604
         ["SETTING" => CONFIG['APPEARANCE']['webcert_CRLDP'],
605 605
             "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'],
606 606
             "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ",
607
-            "REQUIRED" => TRUE,],
607
+            "REQUIRED" => TRUE, ],
608 608
         ["SETTING" => CONFIG['APPEARANCE']['webcert_OCSP'],
609 609
             "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'],
610 610
             "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ",
611
-            "REQUIRED" => TRUE,],
611
+            "REQUIRED" => TRUE, ],
612 612
         ["SETTING" => CONFIG['DB']['INST']['host'],
613 613
             "DEFVALUE" => "db.host.example",
614 614
             "COMPLAINTSTRING" => "DB/INST ",
615
-            "REQUIRED" => TRUE,],
615
+            "REQUIRED" => TRUE, ],
616 616
         ["SETTING" => CONFIG['DB']['INST']['host'],
617 617
             "DEFVALUE" => "db.host.example",
618 618
             "COMPLAINTSTRING" => "DB/USER ",
619
-            "REQUIRED" => TRUE,],
619
+            "REQUIRED" => TRUE, ],
620 620
         ["SETTING" => CONFIG['DB']['EXTERNAL']['host'],
621 621
             "DEFVALUE" => "customerdb.otherhost.example",
622 622
             "COMPLAINTSTRING" => "DB/EXTERNAL ",
623
-            "REQUIRED" => FALSE,],
623
+            "REQUIRED" => FALSE, ],
624 624
     ];
625 625
 
626 626
     /**
@@ -646,11 +646,11 @@  discard block
 block discarded – undo
646 646
 
647 647
         foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-clientcerts'] as $cadata) {
648 648
             foreach ($cadata['certificates'] as $cert_files) {
649
-                if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) {
650
-                    $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " ";
649
+                if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) {
650
+                    $defaultvalues .= "CERTIFICATE/".$cert_files['public']." ";
651 651
                 }
652
-                if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) {
653
-                    $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " ";
652
+                if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) {
653
+                    $defaultvalues .= "CERTIFICATE/".$cert_files['private']." ";
654 654
                 }
655 655
             }
656 656
         }
@@ -740,14 +740,14 @@  discard block
 block discarded – undo
740 740
         if ($global_no_cache) {
741 741
             foreach ($Devs as $dev => $D) {
742 742
                 if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) {
743
-                    $no_cache_dev .= $dev . " ";
743
+                    $no_cache_dev .= $dev." ";
744 744
                     $no_cache_dev_count++;
745 745
                 }
746 746
             }
747 747
         } else {
748 748
             foreach ($Devs as $dev => $D) {
749 749
                 if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) {
750
-                    $no_cache_dev .= $dev . " ";
750
+                    $no_cache_dev .= $dev." ";
751 751
                     $no_cache_dev_count++;
752 752
                 }
753 753
             }
@@ -785,13 +785,13 @@  discard block
 block discarded – undo
785 785
         $mail->isHTML(FALSE);
786 786
         $mail->CharSet = 'UTF-8';
787 787
         $mail->From = CONFIG['APPEARANCE']['from-mail'];
788
-        $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System";
788
+        $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System";
789 789
         $mail->addAddress(CONFIG['APPEARANCE']['abuse-mail']);
790 790
         $mail->Subject = "testing CAT configuration mail";
791 791
         $mail->Body = "Testing CAT mailing\n";
792 792
         $sent = $mail->send();
793 793
         if ($sent) {
794
-            $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . CONFIG['APPEARANCE']['abuse-mail'] . " mailbox if the message was receiced.");
794
+            $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".CONFIG['APPEARANCE']['abuse-mail']." mailbox if the message was receiced.");
795 795
         } else {
796 796
             $this->testReturn(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS");
797 797
         }
Please login to merge, or discard this patch.
web/user/sb_download.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @author Stefan Winter <[email protected]>
28 28
  * @package UserGUI
29 29
  */
30
-require dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 $API = new \core\UserAPI();
32 32
 $loggerInstance = new \core\common\Logging();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -76,5 +76,5 @@  discard block
 block discarded – undo
76 76
     if ($accountPageUrl === FALSE) {
77 77
         throw new Exception("Unable to find our accountstatus.php page.");
78 78
     }
79
-    header("Location: ../accountstatus/accountstatus.php?token=" . $cleanToken . "&errorcode=GENERATOR_CONSUMED");
79
+    header("Location: ../accountstatus/accountstatus.php?token=".$cleanToken."&errorcode=GENERATOR_CONSUMED");
80 80
 }
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
web/user/API.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  *
25 25
  * @package UserAPI
26 26
  */
27
-include(dirname(dirname(dirname(__FILE__))) . "/config/_config.php");
27
+include(dirname(dirname(dirname(__FILE__)))."/config/_config.php");
28 28
 $API = new \core\UserNetAPI();
29 29
 $validator = new web\lib\common\InputValidation();
30 30
 $loggerInstance = new \core\common\Logging();
Please login to merge, or discard this patch.
web/admin/overview_idp.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
-require_once dirname(dirname(dirname(__FILE__))) . "/core/phpqrcode.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/core/phpqrcode.php";
31 31
 
32 32
 
33 33
 $deco = new \web\lib\admin\PageDecoration();
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 } else {
41 41
     $link = 'http://';
42 42
 }
43
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
43
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
44 44
 $link = htmlspecialchars($link);
45 45
 
46 46
 const QRCODE_PIXELS_PER_SYMBOL = 12;
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
         <div class='infobox' style='text-align:center;'>
77 77
             <h2><?php echo sprintf(_("%s download area QR code"), $uiElements->nomenclatureInst); ?></h2>
78 78
             <?php
79
-            $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier;
79
+            $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier;
80 80
             // never NULL, because $filename is FALSE; but make Scrutinizer happy
81 81
             $rawQr = QRcode::png($idpLevelUrl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL);
82 82
             if ($rawQr === NULL) {
83 83
                 throw new Exception("Something went seriously wrong during QR code generation!");
84 84
             }
85
-            $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL));
85
+            $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL));
86 86
             $size = getimagesize($uri);
87
-            echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>";
87
+            echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>";
88 88
             ?>
89 89
             <br>
90 90
             <?php echo "<a href='$idpLevelUrl'>$idpLevelUrl</a>"; ?>
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 </td>
114 114
                 <td>
115 115
                     <form action='edit_idp_result.php?inst_id=<?php echo $my_inst->identifier; ?>' method='post' accept-charset='UTF-8'>
116
-                        <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->nomenclatureInst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureInst); ?></button>
116
+                        <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->nomenclatureInst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureInst); ?></button>
117 117
                     </form>
118 118
 
119 119
                 </td>
@@ -134,21 +134,21 @@  discard block
 block discarded – undo
134 134
         <?php
135 135
         if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) {
136 136
             echo "<tr>
137
-                        <td>" . _("Check another realm's reachability") . "</td>
137
+                        <td>" . _("Check another realm's reachability")."</td>
138 138
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
139 139
                               <input type='text' name='realm' id='realm'>
140 140
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
141
-                              <button type='submit'>" . _("Go!") . "</button>
141
+                              <button type='submit'>"._("Go!")."</button>
142 142
                             </form>
143 143
                         </td>
144 144
                     </tr>";
145 145
         }
146 146
         if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { // SW: APPROVED
147 147
             echo "<tr>
148
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
148
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
149 149
                         <td>
150 150
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
151
-                              <button type='submit'>" . _("Go!") . "</button>
151
+                              <button type='submit'>" . _("Go!")."</button>
152 152
                            </form>
153 153
                         </td>
154 154
                     </tr>";
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
     <?php
160 160
     $profiles_for_this_idp = $my_inst->listProfiles();
161 161
     if (count($profiles_for_this_idp) == 0) { // no profiles yet.
162
-        echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>";
162
+        echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>";
163 163
     }
164 164
     if (count($profiles_for_this_idp) > 0) { // no profiles yet.
165
-        echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>";
165
+        echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>";
166 166
     }
167 167
 // if there is one profile and it is of type Silver Bullet, display a very
168 168
 // simple widget with just a "Manage" button
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                             echo _("Information needed!");
189 189
                             echo "<ul style='margin:1px'>";
190 190
                             foreach ($completeness as $missing_attrib) {
191
-                                echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
191
+                                echo "<li>".$uiElements->displayName($missing_attrib)."</li>";
192 192
                             }
193 193
                             echo "</ul>";
194 194
                             echo "</div>";
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                         if ($readonly === FALSE) {
203 203
                             ?>
204 204
                             <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&amp;profile_id=<?php echo $profile_list->identifier; ?>' method='POST'>
205
-                                <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
205
+                                <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
206 206
                             </form>
207 207
                             <?php
208 208
                         }
@@ -234,21 +234,21 @@  discard block
 block discarded – undo
234 234
                         $has_overrides = TRUE;
235 235
                     }
236 236
                 }
237
-                $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
237
+                $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>";
238 238
                 $typelist = $profile_list->getEapMethodsinOrderOfPreference();
239 239
                 $allcomplete = TRUE;
240 240
                 foreach ($typelist as $eaptype) {
241 241
                     $buffer_eaptypediv .= $eaptype->getPrintableRep();
242 242
                     $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype);
243 243
                     if ($completeness === true) {
244
-                        $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
244
+                        $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>";
245 245
                     } else {
246 246
                         $buffer_eaptypediv .= " <div class='notacceptable'>";
247 247
                         $buffer_eaptypediv .= _("Information needed!");
248 248
                         if (is_array($completeness)) {
249 249
                             $buffer_eaptypediv .= "<ul style='margin:1px'>";
250 250
                             foreach ($completeness as $missing_attrib) {
251
-                                $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
251
+                                $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>";
252 252
                             }
253 253
                             $buffer_eaptypediv .= "</ul>";
254 254
                         }
@@ -260,12 +260,12 @@  discard block
 block discarded – undo
260 260
                     foreach ($attribs as $attrib) {
261 261
                         if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
262 262
                             $justOnce = TRUE;
263
-                            $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
263
+                            $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>";
264 264
                         }
265 265
                     }
266 266
                     $buffer_eaptypediv .= "<br/>";
267 267
                 }
268
-                $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>";
268
+                $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>";
269 269
 
270 270
                 $buffer_headline .= "<span style='float:right;'>";
271 271
                 $readiness = $profile_list->readinessLevel();
@@ -297,18 +297,18 @@  discard block
 block discarded – undo
297 297
                     if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == "LOCAL") {
298 298
                         $diagUrl = "../diag/";
299 299
                     } else {
300
-                        $diagUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] . "/diag/";
300
+                        $diagUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS']."/diag/";
301 301
                     }
302
-                    echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
302
+                    echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
303 303
                               <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/>
304
-                              <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . ">
305
-                                  " . _("Check realm reachability") . "
304
+                              <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'").">
305
+                                  " . _("Check realm reachability")."
306 306
                               </button>
307 307
                           </form>";
308 308
                 }
309 309
                 echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
310
-                              <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled'  title='" . _("You have not fully configured any supported EAP types!") . "'") . ">
311
-                                  " . _("Installer Fine-Tuning and Download") . "
310
+                              <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled'  title='"._("You have not fully configured any supported EAP types!")."'").">
311
+                                  " . _("Installer Fine-Tuning and Download")."
312 312
                               </button>
313 313
                  </form>
314 314
                    </div>";
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
                     echo "        <div class='buttongroupprofilebox' style='clear:both;'>
318 318
                           <form action='edit_profile.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
319 319
                                <hr/>
320
-                               <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button>
320
+                               <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button>
321 321
                           </form>
322 322
                           <form action='edit_profile_result.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
323
-                               <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\">
324
-                                   " . _("Delete") . "
323
+                               <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\">
324
+                                   " . _("Delete")."
325 325
                                </button>
326 326
                            </form>
327 327
                       </div>";
@@ -330,24 +330,24 @@  discard block
 block discarded – undo
330 330
 // dummy width to keep a little distance
331 331
                 echo "<div style='width:20px;'></div>";
332 332
                 if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) {
333
-                    echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>";
334
-                    $displayurl = $idpLevelUrl . "&amp;profile=" . $profile_list->identifier;
335
-                    $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier;
333
+                    echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>";
334
+                    $displayurl = $idpLevelUrl."&amp;profile=".$profile_list->identifier;
335
+                    $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier;
336 336
                     echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>";
337 337
                     $rawQr = QRcode::png($QRurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL);
338 338
                     if ($rawQr === NULL) {
339 339
                         throw new Exception("Something went seriously wrong during QR code generation!");
340 340
                     }
341
-                    $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL));
341
+                    $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL));
342 342
                     $size = getimagesize($uri);
343
-                    echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>";
343
+                    echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>";
344 344
 
345 345
                     //echo "<nobr>$displayurl</nobr></a>";
346 346
                     echo "<p>$displayurl</p></a>";
347 347
                     echo "</div>";
348 348
                     // dummy width to keep a little distance
349 349
                     echo "<div style='width:20px;'></div>";
350
-                    echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>";
350
+                    echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>";
351 351
                     $stats = $profile_list->getUserDownloadStats();
352 352
                     foreach ($stats as $dev => $count) {
353 353
                         echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>";
Please login to merge, or discard this patch.
web/admin/sanity_tests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $Tests = [
25 25
     'cat_base_url',
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     'mailer',
38 38
 ];
39 39
 
40
-if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) {
40
+if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") {
41 41
     $Tests[] = 'makensis';
42 42
     $Tests[] = 'makensis=>NSISmodules';
43 43
 }
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
             $message = "Your configuration appears to be fine.";
72 72
             break;
73 73
         default:
74
-            throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
74
+            throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
75 75
     }
76 76
     $uiElements = new web\lib\admin\UIElements();
77
-    $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
77
+    $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
78 78
     foreach ($test->out as $testValue) {
79 79
         foreach ($testValue as $o) {
80 80
             $out .= $uiElements->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
web/admin/edit_idp.php 1 patch
Spacing   +30 added lines, -30 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();
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         </table>
95 95
     </div>
96 96
     <?php
97
-    echo "<form enctype='multipart/form-data' action='edit_idp_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'>
98
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE'] . "'>";
97
+    echo "<form enctype='multipart/form-data' action='edit_idp_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'>
98
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE']."'>";
99 99
 
100 100
     if ($wizardStyle) {
101
-        echo "<p>" .
102
-        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->nomenclatureInst) . "</p>";
101
+        echo "<p>".
102
+        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->nomenclatureInst)."</p>";
103 103
     }
104 104
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, "IdP");
105 105
     ?>
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
108 108
         <?php
109 109
         if ($wizardStyle) {
110
-            echo "<p>" .
111
-            _("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>
110
+            echo "<p>".
111
+            _("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>
112 112
                       <ul>
113
-                         <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>
114
-                         <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->nomenclatureInst) . "</li>";
113
+                         <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>
114
+                         <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->nomenclatureInst)."</li>";
115 115
             echo "</ul>";
116 116
         }
117 117
         echo $optionDisplay->prefilledOptionTable("general");
@@ -125,47 +125,47 @@  discard block
 block discarded – undo
125 125
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
126 126
         <?php
127 127
         if ($wizardStyle) {
128
-            echo "<p>" .
129
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>
128
+            echo "<p>".
129
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>
130 130
           <ul>";
131 131
             echo "<li>";
132
-            echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
132
+            echo "<strong>".(count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
133 133
             if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0) {
134 134
                 $ssidlist = "";
135 135
                 foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] as $ssid) {
136
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
136
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
137 137
                 }
138 138
                 $ssidlist = substr($ssidlist, 2);
139 139
                 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);
140 140
                 if (CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport']) {
141
-                    echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
141
+                    echo " "._("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
142 142
                 }
143
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
143
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
144 144
             } else {
145 145
                 echo _("Please configure which SSIDs should be configured in the installers.");
146 146
             }
147
-            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.");
147
+            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.");
148 148
             echo "</li>";
149 149
 
150 150
             echo "<li>";
151
-            echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
151
+            echo "<strong>".(count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
152 152
             if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']) > 0) {
153 153
                 $consortiumlist = "";
154 154
                 foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi'] as $oi) {
155
-                    $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
155
+                    $consortiumlist .= ", '<strong>".$oi."</strong>'";
156 156
                 }
157 157
                 $consortiumlist = substr($consortiumlist, 2);
158 158
                 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);
159 159
 
160
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
160
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
161 161
             } else {
162 162
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
163 163
             }
164 164
             echo "</li>";
165
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
166
-            . _("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).") .
165
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
166
+            . _("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).").
167 167
             "</li>";
168
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
168
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
169 169
             . _("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'.")
170 170
             . "</li>";
171 171
             echo "</ul>";
@@ -181,16 +181,16 @@  discard block
 block discarded – undo
181 181
             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>";
182 182
             
183 183
             if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") {
184
-                echo "<p>" .
184
+                echo "<p>".
185 185
                         
186
-                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->nomenclatureInst)  . "</p>" .
187
-                "<p>" .
188
-                _("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>";
186
+                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->nomenclatureInst)."</p>".
187
+                "<p>".
188
+                _("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>";
189 189
                 if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
190
-                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>";
190
+                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>";
191 191
                 }
192 192
             } elseif (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
193
-                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>";
193
+                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>";
194 194
             }
195 195
             
196 196
         }
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
201 201
     <?php
202 202
     if ($wizardStyle) {
203
-        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>";
203
+        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>";
204 204
     } else {
205
-        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_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></div></form>";
205
+        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_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></div></form>";
206 206
     }
207 207
     echo $deco->footer();
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 use Exception;
26 26
 
27
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
27
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
28 28
 
29 29
 /**
30 30
  * We need to display previously set options in various forms. This class covers
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @return string HTML code <table>
88 88
      */
89 89
     public function prefilledOptionTable(string $attributePrefix) {
90
-        $retval = "<table id='expandable_$attributePrefix" . "_options'>";
90
+        $retval = "<table id='expandable_$attributePrefix"."_options'>";
91 91
 
92 92
         $prepopulate = [];
93 93
         foreach ($this->listOfOptions as $existingAttribute) {
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
         if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" && CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] != "LOCAL") {
120 120
             $blackListOnPrefill .= "|fed:silverbullet";
121 121
         }
122
-        if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
122
+        if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
123 123
             foreach ($prepopulate as $option) {
124 124
                 if (preg_match("/$class:/", $option['name']) && !preg_match("/($blackListOnPrefill)/", $option['name'])) {
125 125
                     $optiontypearray = $optioninfo->optionType($option['name']);
126 126
                     $loggerInstance = new \core\common\Logging();
127 127
                     $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n");
128
-                    $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']);
128
+                    $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']);
129 129
                 }
130 130
             }
131 131
         } else { // not editing exist, this in new: add empty list
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         if (!isset($descriptions[$input])) {
188 188
             return "";
189 189
         }
190
-        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>";
190
+        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>";
191 191
     }
192 192
 
193 193
     /**
@@ -200,18 +200,18 @@  discard block
 block discarded – undo
200 200
      */
201 201
     private function selectElement($rowid, $list) {
202 202
         $jsmagic = "onchange='
203
-                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
203
+                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) {
204 204
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
205 205
                                    } else {
206 206
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\";
207 207
                                    }";
208 208
         foreach (array_keys(OptionDisplay::HTML_DATATYPE_TEXTS) as $key) {
209
-            $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
210
-                                  document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\";
211
-                                  document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\";
212
-                                  document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\";
213
-                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\";
214
-                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\";
209
+            $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) {
210
+                                  document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\";
211
+                                  document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\";
212
+                                  document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\";
213
+                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\";
214
+                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\";
215 215
                              }
216 216
                              ";
217 217
             // hide all tooltips (each is a <span>, and there are no other <span>s)
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $activelisttype = [];
241 241
         foreach ($list as $value) {
242 242
             $listtype = $optioninfo->optionType($value);
243
-            $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
243
+            $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' ";
244 244
             if ($iterator == $this->optionIterator) {
245 245
                 $retval .= "selected='selected'";
246 246
                 $activelisttype = $listtype;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             } else {
249 249
                 $tooltips .= $this->tooltip($rowid, $value, FALSE);
250 250
             }
251
-            $retval .= ">" . $uiElements->displayName($value) . "</option>";
251
+            $retval .= ">".$uiElements->displayName($value)."</option>";
252 252
             $iterator++;
253 253
         }
254 254
         if (count($activelisttype) == 0) {
@@ -271,9 +271,9 @@  discard block
 block discarded – undo
271 271
      */
272 272
     private function selectLanguage($rowid, $makeVisible) {
273 273
         \core\common\Entity::intoThePotatoes();
274
-        $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
275
-            <option value='' name='select_language' selected>" . _("select language") . "</option>
276
-            <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
274
+        $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'>
275
+            <option value='' name='select_language' selected>" . _("select language")."</option>
276
+            <option value='C' name='all_languages'>" . _("default/other languages")."</option>";
277 277
         foreach (CONFIG['LANGUAGES'] as $langindex => $possibleLang) {
278 278
             $thislang = $possibleLang['display'];
279 279
             $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>";
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     private function inputFields($rowid, $activetype) {
302 302
         $retval = "";
303 303
         foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) {
304
-            $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">";
304
+            $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">";
305 305
         }
306 306
         return $retval;
307 307
     }
@@ -316,11 +316,11 @@  discard block
 block discarded – undo
316 316
     private function noPrefillText(int $rowid, array $list) {
317 317
         // first column: the <select> element with the names of options and their field-toggling JS magic
318 318
         $selectorInfo = $this->selectElement($rowid, $list);
319
-        $retval = "<td>" . $selectorInfo["TEXT"] . "</td>";
319
+        $retval = "<td>".$selectorInfo["TEXT"]."</td>";
320 320
         // second column: the <select> element for language selection - only visible if the active option is multi-lang
321
-        $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>";
321
+        $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>";
322 322
         // third column: the actual input fields; the data type of the active option is visible, all others hidden
323
-        $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>";
323
+        $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>";
324 324
         return $retval;
325 325
     }
326 326
 
@@ -343,20 +343,20 @@  discard block
 block discarded – undo
343 343
         $retval .= "<td>";
344 344
         $uiElements = new UIElements();
345 345
         $listtype = $optioninfo->optionType($optionName);
346
-        $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName);
347
-        $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>";
348
-        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>";
346
+        $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName);
347
+        $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>";
348
+        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>";
349 349
 
350 350
         // language tag if any
351 351
         $retval .= "<td>";
352 352
         if ($listtype["flag"] == "ML") {
353 353
 
354
-            $language = "(" . strtoupper($optionLang) . ")";
354
+            $language = "(".strtoupper($optionLang).")";
355 355
             if ($optionLang == 'C') {
356 356
                 $language = _("(default/other languages)");
357 357
             }
358 358
             $retval .= $language;
359
-            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>";
359
+            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>";
360 360
         }
361 361
         $retval .= "</td>";
362 362
 // attribute content
@@ -366,12 +366,12 @@  discard block
 block discarded – undo
366 366
             case \core\Options::TYPECODE_COORDINATES:
367 367
                 $this->allLocationCount = $this->allLocationCount + 1;
368 368
                 // display of the locations varies by map provider
369
-                $classname = "\web\lib\admin\Map" . CONFIG_CONFASSISTANT['MAPPROVIDER']['PROVIDER'];
369
+                $classname = "\web\lib\admin\Map".CONFIG_CONFASSISTANT['MAPPROVIDER']['PROVIDER'];
370 370
                 $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount);
371
-                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
371
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link";
372 372
                 break;
373 373
             case \core\Options::TYPECODE_FILE:
374
-                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
374
+                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>";
375 375
                 $uiElements = new UIElements();
376 376
                 switch ($optionName) {
377 377
                     case "eap:ca_file":
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                 if ($listtype['type'] == \core\Options::TYPECODE_BOOLEAN) {// only modify in this one case
402 402
                     $displayedVariant = ($optionValue == "on" ? _("on") : _("off"));
403 403
                 }
404
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
404
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
405 405
                 break;
406 406
             default:
407 407
                 // this should never happen!
@@ -445,10 +445,10 @@  discard block
 block discarded – undo
445 445
        <td>
446 446
           <button type='button' class='delete' onclick='";
447 447
         if ($prefillValue !== NULL && $item == "general:geo_coordinates") {
448
-            $funcname = "Map" . CONFIG_CONFASSISTANT['MAPPROVIDER']['PROVIDER'] . 'DeleteCoord';
449
-            $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } ';
448
+            $funcname = "Map".CONFIG_CONFASSISTANT['MAPPROVIDER']['PROVIDER'].'DeleteCoord';
449
+            $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } ';
450 450
         }
451
-        $retval .= 'deleteOption("option-S' . $rowid . '")';
451
+        $retval .= 'deleteOption("option-S'.$rowid.'")';
452 452
         $retval .= "'>-</button>
453 453
        </td>
454 454
     </tr>";
Please login to merge, or discard this patch.
devices/ms/Files/common.inc 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp"
136 136
 !define MUI_COMPONENTSPAGE_SMALLDESC
137 137
 
138
-!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
139
-!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi( _("Installation complete"))?>"
140
-!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(  _("Your system is ready."))?>"
141
-!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi( _("Please contact \${SUPPORT}."))?>"
138
+!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
139
+!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi(_("Installation complete"))?>"
140
+!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Your system is ready."))?>"
141
+!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Please contact \${SUPPORT}."))?>"
142 142
 ;--------------------------------
143 143
 ;Languages
144 144
 !insertmacro MUI_LANGUAGE "${LANG}"
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
 ;--------------------------------
147 147
 ; License file
148 148
 !ifdef LICENSE_FILE
149
-LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi( _("Accept"))?>"
149
+LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi(_("Accept"))?>"
150 150
 LicenseText "<?php WindowsCommon::echo_nsi(_("If you accept the conditions then select Accept and then click Install to continue."))?>"
151 151
 LicenseData ${LICENSE_FILE}
152 152
 !endif
153 153
 
154 154
 ;-----------------------------------
155 155
 
156
-MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi( _("Finish"))?>"
156
+MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi(_("Finish"))?>"
157 157
 ;----------------------------------
158 158
 ;  FUNCTIONS
159 159
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 !macro install_ca_cert ca_file ca_fingerprint level
188 188
    !insertmacro debug_cat 2 "locating certificate  SHA=${ca_fingerprint} Level=${level}"
189
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("searching for certificate"))?> ${ca_file}"
189
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("searching for certificate"))?> ${ca_file}"
190 190
    File "${ca_file}"
191 191
    nsArray::Set Delete_files "${ca_file}"
192 192
    !insertmacro debug_cat 2 "Testing machine store root"
@@ -248,13 +248,13 @@  discard block
 block discarded – undo
248 248
    ${EndIf}
249 249
    !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}"
250 250
    !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}"
251
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("installing certificate"))?> ${ca_file}"
251
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("installing certificate"))?> ${ca_file}"
252 252
    nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}'
253 253
    Pop $0
254 254
    !insertmacro debug_cat 3 "certutil returned $0"
255 255
    ${If} $0 != 0
256 256
      IfSilent +2
257
-     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("could not install certificate"))?>  ${ca_file}"
257
+     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("could not install certificate"))?>  ${ca_file}"
258 258
      !insertmacro debug_cat 1 "could not install certificate ${ca_file}"
259 259
    ${EndIf}
260 260
 no_install_${ca_file}:
@@ -461,26 +461,26 @@  discard block
 block discarded – undo
461 461
   pop $R0
462 462
   ${If} $tkip_count > 0
463 463
     ${If} $aes_count > 1
464
-      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
464
+      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
465 465
     ${Else}
466
-     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
466
+     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
467 467
     ${EndIf}
468 468
   ${Else}
469 469
     StrCpy $R1 ""
470 470
   ${EndIf}
471 471
   ${If} $profile_count > 0
472
-    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
473
-<?php WindowsCommon::echo_nsi( _("The installer will create the following wireless profiles:"))?>$\r$\n\
472
+    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
473
+<?php WindowsCommon::echo_nsi(_("The installer will create the following wireless profiles:"))?>$\r$\n\
474 474
 $R0.\
475 475
 $R1$\r$\n$\n\
476
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
476
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
477 477
    EMAIL: ${SUPPORT}$\r$\n\
478 478
    WWW: ${URL}"
479 479
 ${Else}
480
-StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
481
-<?php WindowsCommon::echo_nsi( _("The installer will create the wireless profile:"))?> $R0.\
480
+StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
481
+<?php WindowsCommon::echo_nsi(_("The installer will create the wireless profile:"))?> $R0.\
482 482
 $R1$\r$\n$\n\
483
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
483
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
484 484
    EMAIL: ${SUPPORT}$\r$\n\
485 485
    WWW: ${URL}"
486 486
 ${EndIf}
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
   SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
507 507
 ;TRANSLATION
508 508
   nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\
509
-$\r$\n$\r$\n<?php WindowsCommon::echo_nsi( _("Installer created with software from the GEANT project."))?>"
509
+$\r$\n$\r$\n<?php WindowsCommon::echo_nsi(_("Installer created with software from the GEANT project."))?>"
510 510
   Pop $TEXT
511 511
 
512 512
   SetCtlColors $DIALOG "" 0xffffff
@@ -619,18 +619,18 @@  discard block
 block discarded – undo
619 619
     ${If} $wireless_result == 1
620 620
       !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service"
621 621
       IfSilent +2
622
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
622
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
623 623
       Call Cleanup
624 624
     ${EndIf}
625 625
     ${If} $wireless_result == 2
626 626
       IfSilent +2
627
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. The installer cannot continue."))?>"
627
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. The installer cannot continue."))?>"
628 628
       Call Cleanup
629 629
     ${EndIf}
630 630
   ${Else}
631 631
     ${If} $wireless_result > 0
632 632
        IfSilent +3
633
-       MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes
633
+       MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes
634 634
        Call Cleanup
635 635
        wired_yes:
636 636
        Push 1
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
     ${If} $wired == 1
647 647
       ${If} $force_wired == 0
648 648
         IfSilent wired
649
-        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired
649
+        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired
650 650
         Push 0
651 651
         Pop $wired
652 652
       ${EndIf}
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 ;================================
688 688
 
689 689
 Function ShowInstfiles
690
-  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Profiles installation"))?>" " "
690
+  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Profiles installation"))?>" " "
691 691
 FunctionEnd
692 692
 ;================================
693 693
 ;  Check if a wireless profile exist and put it on delete list
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 
707 707
 Function FindProfile
708 708
   Pop $R8
709
-  DetailPrint "<?php WindowsCommon::echo_nsi( _("Checking for profile \$R8"))?>"
709
+  DetailPrint "<?php WindowsCommon::echo_nsi(_("Checking for profile \$R8"))?>"
710 710
   !insertmacro debug_cat 2 "Checking for profile $R8"
711 711
   !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8"
712 712
   nsExec::Exec  '"$Netsh" wlan show profiles "$R8"'
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
   !insertmacro debug_cat 4 "netsh returned $0"
715 715
   ${If} $0 == 0
716 716
     !insertmacro debug_cat 1 "found profile $R8"
717
-    DetailPrint "<?php WindowsCommon::echo_nsi( _("found profile \$R8"))?>"
717
+    DetailPrint "<?php WindowsCommon::echo_nsi(_("found profile \$R8"))?>"
718 718
     Push 0
719 719
   ${Else}
720 720
     !insertmacro debug_cat 1 "profile $R8 not found"
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
     ${If} $Symantec_installed  != 0
810 810
      !insertmacro debug_cat 3 "Symantec problem"
811 811
      IfSilent +2
812
-     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>"
812
+     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>"
813 813
     Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"'
814 814
     Quit
815 815
 
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 Function PFXCertificateSelect
1098 1098
   !ifndef SILVERBULLET
1099 1099
 ;TRANSLATION
1100
-!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
1100
+!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
1101 1101
 ;TRANSLATION
1102 1102
     IfSilent +2
1103 1103
   MessageBox MB_OK "<?php WindowsCommon::echo_nsi(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echo_nsi(_("Click OK to continue"))?> "
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
         $certPasswordLength = strlen($certPasswordLabel);
1114 1114
         $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:"));
1115 1115
         $certUsernameLength = strlen($certUsernameLabel);
1116
-        $labelLength = max($certPasswordLength,$certUsernameLength);
1116
+        $labelLength = max($certPasswordLength, $certUsernameLength);
1117 1117
   ?>
1118 1118
   ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>"
1119 1119
   !else
@@ -1130,11 +1130,11 @@  discard block
 block discarded – undo
1130 1130
   !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP";
1131 1131
   ${If} $VistaNoSP == 0
1132 1132
     !ifdef PFX_USERNAME
1133
-       !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u"
1134
-       !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u"
1133
+       !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u"
1134
+       !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u"
1135 1135
     !else
1136
-       !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u"
1137
-       !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u"
1136
+       !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u"
1137
+       !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u"
1138 1138
     !endif
1139 1139
     ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>"
1140 1140
     ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u ""
@@ -1496,7 +1496,7 @@  discard block
 block discarded – undo
1496 1496
 Section "-start"
1497 1497
 SectionIn RO
1498 1498
 
1499
-!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Installation"))?>" "<?php WindowsCommon::echo_nsi( _("Checking for existing wireless profiles"))?>"
1499
+!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Installation"))?>" "<?php WindowsCommon::echo_nsi(_("Checking for existing wireless profiles"))?>"
1500 1500
 !ifndef PWD
1501 1501
 !include "certs.nsh"
1502 1502
 !endif
Please login to merge, or discard this patch.
web/admin/API.php 1 patch
Spacing   +7 added lines, -7 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
 /**
26 26
  * Checks if the profile is a valid SB profile belonging to the federation
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $inputRaw = file_get_contents('php://input');
70 70
 $inputDecoded = json_decode($inputRaw, TRUE);
71 71
 if (!is_array($inputDecoded)) {
72
-    $adminApi->returnError(web\lib\admin\API::ERROR_MALFORMED_REQUEST, "Unable to decode JSON POST data." . json_last_error_msg() . $inputRaw);
72
+    $adminApi->returnError(web\lib\admin\API::ERROR_MALFORMED_REQUEST, "Unable to decode JSON POST data.".json_last_error_msg().$inputRaw);
73 73
     exit(1);
74 74
 }
75 75
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             throw new Exception("A required parameter is missing, and this wasn't caught earlier?!");
159 159
         }
160 160
         $newtokens = $mgmt->createTokens(true, [$admin], $idp);
161
-        $URL = "https://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']) . "/action_enrollment.php?token=" . array_keys($newtokens)[0];
161
+        $URL = "https://".$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])."/action_enrollment.php?token=".array_keys($newtokens)[0];
162 162
         $success = ["TOKEN URL" => $URL, "TOKEN" => array_keys($newtokens)[0]];
163 163
         // done with the essentials - display in response. But if we also have an email address, send it there
164 164
         $email = $adminApi->firstParameterInstance($scrubbedParameters, web\lib\admin\API::AUXATTRIB_TARGETMAIL);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         if ($found) {
196 196
             $adminApi->returnSuccess([]);
197 197
         }
198
-        $adminApi->returnError(web\lib\admin\API::ERROR_INVALID_PARAMETER, "The admin with ID $toBeDeleted is not associated to IdP " . $idp->identifier);
198
+        $adminApi->returnError(web\lib\admin\API::ERROR_INVALID_PARAMETER, "The admin with ID $toBeDeleted is not associated to IdP ".$idp->identifier);
199 199
         break;
200 200
     case web\lib\admin\API::ACTION_STATISTICS_FED:
201 201
         $adminApi->returnSuccess($fed->downloadStats("array"));
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
                 $outer = "";
243 243
                 $profile->setAnonymousIDSupport(FALSE);
244 244
             } else {
245
-                $outer = $outer . "@";
245
+                $outer = $outer."@";
246 246
                 $profile->setAnonymousIDSupport(TRUE);
247 247
             }
248
-            $profile->setRealm($outer . $realm);
248
+            $profile->setRealm($outer.$realm);
249 249
         }
250 250
         /* const AUXATTRIB_PROFILE_TESTUSER = 'ATTRIB-PROFILE-TESTUSER'; */
251 251
         $testuser = $adminApi->firstParameterInstance($scrubbedParameters, web\lib\admin\API::AUXATTRIB_PROFILE_TESTUSER);
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         // extract relevant subset of information from cert objects
474 474
         $certDetails = [];
475 475
         foreach ($certs as $cert) {
476
-            $certDetails[$cert->ca_type . ":" . $cert->serial] = ["ISSUED" => $cert->issued, "EXPIRY" => $cert->expiry, "STATUS" => $cert->status, "DEVICE" => $cert->device, "CN" => $cert->username, "ANNOTATION" => $cert->annotation];
476
+            $certDetails[$cert->ca_type.":".$cert->serial] = ["ISSUED" => $cert->issued, "EXPIRY" => $cert->expiry, "STATUS" => $cert->status, "DEVICE" => $cert->device, "CN" => $cert->username, "ANNOTATION" => $cert->annotation];
477 477
         }
478 478
         $adminApi->returnSuccess($certDetails);
479 479
         break;
Please login to merge, or discard this patch.