Passed
Push — release_2_0 ( 504768...70923e )
by Tomasz
08:21
created
core/SilverbulletCertificate.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function annotate($annotation) {
145 145
         $encoded = json_encode($annotation);
146 146
         $this->annotation = $encoded;
147
-        $this->databaseHandle->exec("UPDATE silverbullet_certificate SET extrainfo = ? WHERE serial_number = ?", "si", $encoded, $this->serial );
147
+        $this->databaseHandle->exec("UPDATE silverbullet_certificate SET extrainfo = ? WHERE serial_number = ?", "si", $encoded, $this->serial);
148 148
     }
149 149
     /**
150 150
      * we don't use caching in SB, so this function does nothing
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $invitationObject = new SilverbulletInvitation($token);
171 171
         $profile = new ProfileSilverbullet($invitationObject->profile);
172 172
         $inst = new IdP($profile->institution);
173
-        $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n");
173
+        $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n");
174 174
         if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) {
175 175
             throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have gotten that far!");
176 176
         }
@@ -183,12 +183,12 @@  discard block
 block discarded – undo
183 183
             throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!");
184 184
         }
185 185
         $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow);
186
-        $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n");
186
+        $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n");
187 187
         $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry);
188 188
         if ($expiryDateObject === FALSE) {
189 189
             throw new Exception("The expiry date we got from the DB is bogus!");
190 190
         }
191
-        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n");
191
+        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n");
192 192
         // date_create with no parameters can't fail, i.e. is never FALSE
193 193
         $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject);
194 194
         $expiryDays = $validity->days + 1;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $certString = "";
238 238
         openssl_x509_export($cert, $certString);
239 239
         $parsedCert = $x509->processCertificate($certString);
240
-        $loggerInstance->debug(5, "CERTINFO: " . print_r($parsedCert['full_details'], true));
240
+        $loggerInstance->debug(5, "CERTINFO: ".print_r($parsedCert['full_details'], true));
241 241
         $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s");
242 242
 
243 243
         // store new cert info in DB
@@ -295,26 +295,26 @@  discard block
 block discarded – undo
295 295
                 $cat = new CAT();
296 296
                 $tempdirArray = $cat->createTemporaryDirectory("test");
297 297
                 $tempdir = $tempdirArray['dir'];
298
-                $nowIndexTxt = (new \DateTime())->format("ymdHis") . "Z";
299
-                $expiryIndexTxt = $originalExpiry->format("ymdHis") . "Z";
298
+                $nowIndexTxt = (new \DateTime())->format("ymdHis")."Z";
299
+                $expiryIndexTxt = $originalExpiry->format("ymdHis")."Z";
300 300
                 $serialHex = strtoupper(dechex($this->serial));
301 301
                 if (strlen($serialHex) % 2 == 1) {
302
-                    $serialHex = "0" . $serialHex;
302
+                    $serialHex = "0".$serialHex;
303 303
                 }
304 304
 
305
-                $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . CONFIG_CONFASSISTANT['CONSORTIUM']['name'] . "/OU=$federation/CN=$this->username\n";
305
+                $indexStatement = "$certstatus\t$expiryIndexTxt\t".($certstatus == "R" ? "$nowIndexTxt,unspecified" : "")."\t$serialHex\tunknown\t/O=".CONFIG_CONFASSISTANT['CONSORTIUM']['name']."/OU=$federation/CN=$this->username\n";
306 306
                 $logHandle->debug(4, "index.txt contents-to-be: $indexStatement");
307
-                if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) {
307
+                if (!file_put_contents($tempdir."/index.txt", $indexStatement)) {
308 308
                     $logHandle->debug(1, "Unable to write openssl index.txt file for revocation handling!");
309 309
                 }
310 310
                 // index.txt.attr is dull but needs to exist
311
-                file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n");
311
+                file_put_contents($tempdir."/index.txt.attr", "unique_subject = yes\n");
312 312
                 // call "openssl ocsp" to manufacture our own OCSP statement
313 313
                 // adding "-rmd sha1" to the following command-line makes the
314 314
                 // choice of signature algorithm for the response explicit
315 315
                 // but it's only available from openssl-1.1.0 (which we do not
316 316
                 // want to require just for that one thing).
317
-                $execCmd = CONFIG['PATHS']['openssl'] . " ocsp -issuer " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rsigner " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rkey " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".key -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der";
317
+                $execCmd = CONFIG['PATHS']['openssl']." ocsp -issuer ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rsigner ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rkey ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".key -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der";
318 318
                 $logHandle->debug(2, "Calling openssl ocsp with following cmdline: $execCmd\n");
319 319
                 $output = [];
320 320
                 $return = 999;
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
                 if ($return !== 0) {
323 323
                     throw new Exception("Non-zero return value from openssl ocsp!");
324 324
                 }
325
-                $ocsp = file_get_contents($tempdir . "/$serialHex.response.der");
325
+                $ocsp = file_get_contents($tempdir."/$serialHex.response.der");
326 326
                 // remove the temp dir!
327
-                unlink($tempdir . "/$serialHex.response.der");
328
-                unlink($tempdir . "/index.txt.attr");
329
-                unlink($tempdir . "/index.txt");
327
+                unlink($tempdir."/$serialHex.response.der");
328
+                unlink($tempdir."/index.txt.attr");
329
+                unlink($tempdir."/index.txt");
330 330
                 rmdir($tempdir);
331 331
                 break;
332 332
             default:
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
         $username = "";
381 381
         while ($usernameIsUnique === FALSE) {
382 382
             $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz");
383
-            $username = $usernameLocalPart . "@" . $realm;
383
+            $username = $usernameLocalPart."@".$realm;
384 384
             $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ?", "s", $username);
385 385
             // SELECT -> resource, not boolean
386 386
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) {
@@ -432,10 +432,10 @@  discard block
 block discarded – undo
432 432
         $databaseHandle = DBConnection::handle("INST");
433 433
         switch (CONFIG_CONFASSISTANT['SILVERBULLET']['CA']['type']) {
434 434
             case "embedded":
435
-                $rootCaPem = file_get_contents(ROOT . "/config/SilverbulletClientCerts/rootca-$certtype.pem");
436
-                $issuingCaPem = file_get_contents(ROOT . "/config/SilverbulletClientCerts/real-$certtype.pem");
435
+                $rootCaPem = file_get_contents(ROOT."/config/SilverbulletClientCerts/rootca-$certtype.pem");
436
+                $issuingCaPem = file_get_contents(ROOT."/config/SilverbulletClientCerts/real-$certtype.pem");
437 437
                 $issuingCa = openssl_x509_read($issuingCaPem);
438
-                $issuingCaKey = openssl_pkey_get_private("file://" . ROOT . "/config/SilverbulletClientCerts/real-$certtype.key");
438
+                $issuingCaKey = openssl_pkey_get_private("file://".ROOT."/config/SilverbulletClientCerts/real-$certtype.key");
439 439
                 $nonDupSerialFound = FALSE;
440 440
                 do {
441 441
                     $serial = random_int(1000000000, PHP_INT_MAX);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                         throw new Exception("Unknown cert type!");
458 458
                 }
459 459
                 return [
460
-                    "CERT" => openssl_csr_sign($csr, $issuingCa, $issuingCaKey, $expiryDays, ['digest_alg' => $alg, 'config' => dirname(__DIR__) . "/config/SilverbulletClientCerts/openssl-$certtype.cnf"], $serial),
460
+                    "CERT" => openssl_csr_sign($csr, $issuingCa, $issuingCaKey, $expiryDays, ['digest_alg' => $alg, 'config' => dirname(__DIR__)."/config/SilverbulletClientCerts/openssl-$certtype.cnf"], $serial),
461 461
                     "SERIAL" => $serial,
462 462
                     "ISSUER" => $issuingCaPem,
463 463
                     "ROOT" => $rootCaPem,
Please login to merge, or discard this patch.
devices/ms/WindowsCommon.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         $this->loggerInstance->debug(5, "translateFile($source_name, $output_name, $encoding)\n");
108 108
         ob_start();
109
-        $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n");
109
+        $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n");
110 110
         $source = $this->findSourceFile($source_name);
111 111
 
112 112
         if ($source !== FALSE) { // if there is no file found, don't attempt to include an uninitialised variable
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
         $output = ob_get_clean();
116 116
         if ($encoding) {
117
-            $outputClean = iconv('UTF-8', $encoding . '//TRANSLIT', $output);
117
+            $outputClean = iconv('UTF-8', $encoding.'//TRANSLIT', $output);
118 118
             if ($outputClean) {
119 119
                 $output = $outputClean;
120 120
             }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             $encoding = 0;
159 159
         }
160 160
         if ($encoding) {
161
-            $output_c = iconv('UTF-8', $encoding . '//TRANSLIT', $source_string);
161
+            $output_c = iconv('UTF-8', $encoding.'//TRANSLIT', $source_string);
162 162
         } else {
163 163
             $output_c = $source_string;
164 164
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         if (isset($this->LANGS[$this->languageInstance->getLang()])) {
238 238
             $language = $this->LANGS[$this->languageInstance->getLang()];
239 239
             $this->lang = $language['nsis'];
240
-            $this->codePage = 'cp' . $language['cp'];
240
+            $this->codePage = 'cp'.$language['cp'];
241 241
         } else {
242 242
             $this->lang = 'English';
243 243
             $this->codePage = 'cp1252';
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
         $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
260 260
         $out .= "<p>";
261 261
         if ($ssidCount > $configCount) {
262
-            $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList)) . " ";
263
-            $out .= '<strong>' . join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)) . '</strong>';
262
+            $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList))." ";
263
+            $out .= '<strong>'.join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)).'</strong>';
264 264
             $out .= "<p>";
265 265
         }
266 266
 // TODO - change this below
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
             $out .= _("When you are connecting to the network for the first time, Windows will pop up a login box, where you should enter your user name and password. This information will be saved so that you will reconnect to the network automatically each time you are in the range.");
277 277
             if ($ssidCount > 1) {
278 278
                 $out .= "<p>";
279
-                $out .= _("You will be required to enter the same credentials for each of the configured networks:") . " ";
280
-                $out .= '<strong>' . join('</strong>, <strong>', array_keys($ssids)) . '</strong>';
279
+                $out .= _("You will be required to enter the same credentials for each of the configured networks:")." ";
280
+                $out .= '<strong>'.join('</strong>, <strong>', array_keys($ssids)).'</strong>';
281 281
             }
282 282
         }
283 283
         return $out;
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
      */
380 380
     protected function signInstaller()
381 381
     {
382
-        $fileName = $this->installerBasename . '.exe';
382
+        $fileName = $this->installerBasename.'.exe';
383 383
         if (!$this->sign) {
384 384
             rename("installer.exe", $fileName);
385 385
             return $fileName;
386 386
         }
387 387
         // are actually signing
388
-        $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null");
388
+        $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null");
389 389
         if ($outputFromSigning === FALSE) {
390 390
             $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n");
391 391
         }
@@ -400,15 +400,15 @@  discard block
 block discarded – undo
400 400
     protected function compileNSIS()
401 401
     {
402 402
         if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) {
403
-            $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -INPUTCHARSET UTF8";
403
+            $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis']." -INPUTCHARSET UTF8";
404 404
         } else {
405 405
             $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis'];
406 406
         }
407 407
         $lcAll = getenv("LC_ALL");
408 408
         putenv("LC_ALL=en_US.UTF-8");
409
-        $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1';
409
+        $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1';
410 410
         system($command);
411
-        putenv("LC_ALL=" . $lcAll);
411
+        putenv("LC_ALL=".$lcAll);
412 412
         $this->loggerInstance->debug(4, "compileNSIS:$command\n");
413 413
     }
414 414
 
@@ -425,10 +425,10 @@  discard block
 block discarded – undo
425 425
             'email' => 'SUPPORT',
426 426
             'url' => 'URL',
427 427
         ];
428
-        $s = "support_" . $type . "_substitute";
428
+        $s = "support_".$type."_substitute";
429 429
         $substitute = $this->translateString($this->$s, $this->codePage);
430
-        $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute;
431
-        return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n";
430
+        $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute;
431
+        return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n";
432 432
     }
433 433
 
434 434
     /**
@@ -439,20 +439,20 @@  discard block
 block discarded – undo
439 439
      */
440 440
     protected function writeNsisDefines($attr)
441 441
     {
442
-        $fcontents = "\n" . '!define NSIS_MAJOR_VERSION ' . CONFIG_CONFASSISTANT['NSIS_VERSION'];
442
+        $fcontents = "\n".'!define NSIS_MAJOR_VERSION '.CONFIG_CONFASSISTANT['NSIS_VERSION'];
443 443
         if ($attr['internal:profile_count'][0] > 1) {
444
-            $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '"
444
+            $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage).'"
445 445
 ';
446 446
         }
447 447
         $fcontents .= '
448
-Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '"
449
-!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '"
450
-!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '"
448
+Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage).'"
449
+!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage).'"
450
+!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'"
451 451
 !define INSTALLER_NAME "installer.exe"
452
-!define LANG "' . $this->lang . '"
453
-!define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '"
452
+!define LANG "' . $this->lang.'"
453
+!define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']).'"
454 454
 ;--------------------------------
455
-!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '"
455
+!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage).'"
456 456
 ';
457 457
         $fcontents .= $this->getSupport($attr, 'email');
458 458
         $fcontents .= $this->getSupport($attr, 'url');
@@ -460,18 +460,18 @@  discard block
 block discarded – undo
460 460
             $fcontents .= '!define WIRED
461 461
         ';
462 462
         }
463
-        $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '"
463
+        $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'"
464 464
 ';
465 465
         if (!empty($attr['internal:realm'][0])) {
466
-            $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '"
466
+            $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'"
467 467
 ';
468 468
         }
469 469
         if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) {
470
-            $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '"
470
+            $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'"
471 471
 ';
472 472
         }
473 473
         if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) {
474
-            $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '"
474
+            $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'"
475 475
 ';
476 476
         }
477 477
         $fcontents .= $this->msInfoFile($attr);
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
             $out .= '!define EXTERNAL_INFO "';
493 493
 //  $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n");
494 494
             if ($attr['internal:info_file'][0]['mime'] == 'rtf') {
495
-                $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name'];
495
+                $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name'];
496 496
             } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') {
497 497
                 $infoFile = file_get_contents($attr['internal:info_file'][0]['name']);
498 498
                 if ($infoFile === FALSE) {
@@ -501,14 +501,14 @@  discard block
 block discarded – undo
501 501
                 if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) {
502 502
                     $infoFileConverted = $infoFile;
503 503
                 } else {
504
-                    $infoFileConverted = iconv('UTF-8', $this->codePage . '//TRANSLIT', $infoFile);
504
+                    $infoFileConverted = iconv('UTF-8', $this->codePage.'//TRANSLIT', $infoFile);
505 505
                 }
506 506
                 if ($infoFileConverted !== FALSE && strlen($infoFileConverted) > 0) {
507 507
                     file_put_contents('info_f.txt', $infoFileConverted);
508 508
                     $out = '!define LICENSE_FILE " info_f.txt';
509 509
                 }
510 510
             } else {
511
-                $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name'];
511
+                $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name'];
512 512
             }
513 513
 
514 514
             $out .= "\"\n";
Please login to merge, or discard this patch.
core/SanityTests.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 use GeoIp2\Database\Reader;
50 50
 use \Exception;
51 51
 
52
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
53
-require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/PHPMailer.php";
54
-require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/SMTP.php";
52
+require_once dirname(dirname(__FILE__))."/config/_config.php";
53
+require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/PHPMailer.php";
54
+require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/SMTP.php";
55 55
 
56 56
 class SanityTests extends CAT
57 57
 {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $this->test_result = [];
94 94
         $this->test_result['global'] = 0;
95 95
         // parse the schema file to find out the number of expected rows...
96
-        $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql");
96
+        $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql");
97 97
         $this->profile_option_ct = 0;
98 98
         $passedTheWindmill = FALSE;
99 99
         foreach ($schema as $schemaLine) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $this->out[$test] = [];
122 122
         $this->name = $test;
123
-        $m_name = $test . '_test';
123
+        $m_name = $test.'_test';
124 124
         $this->test_result[$test] = 0;
125 125
         if (!method_exists($this, $m_name)) {
126 126
             $this->testReturn(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>.");
@@ -229,9 +229,9 @@  discard block
 block discarded – undo
229 229
     private function php_test()
230 230
     {
231 231
         if (version_compare(phpversion(), $this->php_needversion, '>=')) {
232
-            $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . ".");
232
+            $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion().".");
233 233
         } else {
234
-            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->php_needversion, but you only have " . phpversion() . ".");
234
+            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->php_needversion, but you only have ".phpversion().".");
235 235
         }
236 236
     }
237 237
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $this->testReturn(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly");
249 249
         } else {
250 250
             $rootFromScript = $m[1] === '' ? '/' : $m[1];
251
-            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . CONFIG['PATHS']['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>");
251
+            $this->testReturn(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".CONFIG['PATHS']['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>");
252 252
         }
253 253
     }
254 254
 
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
             $SSPconfig = \SimpleSAML_Configuration::getInstance();
267 267
             $sspVersion = explode('.', $SSPconfig->getVersion());
268 268
             if ((int) $sspVersion[0] >= $this->ssp_needversion['major'] && (int) $sspVersion[1] >= $this->ssp_needversion['minor']) {
269
-                $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion));
269
+                $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion));
270 270
             } else {
271
-                $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->ssp_needversion));
271
+                $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->ssp_needversion));
272 272
             }
273 273
         }
274 274
     }
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
      */
330 330
     private function logdir_test()
331 331
     {
332
-        if (fopen(CONFIG['PATHS']['logdir'] . "/debug.log", "a") == FALSE) {
333
-            $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>" . CONFIG['PATHS']['logdir'] . "</strong> are not writable!");
332
+        if (fopen(CONFIG['PATHS']['logdir']."/debug.log", "a") == FALSE) {
333
+            $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>".CONFIG['PATHS']['logdir']."</strong> are not writable!");
334 334
         } else {
335 335
             $this->testReturn(\core\common\Entity::L_OK, "Log directory is writable.");
336 336
         }
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
         } else {
368 368
             $classname = 'Imagick';
369 369
         }
370
-        if (class_exists('\\' . $classname)) {
370
+        if (class_exists('\\'.$classname)) {
371 371
             $this->testReturn(\core\common\Entity::L_OK, "PHP extension <strong>$classname</strong> is installed.");
372 372
         } else {
373
-            $this->testReturn(\core\common\Entity::L_ERROR, "PHP extension <strong>$classname</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/get/" . strtolower($classname) . "'>here</a>.");
373
+            $this->testReturn(\core\common\Entity::L_ERROR, "PHP extension <strong>$classname</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/get/".strtolower($classname)."'>here</a>.");
374 374
         }
375 375
 
376 376
         if (function_exists('ImageCreate')) {
@@ -468,15 +468,15 @@  discard block
 block discarded – undo
468 468
         }
469 469
         $output = [];
470 470
         $retval = -100;
471
-        $t = exec($A['exec'] . ' version', $output, $retval);
471
+        $t = exec($A['exec'].' version', $output, $retval);
472 472
         if ($retval != 0 || count($output) != 1) {
473 473
             $this->testReturn(\core\common\Entity::L_ERROR, "<strong>openssl</strong> was not found on your system despite being configured!");
474 474
             return;
475 475
         }
476 476
         if ($A['exec_is'] == "EXPLICIT") {
477
-            $this->testReturn(\core\common\Entity::L_OK, "<strong>" . $output[0] . "</strong> was found and is configured explicitly in your config.");
477
+            $this->testReturn(\core\common\Entity::L_OK, "<strong>".$output[0]."</strong> was found and is configured explicitly in your config.");
478 478
         } else {
479
-            $this->testReturn(\core\common\Entity::L_WARN, "<strong>" . $output[0] . "</strong> was found, but is not configured with an absolute path in your config.");
479
+            $this->testReturn(\core\common\Entity::L_WARN, "<strong>".$output[0]."</strong> was found, but is not configured with an absolute path in your config.");
480 480
         }
481 481
     }
482 482
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         }
503 503
         $output = [];
504 504
         $retval = -100;
505
-        $t = exec($A['exec'] . ' -VERSION', $output, $retval);
505
+        $t = exec($A['exec'].' -VERSION', $output, $retval);
506 506
         if ($retval != 0 || count($output) != 1) {
507 507
             $this->testReturn(\core\common\Entity::L_ERROR, "<strong>makensis</strong> was not found on your system despite being configured!");
508 508
             return;
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             $this->testReturn(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config.");
514 514
         }
515 515
         $outputArray = [];
516
-        exec($A['exec'] . ' -HELP', $outputArray);
516
+        exec($A['exec'].' -HELP', $outputArray);
517 517
         $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray));
518 518
         if ($t1 == 1 && CONFIG_CONFASSISTANT['NSIS_VERSION'] == 2) {
519 519
             $this->testReturn(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!");
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
         $NSIS_Module_status = [];
541 541
         foreach ($this->NSIS_Modules as $module) {
542 542
             unset($out);
543
-            exec(CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
543
+            exec(CONFIG_CONFASSISTANT['PATHS']['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
544 544
             if ($retval > 0) {
545 545
                 $NSIS_Module_status[$module] = 0;
546 546
             } else {
@@ -605,8 +605,8 @@  discard block
 block discarded – undo
605 605
         $locales = shell_exec("locale -a");
606 606
         $allthere = "";
607 607
         foreach (CONFIG['LANGUAGES'] as $onelanguage) {
608
-            if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) {
609
-                $allthere .= $onelanguage['locale'] . " ";
608
+            if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) {
609
+                $allthere .= $onelanguage['locale']." ";
610 610
             }
611 611
         }
612 612
         if ($allthere == "") {
@@ -620,47 +620,47 @@  discard block
 block discarded – undo
620 620
         ["SETTING" => CONFIG['APPEARANCE']['from-mail'],
621 621
             "DEFVALUE" => "[email protected]",
622 622
             "COMPLAINTSTRING" => "APPEARANCE/from-mail ",
623
-            "REQUIRED" => FALSE,],
623
+            "REQUIRED" => FALSE, ],
624 624
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['url'],
625 625
             "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!",
626 626
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ",
627
-            "REQUIRED" => FALSE,],
627
+            "REQUIRED" => FALSE, ],
628 628
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['display'],
629 629
             "DEFVALUE" => "[email protected]",
630 630
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ",
631
-            "REQUIRED" => FALSE,],
631
+            "REQUIRED" => FALSE, ],
632 632
         ["SETTING" => CONFIG['APPEARANCE']['support-contact']['developer-mail'],
633 633
             "DEFVALUE" => "[email protected]",
634 634
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ",
635
-            "REQUIRED" => FALSE,],
635
+            "REQUIRED" => FALSE, ],
636 636
         ["SETTING" => CONFIG['APPEARANCE']['abuse-mail'],
637 637
             "DEFVALUE" => "[email protected]",
638 638
             "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ",
639
-            "REQUIRED" => FALSE,],
639
+            "REQUIRED" => FALSE, ],
640 640
         ["SETTING" => CONFIG['APPEARANCE']['MOTD'],
641 641
             "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!",
642 642
             "COMPLAINTSTRING" => "APPEARANCE/MOTD ",
643
-            "REQUIRED" => FALSE,],
643
+            "REQUIRED" => FALSE, ],
644 644
         ["SETTING" => CONFIG['APPEARANCE']['webcert_CRLDP'],
645 645
             "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'],
646 646
             "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ",
647
-            "REQUIRED" => TRUE,],
647
+            "REQUIRED" => TRUE, ],
648 648
         ["SETTING" => CONFIG['APPEARANCE']['webcert_OCSP'],
649 649
             "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'],
650 650
             "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ",
651
-            "REQUIRED" => TRUE,],
651
+            "REQUIRED" => TRUE, ],
652 652
         ["SETTING" => CONFIG['DB']['INST']['host'],
653 653
             "DEFVALUE" => "db.host.example",
654 654
             "COMPLAINTSTRING" => "DB/INST ",
655
-            "REQUIRED" => TRUE,],
655
+            "REQUIRED" => TRUE, ],
656 656
         ["SETTING" => CONFIG['DB']['INST']['host'],
657 657
             "DEFVALUE" => "db.host.example",
658 658
             "COMPLAINTSTRING" => "DB/USER ",
659
-            "REQUIRED" => TRUE,],
659
+            "REQUIRED" => TRUE, ],
660 660
         ["SETTING" => CONFIG['DB']['EXTERNAL']['host'],
661 661
             "DEFVALUE" => "customerdb.otherhost.example",
662 662
             "COMPLAINTSTRING" => "DB/EXTERNAL ",
663
-            "REQUIRED" => FALSE,],
663
+            "REQUIRED" => FALSE, ],
664 664
     ];
665 665
 
666 666
     /**
@@ -687,11 +687,11 @@  discard block
 block discarded – undo
687 687
 
688 688
         foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-clientcerts'] as $cadata) {
689 689
             foreach ($cadata['certificates'] as $cert_files) {
690
-                if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) {
691
-                    $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " ";
690
+                if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) {
691
+                    $defaultvalues .= "CERTIFICATE/".$cert_files['public']." ";
692 692
                 }
693
-                if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) {
694
-                    $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " ";
693
+                if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) {
694
+                    $defaultvalues .= "CERTIFICATE/".$cert_files['private']." ";
695 695
                 }
696 696
             }
697 697
         }
@@ -783,14 +783,14 @@  discard block
 block discarded – undo
783 783
         if ($global_no_cache) {
784 784
             foreach ($Devs as $dev => $D) {
785 785
                 if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) {
786
-                    $no_cache_dev .= $dev . " ";
786
+                    $no_cache_dev .= $dev." ";
787 787
                     $no_cache_dev_count++;
788 788
                 }
789 789
             }
790 790
         } else {
791 791
             foreach ($Devs as $dev => $D) {
792 792
                 if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) {
793
-                    $no_cache_dev .= $dev . " ";
793
+                    $no_cache_dev .= $dev." ";
794 794
                     $no_cache_dev_count++;
795 795
                 }
796 796
             }
@@ -829,13 +829,13 @@  discard block
 block discarded – undo
829 829
         $mail->isHTML(FALSE);
830 830
         $mail->CharSet = 'UTF-8';
831 831
         $mail->From = CONFIG['APPEARANCE']['from-mail'];
832
-        $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System";
832
+        $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System";
833 833
         $mail->addAddress(CONFIG['APPEARANCE']['abuse-mail']);
834 834
         $mail->Subject = "testing CAT configuration mail";
835 835
         $mail->Body = "Testing CAT mailing\n";
836 836
         $sent = $mail->send();
837 837
         if ($sent) {
838
-            $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . CONFIG['APPEARANCE']['abuse-mail'] . " mailbox if the message was receiced.");
838
+            $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".CONFIG['APPEARANCE']['abuse-mail']." mailbox if the message was receiced.");
839 839
         } else {
840 840
             $this->testReturn(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS");
841 841
         }
Please login to merge, or discard this patch.
web/admin/edit_idp.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         </table>
95 95
     </div>
96 96
     <?php
97
-    echo "<form enctype='multipart/form-data' action='edit_idp_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'>
98
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE'] . "'>";
97
+    echo "<form enctype='multipart/form-data' action='edit_idp_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'>
98
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE']."'>";
99 99
 
100 100
     if ($wizardStyle) {
101
-        echo "<p>" .
102
-        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureInst) . "</p>";
101
+        echo "<p>".
102
+        sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureInst)."</p>";
103 103
     }
104 104
     $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, "IdP");
105 105
     ?>
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         <legend><strong><?php echo _("General Information"); ?></strong></legend>
108 108
         <?php
109 109
         if ($wizardStyle) {
110
-            echo "<p>" .
111
-            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>
110
+            echo "<p>".
111
+            _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>
112 112
                       <ul>
113
-                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>
114
-                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."),$uiElements->nomenclatureInst) . "</li>";
113
+                         <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>
114
+                         <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $uiElements->nomenclatureInst)."</li>";
115 115
             echo "</ul>";
116 116
         }
117 117
         echo $optionDisplay->prefilledOptionTable("general");
@@ -125,30 +125,30 @@  discard block
 block discarded – undo
125 125
         <legend><strong><?php echo _("Media Properties"); ?></strong></legend>
126 126
         <?php
127 127
         if ($wizardStyle) {
128
-            echo "<p>" .
129
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>
128
+            echo "<p>".
129
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>
130 130
           <ul>";
131 131
             echo "<li>";
132
-            echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
132
+            echo "<strong>".(count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
133 133
             if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0) {
134 134
                 $ssidlist = "";
135 135
                 foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'] as $ssid) {
136
-                    $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
136
+                    $ssidlist .= ", '<strong>".$ssid."</strong>'";
137 137
                 }
138 138
                 $ssidlist = substr($ssidlist, 2);
139 139
                 echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid'])), $ssidlist);
140 140
                 if (CONFIG_CONFASSISTANT['CONSORTIUM']['tkipsupport']) {
141
-                    echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
141
+                    echo " "._("They will also be configured for WPA/TKIP if the device supports multiple encryption types.");
142 142
                 }
143
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
143
+                echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), $uiElements->displayName("media:SSID"), $uiElements->displayName("media:SSID_with_legacy"));
144 144
             } else {
145 145
                 echo _("Please configure which SSIDs should be configured in the installers.");
146 146
             }
147
-            echo " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
147
+            echo " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
148 148
             echo "</li>";
149 149
 
150 150
             echo "<li>";
151
-            echo "<strong>" . ( count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
151
+            echo "<strong>".(count(CONFIG_CONFASSISTANT['CONSORTIUM']['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
152 152
             if (count(CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']) > 0) {
153 153
                 $consortiumlist = "";
154 154
                 foreach (CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi'] as $displayName => $oi) {
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
                 $consortiumlistFinal = substr($consortiumlist, 2);
158 158
                 echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi'])), $consortiumlistFinal);
159 159
 
160
-                echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
160
+                echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI"));
161 161
             } else {
162 162
                 echo _("Please configure which Consortium OIs should be configured in the installers.");
163 163
             }
164 164
             echo "</li>";
165
-            echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
166
-            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
165
+            echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
166
+            . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
167 167
             "</li>";
168
-            echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
168
+            echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
169 169
             . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
170 170
             . "</li>";
171 171
             echo "</ul>";
@@ -181,16 +181,16 @@  discard block
 block discarded – undo
181 181
             echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
182 182
             
183 183
             if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") {
184
-                echo "<p>" .
184
+                echo "<p>".
185 185
                         
186
-                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."),$uiElements->nomenclatureInst)  . "</p>" .
187
-                "<p>" .
188
-                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
186
+                sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $uiElements->nomenclatureInst)."</p>".
187
+                "<p>".
188
+                _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
189 189
                 if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
190
-                echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>";
190
+                echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>";
191 191
                 }
192 192
             } elseif (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
193
-                echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
193
+                echo "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
194 194
             }
195 195
             
196 196
         }
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
         <button type='button' class='newoption' onclick='getXML("support")'><?php echo _("Add new option"); ?></button></fieldset>
201 201
     <?php
202 202
     if ($wizardStyle) {
203
-        echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>";
203
+        echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>";
204 204
     } else {
205
-        echo "<div><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></div></form>";
205
+        echo "<div><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></div></form>";
206 206
     }
207 207
     echo $deco->footer();
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
       <key>PayloadDescription</key>
99 99
          <string>$tagline</string>
100 100
       <key>PayloadDisplayName</key>
101
-         <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</string>
101
+         <string>".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']."</string>
102 102
       <key>PayloadIdentifier</key>
103
-         <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
103
+         <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
104 104
       <key>PayloadOrganization</key>
105
-         <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string>
105
+         <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string>
106 106
       <key>PayloadType</key>
107 107
          <string>Configuration</string>
108 108
       <key>PayloadUUID</key>
109
-         <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string>
109
+         <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string>
110 110
       <key>PayloadVersion</key>
111 111
          <integer>1</integer>";
112 112
         \core\common\Entity::outOfThePotatoes();
@@ -138,15 +138,15 @@  discard block
 block discarded – undo
138 138
     {
139 139
         \core\common\Entity::intoThePotatoes();
140 140
         if (isset($this->attributes['support:info_file'])) {
141
-            return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
141
+            return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST;
142 142
         }
143 143
         if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) {
144 144
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
145
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
145
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
146 146
                 \core\common\Entity::outOfThePotatoes();
147 147
                 return $retval;
148 148
             }
149
-            $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;
149
+            $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;
150 150
             \core\common\Entity::outOfThePotatoes();
151 151
             return $retval;
152 152
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         // also escape htmlspecialchars
171 171
         // not all names and profiles have a name, so be prepared
172 172
 
173
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
173
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
174 174
 
175 175
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
176 176
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         file_put_contents('installer_profile', $outputXml);
214 214
 
215
-        $fileName = $this->installerBasename . '.mobileconfig';
215
+        $fileName = $this->installerBasename.'.mobileconfig';
216 216
 
217 217
         if (!$this->sign) {
218 218
             rename("installer_profile", $fileName);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             return $fileName;
221 221
         }
222 222
         // still here? Then we are signing.
223
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
223
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
224 224
         if ($signing === FALSE) {
225 225
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
226 226
         }
@@ -239,19 +239,19 @@  discard block
 block discarded – undo
239 239
         \core\common\Entity::intoThePotatoes();
240 240
         $ssidCount = count($this->attributes['internal:SSID']);
241 241
         $certCount = count($this->attributes['internal:CAs'][0]);
242
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
242
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
243 243
         $out .= "<p>";
244 244
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
245 245
         $out .= "<ul>";
246
-        $out .= "<li>" . _("to install the profile") . "</li>";
247
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
246
+        $out .= "<li>"._("to install the profile")."</li>";
247
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
248 248
         if ($certCount > 1) {
249
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
249
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
250 250
         }
251 251
         $out .= "</li>";
252
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
252
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
253 253
         if ($ssidCount > 1) {
254
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount);
254
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount);
255 255
         }
256 256
         $out .= "</li>";
257 257
         $out .= "</ul>";
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         $retval .= "                <key>RoamingConsortiumOIs</key>
305 305
                 <array>";
306 306
 
307
-        $retval .= "<string>" . strtoupper($consortiumOi) . "</string>";
307
+        $retval .= "<string>".strtoupper($consortiumOi)."</string>";
308 308
 
309 309
         $retval .= "</array>";
310 310
         // this is an undocumented value found on the net. Does it do something useful?
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                   <dict>
346 346
                       <key>AcceptEAPTypes</key>
347 347
                          <array>
348
-                            <integer>" . $eapType['OUTER'] . "</integer>
348
+                            <integer>" . $eapType['OUTER']."</integer>
349 349
                          </array>
350 350
                       <key>EAPFASTProvisionPAC</key>
351 351
                             <true />
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 ";
359 359
         if ($realm !== NULL) {
360 360
             $retval .= "<key>OuterIdentity</key>
361
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
361
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
362 362
 ";
363 363
         }
364 364
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -382,11 +382,11 @@  discard block
 block discarded – undo
382 382
         $retval .= "
383 383
                          </array>";
384 384
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
385
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
385
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
386 386
         }
387 387
         $retval .= "
388 388
                       <key>TTLSInnerAuthentication</key>
389
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string>
389
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2")."</string>
390 390
                    </dict>";
391 391
         return $retval;
392 392
     }
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
             // characters are still reversed, invert on use!
407 407
             $buffer .= "<string>Manual</string>
408 408
                   <key>ProxyServer</key>
409
-                  <string>" . strrev($serverAndPort[1]) . "</string>
409
+                  <string>" . strrev($serverAndPort[1])."</string>
410 410
                   <key>ProxyServerPort</key>
411
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
411
+                  <integer>" . strrev($serverAndPort[0])."</integer>
412 412
                   <key>ProxyPACFallbackAllowed</key>
413 413
                   <false/>";
414 414
         } else {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
                     throw new Exception("SSID must be a string!");
438 438
                 }
439 439
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
440
-                $payloadIdentifier = "wifi." . $this->serial;
440
+                $payloadIdentifier = "wifi.".$this->serial;
441 441
                 $payloadShortName = sprintf(_("SSID %s"), $escapedSSID);
442 442
                 $payloadName = sprintf(_("%s configuration for network name %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $escapedSSID);
443 443
                 $encryptionTypeString = "WPA";
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                 $payloadIdentifier = "hs20.$toBeConfigured";
468 468
                 $knownOiName = array_search($toBeConfigured, CONFIG_CONFASSISTANT['CONSORTIUM']['interworking-consortium-oi']);
469 469
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
470
-                    $knownOiName = $this->instName . " "._("Roaming Partner");
470
+                    $knownOiName = $this->instName." "._("Roaming Partner");
471 471
                 }
472 472
                 $payloadShortName = $knownOiName;
473 473
                 $payloadName = _("Passpoint roaming configuration ($knownOiName)");
@@ -489,11 +489,11 @@  discard block
 block discarded – undo
489 489
                <key>PayloadDisplayName</key>
490 490
                   <string>$payloadShortName</string>
491 491
                <key>PayloadIdentifier</key>
492
-                  <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
492
+                  <string>".self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
493 493
                <key>PayloadOrganization</key>
494
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
494
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
495 495
                <key>PayloadType</key>
496
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
496
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
497 497
         $retval .= $this->proxySettings();
498 498
         $retval .= $setupModesString;
499 499
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         }
506 506
         $retval .= "
507 507
                <key>PayloadUUID</key>
508
-                  <string>" . \core\common\Entity::uuid() . "</string>
508
+                  <string>" . \core\common\Entity::uuid()."</string>
509 509
                <key>PayloadVersion</key>
510 510
                   <integer>1</integer>
511 511
                   $wifiNetworkIdentification</dict>";
@@ -535,15 +535,15 @@  discard block
 block discarded – undo
535 535
 	<key>IsHotspot</key>
536 536
 	<false/>
537 537
 	<key>PayloadDescription</key>
538
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</string>
538
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</string>
539 539
 	<key>PayloadDisplayName</key>
540
-	<string>" . _("Disabled WiFi network") . "</string>
540
+	<string>" . _("Disabled WiFi network")."</string>
541 541
 	<key>PayloadIdentifier</key>
542
-	<string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
542
+	<string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
543 543
 	<key>PayloadType</key>
544 544
 	<string>com.apple.wifi.managed</string>
545 545
 	<key>PayloadUUID</key>
546
-	<string>" . \core\common\Entity::uuid() . "</string>
546
+	<string>".\core\common\Entity::uuid()."</string>
547 547
 	<key>PayloadVersion</key>
548 548
 	<real>1</real>";
549 549
         $retval .= $this->proxySettings();
@@ -622,12 +622,12 @@  discard block
 block discarded – undo
622 622
         $mimeBlob = base64_encode($binaryBlob);
623 623
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
624 624
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
625
-        $retArray = ["block" => "<dict>" .
625
+        $retArray = ["block" => "<dict>".
626 626
             // we don't include the import password. It's displayed on screen, and should be input by the user.
627 627
             // <key>Password</key>
628 628
             //   <string>" . $this->clientCert['password'] . "</string>
629 629
             "<key>PayloadCertificateFileName</key>
630
-                     <string>" . $this->massagedConsortium . ".pfx</string>
630
+                     <string>" . $this->massagedConsortium.".pfx</string>
631 631
                   <key>PayloadContent</key>
632 632
                      <data>
633 633
 $mimeFormatted
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
                   <key>PayloadDescription</key>
636 636
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
637 637
                   <key>PayloadDisplayName</key>
638
-                     <string>" . _("eduroam user certificate") . "</string>
638
+                     <string>"._("eduroam user certificate")."</string>
639 639
                   <key>PayloadIdentifier</key>
640 640
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
641 641
                   <key>PayloadType</key>
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
                   <key>PayloadVersion</key>
646 646
                      <integer>1</integer>
647 647
                 </dict>",
648
-            "UUID" => $payloadUUID,];
648
+            "UUID" => $payloadUUID, ];
649 649
         \core\common\Entity::outOfThePotatoes();
650 650
         return $retArray;
651 651
     }
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
         }
665 665
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
666 666
         return "<key>RemovalDate</key>
667
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
667
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
668 668
     }
669 669
 
670 670
     private $CAsAccountedFor = [];
@@ -688,21 +688,21 @@  discard block
 block discarded – undo
688 688
             $stream = "
689 689
             <dict>
690 690
                <key>PayloadCertificateFileName</key>
691
-               <string>" . $ca['uuid'] . ".der</string>
691
+               <string>" . $ca['uuid'].".der</string>
692 692
                <key>PayloadContent</key>
693 693
                <data>
694
-" . $trimmedPem . "</data>
694
+" . $trimmedPem."</data>
695 695
                <key>PayloadDescription</key>
696
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
696
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
697 697
                <key>PayloadDisplayName</key>
698
-               <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst) . "</string>
698
+               <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst)."</string>
699 699
                <key>PayloadIdentifier</key>
700
-               <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
700
+               <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
701 701
                <key>PayloadOrganization</key>
702
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
702
+               <string>".$this->massagedConsortium.".1x-config.org</string>
703 703
                <key>PayloadType</key>
704 704
                <string>com.apple.security.root</string>
705
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
705
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
706 706
                <key>PayloadVersion</key>
707 707
                <integer>1</integer>
708 708
             </dict>";
Please login to merge, or discard this patch.