@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @package UserGUI |
| 28 | 28 | * |
| 29 | 29 | */ |
| 30 | -require dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
| 30 | +require dirname(dirname(__FILE__))."/config/_config.php"; |
|
| 31 | 31 | $loggerInstance = new \core\common\Logging(); |
| 32 | 32 | $langObject = new \core\common\Language(); |
| 33 | 33 | $cat = new \core\CAT(); |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'> |
| 52 | 52 | <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" /> |
| 53 | 53 | |
| 54 | - <div id="motd"><?php print ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
| 54 | + <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' '); ?></div> |
|
| 55 | 55 | |
| 56 | - <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
| 56 | + <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1> |
|
| 57 | 57 | <div id="tou"> |
| 58 | 58 | <?php |
| 59 | 59 | require "user/tou.php"; |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | </div> |
| 62 | 62 | <div> |
| 63 | 63 | <table style='width:100%'> |
| 64 | - <caption><?php echo "Legalese";?></caption> |
|
| 64 | + <caption><?php echo "Legalese"; ?></caption> |
|
| 65 | 65 | <tr> |
| 66 | - <th class='wai-invisible' scope='col'><?php echo "Copyright";?></th> |
|
| 67 | - <th class='wai-invisible' scope='col'><?php echo "Privacy Notice";?></th> |
|
| 68 | - <th class='wai-invisible' scope='col'><?php echo "Attribution";?></th> |
|
| 66 | + <th class='wai-invisible' scope='col'><?php echo "Copyright"; ?></th> |
|
| 67 | + <th class='wai-invisible' scope='col'><?php echo "Privacy Notice"; ?></th> |
|
| 68 | + <th class='wai-invisible' scope='col'><?php echo "Attribution"; ?></th> |
|
| 69 | 69 | </tr> |
| 70 | 70 | <tr> |
| 71 | 71 | <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'> |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | </td> |
| 74 | 74 | <?php |
| 75 | 75 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
| 76 | - $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>"; |
|
| 76 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>"; |
|
| 77 | 77 | } |
| 78 | 78 | ?> |
| 79 | 79 | <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | ?> |
| 28 | 28 | <?php |
| 29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 30 | 30 | |
| 31 | 31 | $auth = new \web\lib\admin\Authentication(); |
| 32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | "nl" => "_radsec._tcp.eduroam.nl.", |
| 76 | 76 | ]; |
| 77 | 77 | foreach ($cat->getSuperglueZone() as $oneEntry) { |
| 78 | - foreach (explode(',',$oneEntry['inst_realm']) as $oneRealm) { |
|
| 78 | + foreach (explode(',', $oneEntry['inst_realm']) as $oneRealm) { |
|
| 79 | 79 | $target = "_radsec._somewhere.eduroam.org"; |
| 80 | 80 | foreach ($NROs as $tld => $nroTarget) { |
| 81 | 81 | if (preg_match("/$tld$/", $oneRealm)) { |
@@ -105,28 +105,28 @@ |
||
| 105 | 105 | parent::__construct(); |
| 106 | 106 | common\Entity::intoThePotatoes(); |
| 107 | 107 | |
| 108 | - $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>") . "</a>"; |
|
| 108 | + $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>"; |
|
| 109 | 109 | if (CAT::RELEASE_VERSION) { |
| 110 | 110 | $major = CAT::VERSION_MAJOR; |
| 111 | 111 | $minor = CAT::VERSION_MINOR; |
| 112 | 112 | $patch = CAT::VERSION_PATCH; |
| 113 | 113 | $extra = CAT::VERSION_EXTRA; |
| 114 | 114 | $temp_version = "CAT-$major.$minor"; |
| 115 | - $branch = "release_$major" . "_$minor"; |
|
| 115 | + $branch = "release_$major"."_$minor"; |
|
| 116 | 116 | if (CAT::VERSION_PATCH != 0) { |
| 117 | 117 | $temp_version .= ".$patch"; |
| 118 | 118 | } |
| 119 | 119 | if (CAT::VERSION_EXTRA != "") { |
| 120 | 120 | $temp_version .= "-$extra"; |
| 121 | 121 | } |
| 122 | - $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version); |
|
| 122 | + $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version); |
|
| 123 | 123 | } |
| 124 | 124 | $product = \config\Master::APPEARANCE['productname']; |
| 125 | 125 | $minYear = self::COPYRIGHT_MIN_YEAR; |
| 126 | 126 | $maxYear = self::COPYRIGHT_MAX_YEAR; |
| 127 | 127 | $holder = self::COPYRIGHT_HOLDER; |
| 128 | 128 | $consortia = self::COPYRIGHT_CONSORTIA; |
| 129 | - $this->catCopyright = "$product - " . $this->catVersionString . " © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
| 129 | + $this->catCopyright = "$product - ".$this->catVersionString." © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
| 130 | 130 | |
| 131 | 131 | |
| 132 | 132 | /* Federations are created in DB with bootstrapFederation, and listed via listFederations |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * <base_url>/copyright.php after deploying the software |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 23 | 23 | |
| 24 | 24 | $Tests = [ |
| 25 | 25 | 'Directories', |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $uiElements = new \web\lib\admin\UIElements(); |
| 45 | 45 | |
| 46 | -if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
| 46 | +if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
| 47 | 47 | $Tests[] = 'Makensis'; |
| 48 | 48 | $Tests[] = 'Makensis=>NSISmodules'; |
| 49 | 49 | } |
@@ -141,10 +141,10 @@ discard block |
||
| 141 | 141 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
| 142 | 142 | !define MUI_COMPONENTSPAGE_SMALLDESC |
| 143 | 143 | |
| 144 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")),\config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
| 145 | -!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis( _("Installation complete"))?>" |
|
| 146 | -!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Your system is ready."))?>" |
|
| 147 | -!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Please contact \${SUPPORT}."))?>" |
|
| 144 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")), \config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
| 145 | +!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis(_("Installation complete"))?>" |
|
| 146 | +!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Your system is ready."))?>" |
|
| 147 | +!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Please contact \${SUPPORT}."))?>" |
|
| 148 | 148 | ;-------------------------------- |
| 149 | 149 | ;Languages |
| 150 | 150 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -152,14 +152,14 @@ discard block |
||
| 152 | 152 | ;-------------------------------- |
| 153 | 153 | ; License file |
| 154 | 154 | !ifdef LICENSE_FILE |
| 155 | -LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis( _("Accept"))?>" |
|
| 155 | +LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis(_("Accept"))?>" |
|
| 156 | 156 | LicenseText "<?php WindowsCommon::echoNsis(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
| 157 | 157 | LicenseData ${LICENSE_FILE} |
| 158 | 158 | !endif |
| 159 | 159 | |
| 160 | 160 | ;----------------------------------- |
| 161 | 161 | |
| 162 | -MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis( _("Finish"))?>" |
|
| 162 | +MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis(_("Finish"))?>" |
|
| 163 | 163 | ;---------------------------------- |
| 164 | 164 | ; FUNCTIONS |
| 165 | 165 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | !macro install_ca_cert ca_file ca_fingerprint level |
| 194 | 194 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
| 195 | - DetailPrint "<?php WindowsCommon::echoNsis( _("searching for certificate"))?> ${ca_file}" |
|
| 195 | + DetailPrint "<?php WindowsCommon::echoNsis(_("searching for certificate"))?> ${ca_file}" |
|
| 196 | 196 | File "${ca_file}" |
| 197 | 197 | nsArray::Set Delete_files "${ca_file}" |
| 198 | 198 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -254,13 +254,13 @@ discard block |
||
| 254 | 254 | ${EndIf} |
| 255 | 255 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
| 256 | 256 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
| 257 | - DetailPrint "<?php WindowsCommon::echoNsis( _("installing certificate"))?> ${ca_file}" |
|
| 257 | + DetailPrint "<?php WindowsCommon::echoNsis(_("installing certificate"))?> ${ca_file}" |
|
| 258 | 258 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
| 259 | 259 | Pop $0 |
| 260 | 260 | !insertmacro debug_cat 3 "certutil returned $0" |
| 261 | 261 | ${If} $0 != 0 |
| 262 | 262 | IfSilent +2 |
| 263 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("could not install certificate"))?> ${ca_file}" |
|
| 263 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("could not install certificate"))?> ${ca_file}" |
|
| 264 | 264 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
| 265 | 265 | ${EndIf} |
| 266 | 266 | no_install_${ca_file}: |
@@ -467,26 +467,26 @@ discard block |
||
| 467 | 467 | pop $R0 |
| 468 | 468 | ${If} $tkip_count > 0 |
| 469 | 469 | ${If} $aes_count > 1 |
| 470 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 470 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 471 | 471 | ${Else} |
| 472 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 472 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 473 | 473 | ${EndIf} |
| 474 | 474 | ${Else} |
| 475 | 475 | StrCpy $R1 "" |
| 476 | 476 | ${EndIf} |
| 477 | 477 | ${If} $profile_count > 0 |
| 478 | - StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 479 | -<?php WindowsCommon::echoNsis( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 478 | + StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 479 | +<?php WindowsCommon::echoNsis(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 480 | 480 | $R0.\ |
| 481 | 481 | $R1$\r$\n$\n\ |
| 482 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
| 482 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
| 483 | 483 | EMAIL: ${SUPPORT}$\r$\n\ |
| 484 | 484 | WWW: ${URL}" |
| 485 | 485 | ${Else} |
| 486 | -StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 487 | -<?php WindowsCommon::echoNsis( _("The installer will create the wireless profile:"))?> $R0.\ |
|
| 486 | +StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 487 | +<?php WindowsCommon::echoNsis(_("The installer will create the wireless profile:"))?> $R0.\ |
|
| 488 | 488 | $R1$\r$\n$\n\ |
| 489 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
| 489 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
| 490 | 490 | EMAIL: ${SUPPORT}$\r$\n\ |
| 491 | 491 | WWW: ${URL}" |
| 492 | 492 | ${EndIf} |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
| 513 | 513 | ;TRANSLATION |
| 514 | 514 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
| 515 | -$\r$\n$\r$\n<?php WindowsCommon::echoNsis( _("Installer created with software from the GEANT project."))?>" |
|
| 515 | +$\r$\n$\r$\n<?php WindowsCommon::echoNsis(_("Installer created with software from the GEANT project."))?>" |
|
| 516 | 516 | Pop $TEXT |
| 517 | 517 | |
| 518 | 518 | SetCtlColors $DIALOG "" 0xffffff |
@@ -645,18 +645,18 @@ discard block |
||
| 645 | 645 | ${If} $wireless_result == 1 |
| 646 | 646 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
| 647 | 647 | IfSilent +2 |
| 648 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 648 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 649 | 649 | Call Cleanup |
| 650 | 650 | ${EndIf} |
| 651 | 651 | ${If} $wireless_result == 2 |
| 652 | 652 | IfSilent +2 |
| 653 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 653 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 654 | 654 | Call Cleanup |
| 655 | 655 | ${EndIf} |
| 656 | 656 | ${Else} |
| 657 | 657 | ${If} $wireless_result > 0 |
| 658 | 658 | IfSilent +3 |
| 659 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("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 |
|
| 659 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("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 |
|
| 660 | 660 | Call Cleanup |
| 661 | 661 | wired_yes: |
| 662 | 662 | Push 1 |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | ${If} $wired == 1 |
| 673 | 673 | ${If} $force_wired == 0 |
| 674 | 674 | IfSilent wired |
| 675 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 675 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 676 | 676 | Push 0 |
| 677 | 677 | Pop $wired |
| 678 | 678 | wired: |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | ;================================ |
| 714 | 714 | |
| 715 | 715 | Function ShowInstfiles |
| 716 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Profiles installation"))?>" " " |
|
| 716 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Profiles installation"))?>" " " |
|
| 717 | 717 | FunctionEnd |
| 718 | 718 | ;================================ |
| 719 | 719 | ; Check if a wireless profile exist and put it on delete list |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | |
| 733 | 733 | Function FindProfile |
| 734 | 734 | Pop $R8 |
| 735 | - DetailPrint "<?php WindowsCommon::echoNsis( _("Checking for profile \$R8"))?>" |
|
| 735 | + DetailPrint "<?php WindowsCommon::echoNsis(_("Checking for profile \$R8"))?>" |
|
| 736 | 736 | !insertmacro debug_cat 2 "Checking for profile $R8" |
| 737 | 737 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
| 738 | 738 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | !insertmacro debug_cat 4 "netsh returned $0" |
| 741 | 741 | ${If} $0 == 0 |
| 742 | 742 | !insertmacro debug_cat 1 "found profile $R8" |
| 743 | - DetailPrint "<?php WindowsCommon::echoNsis( _("found profile \$R8"))?>" |
|
| 743 | + DetailPrint "<?php WindowsCommon::echoNsis(_("found profile \$R8"))?>" |
|
| 744 | 744 | Push 0 |
| 745 | 745 | ${Else} |
| 746 | 746 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | ${If} $Symantec_installed != 0 |
| 836 | 836 | !insertmacro debug_cat 3 "Symantec problem" |
| 837 | 837 | IfSilent +2 |
| 838 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("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']) ?>" |
|
| 838 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("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']) ?>" |
|
| 839 | 839 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
| 840 | 840 | Quit |
| 841 | 841 | |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | Function PFXCertificateSelect |
| 1129 | 1129 | !ifndef SILVERBULLET |
| 1130 | 1130 | ;TRANSLATION |
| 1131 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")),\config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
| 1131 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")), \config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
| 1132 | 1132 | ;TRANSLATION |
| 1133 | 1133 | IfSilent +2 |
| 1134 | 1134 | MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echoNsis(_("Click OK to continue"))?> " |
@@ -1144,7 +1144,7 @@ discard block |
||
| 1144 | 1144 | $certPasswordLength = strlen($certPasswordLabel); |
| 1145 | 1145 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
| 1146 | 1146 | $certUsernameLength = strlen($certUsernameLabel); |
| 1147 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
| 1147 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
| 1148 | 1148 | ?> |
| 1149 | 1149 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
| 1150 | 1150 | !else |
@@ -1161,11 +1161,11 @@ discard block |
||
| 1161 | 1161 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
| 1162 | 1162 | ${If} $VistaNoSP == 0 |
| 1163 | 1163 | !ifdef PFX_USERNAME |
| 1164 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
| 1165 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
| 1164 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
| 1165 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
| 1166 | 1166 | !else |
| 1167 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
| 1168 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
| 1167 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
| 1168 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
| 1169 | 1169 | !endif |
| 1170 | 1170 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
| 1171 | 1171 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1537,7 +1537,7 @@ discard block |
||
| 1537 | 1537 | Section "-start" |
| 1538 | 1538 | SectionIn RO |
| 1539 | 1539 | |
| 1540 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Installation"))?>" "<?php WindowsCommon::echoNsis( _("Checking for existing wireless profiles"))?>" |
|
| 1540 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Installation"))?>" "<?php WindowsCommon::echoNsis(_("Checking for existing wireless profiles"))?>" |
|
| 1541 | 1541 | !ifndef PWD |
| 1542 | 1542 | !include "certs.nsh" |
| 1543 | 1543 | !endif |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $mail->WordWrap = 72; |
| 83 | 83 | $mail->isHTML(FALSE); |
| 84 | 84 | $mail->CharSet = 'UTF-8'; |
| 85 | - $configuredFrom = \config\Master::APPEARANCE['from-mail'] . ""; |
|
| 85 | + $configuredFrom = \config\Master::APPEARANCE['from-mail'].""; |
|
| 86 | 86 | $mail->From = $configuredFrom; |
| 87 | 87 | // are we fancy? i.e. S/MIME signing? |
| 88 | 88 | if (isset(\config\Master::MAILSETTINGS['certfilename'], \config\Master::MAILSETTINGS['keyfilename'], \config\Master::MAILSETTINGS['keypass'])) { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX."); |
| 124 | 124 | return OutsideComm::MAILDOMAIN_NO_MX; |
| 125 | 125 | } |
| 126 | - $loggerInstance->debug(5, "Domain: $domain MX: " . /** @scrutinizer ignore-type */ print_r($mx, TRUE)); |
|
| 126 | + $loggerInstance->debug(5, "Domain: $domain MX: "./** @scrutinizer ignore-type */ print_r($mx, TRUE)); |
|
| 127 | 127 | // create a pool of A and AAAA records for all the MXes |
| 128 | 128 | $ipAddrs = []; |
| 129 | 129 | foreach ($mx as $onemx) { |
@@ -133,14 +133,14 @@ discard block |
||
| 133 | 133 | $ipAddrs[] = $oneipv4['ip']; |
| 134 | 134 | } |
| 135 | 135 | foreach ($v6list as $oneipv6) { |
| 136 | - $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]"; |
|
| 136 | + $ipAddrs[] = "[".$oneipv6['ipv6']."]"; |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | if (count($ipAddrs) == 0) { |
| 140 | 140 | $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts."); |
| 141 | 141 | return OutsideComm::MAILDOMAIN_NO_HOST; |
| 142 | 142 | } |
| 143 | - $loggerInstance->debug(5, "Domain: $domain Addrs: " . /** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE)); |
|
| 143 | + $loggerInstance->debug(5, "Domain: $domain Addrs: "./** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE)); |
|
| 144 | 144 | // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. |
| 145 | 145 | // If at least one does not support STARTTLS or one of the hosts doesn't connect |
| 146 | 146 | // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | switch (\config\ConfAssistant::SMSSETTINGS['provider']) { |
| 194 | 194 | case 'Nexmo': |
| 195 | 195 | // taken from https://docs.nexmo.com/messaging/sms-api |
| 196 | - $url = 'https://rest.nexmo.com/sms/json?' . http_build_query( |
|
| 196 | + $url = 'https://rest.nexmo.com/sms/json?'.http_build_query( |
|
| 197 | 197 | [ |
| 198 | 198 | 'api_key' => \config\ConfAssistant::SMSSETTINGS['username'], |
| 199 | 199 | 'api_secret' => \config\ConfAssistant::SMSSETTINGS['password'], |
@@ -219,14 +219,14 @@ discard block |
||
| 219 | 219 | $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!'); |
| 220 | 220 | return OutsideComm::SMS_NOTSENT; |
| 221 | 221 | } |
| 222 | - $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.'); |
|
| 222 | + $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.'); |
|
| 223 | 223 | |
| 224 | 224 | $totalFailures = 0; |
| 225 | 225 | foreach ($decoded_response['messages'] as $message) { |
| 226 | 226 | if ($message['status'] == 0) { |
| 227 | - $loggerInstance->debug(2, $message['message-id'] . ": Success"); |
|
| 227 | + $loggerInstance->debug(2, $message['message-id'].": Success"); |
|
| 228 | 228 | } else { |
| 229 | - $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")"); |
|
| 229 | + $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")"); |
|
| 230 | 230 | $totalFailures++; |
| 231 | 231 | } |
| 232 | 232 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $proto = "https://"; |
| 296 | 296 | } |
| 297 | 297 | // then, send out the mail |
| 298 | - $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n"; |
|
| 298 | + $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n"; |
|
| 299 | 299 | // default means we don't have a Reply-To. |
| 300 | 300 | $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address.")); |
| 301 | 301 | |
@@ -303,8 +303,8 @@ discard block |
||
| 303 | 303 | // see if we are supposed to add a custom message |
| 304 | 304 | $customtext = $federation->getAttributes('fed:custominvite'); |
| 305 | 305 | if (count($customtext) > 0) { |
| 306 | - $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" . |
|
| 307 | - wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n"; |
|
| 306 | + $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------". |
|
| 307 | + wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n"; |
|
| 308 | 308 | } |
| 309 | 309 | // and add Reply-To already now |
| 310 | 310 | foreach ($federation->listFederationAdmins() as $fedadmin_id) { |
@@ -320,19 +320,19 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | $productname = \config\Master::APPEARANCE['productname']; |
| 322 | 322 | $consortium = \config\ConfAssistant::CONSORTIUM['display_name']; |
| 323 | - $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72) . "\n\n" . |
|
| 324 | - $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" . |
|
| 325 | - wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72) . "\n\n" . |
|
| 326 | - $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/\n\n" . |
|
| 327 | - _("and enter the invitation token") . "\n\n" . |
|
| 328 | - $newtoken . "\n\n$replyToMessage\n\n" . |
|
| 329 | - wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" . |
|
| 330 | - wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72) . "\n\n" . |
|
| 323 | + $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72)."\n\n". |
|
| 324 | + $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n". |
|
| 325 | + wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72)."\n\n". |
|
| 326 | + $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/\n\n". |
|
| 327 | + _("and enter the invitation token")."\n\n". |
|
| 328 | + $newtoken."\n\n$replyToMessage\n\n". |
|
| 329 | + wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n". |
|
| 330 | + wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72)."\n\n". |
|
| 331 | 331 | sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), $consortium); |
| 332 | 332 | |
| 333 | 333 | |
| 334 | 334 | // who to whom? |
| 335 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System"; |
|
| 335 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System"; |
|
| 336 | 336 | |
| 337 | 337 | if (isset(\config\Master::APPEARANCE['invitation-bcc-mail']) && \config\Master::APPEARANCE['invitation-bcc-mail'] !== NULL) { |
| 338 | 338 | $mail->addBCC(\config\Master::APPEARANCE['invitation-bcc-mail']); |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
| 107 | 107 | |
| 108 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
| 109 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
| 110 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 108 | + $this->loggerInstance->debug(5, "Device-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
| 109 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
| 110 | + $this->loggerInstance->debug(5, "All low-Level Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 111 | 111 | |
| 112 | 112 | // now fetch and merge profile-level attributes if not already set on deeper level |
| 113 | 113 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $this->loggerInstance->debug(5, "Merged Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 140 | + $this->loggerInstance->debug(5, "Merged Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
| 141 | 141 | |
| 142 | 142 | // now, fetch and merge IdP-wide attributes |
| 143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | // add the internal attribute to that effect |
| 153 | 153 | |
| 154 | 154 | if (isset($this->attributes['media:openroaming_always'])) { |
| 155 | - $this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] )); |
|
| 155 | + $this->attributes = array_merge($this->attributes, $this->addInternalAttributes(["internal:openroaming" => TRUE])); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | $this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n"); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | "row" => $attributeQuery->row, |
| 201 | 201 | "flag" => $optinfo['flag'], |
| 202 | 202 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
| 203 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
| 203 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
| 204 | 204 | } |
| 205 | 205 | return $temparray; |
| 206 | 206 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function setAnonymousIDSupport($shallwe) |
| 311 | 311 | { |
| 312 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
| 312 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /** Toggle special username for realm checks |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | * @return void |
| 320 | 320 | */ |
| 321 | 321 | public function setRealmCheckUser($shallwe, $localpart = NULL) { |
| 322 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
| 322 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
| 323 | 323 | if ($localpart !== NULL) { |
| 324 | 324 | $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart); |
| 325 | 325 | } |
@@ -334,8 +334,8 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function setInputVerificationPreference($verify, $hint) |
| 336 | 336 | { |
| 337 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
| 338 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
| 337 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
| 338 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
| 339 | 339 | " WHERE profile_id = $this->identifier"); |
| 340 | 340 | } |
| 341 | 341 | |
@@ -62,24 +62,24 @@ discard block |
||
| 62 | 62 | case "EXTERNAL": |
| 63 | 63 | case "FRONTEND": |
| 64 | 64 | case "DIAGNOSTICS": |
| 65 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 65 | + if (!isset(self::${"instance".$theDb})) { |
|
| 66 | 66 | $class = __CLASS__; |
| 67 | - self::${"instance" . $theDb} = new $class($database); |
|
| 68 | - DBConnection::${"instance" . $theDb}->databaseInstance = $theDb; |
|
| 67 | + self::${"instance".$theDb} = new $class($database); |
|
| 68 | + DBConnection::${"instance".$theDb}->databaseInstance = $theDb; |
|
| 69 | 69 | } |
| 70 | - return self::${"instance" . $theDb}; |
|
| 70 | + return self::${"instance".$theDb}; |
|
| 71 | 71 | case "RADIUS": |
| 72 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 72 | + if (!isset(self::${"instance".$theDb})) { |
|
| 73 | 73 | $class = __CLASS__; |
| 74 | 74 | foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) { |
| 75 | 75 | $theInstance = new $class($name); |
| 76 | - self::${"instance" . $theDb}[] = $theInstance; |
|
| 76 | + self::${"instance".$theDb}[] = $theInstance; |
|
| 77 | 77 | $theInstance->databaseInstance = $theDb; |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | - return self::${"instance" . $theDb}; |
|
| 80 | + return self::${"instance".$theDb}; |
|
| 81 | 81 | default: |
| 82 | - throw new Exception("This type of database (" . strtoupper($database) . ") is not known!"); |
|
| 82 | + throw new Exception("This type of database (".strtoupper($database).") is not known!"); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -121,18 +121,18 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | // log exact query to debug log, if log level is at 5 |
| 124 | - $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n"); |
|
| 124 | + $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n"); |
|
| 125 | 125 | if ($types !== NULL) { |
| 126 | - $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 126 | + $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | if ($this->connection->connect_error) { |
| 130 | - throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!"); |
|
| 130 | + throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!"); |
|
| 131 | 131 | } |
| 132 | 132 | if ($types === NULL) { |
| 133 | 133 | $result = $this->connection->query($querystring); |
| 134 | 134 | if ($result === FALSE) { |
| 135 | - throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--"); |
|
| 135 | + throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--"); |
|
| 136 | 136 | } |
| 137 | 137 | } else { |
| 138 | 138 | // fancy! prepared statement with dedicated argument list |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | $prepResult = $statementObject->prepare($querystring); |
| 150 | 150 | if ($prepResult === FALSE) { |
| 151 | - throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--."); |
|
| 151 | + throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--."); |
|
| 152 | 152 | } |
| 153 | 153 | $this->preparedStatements[$querystring] = $statementObject; |
| 154 | 154 | } |
@@ -161,11 +161,11 @@ discard block |
||
| 161 | 161 | array_unshift($localArray, $types); |
| 162 | 162 | $retval = call_user_func_array([$statementObject, "bind_param"], $localArray); |
| 163 | 163 | if ($retval === FALSE) { |
| 164 | - throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--"); |
|
| 164 | + throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--"); |
|
| 165 | 165 | } |
| 166 | 166 | $result = $statementObject->execute(); |
| 167 | 167 | if ($result === FALSE) { |
| 168 | - throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--"); |
|
| 168 | + throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--"); |
|
| 169 | 169 | } |
| 170 | 170 | $selectResult = $statementObject->get_result(); |
| 171 | 171 | if ($selectResult !== FALSE) { |
@@ -175,14 +175,14 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | // all cases where $result could be FALSE have been caught earlier |
| 177 | 177 | if ($this->connection->errno) { |
| 178 | - throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!"); |
|
| 178 | + throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!"); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | |
| 182 | 182 | if ($isMoreThanSelect) { |
| 183 | - $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring); |
|
| 183 | + $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring); |
|
| 184 | 184 | if ($types !== NULL) { |
| 185 | - $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 185 | + $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | return $result; |
@@ -277,13 +277,13 @@ discard block |
||
| 277 | 277 | if (isset(\config\Master::DB[$databaseCapitalised])) { |
| 278 | 278 | $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']); |
| 279 | 279 | if ($this->connection->connect_error) { |
| 280 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 280 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 281 | 281 | } |
| 282 | 282 | $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly']; |
| 283 | 283 | } else { // one of the RADIUS DBs |
| 284 | 284 | $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']); |
| 285 | 285 | if ($this->connection->connect_error) { |
| 286 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 286 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 287 | 287 | } |
| 288 | 288 | $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly']; |
| 289 | 289 | } |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $invitationObject = new SilverbulletInvitation($token); |
| 326 | 326 | $profile = new ProfileSilverbullet($invitationObject->profile); |
| 327 | 327 | $inst = new IdP($profile->institution); |
| 328 | - $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n"); |
|
| 328 | + $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n"); |
|
| 329 | 329 | if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) { |
| 330 | 330 | throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have gotten that far!"); |
| 331 | 331 | } |
@@ -338,12 +338,12 @@ discard block |
||
| 338 | 338 | throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!"); |
| 339 | 339 | } |
| 340 | 340 | $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow); |
| 341 | - $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n"); |
|
| 341 | + $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n"); |
|
| 342 | 342 | $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry); |
| 343 | 343 | if ($expiryDateObject === FALSE) { |
| 344 | 344 | throw new Exception("The expiry date we got from the DB is bogus!"); |
| 345 | 345 | } |
| 346 | - $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n"); |
|
| 346 | + $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n"); |
|
| 347 | 347 | // date_create with no parameters can't fail, i.e. is never FALSE |
| 348 | 348 | $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject); |
| 349 | 349 | $expiryDays = $validity->days + 1; |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $certString = ""; |
| 383 | 383 | openssl_x509_export($cert, $certString); |
| 384 | 384 | $parsedCert = $x509->processCertificate($certString); |
| 385 | - $loggerInstance->debug(5, "CERTINFO: " . /** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true)); |
|
| 385 | + $loggerInstance->debug(5, "CERTINFO: "./** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true)); |
|
| 386 | 386 | $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s"); |
| 387 | 387 | |
| 388 | 388 | // store new cert info in DB |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | $username = ""; |
| 443 | 443 | while ($usernameIsUnique === FALSE) { |
| 444 | 444 | $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz"); |
| 445 | - $username = $usernameLocalPart . "@" . $realm; |
|
| 445 | + $username = $usernameLocalPart."@".$realm; |
|
| 446 | 446 | $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ? AND ca_type = ?", "ss", $username, $certtype); |
| 447 | 447 | // SELECT -> resource, not boolean |
| 448 | 448 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) { |