Passed
Push — master ( 731f35...70cda0 )
by Maja
06:41
created
web/admin/overview_idp.php 1 patch
Spacing   +27 added lines, -27 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
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureInst));
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
     $readonly = \config\Master::DB['INST']['readonly'];
85 85
     $profiles_for_this_idp = $my_inst->listProfiles();
86 86
     if (count($profiles_for_this_idp) == 0) { // no profiles yet.
87
-        echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>";
87
+        echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>";
88 88
     }
89 89
     if (count($profiles_for_this_idp) > 0) { // no profiles yet.
90
-        echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>";
90
+        echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>";
91 91
     }
92 92
 // if there is one profile and it is of type Silver Bullet, display a very
93 93
 // simple widget with just a "Manage" button
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                             echo _("Information needed!");
114 114
                             echo "<ul style='margin:1px'>";
115 115
                             foreach ($completeness as $missing_attrib) {
116
-                                echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
116
+                                echo "<li>".$uiElements->displayName($missing_attrib)."</li>";
117 117
                             }
118 118
                             echo "</ul>";
119 119
                             echo "</div>";
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                         if ($readonly === FALSE) {
128 128
                             ?>
129 129
                             <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&amp;profile_id=<?php echo $profile_list->identifier; ?>' method='POST'>
130
-                                <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
130
+                                <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
131 131
                             </form>
132 132
                             <?php
133 133
                         }
@@ -159,21 +159,21 @@  discard block
 block discarded – undo
159 159
                         $has_overrides = TRUE;
160 160
                     }
161 161
                 }
162
-                $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
162
+                $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>";
163 163
                 $typelist = $profile_list->getEapMethodsinOrderOfPreference();
164 164
                 $allcomplete = TRUE;
165 165
                 foreach ($typelist as $eaptype) {
166 166
                     $buffer_eaptypediv .= $eaptype->getPrintableRep();
167 167
                     $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype);
168 168
                     if ($completeness === true) {
169
-                        $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
169
+                        $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>";
170 170
                     } else {
171 171
                         $buffer_eaptypediv .= " <div class='notacceptable'>";
172 172
                         $buffer_eaptypediv .= _("Information needed!");
173 173
                         if (is_array($completeness)) {
174 174
                             $buffer_eaptypediv .= "<ul style='margin:1px'>";
175 175
                             foreach ($completeness as $missing_attrib) {
176
-                                $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
176
+                                $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>";
177 177
                             }
178 178
                             $buffer_eaptypediv .= "</ul>";
179 179
                         }
@@ -185,12 +185,12 @@  discard block
 block discarded – undo
185 185
                     foreach ($attribs as $attrib) {
186 186
                         if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
187 187
                             $justOnce = TRUE;
188
-                            $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
188
+                            $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>";
189 189
                         }
190 190
                     }
191 191
                     $buffer_eaptypediv .= "<br/>";
192 192
                 }
193
-                $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>";
193
+                $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>";
194 194
 
195 195
                 $buffer_headline .= "<span style='float:right;'>";
196 196
                 $readiness = $profile_list->readinessLevel();
@@ -222,18 +222,18 @@  discard block
 block discarded – undo
222 222
                     if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") {
223 223
                         $diagUrl = "../diag/";
224 224
                     } else {
225
-                        $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/";
225
+                        $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/";
226 226
                     }
227
-                    echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
227
+                    echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
228 228
                               <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/>
229
-                              <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . ">
230
-                                  " . _("Check realm reachability") . "
229
+                              <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'").">
230
+                                  " . _("Check realm reachability")."
231 231
                               </button>
232 232
                           </form>";
233 233
                 }
234 234
                 echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
235
-                              <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled'  title='" . _("You have not fully configured any supported EAP types!") . "'") . ">
236
-                                  " . _("Installer Fine-Tuning and Download") . "
235
+                              <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled'  title='"._("You have not fully configured any supported EAP types!")."'").">
236
+                                  " . _("Installer Fine-Tuning and Download")."
237 237
                               </button>
238 238
                  </form>
239 239
                    </div>";
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
                     echo "        <div class='buttongroupprofilebox' style='clear:both;'>
243 243
                           <form action='edit_profile.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
244 244
                                <hr/>
245
-                               <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button>
245
+                               <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button>
246 246
                           </form>
247 247
                           <form action='edit_profile_result.php?inst_id=$my_inst->identifier&amp;profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'>
248
-                               <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\">
249
-                                   " . _("Delete") . "
248
+                               <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\">
249
+                                   " . _("Delete")."
250 250
                                </button>
251 251
                            </form>
252 252
                       </div>";
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 // dummy width to keep a little distance
256 256
                 echo "<div style='width:20px;'></div>";
257 257
                 if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) {
258
-                    $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier;
259
-                    echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>";
260
-                    $displayurl = $idpLevelUrl . "&amp;profile=" . $profile_list->identifier;
261
-                    $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier;
258
+                    $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier;
259
+                    echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>";
260
+                    $displayurl = $idpLevelUrl."&amp;profile=".$profile_list->identifier;
261
+                    $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier;
262 262
                     $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([
263 263
                                 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG,
264 264
                                 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H,
@@ -270,16 +270,16 @@  discard block
 block discarded – undo
270 270
                     if (empty($rawQr)) {
271 271
                         throw new Exception("Something went seriously wrong during QR code generation!");
272 272
                     }
273
-                    $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
273
+                    $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
274 274
                     $size = getimagesize($uri);
275
-                    echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>";
275
+                    echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>";
276 276
 
277 277
                     //echo "<nobr>$displayurl</nobr></a>";
278 278
                     echo "<p>$displayurl</p></a>";
279 279
                     echo "</div>";
280 280
                     // dummy width to keep a little distance
281 281
                     echo "<div style='width:20px;'></div>";
282
-                    echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>";
282
+                    echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>";
283 283
                     $stats = $profile_list->getUserDownloadStats();
284 284
                     foreach ($stats as $dev => $count) {
285 285
                         echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>";
Please login to merge, or discard this patch.
devices/PP_OSU_XML/DevicePPOSUXML.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
         <NodeName>AAAServerTrustRoot</NodeName>';
93 93
         foreach ($this->attributes['internal:CAs'][0] as $oneCert) {
94 94
             $retval .= '<Node>
95
-                         <NodeName>' . $oneCert['uuid'] . '</NodeName>
95
+                         <NodeName>' . $oneCert['uuid'].'</NodeName>
96 96
                              <Node>
97 97
                                <NodeName>CertSHA256Fingerprint</NodeName>
98
-                               <Value>' . $oneCert['sha256'] . '</Value>
98
+                               <Value>' . $oneCert['sha256'].'</Value>
99 99
                              </Node>
100 100
                        </Node>
101 101
                   ';
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $now = new \DateTime();
115 115
         return '<Node>
116 116
           <NodeName>CreationDate</NodeName>
117
-          <Value>' . $now->format("Y-m-d") . "T" . $now->format("H:i:s") . "Z" . '</Value>
117
+          <Value>' . $now->format("Y-m-d")."T".$now->format("H:i:s")."Z".'</Value>
118 118
         </Node>';
119 119
     }
120 120
 
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         <NodeName>HomeSP</NodeName>
129 129
         <Node>
130 130
           <NodeName>FriendlyName</NodeName>
131
-          <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']) . '</Value>
131
+          <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']).'</Value>
132 132
         </Node>
133 133
         <Node>
134 134
           <NodeName>FQDN</NodeName>
135
-          <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */ . '</Value>
135
+          <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */.'</Value>
136 136
         </Node>
137 137
         <Node>
138 138
           <NodeName>RoamingConsortiumOI</NodeName>
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 $oiList .= ",";
149 149
             }
150 150
         }
151
-        $retval .= $oiList . '</Value>
151
+        $retval .= $oiList.'</Value>
152 152
         </Node>
153 153
       </Node>
154 154
 ';
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         <NodeName>Credential</NodeName>
166 166
         <Node>
167 167
               <NodeName>Realm</NodeName>
168
-              <Value>' . $this->attributes['internal:realm'][0] . '</Value>
168
+              <Value>' . $this->attributes['internal:realm'][0].'</Value>
169 169
             </Node>';
170 170
         /* the example file I got did not include CreationDate, so omit it
171 171
          * 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             </Node>
181 181
             <Node>
182 182
               <NodeName>CertSHA256Fingerprint</NodeName>
183
-              <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */ . '</Value>
183
+              <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */.'</Value>
184 184
             </Node>
185 185
           </Node>
186 186
       </Node>
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         // foresee signing.
299 299
         // but if they ever change their mind, we are prepared
300 300
 
301
-        $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null");
301
+        $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null");
302 302
         if ($outputFromSigning === FALSE) {
303 303
             $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n");
304 304
         }
Please login to merge, or discard this patch.
devices/linux/DeviceLinuxSh.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
         }
202 202
 
203 203
         if (!empty($this->attributes['internal:realm'][0])) {
204
-           $config['USER_REALM'] = $this->attributes['internal:realm'][0];
204
+            $config['USER_REALM'] = $this->attributes['internal:realm'][0];
205 205
         }
206 206
 
207 207
         if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
      *
46 46
      */
47 47
     public function writeInstaller() {
48
-        $installerPath = $this->installerBasename . ".sh";
48
+        $installerPath = $this->installerBasename.".sh";
49 49
         $this->copyFile("eduroam_linux_main.sh", $installerPath);
50 50
 
51
-        if ( !file_exists($installerPath) ) {
51
+        if (!file_exists($installerPath)) {
52 52
             throw new Exception('File not found.');
53 53
         }
54 54
 
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
             fseek($installer, 0, SEEK_END);
62 62
             $this->writeMessages($installer);
63 63
             $this->writeConfigVars($installer);
64
-            fwrite($installer, 'printf -v INIT_INFO "$INIT_INFO_TMP" "$ORGANISATION" "$EMAIL" "$URL"' . "\n");
65
-            fwrite($installer, 'printf -v INIT_CONFIRMATION "$INIT_CONFIRMATION_TMP" "$ORGANISATION"' . "\n\n");
66
-            fwrite($installer, 'main "$@"; exit' . "\n");
64
+            fwrite($installer, 'printf -v INIT_INFO "$INIT_INFO_TMP" "$ORGANISATION" "$EMAIL" "$URL"'."\n");
65
+            fwrite($installer, 'printf -v INIT_CONFIRMATION "$INIT_CONFIRMATION_TMP" "$ORGANISATION"'."\n\n");
66
+            fwrite($installer, 'main "$@"; exit'."\n");
67 67
         } catch (Exception $e) {
68
-            echo 'Error message: ' .$e->getMessage();
68
+            echo 'Error message: '.$e->getMessage();
69 69
         } finally {
70 70
             fclose($installer);
71 71
             return($installerPath);
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
         $out .= "<p>";
88 88
         if ($ssidCount > 1) {
89 89
             if ($ssidCount > 2) {
90
-                $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " ";
90
+                $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." ";
91 91
             } else {
92
-                $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " ";
92
+                $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." ";
93 93
             }
94 94
             $iterator = 0;
95 95
             foreach ($this->attributes['internal:SSID'] as $ssid => $v) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @return void
127 127
      */
128 128
     private function writeConfigLine($file, $name, $text) {
129
-        $out = $name . '="' . $text . '"' . "\n";
129
+        $out = $name.'="'.$text.'"'."\n";
130 130
 //        fwrite($file, wordwrap($out, 70, "\n"));
131 131
         fwrite($file, $out);
132 132
 
@@ -209,18 +209,18 @@  discard block
 block discarded – undo
209 209
         }
210 210
 
211 211
         if ($outerId !== NULL) {
212
-            $configRaw['ANONYMOUS_IDENTITY'] = '"' . $outerId . '"';
212
+            $configRaw['ANONYMOUS_IDENTITY'] = '"'.$outerId.'"';
213 213
         }
214 214
 
215 215
         if (!empty($this->attributes['internal:realm'][0])) {
216 216
            $config['USER_REALM'] = $this->attributes['internal:realm'][0];
217 217
         }
218 218
 
219
-        if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
219
+        if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
220 220
             $configRaw['HINT_USER_INPUT'] = true;
221 221
         }
222 222
 
223
-        if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
223
+        if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
224 224
             $configRaw['VERIFY_USER_REALM_INPUT'] = true;
225 225
         } else {
226 226
             $configRaw['VERIFY_USER_REALM_INPUT'] = false;
@@ -231,19 +231,19 @@  discard block
 block discarded – undo
231 231
         }
232 232
 
233 233
         foreach ($configRaw as $name => $value) {
234
-            fwrite($file, $name ."=". $value . "\n");
234
+            fwrite($file, $name."=".$value."\n");
235 235
         }
236 236
 
237 237
         if ($tou === '') {
238 238
             fwrite($file, "TOU=\"\"\n");
239 239
         } else {
240
-            fwrite($file, "TOU=\"" . $tou . "\"\n");
240
+            fwrite($file, "TOU=\"".$tou."\"\n");
241 241
         }
242 242
 
243
-        fwrite($file, "CA_CERTIFICATE=\"" . $this->mkCAfile() . "\"\n");
243
+        fwrite($file, "CA_CERTIFICATE=\"".$this->mkCAfile()."\"\n");
244 244
         $sbUserFile = $this->mkSbUserFile();
245 245
         if ($sbUserFile !== '') {
246
-            fwrite($file, "SB_USER_FILE=\"" . $sbUserFile . "\"\n");
246
+            fwrite($file, "SB_USER_FILE=\"".$sbUserFile."\"\n");
247 247
         }
248 248
     }
249 249
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             }
296 296
             $out .= "'DNS:$oneServer'";
297 297
         }
298
-        return "(" . $out. ")";
298
+        return "(".$out.")";
299 299
     }
300 300
 
301 301
     /**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
         foreach ($ssids as $ssid => $cipher) {
310 310
             $outArray[] = "'$ssid'";
311 311
         }
312
-        return '(' . implode(' ', $outArray) . ')';
312
+        return '('.implode(' ', $outArray).')';
313 313
     }
314 314
 
315 315
     /**
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
                 $outArray[] = "'$ssid'";
326 326
             }
327 327
         }
328
-        return '(' . implode(', ', $outArray) . ')';
328
+        return '('.implode(', ', $outArray).')';
329 329
     }
330 330
 
331 331
     /**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      *
334 334
      * @return string
335 335
      */
336
-    private function mkCAfile(){
336
+    private function mkCAfile() {
337 337
         $out = '';
338 338
         $cAlist = $this->attributes['internal:CAs'][0];
339 339
         foreach ($cAlist as $oneCa) {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
      */
350 350
     private function mkIntro() {
351 351
         \core\common\Entity::intoThePotatoes();
352
-        $out = _("This installer has been prepared for %s") . '\n\n' . _("More information and comments:") . '\n\nE-Mail: %s\nWWW: %s\n\n' .
352
+        $out = _("This installer has been prepared for %s").'\n\n'._("More information and comments:").'\n\nE-Mail: %s\nWWW: %s\n\n'.
353 353
             _("Installer created with software from the GEANT project.");
354 354
         \core\common\Entity::outOfThePotatoes();
355 355
         return $out;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -203,8 +203,7 @@
 block discarded – undo
203 203
 
204 204
         if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') {
205 205
             $configRaw['USE_OTHER_TLS_ID'] = true;
206
-        }
207
-        else {
206
+        } else {
208 207
             $configRaw['USE_OTHER_TLS_ID'] = false;
209 208
         }
210 209
 
Please login to merge, or discard this patch.
web/admin/overview_certificates.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();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert
82 82
             $status = $oneCert['STATUS'];
83 83
             if ($status == "ISSUED") {
84
-                $status = "<span onclick='alert(\"".str_replace("\n","\\n",$oneCert['CERT'])."\");'>$status</span>";
84
+                $status = "<span onclick='alert(\"".str_replace("\n", "\\n", $oneCert['CERT'])."\");'>$status</span>";
85 85
             }
86 86
             echo "<tr><td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td></tr>";
87 87
         }
Please login to merge, or discard this patch.
devices/ms/DeviceW8W10.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
  * @author Tomasz Wolniewicz <[email protected]>
36 36
  * @package ModuleWriting
37 37
  */
38
- class DeviceW8W10 extends WindowsCommon 
39
- {
38
+    class DeviceW8W10 extends WindowsCommon 
39
+    {
40 40
     final public function __construct() {
41 41
         parent::__construct();
42 42
         \core\common\Entity::intoThePotatoes();
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             foreach ($this->attributes['internal:consortia'] as $oneCons) {
98 98
                 $knownOiName = array_search($oneCons, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']);
99 99
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
100
-                    $knownOiName = $this->attributes['general:instname'][0] . " "._("Roaming Partner") . " $roamingPartner";
100
+                    $knownOiName = $this->attributes['general:instname'][0]." "._("Roaming Partner")." $roamingPartner";
101 101
                     $roamingPartner++;
102 102
                 }
103 103
                 $ssid = 'cat-passpoint-profile';
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
         if (empty($this->attributes['internal:realm'][0])) {
150 150
             $retval .= \config\ConfAssistant::CONSORTIUM['interworking-domainname-fallback'];
151 151
         } else {
152
-            $retval .=  $this->attributes['internal:realm'][0];
152
+            $retval .= $this->attributes['internal:realm'][0];
153 153
         }
154 154
         $retval .= '</DomainName>';
155
-        $retval .= '<RoamingConsortium><OUI>' . $oi .
155
+        $retval .= '<RoamingConsortium><OUI>'.$oi.
156 156
             '</OUI></RoamingConsortium>';
157
-        $retval .=  '</Hotspot2>';
157
+        $retval .= '</Hotspot2>';
158 158
         return($retval);
159 159
     }
160 160
     
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
         $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
164 164
 <EapMethod>
165 165
 ';
166
-        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' .
167
-                $this->selectedEap["OUTER"] . '</Type>
166
+        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'.
167
+                $this->selectedEap["OUTER"].'</Type>
168 168
 <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
169 169
 <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
170
-<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId>
170
+<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId>
171 171
 </EapMethod>
172 172
 ';
173 173
         return($profileFileCont);
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
 <eapTls:ServerValidation>
179 179
 <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation>
180 180
 ';
181
-        $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>';
181
+        $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>';
182 182
         foreach ($this->caArray as $certAuthority) {
183 183
             if ($certAuthority['root']) {
184
-                $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n";
184
+                $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n";
185 185
             }
186 186
         }
187 187
         $profileFileCont .= '</eapTls:ServerValidation>
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
         $profileFileCont = '
194 194
         <ServerValidation>
195 195
 ';
196
-        $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> ';
196
+        $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> ';
197 197
         foreach ($this->caArray as $certAuthority) {
198 198
             if ($certAuthority['root']) {
199
-                $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n";
199
+                $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n";
200 200
             }
201 201
         }
202 202
         $profileFileCont .= '<DisablePrompt>true</DisablePrompt>
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
         $profileFileCont = '
229 229
         <ServerValidation>
230 230
 <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation>
231
-<ServerNames>' . $this->servers . '</ServerNames>';
231
+<ServerNames>' . $this->servers.'</ServerNames>';
232 232
         foreach ($this->caArray as $certAuthority) {
233 233
             if ($certAuthority['root']) {
234
-                $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n";
234
+                $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n";
235 235
             }
236 236
         }
237 237
         $profileFileCont .= '</ServerValidation>
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         if ($this->useAnon) {
288 288
             $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy>
289 289
 ';
290
-            $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>
290
+            $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>
291 291
                 ';
292 292
         } else {
293 293
             $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy>
@@ -304,10 +304,10 @@  discard block
 block discarded – undo
304 304
         $profileFileCont = '
305 305
 <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
306 306
 <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata">
307
-<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID">
307
+<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID">
308 308
 
309 309
 <ProviderInfo>
310
-<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName>
310
+<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName>
311 311
 </ProviderInfo>
312 312
 <AuthenticationMethods>
313 313
 <AuthenticationMethod>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             if ($this->outerUser == '') {
320 320
                 $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>';
321 321
             } else {
322
-                $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>';
322
+                $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>';
323 323
             }
324 324
         }
325 325
         $profileFileCont .= '</ClientSideCredential>
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $profileFileCont .= $this->glTtlsServerValidation();
328 328
         $profileFileCont .= '
329 329
 <InnerAuthenticationMethod>
330
-<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod>
330
+<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod>
331 331
 </InnerAuthenticationMethod>
332 332
 <VendorSpecific>
333 333
 <SessionResumption>false</SessionResumption>
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 <UseWinLogonCredentials>false</UseWinLogonCredentials>
359 359
 </EapType>
360 360
 </Eap>
361
-<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks>
361
+<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks>
362 362
 <RequireCryptoBinding>false</RequireCryptoBinding>
363 363
 ';
364 364
         if ($this->useAnon) {
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 $profileFileCont .= '<AnonymousUserName/>
371 371
 ';
372 372
             } else {
373
-                $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName>
373
+                $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName>
374 374
                 ';
375 375
             }
376 376
             $profileFileCont .= '</IdentityPrivacy>
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     private function prepareEapConfig() {
401 401
         if ($this->useAnon) {
402 402
             $this->outerUser = $this->attributes['internal:anon_local_value'][0];
403
-            $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0];
403
+            $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0];
404 404
         }
405 405
 
406 406
         $profileFileCont = $this->eapConfigHeader();
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             default:
426 426
                 break;
427 427
         }
428
-        return(['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']);
428
+        return(['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']);
429 429
     }
430 430
 
431 431
     /**
@@ -443,10 +443,10 @@  discard block
 block discarded – undo
443 443
     private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $oi = '') {
444 444
         $profileFileCont = '<?xml version="1.0"?>
445 445
 <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
446
-<name>' . $wlanProfileName . '</name>
446
+<name>' . $wlanProfileName.'</name>
447 447
 <SSIDConfig>
448 448
 <SSID>
449
-<name>' . $ssid . '</name>
449
+<name>' . $ssid.'</name>
450 450
 </SSID>
451 451
 <nonBroadcast>true</nonBroadcast>
452 452
 </SSIDConfig>';
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 <MSM>
459 459
 <security>
460 460
 <authEncryption>
461
-<authentication>' . $auth . '</authentication>
462
-<encryption>' . $encryption . '</encryption>
461
+<authentication>' . $auth.'</authentication>
462
+<encryption>' . $encryption.'</encryption>
463 463
 <useOneX>true</useOneX>
464 464
 </authEncryption>
465 465
 ';
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             mkdir('w8');
487 487
         }
488 488
         $xmlFname = "w8/wlan_prof-$profileNumber.xml";
489
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
489
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
490 490
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
491 491
         $hs20 = $oi == '' ? 0 : 1;
492 492
         return("\"$wlanProfileName\" \"$encryption\" $hs20");
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
             mkdir('w8');
515 515
         }
516 516
         $xmlFname = "w8/lan_prof.xml";
517
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
517
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
518 518
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
519 519
     }
520 520
 
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
         }
536 536
         foreach ($caArray as $certAuthority) {
537 537
             $store = $certAuthority['root'] ? "root" : "ca";
538
-            $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n";
538
+            $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n";
539 539
         }
540 540
         fwrite($fileHandleCerts, $fcontentsCerts);
541 541
         fclose($fileHandleCerts);
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     private function writeMainNSH($eap, $attr) {
545 545
         $this->loggerInstance->debug(4, "writeMainNSH");
546 546
         $this->loggerInstance->debug(4, $attr);
547
-        $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n");
547
+        $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n");
548 548
         $fcontents = "!define W8\n";
549 549
         if ($this->device_id == 'w10') {
550 550
             $fcontents .= "!define W10\n";
@@ -574,8 +574,8 @@  discard block
 block discarded – undo
574 574
         if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
575 575
             $fcontents .= "!define SILVERBULLET\n";
576 576
         }
577
-        $fcontents .= '!define ' . $eapStr;
578
-        $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"';
577
+        $fcontents .= '!define '.$eapStr;
578
+        $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"';
579 579
         $fcontents .= $this->writeNsisDefines($attr);
580 580
         file_put_contents('main.nsh', $fcontents);
581 581
     }
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -774,7 +774,7 @@
 block discarded – undo
774 774
                             \core\common\Entity::$nomenclature_inst, 
775 775
                             count($this->CAsAccountedFor)+1, 
776 776
                             ($ca['root'] ? _("Root") : _("Intermediate"))) . 
777
-              "</string>
777
+                "</string>
778 778
                <key>PayloadIdentifier</key>
779 779
                <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
780 780
                <key>PayloadOrganization</key>
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -179,15 +179,15 @@  discard block
 block discarded – undo
179 179
       <key>PayloadDescription</key>
180 180
          <string>$tagline</string>
181 181
       <key>PayloadDisplayName</key>
182
-         <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string>
182
+         <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string>
183 183
       <key>PayloadIdentifier</key>
184
-         <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
184
+         <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
185 185
       <key>PayloadOrganization</key>
186
-         <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string>
186
+         <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string>
187 187
       <key>PayloadType</key>
188 188
          <string>Configuration</string>
189 189
       <key>PayloadUUID</key>
190
-         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string>
190
+         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string>
191 191
       <key>PayloadVersion</key>
192 192
          <integer>1</integer>";
193 193
         \core\common\Entity::outOfThePotatoes();
@@ -219,16 +219,16 @@  discard block
 block discarded – undo
219 219
     {
220 220
         \core\common\Entity::intoThePotatoes();
221 221
         if (isset($this->attributes['support:info_file'])) {
222
-            return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
222
+            return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST;
223 223
         }
224 224
         if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) {
225 225
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
226 226
                 /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username!
227
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
227
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
228 228
                 \core\common\Entity::outOfThePotatoes();
229 229
                 return $retval;
230 230
             }
231
-            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST;
231
+            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST;
232 232
             \core\common\Entity::outOfThePotatoes();
233 233
             return $retval;
234 234
         }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         // also escape htmlspecialchars
252 252
         // not all names and profiles have a name, so be prepared
253 253
 
254
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
254
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
255 255
 
256 256
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
257 257
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
         file_put_contents('installer_profile', $outputXml);
295 295
 
296
-        $fileName = $this->installerBasename . '.mobileconfig';
296
+        $fileName = $this->installerBasename.'.mobileconfig';
297 297
 
298 298
         if (!$this->sign) {
299 299
             rename("installer_profile", $fileName);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             return $fileName;
302 302
         }
303 303
         // still here? Then we are signing.
304
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
304
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
305 305
         if ($signing === FALSE) {
306 306
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
307 307
         }
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
         \core\common\Entity::intoThePotatoes();
321 321
         $ssidCount = count($this->attributes['internal:SSID']);
322 322
         $certCount = count($this->attributes['internal:CAs'][0]);
323
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
323
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
324 324
         $out .= "<p>";
325 325
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
326 326
         $out .= "<ul>";
327
-        $out .= "<li>" . _("to install the profile") . "</li>";
328
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
327
+        $out .= "<li>"._("to install the profile")."</li>";
328
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
329 329
         if ($certCount > 1) {
330
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
330
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
331 331
         }
332 332
         $out .= "</li>";
333
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
333
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
334 334
         if ($ssidCount > 1) {
335
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
335
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
336 336
         }
337 337
         $out .= "</li>";
338 338
         $out .= "</ul>";
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
                <key>ServiceProviderRoamingEnabled</key>
373 373
                <true/>
374 374
                <key>DisplayedOperatorName</key>
375
-               <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>";
375
+               <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>";
376 376
         // if we don't know the realm, omit the entire DomainName key
377 377
         if (isset($this->attributes['internal:realm'])) {
378 378
             $retval .= "<key>DomainName</key>
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $retval .= "                <key>RoamingConsortiumOIs</key>
385 385
                 <array>";
386 386
 
387
-        $retval .= "<string>" . strtoupper($consortiumOi) . "</string>";
387
+        $retval .= "<string>".strtoupper($consortiumOi)."</string>";
388 388
 
389 389
         $retval .= "</array>";
390 390
         // this is an undocumented value found on the net. Does it do something useful?
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
                   <dict>
422 422
                       <key>AcceptEAPTypes</key>
423 423
                          <array>
424
-                            <integer>" . $eapType['OUTER'] . "</integer>
424
+                            <integer>" . $eapType['OUTER']."</integer>
425 425
                          </array>
426 426
                       <key>EAPFASTProvisionPAC</key>
427 427
                             <true />
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 ";
435 435
         if ($realm !== NULL) {
436 436
             $retval .= "<key>OuterIdentity</key>
437
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
437
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
438 438
 ";
439 439
         }
440 440
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
         $retval .= "
459 459
                          </array>";
460 460
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
461
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
461
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
462 462
         }
463 463
         $retval .= "
464 464
                       <key>TTLSInnerAuthentication</key>
465
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string>
465
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2")."</string>
466 466
                    </dict>";
467 467
         return $retval;
468 468
     }
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
             // characters are still reversed, invert on use!
483 483
             $buffer .= "<string>Manual</string>
484 484
                   <key>ProxyServer</key>
485
-                  <string>" . strrev($serverAndPort[1]) . "</string>
485
+                  <string>" . strrev($serverAndPort[1])."</string>
486 486
                   <key>ProxyServerPort</key>
487
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
487
+                  <integer>" . strrev($serverAndPort[0])."</integer>
488 488
                   <key>ProxyPACFallbackAllowed</key>
489 489
                   <false/>";
490 490
         } else {
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                     throw new Exception("SSID must be a string!");
514 514
                 }
515 515
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
516
-                $payloadIdentifier = "wifi." . $this->serial;
516
+                $payloadIdentifier = "wifi.".$this->serial;
517 517
                 $payloadShortName = sprintf(_("SSID %s"), $escapedSSID);
518 518
                 $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID);
519 519
                 $encryptionTypeString = "WPA";
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
                 $payloadIdentifier = "hs20.$toBeConfigured";
544 544
                 $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']);
545 545
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
546
-                    $knownOiName = $this->instName . " "._("Roaming Partner");
546
+                    $knownOiName = $this->instName." "._("Roaming Partner");
547 547
                 }
548 548
                 $payloadShortName = $knownOiName;
549 549
                 $payloadName = _("Passpoint roaming configuration ($knownOiName)");
@@ -565,11 +565,11 @@  discard block
 block discarded – undo
565 565
                <key>PayloadDisplayName</key>
566 566
                   <string>$payloadShortName</string>
567 567
                <key>PayloadIdentifier</key>
568
-                  <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
568
+                  <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
569 569
                <key>PayloadOrganization</key>
570
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
570
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
571 571
                <key>PayloadType</key>
572
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
572
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
573 573
         $retval .= $this->proxySettings();
574 574
         $retval .= $setupModesString;
575 575
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
         }
582 582
         $retval .= "
583 583
                <key>PayloadUUID</key>
584
-                  <string>" . \core\common\Entity::uuid() . "</string>
584
+                  <string>" . \core\common\Entity::uuid()."</string>
585 585
                <key>PayloadVersion</key>
586 586
                   <integer>1</integer>
587 587
                   $wifiNetworkIdentification</dict>";
@@ -611,15 +611,15 @@  discard block
 block discarded – undo
611 611
 	<key>IsHotspot</key>
612 612
 	<false/>
613 613
 	<key>PayloadDescription</key>
614
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string>
614
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string>
615 615
 	<key>PayloadDisplayName</key>
616
-	<string>" . _("Disabled WiFi network") . "</string>
616
+	<string>" . _("Disabled WiFi network")."</string>
617 617
 	<key>PayloadIdentifier</key>
618
-	<string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
618
+	<string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
619 619
 	<key>PayloadType</key>
620 620
 	<string>com.apple.wifi.managed</string>
621 621
 	<key>PayloadUUID</key>
622
-	<string>" . \core\common\Entity::uuid() . "</string>
622
+	<string>".\core\common\Entity::uuid()."</string>
623 623
 	<key>PayloadVersion</key>
624 624
 	<real>1</real>";
625 625
         $retval .= $this->proxySettings();
@@ -698,12 +698,12 @@  discard block
 block discarded – undo
698 698
         $mimeBlob = base64_encode($binaryBlob);
699 699
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
700 700
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
701
-        $retArray = ["block" => "<dict>" .
701
+        $retArray = ["block" => "<dict>".
702 702
             // we don't include the import password. It's displayed on screen, and should be input by the user.
703 703
             // <key>Password</key>
704 704
             //   <string>" . $this->clientCert['password'] . "</string>
705 705
             "<key>PayloadCertificateFileName</key>
706
-                     <string>" . $this->massagedConsortium . ".pfx</string>
706
+                     <string>" . $this->massagedConsortium.".pfx</string>
707 707
                   <key>PayloadContent</key>
708 708
                      <data>
709 709
 $mimeFormatted
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                   <key>PayloadDescription</key>
712 712
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
713 713
                   <key>PayloadDisplayName</key>
714
-                     <string>" . _("eduroam user certificate") . "</string>
714
+                     <string>"._("eduroam user certificate")."</string>
715 715
                   <key>PayloadIdentifier</key>
716 716
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
717 717
                   <key>PayloadType</key>
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
                   <key>PayloadVersion</key>
722 722
                      <integer>1</integer>
723 723
                 </dict>",
724
-            "UUID" => $payloadUUID,];
724
+            "UUID" => $payloadUUID, ];
725 725
         \core\common\Entity::outOfThePotatoes();
726 726
         return $retArray;
727 727
     }
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
         }
740 740
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
741 741
         return "<key>RemovalDate</key>
742
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
742
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
743 743
     }
744 744
 
745 745
     /**
@@ -761,27 +761,27 @@  discard block
 block discarded – undo
761 761
             $stream = "
762 762
             <dict>
763 763
                <key>PayloadCertificateFileName</key>
764
-               <string>" . $ca['uuid'] . ".der</string>
764
+               <string>" . $ca['uuid'].".der</string>
765 765
                <key>PayloadContent</key>
766 766
                <data>
767
-" . $trimmedPem . "</data>
767
+" . $trimmedPem."</data>
768 768
                <key>PayloadDescription</key>
769
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
769
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
770 770
                <key>PayloadDisplayName</key>
771 771
                <string>" . 
772 772
                     /// example: "Identity Provider CA #1 (Root)"
773
-                    sprintf(_("%s CA #%d (%s)" ), 
773
+                    sprintf(_("%s CA #%d (%s)"), 
774 774
                             \core\common\Entity::$nomenclature_inst, 
775
-                            count($this->CAsAccountedFor)+1, 
776
-                            ($ca['root'] ? _("Root") : _("Intermediate"))) . 
775
+                            count($this->CAsAccountedFor) + 1, 
776
+                            ($ca['root'] ? _("Root") : _("Intermediate"))). 
777 777
               "</string>
778 778
                <key>PayloadIdentifier</key>
779
-               <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
779
+               <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
780 780
                <key>PayloadOrganization</key>
781
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
781
+               <string>".$this->massagedConsortium.".1x-config.org</string>
782 782
                <key>PayloadType</key>
783 783
                <string>com.apple.security.root</string>
784
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
784
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
785 785
                <key>PayloadVersion</key>
786 786
                <integer>1</integer>
787 787
             </dict>";
Please login to merge, or discard this patch.
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -66,24 +66,24 @@  discard block
 block discarded – undo
66 66
             case "EXTERNAL":
67 67
             case "FRONTEND":
68 68
             case "DIAGNOSTICS":
69
-                if (!isset(self::${"instance" . $theDb})) {
69
+                if (!isset(self::${"instance".$theDb})) {
70 70
                     $class = __CLASS__;
71
-                    self::${"instance" . $theDb} = new $class($database);
72
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
71
+                    self::${"instance".$theDb} = new $class($database);
72
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
73 73
                 }
74
-                return self::${"instance" . $theDb};
74
+                return self::${"instance".$theDb};
75 75
             case "RADIUS":
76
-                if (!isset(self::${"instance" . $theDb})) {
76
+                if (!isset(self::${"instance".$theDb})) {
77 77
                     $class = __CLASS__;
78 78
                     foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) {
79 79
                         $theInstance = new $class($name);
80
-                        self::${"instance" . $theDb}[] = $theInstance;
80
+                        self::${"instance".$theDb}[] = $theInstance;
81 81
                         $theInstance->databaseInstance = $theDb;
82 82
                     }
83 83
                 }
84
-                return self::${"instance" . $theDb};
84
+                return self::${"instance".$theDb};
85 85
             default:
86
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
86
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
87 87
         }
88 88
     }
89 89
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
             }
126 126
         }
127 127
         // log exact query to debug log, if log level is at 5
128
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
128
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
129 129
         if ($types !== NULL) {
130
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true));
130
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true));
131 131
         }
132 132
 
133 133
         if ($this->connection->connect_error) {
134
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
134
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
135 135
         }
136 136
         if ($types === NULL) {
137 137
             $result = $this->connection->query($querystring);
138 138
             if ($result === FALSE) {
139
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
139
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
140 140
             }
141 141
         } else {
142 142
             // fancy! prepared statement with dedicated argument list
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 }
153 153
                 $prepResult = $statementObject->prepare($querystring);
154 154
                 if ($prepResult === FALSE) {
155
-                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
155
+                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
156 156
                 }
157 157
                 $this->preparedStatements[$querystring] = $statementObject;
158 158
             }
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
             array_unshift($localArray, $types);
166 166
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
167 167
             if ($retval === FALSE) {
168
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
168
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
169 169
             }
170 170
             $result = $statementObject->execute();
171 171
             if ($result === FALSE) {
172
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
172
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
173 173
             }
174 174
             $selectResult = $statementObject->get_result();
175 175
             if ($selectResult !== FALSE) {
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 
180 180
         // all cases where $result could be FALSE have been caught earlier
181 181
         if ($this->connection->errno) {
182
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
182
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
183 183
         }
184 184
 
185 185
 
186 186
         if ($isMoreThanSelect) {
187
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
187
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
188 188
             if ($types !== NULL) {
189
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true));
189
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true));
190 190
             }
191 191
         }
192 192
         return $result;
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
         if (isset(\config\Master::DB[$databaseCapitalised])) {
282 282
             $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']);
283 283
             if ($this->connection->connect_error) {
284
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
284
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
285 285
             }
286 286
             $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly'];
287 287
         } else { // one of the RADIUS DBs
288 288
             $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']);
289 289
             if ($this->connection->connect_error) {
290
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
290
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
291 291
             }
292 292
             $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly'];
293 293
         }
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
         $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname'));
116 116
         $eligibility = $this->eligibility();
117 117
         if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) {
118
-            $eligType = IdP::TYPE_IDPSP . "";
118
+            $eligType = IdP::TYPE_IDPSP."";
119 119
             $this->type = $eligType;
120 120
         } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) {
121
-            $eligType = IdP::TYPE_IDP . "";
121
+            $eligType = IdP::TYPE_IDP."";
122 122
         } else {
123
-            $eligType = IdP::TYPE_SP . "";
123
+            $eligType = IdP::TYPE_SP."";
124 124
         }
125 125
         $this->type = $eligType;
126 126
         $this->loggerInstance->debug(3, "--- END Constructing new IdP object ... ---\n");
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function listProfiles(bool $activeOnly = FALSE)
136 136
     {
137
-        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "");
137
+        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "");
138 138
         $allProfiles = $this->databaseHandle->exec($query);
139 139
         $returnarray = [];
140 140
         // SELECT -> resource, not boolean
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $returnarray[] = $oneProfile;
145 145
         }
146 146
 
147
-        $this->loggerInstance->debug(4, "listProfiles: " . print_r($returnarray, true));
147
+        $this->loggerInstance->debug(4, "listProfiles: ".print_r($returnarray, true));
148 148
         return $returnarray;
149 149
     }
150 150
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function listDeployments(bool $activeOnly = FALSE)
158 158
     {
159
-        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : "");
159
+        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : "");
160 160
         $allDeployments = $this->databaseHandle->exec($query);
161 161
         $returnarray = [];
162 162
         // SELECT -> resource, not boolean
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id);
165 165
         }
166 166
 
167
-        $this->loggerInstance->debug(4, "listDeployments: " . print_r($returnarray, true));
167
+        $this->loggerInstance->debug(4, "listDeployments: ".print_r($returnarray, true));
168 168
         return $returnarray;
169 169
     }
170 170
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
307 307
                     $theProfile = new ProfileSilverbullet($identifier, $this);
308 308
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
309
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
309
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
310 310
                     return $theProfile;
311 311
                 default:
312 312
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     public function getExternalDBId()
448 448
     {
449 449
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
450
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
450
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
451 451
             // SELECT -> it's a resource, not a boolean
452 452
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
453 453
                 return FALSE;
@@ -513,16 +513,16 @@  discard block
 block discarded – undo
513 513
         }
514 514
         foreach ($baseline as $lang => $value) {
515 515
             if (!key_exists($lang, $newvalues)) {
516
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED";
516
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED";
517 517
             } else {
518 518
                 if ($value != $newvalues[$lang]) {
519
-                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'";
519
+                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'";
520 520
                 }
521 521
             }
522 522
         }
523 523
         foreach ($newvalues as $lang => $value) {
524 524
             if (!key_exists($lang, $baseline)) {
525
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'";
525
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'";
526 526
             }
527 527
         }
528 528
         return $retval;
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 
117 117
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
118 118
 
119
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true));
120
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true));
121
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true));
119
+        $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true));
120
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true));
121
+        $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true));
122 122
 
123 123
         // now fetch and merge profile-level attributes if not already set on deeper level
124 124
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             }
138 138
         }
139 139
 
140
-        $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true));
140
+        $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true));
141 141
 
142 142
         // now, fetch and merge IdP-wide attributes
143 143
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 "row" => $attributeQuery->row,
194 194
                 "flag" => $optinfo['flag'],
195 195
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
196
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
196
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
197 197
         }
198 198
         return $temparray;
199 199
     }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     public function setAnonymousIDSupport($shallwe)
304 304
     {
305
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
305
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
306 306
     }
307 307
 
308 308
     /** Toggle special username for realm checks
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function setRealmCheckUser($shallwe, $localpart = NULL)
315 315
     {
316
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") .
317
-                ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") .
316
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0").
317
+                ($localpart !== NULL ? ", checkuser_value = '$localpart' " : "").
318 318
                 " WHERE profile_id = $this->identifier");
319 319
     }
320 320
 
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function setInputVerificationPreference($verify, $hint)
329 329
     {
330
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
331
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
330
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
331
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
332 332
                 " WHERE profile_id = $this->identifier");
333 333
     }
334 334
 
Please login to merge, or discard this patch.