@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | "nl" => "_radsec._tcp.eduroam.nl.", |
76 | 76 | ]; |
77 | 77 | foreach ($cat->getSuperglueZone() as $oneEntry) { |
78 | - foreach (explode(',',$oneEntry['inst_realm']) as $oneRealm) { |
|
78 | + foreach (explode(',', $oneEntry['inst_realm']) as $oneRealm) { |
|
79 | 79 | $target = "_radsec._somewhere.eduroam.org"; |
80 | 80 | foreach ($NROs as $tld => $nroTarget) { |
81 | 81 | if (preg_match("/$tld$/", $oneRealm)) { |
@@ -105,28 +105,28 @@ |
||
105 | 105 | parent::__construct(); |
106 | 106 | common\Entity::intoThePotatoes(); |
107 | 107 | |
108 | - $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>") . "</a>"; |
|
108 | + $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>"; |
|
109 | 109 | if (CAT::RELEASE_VERSION) { |
110 | 110 | $major = CAT::VERSION_MAJOR; |
111 | 111 | $minor = CAT::VERSION_MINOR; |
112 | 112 | $patch = CAT::VERSION_PATCH; |
113 | 113 | $extra = CAT::VERSION_EXTRA; |
114 | 114 | $temp_version = "CAT-$major.$minor"; |
115 | - $branch = "release_$major" . "_$minor"; |
|
115 | + $branch = "release_$major"."_$minor"; |
|
116 | 116 | if (CAT::VERSION_PATCH != 0) { |
117 | 117 | $temp_version .= ".$patch"; |
118 | 118 | } |
119 | 119 | if (CAT::VERSION_EXTRA != "") { |
120 | 120 | $temp_version .= "-$extra"; |
121 | 121 | } |
122 | - $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version); |
|
122 | + $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version); |
|
123 | 123 | } |
124 | 124 | $product = \config\Master::APPEARANCE['productname']; |
125 | 125 | $minYear = self::COPYRIGHT_MIN_YEAR; |
126 | 126 | $maxYear = self::COPYRIGHT_MAX_YEAR; |
127 | 127 | $holder = self::COPYRIGHT_HOLDER; |
128 | 128 | $consortia = self::COPYRIGHT_CONSORTIA; |
129 | - $this->catCopyright = "$product - " . $this->catVersionString . " © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
129 | + $this->catCopyright = "$product - ".$this->catVersionString." © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
130 | 130 | |
131 | 131 | |
132 | 132 | /* Federations are created in DB with bootstrapFederation, and listed via listFederations |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $Tests = [ |
25 | 25 | 'Directories', |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $uiElements = new \web\lib\admin\UIElements(); |
45 | 45 | |
46 | -if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
46 | +if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || \config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
47 | 47 | $Tests[] = 'Makensis'; |
48 | 48 | $Tests[] = 'Makensis=>NSISmodules'; |
49 | 49 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | 'mime' => 'application/eap-config', |
398 | 398 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
399 | 399 | "geteduroam", |
400 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
400 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
401 | 401 | ], |
402 | 402 | ], |
403 | 403 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | 'mime' => 'application/eap-config', |
412 | 412 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
413 | 413 | "geteduroam", |
414 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
414 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
415 | 415 | ], |
416 | 416 | ], |
417 | 417 | 'android_4_7' => [ |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | 'mime' => 'application/eap-config', |
425 | 425 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
426 | 426 | "eduroamCAT", |
427 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
427 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
428 | 428 | ], |
429 | 429 | ], |
430 | 430 | |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | 'mime' => 'application/eap-config', |
440 | 440 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
441 | 441 | "eduroamCAT", |
442 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
442 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
443 | 443 | ], |
444 | 444 | ], |
445 | 445 | 'android_pie' => [ |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | 'mime' => 'application/eap-config', |
454 | 454 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
455 | 455 | "eduroamCAT", |
456 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
456 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
457 | 457 | ], |
458 | 458 | ], |
459 | 459 | 'android_oreo' => [ |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | 'mime' => 'application/eap-config', |
468 | 468 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
469 | 469 | "eduroamCAT", |
470 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
470 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
471 | 471 | ], |
472 | 472 | ], |
473 | 473 | 'android_nougat' => [ |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | 'mime' => 'application/eap-config', |
482 | 482 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
483 | 483 | "eduroamCAT", |
484 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
484 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
485 | 485 | ], |
486 | 486 | ], |
487 | 487 | 'android_marshmallow' => [ |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | 'mime' => 'application/eap-config', |
496 | 496 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
497 | 497 | "eduroamCAT", |
498 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
498 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
499 | 499 | ], |
500 | 500 | ], |
501 | 501 | 'android_lollipop' => [ |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | 'mime' => 'application/eap-config', |
510 | 510 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
511 | 511 | "eduroamCAT", |
512 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
512 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
513 | 513 | ], |
514 | 514 | ], |
515 | 515 | 'android_kitkat' => [ |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | 'mime' => 'application/eap-config', |
524 | 524 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
525 | 525 | "eduroamCAT", |
526 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
526 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
527 | 527 | ], |
528 | 528 | ], |
529 | 529 | 'android_43' => [ |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | 'mime' => 'application/eap-config', |
538 | 538 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
539 | 539 | "eduroamCAT", |
540 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
540 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
541 | 541 | ], |
542 | 542 | ], |
543 | 543 | 'android_legacy' => [ |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | protected function setSupportedEapMethods($eapArray) |
86 | 86 | { |
87 | 87 | $this->supportedEapMethods = $eapArray; |
88 | - $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: "); |
|
88 | + $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: "); |
|
89 | 89 | $this->loggerInstance->debug(4, $this->supportedEapMethods); |
90 | 90 | } |
91 | 91 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | break 2; |
138 | 138 | } |
139 | 139 | } |
140 | - $longestSuffix = $candidate . $longestSuffix; |
|
140 | + $longestSuffix = $candidate.$longestSuffix; |
|
141 | 141 | } |
142 | 142 | return $longestSuffix; |
143 | 143 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | throw new Exception("No EAP type available."); |
176 | 176 | } |
177 | 177 | $this->attributes = $this->getProfileAttributes($profile); |
178 | - $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id); |
|
178 | + $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id); |
|
179 | 179 | |
180 | 180 | |
181 | 181 | // if we are instantiating a Silverbullet profile AND have been given |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | // create temporary directory, its full path will be saved in $this->FPATH; |
201 | 201 | $tempDir = \core\common\Entity::createTemporaryDirectory($purpose); |
202 | 202 | $this->FPATH = $tempDir['dir']; |
203 | - mkdir($tempDir['dir'] . '/tmp'); |
|
204 | - chdir($tempDir['dir'] . '/tmp'); |
|
203 | + mkdir($tempDir['dir'].'/tmp'); |
|
204 | + chdir($tempDir['dir'].'/tmp'); |
|
205 | 205 | $caList = []; |
206 | 206 | $x509 = new \core\common\X509(); |
207 | 207 | if (isset($this->attributes['eap:ca_file'])) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $this->support_url_substitute = sprintf(_("your local %s support page"), \config\ConfAssistant::CONSORTIUM['display_name']); |
240 | 240 | |
241 | 241 | if ($this->signer && $this->options['sign']) { |
242 | - $this->sign = ROOT . '/signer/' . $this->signer; |
|
242 | + $this->sign = ROOT.'/signer/'.$this->signer; |
|
243 | 243 | } |
244 | 244 | $this->installerBasename = $this->getInstallerBasename(); |
245 | 245 | common\Entity::outOfThePotatoes(); |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | */ |
300 | 300 | protected function findSourceFile($file) |
301 | 301 | { |
302 | - if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { |
|
303 | - return $this->module_path . '/Files/' . $this->device_id . '/' . $file; |
|
304 | - } elseif (is_file($this->module_path . '/Files/' . $file)) { |
|
305 | - return $this->module_path . '/Files/' . $file; |
|
302 | + if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) { |
|
303 | + return $this->module_path.'/Files/'.$this->device_id.'/'.$file; |
|
304 | + } elseif (is_file($this->module_path.'/Files/'.$file)) { |
|
305 | + return $this->module_path.'/Files/'.$file; |
|
306 | 306 | } else { |
307 | 307 | $this->loggerInstance->debug(2, "requested file $file does not exist\n"); |
308 | 308 | return FALSE; |
@@ -426,19 +426,19 @@ discard block |
||
426 | 426 | */ |
427 | 427 | private function getInstallerBasename() |
428 | 428 | { |
429 | - $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name']) . "-" . $this->getDeviceId(); |
|
429 | + $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name'])."-".$this->getDeviceId(); |
|
430 | 430 | if (isset($this->attributes['profile:customsuffix'][1])) { |
431 | 431 | // this string will end up as a filename on a filesystem, so always |
432 | 432 | // take a latin-based language variant if available |
433 | 433 | // and then scrub non-ASCII just in case |
434 | - return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
434 | + return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
435 | 435 | } |
436 | 436 | // Okay, no custom suffix. |
437 | 437 | // Use the configured inst name and apply shortening heuristics |
438 | 438 | // if an instshortname is set, base on that, otherwise, the normal instname |
439 | 439 | $attribToUse = (isset($this->attributes['general:instshortname']) ? 'general:instshortname' : 'general:instname'); |
440 | 440 | $lang_pointer = \config\Master::LANGUAGES[$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1; |
441 | - $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes[$attribToUse][$lang_pointer] . "\n"); |
|
441 | + $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes[$attribToUse][$lang_pointer]."\n"); |
|
442 | 442 | $inst = $this->customTranslit($this->attributes[$attribToUse][$lang_pointer]); |
443 | 443 | $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n"); |
444 | 444 | $Inst_a = explode('_', $inst); |
@@ -453,10 +453,10 @@ discard block |
||
453 | 453 | if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) { |
454 | 454 | $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]); |
455 | 455 | $prof = preg_replace('/_+$/', '', $profTemp); |
456 | - return $baseName . $inst . '-' . $prof; |
|
456 | + return $baseName.$inst.'-'.$prof; |
|
457 | 457 | } |
458 | 458 | } |
459 | - return $baseName . $inst; |
|
459 | + return $baseName.$inst; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | $ext = 'unsupported'; |
641 | 641 | } |
642 | 642 | $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n"); |
643 | - $fileName = 'logo-' . $type . $iterator . '.' . $ext; |
|
643 | + $fileName = 'logo-'.$type.$iterator.'.'.$ext; |
|
644 | 644 | $fileHandle = fopen($fileName, "w"); |
645 | 645 | if (!$fileHandle) { |
646 | 646 | $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n"); |
@@ -667,13 +667,13 @@ discard block |
||
667 | 667 | $mime = $finfo->buffer($blob); |
668 | 668 | $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported'; |
669 | 669 | $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n"); |
670 | - $fileHandle = fopen('local-info.' . $ext, "w"); |
|
670 | + $fileHandle = fopen('local-info.'.$ext, "w"); |
|
671 | 671 | if ($fileHandle === FALSE) { |
672 | 672 | throw new Exception("problem opening the file"); |
673 | 673 | } |
674 | 674 | fwrite($fileHandle, $blob); |
675 | 675 | fclose($fileHandle); |
676 | - return(['name' => 'local-info.' . $ext, 'mime' => $ext]); |
|
676 | + return(['name' => 'local-info.'.$ext, 'mime' => $ext]); |
|
677 | 677 | } |
678 | 678 | |
679 | 679 | /** |
@@ -727,9 +727,9 @@ discard block |
||
727 | 727 | { |
728 | 728 | $outerId = NULL; |
729 | 729 | if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) { |
730 | - $outerId = "@" . $this->attributes['internal:realm'][0]; |
|
730 | + $outerId = "@".$this->attributes['internal:realm'][0]; |
|
731 | 731 | if (isset($this->attributes['internal:anon_local_value'])) { |
732 | - $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId; |
|
732 | + $outerId = $this->attributes['internal:anon_local_value'][0].$outerId; |
|
733 | 733 | } |
734 | 734 | } |
735 | 735 | return $outerId; |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
142 | 142 | !define MUI_COMPONENTSPAGE_SMALLDESC |
143 | 143 | |
144 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")),\config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
145 | -!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis( _("Installation complete"))?>" |
|
146 | -!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Your system is ready."))?>" |
|
147 | -!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Please contact \${SUPPORT}."))?>" |
|
144 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")), \config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
145 | +!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis(_("Installation complete"))?>" |
|
146 | +!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Your system is ready."))?>" |
|
147 | +!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Please contact \${SUPPORT}."))?>" |
|
148 | 148 | ;-------------------------------- |
149 | 149 | ;Languages |
150 | 150 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | ;-------------------------------- |
153 | 153 | ; License file |
154 | 154 | !ifdef LICENSE_FILE |
155 | -LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis( _("Accept"))?>" |
|
155 | +LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis(_("Accept"))?>" |
|
156 | 156 | LicenseText "<?php WindowsCommon::echoNsis(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
157 | 157 | LicenseData ${LICENSE_FILE} |
158 | 158 | !endif |
159 | 159 | |
160 | 160 | ;----------------------------------- |
161 | 161 | |
162 | -MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis( _("Finish"))?>" |
|
162 | +MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis(_("Finish"))?>" |
|
163 | 163 | ;---------------------------------- |
164 | 164 | ; FUNCTIONS |
165 | 165 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | !macro install_ca_cert ca_file ca_fingerprint level |
194 | 194 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
195 | - DetailPrint "<?php WindowsCommon::echoNsis( _("searching for certificate"))?> ${ca_file}" |
|
195 | + DetailPrint "<?php WindowsCommon::echoNsis(_("searching for certificate"))?> ${ca_file}" |
|
196 | 196 | File "${ca_file}" |
197 | 197 | nsArray::Set Delete_files "${ca_file}" |
198 | 198 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -254,13 +254,13 @@ discard block |
||
254 | 254 | ${EndIf} |
255 | 255 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
256 | 256 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
257 | - DetailPrint "<?php WindowsCommon::echoNsis( _("installing certificate"))?> ${ca_file}" |
|
257 | + DetailPrint "<?php WindowsCommon::echoNsis(_("installing certificate"))?> ${ca_file}" |
|
258 | 258 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
259 | 259 | Pop $0 |
260 | 260 | !insertmacro debug_cat 3 "certutil returned $0" |
261 | 261 | ${If} $0 != 0 |
262 | 262 | IfSilent +2 |
263 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("could not install certificate"))?> ${ca_file}" |
|
263 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("could not install certificate"))?> ${ca_file}" |
|
264 | 264 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
265 | 265 | ${EndIf} |
266 | 266 | no_install_${ca_file}: |
@@ -467,26 +467,26 @@ discard block |
||
467 | 467 | pop $R0 |
468 | 468 | ${If} $tkip_count > 0 |
469 | 469 | ${If} $aes_count > 1 |
470 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
470 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
471 | 471 | ${Else} |
472 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
472 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
473 | 473 | ${EndIf} |
474 | 474 | ${Else} |
475 | 475 | StrCpy $R1 "" |
476 | 476 | ${EndIf} |
477 | 477 | ${If} $profile_count > 0 |
478 | - StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
479 | -<?php WindowsCommon::echoNsis( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
478 | + StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
479 | +<?php WindowsCommon::echoNsis(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
480 | 480 | $R0.\ |
481 | 481 | $R1$\r$\n$\n\ |
482 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
482 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
483 | 483 | EMAIL: ${SUPPORT}$\r$\n\ |
484 | 484 | WWW: ${URL}" |
485 | 485 | ${Else} |
486 | -StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
487 | -<?php WindowsCommon::echoNsis( _("The installer will create the wireless profile:"))?> $R0.\ |
|
486 | +StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
487 | +<?php WindowsCommon::echoNsis(_("The installer will create the wireless profile:"))?> $R0.\ |
|
488 | 488 | $R1$\r$\n$\n\ |
489 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
489 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
490 | 490 | EMAIL: ${SUPPORT}$\r$\n\ |
491 | 491 | WWW: ${URL}" |
492 | 492 | ${EndIf} |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
513 | 513 | ;TRANSLATION |
514 | 514 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
515 | -$\r$\n$\r$\n<?php WindowsCommon::echoNsis( _("Installer created with software from the GEANT project."))?>" |
|
515 | +$\r$\n$\r$\n<?php WindowsCommon::echoNsis(_("Installer created with software from the GEANT project."))?>" |
|
516 | 516 | Pop $TEXT |
517 | 517 | |
518 | 518 | SetCtlColors $DIALOG "" 0xffffff |
@@ -645,18 +645,18 @@ discard block |
||
645 | 645 | ${If} $wireless_result == 1 |
646 | 646 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
647 | 647 | IfSilent +2 |
648 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
648 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
649 | 649 | Call Cleanup |
650 | 650 | ${EndIf} |
651 | 651 | ${If} $wireless_result == 2 |
652 | 652 | IfSilent +2 |
653 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
653 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
654 | 654 | Call Cleanup |
655 | 655 | ${EndIf} |
656 | 656 | ${Else} |
657 | 657 | ${If} $wireless_result > 0 |
658 | 658 | IfSilent +3 |
659 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
659 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
660 | 660 | Call Cleanup |
661 | 661 | wired_yes: |
662 | 662 | Push 1 |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | ${If} $wired == 1 |
673 | 673 | ${If} $force_wired == 0 |
674 | 674 | IfSilent wired |
675 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
675 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
676 | 676 | Push 0 |
677 | 677 | Pop $wired |
678 | 678 | wired: |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | ;================================ |
714 | 714 | |
715 | 715 | Function ShowInstfiles |
716 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Profiles installation"))?>" " " |
|
716 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Profiles installation"))?>" " " |
|
717 | 717 | FunctionEnd |
718 | 718 | ;================================ |
719 | 719 | ; Check if a wireless profile exist and put it on delete list |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | |
733 | 733 | Function FindProfile |
734 | 734 | Pop $R8 |
735 | - DetailPrint "<?php WindowsCommon::echoNsis( _("Checking for profile \$R8"))?>" |
|
735 | + DetailPrint "<?php WindowsCommon::echoNsis(_("Checking for profile \$R8"))?>" |
|
736 | 736 | !insertmacro debug_cat 2 "Checking for profile $R8" |
737 | 737 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
738 | 738 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | !insertmacro debug_cat 4 "netsh returned $0" |
741 | 741 | ${If} $0 == 0 |
742 | 742 | !insertmacro debug_cat 1 "found profile $R8" |
743 | - DetailPrint "<?php WindowsCommon::echoNsis( _("found profile \$R8"))?>" |
|
743 | + DetailPrint "<?php WindowsCommon::echoNsis(_("found profile \$R8"))?>" |
|
744 | 744 | Push 0 |
745 | 745 | ${Else} |
746 | 746 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | ${If} $Symantec_installed != 0 |
836 | 836 | !insertmacro debug_cat 3 "Symantec problem" |
837 | 837 | IfSilent +2 |
838 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),\config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
838 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), \config\ConfAssistant::CONSORTIUM['display_name']) ?>" |
|
839 | 839 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
840 | 840 | Quit |
841 | 841 | |
@@ -1128,7 +1128,7 @@ discard block |
||
1128 | 1128 | Function PFXCertificateSelect |
1129 | 1129 | !ifndef SILVERBULLET |
1130 | 1130 | ;TRANSLATION |
1131 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")),\config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1131 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")), \config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1132 | 1132 | ;TRANSLATION |
1133 | 1133 | IfSilent +2 |
1134 | 1134 | MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echoNsis(_("Click OK to continue"))?> " |
@@ -1144,7 +1144,7 @@ discard block |
||
1144 | 1144 | $certPasswordLength = strlen($certPasswordLabel); |
1145 | 1145 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
1146 | 1146 | $certUsernameLength = strlen($certUsernameLabel); |
1147 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
1147 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
1148 | 1148 | ?> |
1149 | 1149 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
1150 | 1150 | !else |
@@ -1161,11 +1161,11 @@ discard block |
||
1161 | 1161 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
1162 | 1162 | ${If} $VistaNoSP == 0 |
1163 | 1163 | !ifdef PFX_USERNAME |
1164 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
1165 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
1164 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
1165 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
1166 | 1166 | !else |
1167 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
1168 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
1167 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
1168 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
1169 | 1169 | !endif |
1170 | 1170 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
1171 | 1171 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1537,7 +1537,7 @@ discard block |
||
1537 | 1537 | Section "-start" |
1538 | 1538 | SectionIn RO |
1539 | 1539 | |
1540 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Installation"))?>" "<?php WindowsCommon::echoNsis( _("Checking for existing wireless profiles"))?>" |
|
1540 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Installation"))?>" "<?php WindowsCommon::echoNsis(_("Checking for existing wireless profiles"))?>" |
|
1541 | 1541 | !ifndef PWD |
1542 | 1542 | !include "certs.nsh" |
1543 | 1543 | !endif |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
53 | 53 | } else { |
54 | 54 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
55 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
55 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
56 | 56 | echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); |
57 | 57 | } |
58 | 58 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | ?> |
110 | 110 | <h1><?php $tablecaption = _("Submitted attributes for this profile"); echo $tablecaption; ?></h1> |
111 | 111 | <table> |
112 | - <caption><?php echo $tablecaption;?></caption> |
|
112 | + <caption><?php echo $tablecaption; ?></caption> |
|
113 | 113 | <tr> |
114 | - <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th> |
|
115 | - <th class="wai-invisible" scope="col"><?php echo _("Details");?></th> |
|
114 | + <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th> |
|
115 | + <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th> |
|
116 | 116 | </tr> |
117 | 117 | <?php |
118 | 118 | $uiElements = new web\lib\admin\UIElements(); |
119 | 119 | // set realm info, if submitted |
120 | 120 | if ($realm !== FALSE) { |
121 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
121 | + $profile->setRealm($anonLocal."@".$realm); |
|
122 | 122 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
123 | 123 | } else { |
124 | 124 | $profile->setRealm(""); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
145 | 145 | } else { |
146 | 146 | $profile->setRealmcheckUser(true, $checkuser_name); |
147 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
147 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
148 | 148 | } |
149 | 149 | } else { |
150 | 150 | $profile->setRealmCheckUser(false); |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | $extratext = ""; |
157 | 157 | if (!empty($realm)) { |
158 | 158 | if ($hint !== FALSE) { |
159 | - $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
159 | + $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
160 | 160 | } else { |
161 | - $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
161 | + $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
162 | 162 | } |
163 | 163 | } |
164 | - echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext); |
|
164 | + echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext); |
|
165 | 165 | } else { |
166 | 166 | $profile->setInputVerificationPreference(false, false); |
167 | 167 | } |
@@ -193,30 +193,30 @@ discard block |
||
193 | 193 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
194 | 194 | } |
195 | 195 | |
196 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
196 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
197 | 197 | // reload the profile to ingest new CA and server names if any; before checking EAP completeness |
198 | 198 | $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier); |
199 | 199 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
200 | 200 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
201 | 201 | continue; |
202 | 202 | } |
203 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
204 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
203 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
204 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
205 | 205 | // add EAP type to profile as requested, but ... |
206 | 206 | $reloadedProfileNr1->addSupportedEapMethod($a, $priority); |
207 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed"); |
|
207 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed"); |
|
208 | 208 | // see if we can enable the EAP type, or if info is missing |
209 | 209 | $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a); |
210 | 210 | if ($eapcompleteness === true) { |
211 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
211 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
212 | 212 | } else { |
213 | 213 | $warntext = ""; |
214 | 214 | if (is_array($eapcompleteness)) { |
215 | 215 | foreach ($eapcompleteness as $item) { |
216 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
216 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
217 | 217 | } |
218 | 218 | } |
219 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
219 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
@@ -227,23 +227,23 @@ discard block |
||
227 | 227 | if (count($significantChanges) > 0) { |
228 | 228 | $myInstOriginal = new \core\IdP($profile->institution); |
229 | 229 | // send a notification/alert mail to someone we know is in charge |
230 | - $text = _("To whom it may concern,") . "\n\n"; |
|
230 | + $text = _("To whom it may concern,")."\n\n"; |
|
231 | 231 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
232 | - $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
232 | + $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
233 | 233 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
234 | - $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n"; |
|
235 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
234 | + $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n"; |
|
235 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
236 | 236 | } |
237 | 237 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
238 | 238 | $text .= _("A new trusted root CA was added. The details are below:")."\n\n"; |
239 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
239 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
240 | 240 | } |
241 | 241 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
242 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
243 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
242 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
243 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
244 | 244 | } |
245 | - $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n"; |
|
246 | - $text .= _("Greetings, ") . "\n\n" . \config\Master::APPEARANCE['productname_long']; |
|
245 | + $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n"; |
|
246 | + $text .= _("Greetings, ")."\n\n".\config\Master::APPEARANCE['productname_long']; |
|
247 | 247 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
248 | 248 | $fed = new core\Federation($myInstOriginal->federation); |
249 | 249 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | <?php |
262 | 262 | if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) { |
263 | 263 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'> |
264 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
264 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
265 | 265 | </form>"; |
266 | 266 | } |
267 | 267 | echo $deco->footer(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
50 | 50 | const SB_GO_AWAY = 1060; |
51 | 51 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
52 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
52 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
53 | 53 | |
54 | 54 | |
55 | 55 | /** |
@@ -96,14 +96,14 @@ discard block |
||
96 | 96 | "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/", |
97 | 97 | ] |
98 | 98 | ] as $consortium => $terms) { |
99 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU'], $terms['PRIV']); |
|
99 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU'], $terms['PRIV']); |
|
100 | 100 | } |
101 | 101 | // this would actually be a checkbox which grays out the actual download button until ACKed |
102 | 102 | $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
103 | 103 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
104 | 104 | $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']); |
105 | 105 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']); |
106 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']); |
|
106 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
107 | 107 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']); |
108 | 108 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
109 | 109 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->test_result = []; |
130 | 130 | $this->test_result['global'] = 0; |
131 | 131 | // parse the schema file to find out the number of expected rows... |
132 | - $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql"); |
|
132 | + $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql"); |
|
133 | 133 | $this->profileOptionCount = 0; |
134 | 134 | $passedTheWindmill = FALSE; |
135 | 135 | foreach ($schema as $schemaLine) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | $this->out[$test] = []; |
158 | 158 | $this->name = $test; |
159 | - $m_name = 'test' . $test; |
|
159 | + $m_name = 'test'.$test; |
|
160 | 160 | $this->test_result[$test] = 0; |
161 | 161 | if (!method_exists($this, $m_name)) { |
162 | 162 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>."); |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | private function testPhp() |
270 | 270 | { |
271 | 271 | if (version_compare(phpversion(), $this->needversionPHP, '>=')) { |
272 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . "."); |
|
272 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion()."."); |
|
273 | 273 | } else { |
274 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have " . phpversion() . "."); |
|
274 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have ".phpversion()."."); |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | */ |
285 | 285 | private function runConstantsTest($config) |
286 | 286 | { |
287 | - $templateConfig = file_get_contents(ROOT . "/config/$config-template.php"); |
|
288 | - $newTemplateConfig = preg_replace("/class *$config/", "class $config" . "_template", $templateConfig); |
|
289 | - file_put_contents(ROOT . "/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | - include(ROOT . "/var/tmp/$config-template.php"); |
|
291 | - unlink(ROOT . "/var/tmp/$config-template.php"); |
|
292 | - $rft = new \ReflectionClass("\config\\$config" . "_template"); |
|
287 | + $templateConfig = file_get_contents(ROOT."/config/$config-template.php"); |
|
288 | + $newTemplateConfig = preg_replace("/class *$config/", "class $config"."_template", $templateConfig); |
|
289 | + file_put_contents(ROOT."/var/tmp/$config-template.php", $newTemplateConfig); |
|
290 | + include(ROOT."/var/tmp/$config-template.php"); |
|
291 | + unlink(ROOT."/var/tmp/$config-template.php"); |
|
292 | + $rft = new \ReflectionClass("\config\\$config"."_template"); |
|
293 | 293 | $templateConstants = $rft->getConstants(); |
294 | 294 | $failResults = []; |
295 | 295 | foreach ($templateConstants as $constant => $value) { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | * Check if all required constants are set |
307 | 307 | */ |
308 | 308 | private function testConfigConstants() { |
309 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
309 | + set_error_handler(function($severity, $message, $file, $line) { |
|
310 | 310 | throw new \ErrorException($message, $severity, $severity, $file, $line); |
311 | 311 | }); |
312 | 312 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $failCount = $failCount + count($failResults); |
318 | 318 | if (count($failResults) > 0) { |
319 | 319 | $this->storeTestResult(\core\common\Entity::L_ERROR, |
320 | - "<strong>The following constants are not set:</strong>" . implode(', ', $failResults)); |
|
320 | + "<strong>The following constants are not set:</strong>".implode(', ', $failResults)); |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly"); |
342 | 342 | } else { |
343 | 343 | $rootFromScript = $m[1] === '' ? '/' : $m[1]; |
344 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . \config\Master::PATHS['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>"); |
|
344 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".\config\Master::PATHS['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>"); |
|
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | if (count($probeReturns) == 0) { |
363 | 363 | $this->storeTestResult(common\Entity::L_OK, "All configured RADIUS/UDP probes are reachable."); |
364 | 364 | } else { |
365 | - $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: " . implode(', ', $probeReturns)); |
|
365 | + $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: ".implode(', ', $probeReturns)); |
|
366 | 366 | } |
367 | 367 | } |
368 | 368 | |
@@ -380,9 +380,9 @@ discard block |
||
380 | 380 | $SSPconfig = \SimpleSAML\Configuration::getInstance(); |
381 | 381 | $sspVersion = explode('.', $SSPconfig->getVersion()); |
382 | 382 | if ((int) $sspVersion[0] >= $this->needversionSSP['major'] && (int) $sspVersion[1] >= $this->needversionSSP['minor']) { |
383 | - $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion)); |
|
383 | + $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion)); |
|
384 | 384 | } else { |
385 | - $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->needversionSSP)); |
|
385 | + $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->needversionSSP)); |
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | } |
@@ -440,8 +440,8 @@ discard block |
||
440 | 440 | */ |
441 | 441 | private function testLogdir() |
442 | 442 | { |
443 | - if (fopen(\config\Master::PATHS['logdir'] . "/debug.log", "a") == FALSE) { |
|
444 | - $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>" . \config\Master::PATHS['logdir'] . "</strong> are not writable!"); |
|
443 | + if (fopen(\config\Master::PATHS['logdir']."/debug.log", "a") == FALSE) { |
|
444 | + $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>".\config\Master::PATHS['logdir']."</strong> are not writable!"); |
|
445 | 445 | } else { |
446 | 446 | $this->storeTestResult(\core\common\Entity::L_OK, "Log directory is writable."); |
447 | 447 | } |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | } |
474 | 474 | |
475 | 475 | $classname = 'Imagick'; |
476 | - if (class_exists('\\' . $classname)) { |
|
476 | + if (class_exists('\\'.$classname)) { |
|
477 | 477 | $this->storeTestResult(\core\common\Entity::L_OK, "PHP extension <strong>Imagick</strong> is installed."); |
478 | 478 | } else { |
479 | 479 | $this->storeTestResult(\core\common\Entity::L_ERROR, "PHP extension <strong>Imagick</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/package/imagick'>here</a>."); |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | { |
570 | 570 | $A = $this->getExecPath('openssl'); |
571 | 571 | if ($A['exec'] != "") { |
572 | - $t = exec($A['exec'] . ' version'); |
|
572 | + $t = exec($A['exec'].' version'); |
|
573 | 573 | if ($A['exec_is'] == "EXPLICIT") { |
574 | 574 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config."); |
575 | 575 | } else { |
@@ -597,14 +597,14 @@ discard block |
||
597 | 597 | } |
598 | 598 | $A = $this->getExecPath('makensis'); |
599 | 599 | if ($A['exec'] != "") { |
600 | - $t = exec($A['exec'] . ' -VERSION'); |
|
600 | + $t = exec($A['exec'].' -VERSION'); |
|
601 | 601 | if ($A['exec_is'] == "EXPLICIT") { |
602 | 602 | $this->storeTestResult(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config."); |
603 | 603 | } else { |
604 | 604 | $this->storeTestResult(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config."); |
605 | 605 | } |
606 | 606 | $outputArray = []; |
607 | - exec($A['exec'] . ' -HELP', $outputArray); |
|
607 | + exec($A['exec'].' -HELP', $outputArray); |
|
608 | 608 | $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray)); |
609 | 609 | if ($t1 == 1 && \config\ConfAssistant::NSIS_VERSION == 2) { |
610 | 610 | $this->storeTestResult(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!"); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $NSIS_Module_status = []; |
635 | 635 | foreach ($this->NSISModules as $module) { |
636 | 636 | unset($out); |
637 | - exec(\config\ConfAssistant::PATHS['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
637 | + exec(\config\ConfAssistant::PATHS['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
638 | 638 | if ($retval > 0) { |
639 | 639 | $NSIS_Module_status[$module] = 0; |
640 | 640 | } else { |
@@ -701,8 +701,8 @@ discard block |
||
701 | 701 | $locales = shell_exec("locale -a"); |
702 | 702 | $allthere = ""; |
703 | 703 | foreach (\config\Master::LANGUAGES as $onelanguage) { |
704 | - if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) { |
|
705 | - $allthere .= $onelanguage['locale'] . " "; |
|
704 | + if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) { |
|
705 | + $allthere .= $onelanguage['locale']." "; |
|
706 | 706 | } |
707 | 707 | } |
708 | 708 | if ($allthere == "") { |
@@ -716,47 +716,47 @@ discard block |
||
716 | 716 | ["SETTING" => \config\Master::APPEARANCE['from-mail'], |
717 | 717 | "DEFVALUE" => "[email protected]", |
718 | 718 | "COMPLAINTSTRING" => "APPEARANCE/from-mail ", |
719 | - "REQUIRED" => FALSE,], |
|
719 | + "REQUIRED" => FALSE, ], |
|
720 | 720 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['url'], |
721 | 721 | "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!", |
722 | 722 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ", |
723 | - "REQUIRED" => FALSE,], |
|
723 | + "REQUIRED" => FALSE, ], |
|
724 | 724 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['display'], |
725 | 725 | "DEFVALUE" => "[email protected]", |
726 | 726 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ", |
727 | - "REQUIRED" => FALSE,], |
|
727 | + "REQUIRED" => FALSE, ], |
|
728 | 728 | ["SETTING" => \config\Master::APPEARANCE['support-contact']['developer-mail'], |
729 | 729 | "DEFVALUE" => "[email protected]", |
730 | 730 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ", |
731 | - "REQUIRED" => FALSE,], |
|
731 | + "REQUIRED" => FALSE, ], |
|
732 | 732 | ["SETTING" => \config\Master::APPEARANCE['abuse-mail'], |
733 | 733 | "DEFVALUE" => "[email protected]", |
734 | 734 | "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ", |
735 | - "REQUIRED" => FALSE,], |
|
735 | + "REQUIRED" => FALSE, ], |
|
736 | 736 | ["SETTING" => \config\Master::APPEARANCE['MOTD'], |
737 | 737 | "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!", |
738 | 738 | "COMPLAINTSTRING" => "APPEARANCE/MOTD ", |
739 | - "REQUIRED" => FALSE,], |
|
739 | + "REQUIRED" => FALSE, ], |
|
740 | 740 | ["SETTING" => \config\Master::APPEARANCE['webcert_CRLDP'], |
741 | 741 | "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'], |
742 | 742 | "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ", |
743 | - "REQUIRED" => TRUE,], |
|
743 | + "REQUIRED" => TRUE, ], |
|
744 | 744 | ["SETTING" => \config\Master::APPEARANCE['webcert_OCSP'], |
745 | 745 | "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'], |
746 | 746 | "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ", |
747 | - "REQUIRED" => TRUE,], |
|
747 | + "REQUIRED" => TRUE, ], |
|
748 | 748 | ["SETTING" => \config\Master::DB['INST']['host'], |
749 | 749 | "DEFVALUE" => "db.host.example", |
750 | 750 | "COMPLAINTSTRING" => "DB/INST ", |
751 | - "REQUIRED" => TRUE,], |
|
751 | + "REQUIRED" => TRUE, ], |
|
752 | 752 | ["SETTING" => \config\Master::DB['INST']['host'], |
753 | 753 | "DEFVALUE" => "db.host.example", |
754 | 754 | "COMPLAINTSTRING" => "DB/USER ", |
755 | - "REQUIRED" => TRUE,], |
|
755 | + "REQUIRED" => TRUE, ], |
|
756 | 756 | ["SETTING" => \config\Master::DB['EXTERNAL']['host'], |
757 | 757 | "DEFVALUE" => "customerdb.otherhost.example", |
758 | 758 | "COMPLAINTSTRING" => "DB/EXTERNAL ", |
759 | - "REQUIRED" => FALSE,], |
|
759 | + "REQUIRED" => FALSE, ], |
|
760 | 760 | ]; |
761 | 761 | |
762 | 762 | /** |
@@ -785,11 +785,11 @@ discard block |
||
785 | 785 | if (isset(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'])) { |
786 | 786 | foreach (\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'] as $cadata) { |
787 | 787 | foreach ($cadata['certificates'] as $cert_files) { |
788 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) { |
|
789 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " "; |
|
788 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) { |
|
789 | + $defaultvalues .= "CERTIFICATE/".$cert_files['public']." "; |
|
790 | 790 | } |
791 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) { |
|
792 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " "; |
|
791 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) { |
|
792 | + $defaultvalues .= "CERTIFICATE/".$cert_files['private']." "; |
|
793 | 793 | } |
794 | 794 | } |
795 | 795 | } |
@@ -882,14 +882,14 @@ discard block |
||
882 | 882 | if ($global_no_cache) { |
883 | 883 | foreach ($Devs as $dev => $D) { |
884 | 884 | if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) { |
885 | - $no_cache_dev .= $dev . " "; |
|
885 | + $no_cache_dev .= $dev." "; |
|
886 | 886 | $no_cache_dev_count++; |
887 | 887 | } |
888 | 888 | } |
889 | 889 | } else { |
890 | 890 | foreach ($Devs as $dev => $D) { |
891 | 891 | if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) { |
892 | - $no_cache_dev .= $dev . " "; |
|
892 | + $no_cache_dev .= $dev." "; |
|
893 | 893 | $no_cache_dev_count++; |
894 | 894 | } |
895 | 895 | } |
@@ -928,13 +928,13 @@ discard block |
||
928 | 928 | $mail->isHTML(FALSE); |
929 | 929 | $mail->CharSet = 'UTF-8'; |
930 | 930 | $mail->From = \config\Master::APPEARANCE['from-mail']; |
931 | - $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System"; |
|
931 | + $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System"; |
|
932 | 932 | $mail->addAddress(\config\Master::APPEARANCE['abuse-mail']); |
933 | 933 | $mail->Subject = "testing CAT configuration mail"; |
934 | 934 | $mail->Body = "Testing CAT mailing\n"; |
935 | 935 | $sent = $mail->send(); |
936 | 936 | if ($sent) { |
937 | - $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . \config\Master::APPEARANCE['abuse-mail'] . " mailbox if the message was receiced."); |
|
937 | + $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".\config\Master::APPEARANCE['abuse-mail']." mailbox if the message was receiced."); |
|
938 | 938 | } else { |
939 | 939 | $this->storeTestResult(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS"); |
940 | 940 | } |