Test Setup Failed
Push — master ( 63dce7...b8acf2 )
by Tomasz
05:58
created
web/skins/example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <h1>Example Skin (main user frontpage)</h1>
23
-<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
23
+<img alt='Consortium logo' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
24 24
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
25 25
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
26
-<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
26
+<img alt='Custom image' src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
Please login to merge, or discard this patch.
web/tou.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'] : '&nbsp'); ?></div>
54
+        <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp'); ?></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
 block discarded – undo
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
 block discarded – undo
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;'>
Please login to merge, or discard this patch.
web/admin/action_generate_zone.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,28 +105,28 @@
 block discarded – undo
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 . " &copy; $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." &copy; $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
Please login to merge, or discard this patch.
web/admin/sanity_tests.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $Tests = [
25 25
     'Directories',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 $uiElements = new \web\lib\admin\UIElements();
45 45
 
46
-if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL" ) {
46
+if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
47 47
     $Tests[] = 'Makensis';
48 48
     $Tests[] = 'Makensis=>NSISmodules';
49 49
 }
Please login to merge, or discard this patch.
devices/ms/Files/common.inc 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm",
137 137
             sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers",
138 138
             sprintf(_("Mint %s with CA on creation"), $this->nomenclatureInst) => "fed:minted_ca_file",
139
-            sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming",
139
+            sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming",
140 140
             _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget",
141 141
             $ssidText => "media:SSID",
142 142
             $passpointOiText => "media:consortium_OI",
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $find = array_keys($displayNames, $input, TRUE);
149 149
 
150 150
         if (count($find) == 0) { // this is an error! throw an Exception
151
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
151
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
152 152
         }
153 153
         \core\common\Entity::outOfThePotatoes();
154 154
         return $find[0];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach ($optionlist as $option) {
171 171
             $type = $optioninfo->optionType($option['name']);
172
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
172
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
173 173
                 // all non-multilang attribs get this assignment ...
174 174
                 $language = "";
175 175
                 $content = $option['value'];
@@ -187,19 +187,19 @@  discard block
 block discarded – undo
187 187
                         $locationMarkers[] = $coords;
188 188
                         break;
189 189
                     case "file":
190
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
190
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
191 191
                         switch ($option['name']) {
192 192
                             case "general:logo_file":
193 193
                             case "fed:logo_file":
194
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
194
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']);
195 195
                                 break;
196 196
                             case "eap:ca_file":
197 197
                             // fall-through intended: display both the same way
198 198
                             case "fed:minted_ca_file":
199
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
199
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']);
200 200
                                 break;
201 201
                             case "support:info_file":
202
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
202
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']);
203 203
                                 break;
204 204
                             default:
205 205
                         }
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
210 210
                             break;
211 211
                         }
212
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
212
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
213 213
                         break;
214 214
                     default:
215
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
215
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
216 216
                 }
217 217
             }
218 218
         }
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
             $locationCount = 0;
222 222
             foreach ($locationMarkers as $g) {
223 223
                 $locationCount++;
224
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
224
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
225 225
             }
226 226
             $marker .= '<\/markers>'; // some validator says this should be escaped
227 227
             $jMarker = json_encode($locationMarkers);
228
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
228
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
229 229
         }
230 230
         \core\common\Entity::outOfThePotatoes();
231 231
         return $retval;
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
         \core\common\Entity::intoThePotatoes();
242 242
         $idpoptions = $myInst->getAttributes();
243 243
         $retval = "<div class='infobox'>
244
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2>
244
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2>
245 245
         <table>
246 246
             <tr>
247 247
                 <td>
248
-                    " . _("Country:") . "
248
+                    " . _("Country:")."
249 249
                 </td>
250 250
                 <td>
251 251
                 </td>
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
         $retval .= $myFed->name;
256 256
         $retval .= "</strong>
257 257
                 </td>
258
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
258
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
259 259
         </table>
260 260
     </div>";
261 261
 
262 262
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
263 263
         foreach ($blocks as $block) {
264 264
             $retval .= "<div class='infobox'>
265
-            <h2>" . $block[1] . "</h2>
265
+            <h2>" . $block[1]."</h2>
266 266
             <table>" .
267
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
267
+                    $this->infoblock($idpoptions, $block[0], "IdP").
268 268
                     "</table>
269 269
         </div>";
270 270
         }
@@ -279,12 +279,12 @@  discard block
 block discarded – undo
279 279
      */
280 280
     private function displaySize(int $number) {
281 281
         if ($number > 1024 * 1024) {
282
-            return round($number / 1024 / 1024, 2) . " MiB";
282
+            return round($number / 1024 / 1024, 2)." MiB";
283 283
         }
284 284
         if ($number > 1024) {
285
-            return round($number / 1024, 2) . " KiB";
285
+            return round($number / 1024, 2)." KiB";
286 286
         }
287
-        return $number . " B";
287
+        return $number." B";
288 288
     }
289 289
 
290 290
     /**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $ref = $validator->databaseReference($cAReference);
339 339
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
340 340
         if (is_bool($rawResult)) { // we didn't actually get a CA!
341
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
341
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
342 342
             \core\common\Entity::outOfThePotatoes();
343 343
             return $retval;
344 344
         }
@@ -354,14 +354,14 @@  discard block
 block discarded – undo
354 354
 
355 355
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
356 356
         $details['name'] = preg_replace('/\//', "", $details['name']);
357
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
358
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
357
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
358
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
359 359
         if ($details['ca'] == 0 && $details['root'] != 1) {
360
-            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
360
+            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>";
361 361
             \core\common\Entity::outOfThePotatoes();
362 362
             return $retval;
363 363
         }
364
-        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>";
364
+        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>";
365 365
         \core\common\Entity::outOfThePotatoes();
366 366
         return $retval;
367 367
     }
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
      */
375 375
     public function previewImageinHTML($imageReference) {
376 376
         \core\common\Entity::intoThePotatoes();
377
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
377
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
378 378
         \core\common\Entity::outOfThePotatoes();
379 379
         return $retval;
380 380
     }
@@ -391,13 +391,13 @@  discard block
 block discarded – undo
391 391
         $ref = $validator->databaseReference($fileReference);
392 392
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
393 393
         if (is_bool($fileBlob)) { // we didn't actually get a file!
394
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
394
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
395 395
             \core\common\Entity::outOfThePotatoes();
396 396
             return $retval;
397 397
         }
398 398
         $decodedFileBlob = base64_decode($fileBlob);
399 399
         $fileinfo = new \finfo();
400
-        $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>";
400
+        $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>";
401 401
         \core\common\Entity::outOfThePotatoes();
402 402
         return $retval;
403 403
     }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             $retval .= "<tr><td>";
426 426
         }
427 427
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
428
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
428
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
429 429
         if (!$omittabletags) {
430 430
             $retval .= "</td><td>";
431 431
         }
@@ -507,8 +507,8 @@  discard block
 block discarded – undo
507 507
             return "";
508 508
         }
509 509
 
510
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
511
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
510
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
511
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
512 512
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
513 513
             return "";
514 514
         }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         imagecolorallocate($whiteimage, 255, 255, 255);
535 535
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
536 536
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
537
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
537
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
538 538
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
539 539
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
540 540
         ob_start();
@@ -584,9 +584,9 @@  discard block
 block discarded – undo
584 584
                 $message = "Your configuration appears to be fine.";
585 585
                 break;
586 586
             default:
587
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
587
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
588 588
         }
589
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
589
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
590 590
         foreach ($test->out as $testValue) {
591 591
             foreach ($testValue as $o) {
592 592
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
core/common/OutsideComm.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $mail->WordWrap = 72;
83 83
         $mail->isHTML(FALSE);
84 84
         $mail->CharSet = 'UTF-8';
85
-        $configuredFrom = \config\Master::APPEARANCE['from-mail'] . "";
85
+        $configuredFrom = \config\Master::APPEARANCE['from-mail']."";
86 86
         $mail->From = $configuredFrom;
87 87
 // are we fancy? i.e. S/MIME signing?
88 88
         if (isset(\config\Master::MAILSETTINGS['certfilename'], \config\Master::MAILSETTINGS['keyfilename'], \config\Master::MAILSETTINGS['keypass'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
124 124
             return OutsideComm::MAILDOMAIN_NO_MX;
125 125
         }
126
-        $loggerInstance->debug(5, "Domain: $domain MX: " . /** @scrutinizer ignore-type */ print_r($mx, TRUE));
126
+        $loggerInstance->debug(5, "Domain: $domain MX: "./** @scrutinizer ignore-type */ print_r($mx, TRUE));
127 127
         // create a pool of A and AAAA records for all the MXes
128 128
         $ipAddrs = [];
129 129
         foreach ($mx as $onemx) {
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $ipAddrs[] = $oneipv4['ip'];
134 134
             }
135 135
             foreach ($v6list as $oneipv6) {
136
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
136
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
137 137
             }
138 138
         }
139 139
         if (count($ipAddrs) == 0) {
140 140
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
141 141
             return OutsideComm::MAILDOMAIN_NO_HOST;
142 142
         }
143
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . /** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
143
+        $loggerInstance->debug(5, "Domain: $domain Addrs: "./** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
144 144
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
145 145
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
146 146
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
194 194
             case 'Nexmo':
195 195
                 // taken from https://docs.nexmo.com/messaging/sms-api
196
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
196
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
197 197
                                 [
198 198
                                     'api_key' => \config\ConfAssistant::SMSSETTINGS['username'],
199 199
                                     'api_secret' => \config\ConfAssistant::SMSSETTINGS['password'],
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
220 220
                     return OutsideComm::SMS_NOTSENT;
221 221
                 }
222
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
222
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
223 223
 
224 224
                 $totalFailures = 0;
225 225
                 foreach ($decoded_response['messages'] as $message) {
226 226
                     if ($message['status'] == 0) {
227
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
227
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
228 228
                     } else {
229
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
229
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
230 230
                         $totalFailures++;
231 231
                     }
232 232
                 }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             $proto = "https://";
296 296
         }
297 297
         // then, send out the mail
298
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
298
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
299 299
         // default means we don't have a Reply-To.
300 300
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
301 301
 
@@ -303,8 +303,8 @@  discard block
 block discarded – undo
303 303
             // see if we are supposed to add a custom message
304 304
             $customtext = $federation->getAttributes('fed:custominvite');
305 305
             if (count($customtext) > 0) {
306
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
307
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
306
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
307
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
308 308
             }
309 309
             // and add Reply-To already now
310 310
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
         }
321 321
         $productname = \config\Master::APPEARANCE['productname'];
322 322
         $consortium = \config\ConfAssistant::CONSORTIUM['display_name'];
323
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72) . "\n\n" .
324
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
325
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72) . "\n\n" .
326
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/\n\n" .
327
-                _("and enter the invitation token") . "\n\n" .
328
-                $newtoken . "\n\n$replyToMessage\n\n" .
329
-                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" .
330
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72) . "\n\n" .
323
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72)."\n\n".
324
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
325
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72)."\n\n".
326
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/\n\n".
327
+                _("and enter the invitation token")."\n\n".
328
+                $newtoken."\n\n$replyToMessage\n\n".
329
+                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n".
330
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72)."\n\n".
331 331
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), $consortium);
332 332
 
333 333
 
334 334
 // who to whom?
335
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
335
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
336 336
 
337 337
         if (isset(\config\Master::APPEARANCE['invitation-bcc-mail']) && \config\Master::APPEARANCE['invitation-bcc-mail'] !== NULL) {
338 338
             $mail->addBCC(\config\Master::APPEARANCE['invitation-bcc-mail']);
Please login to merge, or discard this patch.
core/common/Entity.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function __construct()
111 111
     {
112 112
         $this->loggerInstance = new Logging();
113
-        $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n");
113
+        $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n");
114 114
         $this->languageInstance = new Language();
115 115
         Entity::intoThePotatoes("core");
116 116
         // some config elements are displayable. We need some dummies to 
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $dummy_organisation2a = _("organization");
130 130
         $dummy_organisation3 = _("entity");
131 131
         // and do something useless with the strings so that there's no "unused" complaint
132
-        if (strlen($dummy_NRO . $dummy_inst1 . $dummy_inst2 . $dummy_inst3 . $dummy_hotspot1 . $dummy_hotspot2 . $dummy_hotspot3 . $dummy_organisation1 . $dummy_organisation2 . $dummy_organisation2a . $dummy_organisation3) < 0) {
132
+        if (strlen($dummy_NRO.$dummy_inst1.$dummy_inst2.$dummy_inst3.$dummy_hotspot1.$dummy_hotspot2.$dummy_hotspot3.$dummy_organisation1.$dummy_organisation2.$dummy_organisation2a.$dummy_organisation3) < 0) {
133 133
             throw new Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole.");
134 134
         }
135
-        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . "";
136
-        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution'] . "";
137
-        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'] . "";
138
-        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] . "";
135
+        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation']."";
136
+        $xyzVariableInst = \config\ConfAssistant::CONSORTIUM['nomenclature_institution']."";
137
+        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot']."";
138
+        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant']."";
139 139
         Entity::$nomenclature_fed = _($xyzVariableFed);
140 140
         Entity::$nomenclature_inst = _($xyzVariableInst);
141 141
         Entity::$nomenclature_hotspot = _($xyzVariableHotspot);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function __destruct()
153 153
     {
154
-        (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n");
154
+        (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n");
155 155
     }
156 156
 
157 157
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1)
185 185
     {
186 186
         $loggerInstance = new Logging();
187
-        $name = md5(time() . rand());
187
+        $name = md5(time().rand());
188 188
         $path = ROOT;
189 189
         switch ($purpose) {
190 190
             case 'silverbullet':
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             default:
203 203
                 throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n");
204 204
         }
205
-        $tmpDir = $path . '/' . $name;
205
+        $tmpDir = $path.'/'.$name;
206 206
         $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n");
207 207
         if (!mkdir($tmpDir, 0700, true)) {
208 208
             if ($failIsFatal) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function rrmdir($dir)
225 225
     {
226
-        foreach (glob($dir . '/*') as $file) {
226
+        foreach (glob($dir.'/*') as $file) {
227 227
             if (is_dir($file)) {
228 228
                 Entity::rrmdir($file);
229 229
             } else {
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
         }
250 250
         // these substr() are guaranteed to yield actual string data, as the
251 251
         // base string is an MD5 hash - has sufficient length
252
-        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-';
253
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-';
254
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-';
255
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-';
252
+        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-';
253
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-';
254
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-';
255
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-';
256 256
         $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12);
257
-        return $prefix . $uuid;
257
+        return $prefix.$uuid;
258 258
     }
259 259
 
260 260
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         for ($i = count($trace); $i--; $i > 0) {
296 296
             if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) {
297 297
                 if ($showTrace) {
298
-                    echo "FOUND caller: " . /** @scrutinizer ignore-type */ print_r($trace[$i], true) . " - class is " . $trace[$i]['class'];
298
+                    echo "FOUND caller: "./** @scrutinizer ignore-type */ print_r($trace[$i], true)." - class is ".$trace[$i]['class'];
299 299
                 }
300 300
                 $caller = $trace[$i];
301 301
                 break;
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
         // otherwise, on the filename relative to ROOT
306 306
         $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT));
307 307
         if ($showTrace === TRUE) {
308
-            echo "<pre>" . /** @scrutinizer ignore-type */ print_r($trace, true) . "</pre>";
309
-            echo "CLASS = " . $myName . "<br/>";
308
+            echo "<pre>"./** @scrutinizer ignore-type */ print_r($trace, true)."</pre>";
309
+            echo "CLASS = ".$myName."<br/>";
310 310
         }
311 311
         if (preg_match("/diag/", $myName) == 1) {
312 312
             $ret = "diagnostics";
@@ -340,10 +340,10 @@  discard block
 block discarded – undo
340 340
         if ($catalogue === NULL) {
341 341
             $theCatalogue = Entity::determineOwnCatalogue($trace);
342 342
             textdomain($theCatalogue);
343
-            bindtextdomain($theCatalogue, ROOT . "/translation/");
343
+            bindtextdomain($theCatalogue, ROOT."/translation/");
344 344
         } else {
345 345
             textdomain($catalogue);
346
-            bindtextdomain($catalogue, ROOT . "/translation/");
346
+            bindtextdomain($catalogue, ROOT."/translation/");
347 347
         }
348 348
     }
349 349
 
Please login to merge, or discard this patch.