Passed
Push — release_2_0 ( eab4dd...75d102 )
by Tomasz
10:54
created
devices/ms/Files/common.inc 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp"
137 137
 !define MUI_COMPONENTSPAGE_SMALLDESC
138 138
 
139
-!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
140
-!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi( _("Installation complete"))?>"
141
-!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(  _("Your system is ready."))?>"
142
-!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi( _("Please contact \${SUPPORT}."))?>"
139
+!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>"
140
+!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi(_("Installation complete"))?>"
141
+!define FAREWELL_TEXT	"<?php WindowsCommon::echo_nsi(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Your system is ready."))?>"
142
+!define FAREWELL_FAIL	"<?php WindowsCommon::echo_nsi(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Please contact \${SUPPORT}."))?>"
143 143
 ;--------------------------------
144 144
 ;Languages
145 145
 !insertmacro MUI_LANGUAGE "${LANG}"
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
 ;--------------------------------
148 148
 ; License file
149 149
 !ifdef LICENSE_FILE
150
-LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi( _("Accept"))?>"
150
+LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi(_("Accept"))?>"
151 151
 LicenseText "<?php WindowsCommon::echo_nsi(_("If you accept the conditions then select Accept and then click Install to continue."))?>"
152 152
 LicenseData ${LICENSE_FILE}
153 153
 !endif
154 154
 
155 155
 ;-----------------------------------
156 156
 
157
-MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi( _("Finish"))?>"
157
+MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi(_("Finish"))?>"
158 158
 ;----------------------------------
159 159
 ;  FUNCTIONS
160 160
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
 !macro install_ca_cert ca_file ca_fingerprint level
189 189
    !insertmacro debug_cat 2 "locating certificate  SHA=${ca_fingerprint} Level=${level}"
190
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("searching for certificate"))?> ${ca_file}"
190
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("searching for certificate"))?> ${ca_file}"
191 191
    File "${ca_file}"
192 192
    nsArray::Set Delete_files "${ca_file}"
193 193
    !insertmacro debug_cat 2 "Testing machine store root"
@@ -249,13 +249,13 @@  discard block
 block discarded – undo
249 249
    ${EndIf}
250 250
    !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}"
251 251
    !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}"
252
-   DetailPrint "<?php WindowsCommon::echo_nsi( _("installing certificate"))?> ${ca_file}"
252
+   DetailPrint "<?php WindowsCommon::echo_nsi(_("installing certificate"))?> ${ca_file}"
253 253
    nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}'
254 254
    Pop $0
255 255
    !insertmacro debug_cat 3 "certutil returned $0"
256 256
    ${If} $0 != 0
257 257
      IfSilent +2
258
-     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("could not install certificate"))?>  ${ca_file}"
258
+     MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("could not install certificate"))?>  ${ca_file}"
259 259
      !insertmacro debug_cat 1 "could not install certificate ${ca_file}"
260 260
    ${EndIf}
261 261
 no_install_${ca_file}:
@@ -462,26 +462,26 @@  discard block
 block discarded – undo
462 462
   pop $R0
463 463
   ${If} $tkip_count > 0
464 464
     ${If} $aes_count > 1
465
-      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
465
+      StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>"
466 466
     ${Else}
467
-     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
467
+     StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>"
468 468
     ${EndIf}
469 469
   ${Else}
470 470
     StrCpy $R1 ""
471 471
   ${EndIf}
472 472
   ${If} $profile_count > 0
473
-    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
474
-<?php WindowsCommon::echo_nsi( _("The installer will create the following wireless profiles:"))?>$\r$\n\
473
+    StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
474
+<?php WindowsCommon::echo_nsi(_("The installer will create the following wireless profiles:"))?>$\r$\n\
475 475
 $R0.\
476 476
 $R1$\r$\n$\n\
477
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
477
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
478 478
    EMAIL: ${SUPPORT}$\r$\n\
479 479
    WWW: ${URL}"
480 480
 ${Else}
481
-StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
482
-<?php WindowsCommon::echo_nsi( _("The installer will create the wireless profile:"))?> $R0.\
481
+StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\
482
+<?php WindowsCommon::echo_nsi(_("The installer will create the wireless profile:"))?> $R0.\
483 483
 $R1$\r$\n$\n\
484
-<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\
484
+<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\
485 485
    EMAIL: ${SUPPORT}$\r$\n\
486 486
    WWW: ${URL}"
487 487
 ${EndIf}
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
   SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
508 508
 ;TRANSLATION
509 509
   nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\
510
-$\r$\n$\r$\n<?php WindowsCommon::echo_nsi( _("Installer created with software from the GEANT project."))?>"
510
+$\r$\n$\r$\n<?php WindowsCommon::echo_nsi(_("Installer created with software from the GEANT project."))?>"
511 511
   Pop $TEXT
512 512
 
513 513
   SetCtlColors $DIALOG "" 0xffffff
@@ -640,18 +640,18 @@  discard block
 block discarded – undo
640 640
     ${If} $wireless_result == 1
641 641
       !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service"
642 642
       IfSilent +2
643
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
643
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>"
644 644
       Call Cleanup
645 645
     ${EndIf}
646 646
     ${If} $wireless_result == 2
647 647
       IfSilent +2
648
-      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. The installer cannot continue."))?>"
648
+      MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. The installer cannot continue."))?>"
649 649
       Call Cleanup
650 650
     ${EndIf}
651 651
   ${Else}
652 652
     ${If} $wireless_result > 0
653 653
        IfSilent +3
654
-       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
654
+       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
655 655
        Call Cleanup
656 656
        wired_yes:
657 657
        Push 1
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
     ${If} $wired == 1
668 668
       ${If} $force_wired == 0
669 669
         IfSilent wired
670
-        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired
670
+        MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired
671 671
         Push 0
672 672
         Pop $wired
673 673
         wired:
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 ;================================
709 709
 
710 710
 Function ShowInstfiles
711
-  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Profiles installation"))?>" " "
711
+  !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Profiles installation"))?>" " "
712 712
 FunctionEnd
713 713
 ;================================
714 714
 ;  Check if a wireless profile exist and put it on delete list
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 
728 728
 Function FindProfile
729 729
   Pop $R8
730
-  DetailPrint "<?php WindowsCommon::echo_nsi( _("Checking for profile \$R8"))?>"
730
+  DetailPrint "<?php WindowsCommon::echo_nsi(_("Checking for profile \$R8"))?>"
731 731
   !insertmacro debug_cat 2 "Checking for profile $R8"
732 732
   !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8"
733 733
   nsExec::Exec  '"$Netsh" wlan show profiles "$R8"'
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
   !insertmacro debug_cat 4 "netsh returned $0"
736 736
   ${If} $0 == 0
737 737
     !insertmacro debug_cat 1 "found profile $R8"
738
-    DetailPrint "<?php WindowsCommon::echo_nsi( _("found profile \$R8"))?>"
738
+    DetailPrint "<?php WindowsCommon::echo_nsi(_("found profile \$R8"))?>"
739 739
     Push 0
740 740
   ${Else}
741 741
     !insertmacro debug_cat 1 "profile $R8 not found"
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
     ${If} $Symantec_installed  != 0
831 831
      !insertmacro debug_cat 3 "Symantec problem"
832 832
      IfSilent +2
833
-     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']) ?>"
833
+     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']) ?>"
834 834
     Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"'
835 835
     Quit
836 836
 
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
 Function PFXCertificateSelect
1122 1122
   !ifndef SILVERBULLET
1123 1123
 ;TRANSLATION
1124
-!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
1124
+!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>"
1125 1125
 ;TRANSLATION
1126 1126
     IfSilent +2
1127 1127
   MessageBox MB_OK "<?php WindowsCommon::echo_nsi(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echo_nsi(_("Click OK to continue"))?> "
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
         $certPasswordLength = strlen($certPasswordLabel);
1138 1138
         $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:"));
1139 1139
         $certUsernameLength = strlen($certUsernameLabel);
1140
-        $labelLength = max($certPasswordLength,$certUsernameLength);
1140
+        $labelLength = max($certPasswordLength, $certUsernameLength);
1141 1141
   ?>
1142 1142
   ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>"
1143 1143
   !else
@@ -1154,11 +1154,11 @@  discard block
 block discarded – undo
1154 1154
   !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP";
1155 1155
   ${If} $VistaNoSP == 0
1156 1156
     !ifdef PFX_USERNAME
1157
-       !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u"
1158
-       !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u"
1157
+       !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u"
1158
+       !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u"
1159 1159
     !else
1160
-       !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u"
1161
-       !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u"
1160
+       !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u"
1161
+       !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u"
1162 1162
     !endif
1163 1163
     ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>"
1164 1164
     ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u ""
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
 Section "-start"
1531 1531
 SectionIn RO
1532 1532
 
1533
-!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Installation"))?>" "<?php WindowsCommon::echo_nsi( _("Checking for existing wireless profiles"))?>"
1533
+!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Installation"))?>" "<?php WindowsCommon::echo_nsi(_("Checking for existing wireless profiles"))?>"
1534 1534
 !ifndef PWD
1535 1535
 !include "certs.nsh"
1536 1536
 !endif
Please login to merge, or discard this patch.
web/skins/modern/user/js/cat_js.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 $cat = new core\CAT();
27
-$idpId = filter_input(INPUT_GET, 'idp', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'idp', FILTER_VALIDATE_INT)?? 0;
27
+$idpId = filter_input(INPUT_GET, 'idp', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'idp', FILTER_VALIDATE_INT) ?? 0;
28 28
 $profileId = filter_input(INPUT_GET, 'profile', FILTER_VALIDATE_INT) ?? filter_input(INPUT_POST, 'profile', FILTER_VALIDATE_INT) ?? 0;
29 29
 $skinObject = $Gui->skinObject;
30 30
     ?>
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         otherdata = j.otherdata;
88 88
     if(! result) {
89 89
       alert("<?php escaped_echo(_("no matching data found"))?>");
90
-      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>';
90
+      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>';
91 91
     }
92 92
     j = j.data;
93 93
     n = j.length;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
        result = j1.status;
225 225
        if(! result) {
226 226
             alert("<?php escaped_echo(_("no matching data found")) ?>");
227
-            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>';
227
+            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>';
228 228
        }
229 229
        j = j1.data;
230 230
        if(j.description !== undefined && j.description) {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
          $("#profile_desc").hide();
236 236
          $("#profile_desc").text('');
237 237
        }
238
-       updateTxt = '<span class="user_info"><?php escaped_echo(_("This entry was last updated at:"));?>'+' '+j.last_changed+'</span><br/>';
238
+       updateTxt = '<span class="user_info"><?php escaped_echo(_("This entry was last updated at:")); ?>'+' '+j.last_changed+'</span><br/>';
239 239
        if(j.local_url !== undefined && j.local_url) 
240 240
        txt = txt+'<span class="user_info"><?php escaped_echo(_("WWW:")); ?> <a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></span><br/>';
241 241
        if(j.local_email !== undefined && j.local_email) 
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +24 added lines, -24 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();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $profile = $validator->Profile($_GET['profile_id'], $my_inst->identifier);
57 57
         } else {
58 58
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
59
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
59
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
60 60
         }
61 61
 
62 62
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $uiElements = new web\lib\admin\UIElements();
119 119
             // set realm info, if submitted
120 120
             if ($realm !== FALSE) {
121
-                $profile->setRealm($anonLocal . "@" . $realm);
121
+                $profile->setRealm($anonLocal."@".$realm);
122 122
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
123 123
             } else {
124 124
                 $profile->setRealm("");
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
142 142
                 } else {
143 143
                     $profile->setRealmcheckUser(true, $checkuser_name);
144
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
144
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
145 145
                 }
146 146
             } else {
147 147
                 $profile->setRealmCheckUser(false);
@@ -153,12 +153,12 @@  discard block
 block discarded – undo
153 153
                 $extratext = "";
154 154
                 if (!empty($realm)) {
155 155
                     if ($hint !== FALSE) {
156
-                        $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
156
+                        $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm);
157 157
                     } else {
158
-                        $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
158
+                        $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm);
159 159
                     }
160 160
                 }
161
-                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext);
161
+                echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext);
162 162
             } else {
163 163
                 $profile->setInputVerificationPreference(false, false);
164 164
             }
@@ -190,29 +190,29 @@  discard block
 block discarded – undo
190 190
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
191 191
             }
192 192
 
193
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
193
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
194 194
 
195 195
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
196 196
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
197 197
                     continue;
198 198
                 }
199
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
200
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
199
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
200
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
201 201
                     // add EAP type to profile as requested, but ...
202 202
                     $profile->addSupportedEapMethod($a, $priority);
203
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
203
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
204 204
                     // see if we can enable the EAP type, or if info is missing
205 205
                     $eapcompleteness = $profile->isEapTypeDefinitionComplete($a);
206 206
                     if ($eapcompleteness === true) {
207
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>");
207
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>");
208 208
                     } else {
209 209
                         $warntext = "";
210 210
                         if (is_array($eapcompleteness)) {
211 211
                             foreach ($eapcompleteness as $item) {
212
-                                $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> ";
212
+                                $warntext .= "<strong>".$uiElements->displayName($item)."</strong> ";
213 213
                             }
214 214
                         }
215
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
215
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
216 216
                     }
217 217
                 }
218 218
             }
@@ -222,23 +222,23 @@  discard block
 block discarded – undo
222 222
             if (count($significantChanges) > 0) {
223 223
                 $myInstOriginal = new \core\IdP($profile->institution);
224 224
                 // send a notification/alert mail to someone we know is in charge
225
-                $text = _("To whom it may concern,") . "\n\n";
225
+                $text = _("To whom it may concern,")."\n\n";
226 226
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
227
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
227
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
228 228
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
229
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
230
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
229
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
230
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
231 231
                 }
232 232
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
233 233
                     $text .= _("A new trusted root CA was added. The details are below:\n\n");
234
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
234
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
235 235
                 }
236 236
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
237
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
238
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
237
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
238
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
239 239
                 }
240
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
241
-                $text .= _("Greetings, ") . "\n\n" . CONFIG['APPEARANCE']['productname_long'];
240
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
241
+                $text .= _("Greetings, ")."\n\n".CONFIG['APPEARANCE']['productname_long'];
242 242
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
243 243
                 $fed = new core\Federation($myInstOriginal->federation);
244 244
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         <?php
258 258
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
259 259
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
260
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
260
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
261 261
     </form>";
262 262
         }
263 263
         echo $deco->footer();
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
       <key>PayloadDescription</key>
99 99
          <string>$tagline</string>
100 100
       <key>PayloadDisplayName</key>
101
-         <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</string>
101
+         <string>".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']."</string>
102 102
       <key>PayloadIdentifier</key>
103
-         <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
103
+         <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
104 104
       <key>PayloadOrganization</key>
105
-         <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string>
105
+         <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string>
106 106
       <key>PayloadType</key>
107 107
          <string>Configuration</string>
108 108
       <key>PayloadUUID</key>
109
-         <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string>
109
+         <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string>
110 110
       <key>PayloadVersion</key>
111 111
          <integer>1</integer>";
112 112
         \core\common\Entity::outOfThePotatoes();
@@ -138,21 +138,21 @@  discard block
 block discarded – undo
138 138
     {
139 139
         \core\common\Entity::intoThePotatoes();
140 140
         if (isset($this->attributes['support:info_file'])) {
141
-            return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
141
+            return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST;
142 142
         }
143 143
         if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) {
144 144
             if ($this->attributes['internal:hint_userinput_suffix'][0] != 0) {
145
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
145
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
146 146
                 \core\common\Entity::outOfThePotatoes();
147 147
                 return $retval;
148 148
             } else { 
149 149
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
150 150
                 /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username!
151
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
151
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
152 152
                 \core\common\Entity::outOfThePotatoes();
153 153
                 return $retval;
154 154
             }
155
-            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST;
155
+            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST;
156 156
             \core\common\Entity::outOfThePotatoes();
157 157
             return $retval;
158 158
             }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         // also escape htmlspecialchars
178 178
         // not all names and profiles have a name, so be prepared
179 179
 
180
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
180
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
181 181
 
182 182
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
183 183
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
         file_put_contents('installer_profile', $outputXml);
221 221
 
222
-        $fileName = $this->installerBasename . '.mobileconfig';
222
+        $fileName = $this->installerBasename.'.mobileconfig';
223 223
 
224 224
         if (!$this->sign) {
225 225
             rename("installer_profile", $fileName);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             return $fileName;
228 228
         }
229 229
         // still here? Then we are signing.
230
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
230
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
231 231
         if ($signing === FALSE) {
232 232
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
233 233
         }
@@ -246,19 +246,19 @@  discard block
 block discarded – undo
246 246
         \core\common\Entity::intoThePotatoes();
247 247
         $ssidCount = count($this->attributes['internal:SSID']);
248 248
         $certCount = count($this->attributes['internal:CAs'][0]);
249
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
249
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
250 250
         $out .= "<p>";
251 251
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
252 252
         $out .= "<ul>";
253
-        $out .= "<li>" . _("to install the profile") . "</li>";
254
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
253
+        $out .= "<li>"._("to install the profile")."</li>";
254
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
255 255
         if ($certCount > 1) {
256
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
256
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
257 257
         }
258 258
         $out .= "</li>";
259
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
259
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
260 260
         if ($ssidCount > 1) {
261
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount);
261
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount);
262 262
         }
263 263
         $out .= "</li>";
264 264
         $out .= "</ul>";
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         $retval .= "                <key>RoamingConsortiumOIs</key>
312 312
                 <array>";
313 313
 
314
-        $retval .= "<string>" . strtoupper($consortiumOi) . "</string>";
314
+        $retval .= "<string>".strtoupper($consortiumOi)."</string>";
315 315
 
316 316
         $retval .= "</array>";
317 317
         // this is an undocumented value found on the net. Does it do something useful?
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                   <dict>
353 353
                       <key>AcceptEAPTypes</key>
354 354
                          <array>
355
-                            <integer>" . $eapType['OUTER'] . "</integer>
355
+                            <integer>" . $eapType['OUTER']."</integer>
356 356
                          </array>
357 357
                       <key>EAPFASTProvisionPAC</key>
358 358
                             <true />
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 ";
366 366
         if ($realm !== NULL) {
367 367
             $retval .= "<key>OuterIdentity</key>
368
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
368
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
369 369
 ";
370 370
         }
371 371
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -389,11 +389,11 @@  discard block
 block discarded – undo
389 389
         $retval .= "
390 390
                          </array>";
391 391
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
392
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
392
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
393 393
         }
394 394
         $retval .= "
395 395
                       <key>TTLSInnerAuthentication</key>
396
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string>
396
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2")."</string>
397 397
                    </dict>";
398 398
         return $retval;
399 399
     }
@@ -413,9 +413,9 @@  discard block
 block discarded – undo
413 413
             // characters are still reversed, invert on use!
414 414
             $buffer .= "<string>Manual</string>
415 415
                   <key>ProxyServer</key>
416
-                  <string>" . strrev($serverAndPort[1]) . "</string>
416
+                  <string>" . strrev($serverAndPort[1])."</string>
417 417
                   <key>ProxyServerPort</key>
418
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
418
+                  <integer>" . strrev($serverAndPort[0])."</integer>
419 419
                   <key>ProxyPACFallbackAllowed</key>
420 420
                   <false/>";
421 421
         } else {
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
                     throw new Exception("SSID must be a string!");
445 445
                 }
446 446
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
447
-                $payloadIdentifier = "wifi." . $this->serial;
447
+                $payloadIdentifier = "wifi.".$this->serial;
448 448
                 $payloadShortName = sprintf(_("SSID %s"), $escapedSSID);
449 449
                 $payloadName = sprintf(_("%s configuration for network name %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $escapedSSID);
450 450
                 $encryptionTypeString = "WPA";
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                 $payloadIdentifier = "hs20.$toBeConfigured";
475 475
                 $knownOiName = array_search($toBeConfigured, CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']);
476 476
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
477
-                    $knownOiName = $this->instName . " "._("Roaming Partner");
477
+                    $knownOiName = $this->instName." "._("Roaming Partner");
478 478
                 }
479 479
                 $payloadShortName = $knownOiName;
480 480
                 $payloadName = _("Passpoint roaming configuration ($knownOiName)");
@@ -496,11 +496,11 @@  discard block
 block discarded – undo
496 496
                <key>PayloadDisplayName</key>
497 497
                   <string>$payloadShortName</string>
498 498
                <key>PayloadIdentifier</key>
499
-                  <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
499
+                  <string>".self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
500 500
                <key>PayloadOrganization</key>
501
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
501
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
502 502
                <key>PayloadType</key>
503
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
503
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
504 504
         $retval .= $this->proxySettings();
505 505
         $retval .= $setupModesString;
506 506
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
         }
513 513
         $retval .= "
514 514
                <key>PayloadUUID</key>
515
-                  <string>" . \core\common\Entity::uuid() . "</string>
515
+                  <string>" . \core\common\Entity::uuid()."</string>
516 516
                <key>PayloadVersion</key>
517 517
                   <integer>1</integer>
518 518
                   $wifiNetworkIdentification</dict>";
@@ -542,15 +542,15 @@  discard block
 block discarded – undo
542 542
 	<key>IsHotspot</key>
543 543
 	<false/>
544 544
 	<key>PayloadDescription</key>
545
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</string>
545
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</string>
546 546
 	<key>PayloadDisplayName</key>
547
-	<string>" . _("Disabled WiFi network") . "</string>
547
+	<string>" . _("Disabled WiFi network")."</string>
548 548
 	<key>PayloadIdentifier</key>
549
-	<string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
549
+	<string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
550 550
 	<key>PayloadType</key>
551 551
 	<string>com.apple.wifi.managed</string>
552 552
 	<key>PayloadUUID</key>
553
-	<string>" . \core\common\Entity::uuid() . "</string>
553
+	<string>".\core\common\Entity::uuid()."</string>
554 554
 	<key>PayloadVersion</key>
555 555
 	<real>1</real>";
556 556
         $retval .= $this->proxySettings();
@@ -629,12 +629,12 @@  discard block
 block discarded – undo
629 629
         $mimeBlob = base64_encode($binaryBlob);
630 630
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
631 631
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
632
-        $retArray = ["block" => "<dict>" .
632
+        $retArray = ["block" => "<dict>".
633 633
             // we don't include the import password. It's displayed on screen, and should be input by the user.
634 634
             // <key>Password</key>
635 635
             //   <string>" . $this->clientCert['password'] . "</string>
636 636
             "<key>PayloadCertificateFileName</key>
637
-                     <string>" . $this->massagedConsortium . ".pfx</string>
637
+                     <string>" . $this->massagedConsortium.".pfx</string>
638 638
                   <key>PayloadContent</key>
639 639
                      <data>
640 640
 $mimeFormatted
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
                   <key>PayloadDescription</key>
643 643
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
644 644
                   <key>PayloadDisplayName</key>
645
-                     <string>" . _("eduroam user certificate") . "</string>
645
+                     <string>"._("eduroam user certificate")."</string>
646 646
                   <key>PayloadIdentifier</key>
647 647
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
648 648
                   <key>PayloadType</key>
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                   <key>PayloadVersion</key>
653 653
                      <integer>1</integer>
654 654
                 </dict>",
655
-            "UUID" => $payloadUUID,];
655
+            "UUID" => $payloadUUID, ];
656 656
         \core\common\Entity::outOfThePotatoes();
657 657
         return $retArray;
658 658
     }
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
         }
672 672
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
673 673
         return "<key>RemovalDate</key>
674
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
674
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
675 675
     }
676 676
 
677 677
     private $CAsAccountedFor = [];
@@ -695,27 +695,27 @@  discard block
 block discarded – undo
695 695
             $stream = "
696 696
             <dict>
697 697
                <key>PayloadCertificateFileName</key>
698
-               <string>" . $ca['uuid'] . ".der</string>
698
+               <string>" . $ca['uuid'].".der</string>
699 699
                <key>PayloadContent</key>
700 700
                <data>
701
-" . $trimmedPem . "</data>
701
+" . $trimmedPem."</data>
702 702
                <key>PayloadDescription</key>
703
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
703
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
704 704
                <key>PayloadDisplayName</key>
705 705
                <string>" . 
706 706
                     /// example: "Identity Provider CA #1 (Root)"
707
-                    sprintf(_("%s CA #%d (%s)" ), 
707
+                    sprintf(_("%s CA #%d (%s)"), 
708 708
                             \core\common\Entity::$nomenclature_inst, 
709
-                            count($this->CAsAccountedFor)+1, 
710
-                            ($ca['root'] ? _("Root") : _("Intermediate"))) . 
709
+                            count($this->CAsAccountedFor) + 1, 
710
+                            ($ca['root'] ? _("Root") : _("Intermediate"))). 
711 711
               "</string>
712 712
                <key>PayloadIdentifier</key>
713
-               <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
713
+               <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
714 714
                <key>PayloadOrganization</key>
715
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
715
+               <string>".$this->massagedConsortium.".1x-config.org</string>
716 716
                <key>PayloadType</key>
717 717
                <string>com.apple.security.root</string>
718
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
718
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
719 719
                <key>PayloadVersion</key>
720 720
                <integer>1</integer>
721 721
             </dict>";
Please login to merge, or discard this patch.
web/admin/edit_profile.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     <?php
128 128
     echo $uiElements->instLevelInfoBoxes($my_inst);
129 129
 
130
-    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&amp;profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'>
131
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE'] . "'>";
130
+    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&amp;profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'>
131
+                <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE']."'>";
132 132
     $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, "Profile");
133 133
     ?>
134 134
     <fieldset class="option_container">
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
         </legend>
138 138
         <?php
139 139
         if ($wizardStyle) {
140
-            echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
140
+            echo "<p>"._("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>";
141 141
         }
142 142
         ?>
143 143
         <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3>
144 144
         <?php
145 145
         if ($wizardStyle) {
146
-            echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>";
147
-            echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>";
148
-            echo "<p>" . _("You can also tell us your RADIUS realm. ");
146
+            echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>";
147
+            echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>";
148
+            echo "<p>"._("You can also tell us your RADIUS realm. ");
149 149
             if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) {
150 150
                 printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
151 151
             }
152
-            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
152
+            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
153 153
         }
154 154
 
155 155
         echo $optionDisplay->prefilledOptionTable("profile");
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 
204 204
         <?php
205 205
         if ($wizardStyle) {
206
-            echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>";
207
-            echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>";
208
-            echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>";
206
+            echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>";
207
+            echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>";
208
+            echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
209 209
         }
210 210
         ?>
211 211
         <p>
@@ -214,46 +214,46 @@  discard block
 block discarded – undo
214 214
             <!-- UI table to align elements-->
215 215
         <table style="margin-left: 25px; border-collapse: collapse;">
216 216
             <tr>
217
-                <th colspan="2" style="text-align: left;"><?php echo _("Outer Identity Handling");?></th>
217
+                <th colspan="2" style="text-align: left;"><?php echo _("Outer Identity Handling"); ?></th>
218 218
             </tr>
219 219
             <tr>
220 220
                 <!-- checkbox and input field for anonymity support, available only when realm is known-->
221 221
                 <td>
222
-                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
222
+                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
223 223
                         <?php echo _("Enable Anonymous Outer Identity:"); ?>
224 224
                     </span>
225 225
                 </td>
226 226
                 <td>
227
-                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick='
227
+                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick='
228 228
                             if (this.form.elements["anon_support"].checked !== true) {
229 229
                                 this.form.elements["anon_local"].setAttribute("disabled", "disabled");
230 230
                             } else {
231 231
                                 this.form.elements["anon_local"].removeAttribute("disabled");
232 232
                             }
233 233
                             ;'/>
234
-                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
234
+                    <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
235 235
                 </td>
236 236
             </tr>
237 237
             <tr>
238 238
                 <!-- checkbox and input field for check realm outer id, available only when realm is known-->
239 239
                 <td>
240
-                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
240
+                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
241 241
                         <?php echo _("Use special Outer Identity for realm checks:"); ?>
242 242
                     </span>
243 243
                 </td>
244 244
                 <td>
245
-                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick='
245
+                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick='
246 246
                             if (this.form.elements["checkuser_support"].checked !== true) {
247 247
                                 this.form.elements["checkuser_local"].setAttribute("disabled", "disabled");
248 248
                             } else {
249 249
                                 this.form.elements["checkuser_local"].removeAttribute("disabled");
250 250
                             }
251 251
                             ;'/>
252
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
252
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
253 253
                 </td>
254 254
             </tr>
255 255
             <tr>
256
-                <th colspan="2" style="border-top: 2px solid; text-align: left;"><?php echo _("Inner Identity (Username) Handling");?></th>
256
+                <th colspan="2" style="border-top: 2px solid; text-align: left;"><?php echo _("Inner Identity (Username) Handling"); ?></th>
257 257
             </tr>
258 258
             <tr>
259 259
                 <!-- checkbox for "verify-->
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                 </td>
265 265
                 <td>
266 266
                     <input type='checkbox' <?php
267
-                    echo ($verify != FALSE ? "checked" : "" );
267
+                    echo ($verify != FALSE ? "checked" : "");
268 268
                     ?> name='verify_support' onclick='
269 269
                             if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) {
270 270
                                 this.form.elements["hint_support"].setAttribute("disabled", "disabled");
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
             </tr>
277 277
             <tr>
278 278
                 <td>
279
-                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
279
+                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
280 280
                         <?php echo _("Enforce exact realm in username"); ?>
281 281
                     </span>
282 282
                 </td>
283 283
                 <td>
284
-                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> />
284
+                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> />
285 285
                 </td>
286 286
             </tr>
287 287
         </table>
@@ -291,20 +291,20 @@  discard block
 block discarded – undo
291 291
 
292 292
     <?php
293 293
     if ($wizardStyle) {
294
-        echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
294
+        echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>";
295 295
     }
296 296
     ?>
297 297
     <p>
298 298
 
299 299
         <?php
300
-        echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span>
301
-                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick='
300
+        echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span>
301
+                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick='
302 302
                               if (this.form.elements[\"redirect\"].checked != true) {
303 303
                                 this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\");
304 304
                               } else {
305 305
                                 this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\");
306 306
                               };'/>
307
-                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>";
307
+                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>";
308 308
         ?>
309 309
     </p>
310 310
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend>
314 314
     <?php
315 315
     if ($wizardStyle) {
316
-        echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>";
316
+        echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>";
317 317
     }
318 318
     ?>
319 319
     <?php
@@ -327,9 +327,9 @@  discard block
 block discarded – undo
327 327
      * @return void
328 328
      */
329 329
     function priority(string $eapType, bool $isenabled, int $priority) {
330
-        echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">";
330
+        echo "<td><select id='$eapType-priority' name='$eapType-priority' ".(!$isenabled ? "disabled='disabled'" : "").">";
331 331
         for ($a = 1; $a < 7; $a = $a + 1) {
332
-            echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>";
332
+            echo "<option id='$eapType-$a' value='$a' ".($isenabled && $a == $priority ? "selected" : "").">$a</option>";
333 333
         }
334 334
         echo "</select></td>";
335 335
     }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
      * @return void
346 346
      */
347 347
     function inherited_options($idpwideoptions, $eapType, $isVisible) {
348
-        echo "<td><div style='" . (!$isVisible ? "visibility:hidden" : "") . "' class='inheritedoptions' id='$eapType-inherited-global'>";
348
+        echo "<td><div style='".(!$isVisible ? "visibility:hidden" : "")."' class='inheritedoptions' id='$eapType-inherited-global'>";
349 349
 
350 350
         $eapoptions = [];
351 351
 
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
         $eapoptionsNames = array_count_values($eapoptions);
359 359
 
360 360
         if (count($eapoptionsNames) > 0) {
361
-            echo "<strong>" . _("EAP options inherited from Global level:") . "</strong><br />";
361
+            echo "<strong>"._("EAP options inherited from Global level:")."</strong><br />";
362 362
             foreach ($eapoptionsNames as $optionname => $count) {
363 363
                 /// option count and enumeration
364 364
                 /// Example: "(3x) Server Name"
365 365
                 $uiElements = new web\lib\admin\UIElements();
366
-                printf(_("(%dx) %s") . "<br />", $count, $uiElements->displayName($optionname));
366
+                printf(_("(%dx) %s")."<br />", $count, $uiElements->displayName($optionname));
367 367
             }
368 368
         }
369 369
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
                         <?php
399 399
                         $D = [];
400 400
                         foreach ($prefill_methods as $prio => $value) {
401
-                            print '<li>' . $value->getPrintableRep() . "</li>\n";
401
+                            print '<li>'.$value->getPrintableRep()."</li>\n";
402 402
                             $D[$value->getPrintableRep()] = $prio;
403 403
                         }
404 404
                         ?>
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
                             }
425 425
                             $display = $a->getPrintableRep();
426 426
                             if (!isset($D[$a->getPrintableRep()])) {
427
-                                print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n";
427
+                                print '<li class="eap1">'.$a->getPrintableRep()."</li>\n";
428 428
                             }
429 429
                         }
430 430
                         ?>
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
     foreach ($methods as $a) {
438 438
         $display = $a->getPrintableRep();
439 439
         $v = isset($D[$display]) ? $D[$display] : '';
440
-        print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">';
441
-        print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">';
440
+        print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">';
441
+        print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">';
442 442
     }
443 443
     ?>
444 444
     <br style="clear:both;" />
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
 foreach ($optionsAlreadySet as $optionNames) {
459 459
     if (preg_match("/^support:/", $optionNames)) {
460 460
         $has_support_options[$optionNames] = "SET";
461
-        $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
461
+        $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
462 462
     }
463 463
     if (preg_match("/^media:/", $optionNames)) {
464 464
         $has_media_options[$$optionNames] = "SET";
465
-        $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
465
+        $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
466 466
     }
467 467
 }
468 468
 $fields = [
@@ -471,22 +471,22 @@  discard block
 block discarded – undo
471 471
     "media" => _("Media Properties for this profile")];
472 472
 
473 473
 foreach ($fields as $name => $description) {
474
-    echo "<fieldset class='option_container' id='" . $name . "_override'>
474
+    echo "<fieldset class='option_container' id='".$name."_override'>
475 475
     <legend><strong>$description</strong></legend>
476 476
     <p>";
477 477
 
478
-    if (count(${"has_" . $name . "_options"}) > 0) {
479
-        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>");
478
+    if (count(${"has_".$name."_options"}) > 0) {
479
+        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>");
480 480
     }
481 481
 
482 482
     echo "</p>";
483 483
     echo $optionDisplay->prefilledOptionTable($name);
484
-    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>";
484
+    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>";
485 485
     echo "</fieldset>";
486 486
 }
487 487
 
488 488
 if ($wizardStyle) {
489
-    echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>";
489
+    echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>";
490 490
 }
491
-echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
491
+echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
492 492
 echo $deco->footer();
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 
113 113
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
114 114
 
115
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true));
116
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true));
117
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true));
115
+        $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true));
116
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true));
117
+        $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true));
118 118
 
119 119
         // now fetch and merge profile-level attributes if not already set on deeper level
120 120
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
         }
135 135
 
136
-        $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true));
136
+        $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true));
137 137
 
138 138
         // now, fetch and merge IdP-wide attributes
139 139
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 "row" => $attributeQuery->row,
189 189
                 "flag" => $optinfo['flag'],
190 190
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
191
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
191
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
192 192
         }
193 193
         return $temparray;
194 194
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      * @return void
290 290
      */
291 291
     public function setAnonymousIDSupport($shallwe) {
292
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
292
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
293 293
     }
294 294
 
295 295
     /** Toggle special username for realm checks
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * @return void
300 300
      */
301 301
     public function setRealmCheckUser($shallwe, $localpart = NULL) {
302
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
302
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
303 303
         if ($localpart !== NULL) {
304 304
             $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart);
305 305
         }
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
      * @return void
314 314
      */
315 315
     public function setInputVerificationPreference($verify, $hint) {
316
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
317
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
316
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
317
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
318 318
                 " WHERE profile_id = $this->identifier");
319 319
     }
320 320
 
Please login to merge, or discard this patch.
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 use \Exception;
34 34
 
35
-require_once dirname(__DIR__) . "/config/_config.php";
35
+require_once dirname(__DIR__)."/config/_config.php";
36 36
 
37 37
 /**
38 38
  * This class is a singleton for establishing a connection to the database
@@ -61,24 +61,24 @@  discard block
 block discarded – undo
61 61
             case "EXTERNAL":
62 62
             case "FRONTEND":
63 63
             case "DIAGNOSTICS":
64
-                if (!isset(self::${"instance" . $theDb})) {
64
+                if (!isset(self::${"instance".$theDb})) {
65 65
                     $class = __CLASS__;
66
-                    self::${"instance" . $theDb} = new $class($database);
67
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
66
+                    self::${"instance".$theDb} = new $class($database);
67
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
68 68
                 }
69
-                return self::${"instance" . $theDb};
69
+                return self::${"instance".$theDb};
70 70
             case "RADIUS":
71
-                if (!isset(self::${"instance" . $theDb})) {
71
+                if (!isset(self::${"instance".$theDb})) {
72 72
                     $class = __CLASS__;
73 73
                     foreach (CONFIG_CONFASSISTANT['DB'] as $name => $oneRadiusAuthDb) {
74 74
                         $theInstance = new $class($name);
75
-                        self::${"instance" . $theDb}[] = $theInstance;
75
+                        self::${"instance".$theDb}[] = $theInstance;
76 76
                         $theInstance->databaseInstance = $theDb;
77 77
                     }
78 78
                 }
79
-                return self::${"instance" . $theDb};
79
+                return self::${"instance".$theDb};
80 80
             default:
81
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
81
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
82 82
         }
83 83
     }
84 84
 
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
             }
118 118
         }
119 119
         // log exact query to debug log, if log level is at 5
120
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
120
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
121 121
         if ($types !== NULL) {
122
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true));
122
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true));
123 123
         }
124 124
 
125 125
         if ($this->connection->connect_error) {
126
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
126
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
127 127
         }
128 128
         if ($types === NULL) {
129 129
             $result = $this->connection->query($querystring);
130 130
             if ($result === FALSE) {
131
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
131
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
132 132
             }
133 133
         } else {
134 134
             // fancy! prepared statement with dedicated argument list
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             }
142 142
             $prepResult = $statementObject->prepare($querystring);
143 143
             if ($prepResult === FALSE) {
144
-                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
144
+                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
145 145
             }
146 146
 
147 147
             // we have a variable number of arguments packed into the ... array
@@ -153,11 +153,11 @@  discard block
 block discarded – undo
153 153
             array_unshift($localArray, $types);
154 154
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
155 155
             if ($retval === FALSE) {
156
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
156
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
157 157
             }
158 158
             $result = $statementObject->execute();
159 159
             if ($result === FALSE) {
160
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
160
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
161 161
             }
162 162
             $selectResult = $statementObject->get_result();
163 163
             if ($selectResult !== FALSE) {
@@ -169,14 +169,14 @@  discard block
 block discarded – undo
169 169
 
170 170
         // all cases where $result could be FALSE have been caught earlier
171 171
         if ($this->connection->errno) {
172
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
172
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
173 173
         }
174 174
 
175 175
 
176 176
         if ($isMoreThanSelect) {
177
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
177
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
178 178
             if ($types !== NULL) {
179
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true));
179
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true));
180 180
             }
181 181
         }
182 182
         return $result;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $this->readOnly = CONFIG_CONFASSISTANT['DB'][$databaseCapitalised]['readonly'];
274 274
         }
275 275
         if ($this->connection->connect_error) {
276
-            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
276
+            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
277 277
         }
278 278
         // it does not matter for internal time calculations with TIMESTAMPs but
279 279
         // sometimes we operate on date/time strings. Since MySQL returns those
Please login to merge, or discard this patch.
core/IdPlist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         foreach ($idps as $idp) {
38 38
             $idpTitle[$idp['entityID']] = $idp['title'];
39 39
             $d = self::getIdpDistance($idp, $here);
40
-            $resultSet[$idp['entityID']] = $d . " " . $idp['title'];
40
+            $resultSet[$idp['entityID']] = $d." ".$idp['title'];
41 41
         }
42 42
         asort($resultSet);
43 43
         $outarray = [];
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $allIDPs = ($country != "" ? $handle->exec($query, "s", $country) : $handle->exec($query));
80 80
         $returnarray = [];
81 81
         // SELECTs never return a booleans, always an object
82
-        $i=0;
82
+        $i = 0;
83 83
         while ($queryResult = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allIDPs)) {
84 84
             $i++;
85 85
             $institutionOptions = explode('---', $queryResult->options);
Please login to merge, or discard this patch.