@@ -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(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // also send user back to the overview page |
73 | 73 | if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) { |
74 | 74 | // basic sanity checks before we hand this over to openssl |
75 | - $sanitisedCsr = $validator->string($_POST['CSR'] ?? "" , TRUE); |
|
75 | + $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE); |
|
76 | 76 | if (openssl_csr_get_public_key($sanitisedCsr) === FALSE) { |
77 | 77 | throw new Exception("Sorry: Unable to parse the submitted public key - no public key inside?"); |
78 | 78 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $fed = $validator->Federation($_POST['NRO-list']); |
87 | 87 | $country = strtoupper($fed->tld); |
88 | 88 | $DN[] = "C=$country"; |
89 | - $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)]; |
|
89 | + $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)]; |
|
90 | 90 | $DN[] = "CN=comes.from.eduroam.db"; |
91 | 91 | $policies[] = "eduroam IdP"; |
92 | 92 | $policies[] = "eduroam SP"; |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | default: |
107 | 107 | throw new Exception("Sorry: Unknown level of issuance requested."); |
108 | 108 | } |
109 | - echo "<p>" . _("Requesting a certificate with the following properties"); |
|
109 | + echo "<p>"._("Requesting a certificate with the following properties"); |
|
110 | 110 | echo "<ul>"; |
111 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
112 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>"; |
|
113 | - echo "<li>" . _("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').") . "</li>"; |
|
111 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
112 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>"; |
|
113 | + echo "<li>"._("Requester Contact Details: will come from eduroam DB (using stub 'Someone, <[email protected]>').")."</li>"; |
|
114 | 114 | echo "</ul></p>"; |
115 | - $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => [ "file", "/tmp/voodoo-error", "a"] ], $pipes); |
|
115 | + $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => ["file", "/tmp/voodoo-error", "a"]], $pipes); |
|
116 | 116 | if (is_resource($ossl)) { |
117 | 117 | fwrite($pipes[0], $_POST['CSR']); |
118 | 118 | fclose($pipes[0]); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | echo "<p>"._("This is the new CSR (return code was $retval)")."<pre>$newCsr</pre></p>"; |
126 | 126 | echo "<p>"._("Please WAIT. This can take several MINUTES!")."</p>"; |
127 | - $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "CN" => "[email protected]" , "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN) ,"FED" => $country]; |
|
127 | + $newCsrWithMeta = ["CSR" => /* $newCsr */ $_POST['CSR'], "CN" => "[email protected]", "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN), "FED" => $country]; |
|
128 | 128 | $eduPki = new core\CertificationAuthorityEduPkiServer(); |
129 | 129 | // our certs can be good for max 5 years |
130 | 130 | $cert = $eduPki->signRequest($newCsrWithMeta, 1825); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | echo "<p>"._("Here is your certificate:")."<pre>$certPem</pre></p>"; |
133 | 133 | ?> |
134 | 134 | <form action="overview_certificates.php" method="GET"> |
135 | - <button type="submit"><?php echo _("Back to Certificate Overview");?></button> |
|
135 | + <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
|
136 | 136 | </form> |
137 | 137 | <?php |
138 | 138 | echo $deco->footer(); |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | <?php |
147 | 147 | if (count($feds) == 1) { |
148 | 148 | $fedObject = new \core\Federation($feds[0]['value']); |
149 | - echo " <strong>" . $cat->knownFederations[$fedObject->tld] . "</strong>"; |
|
150 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $fedObject->tld . '"/>'; |
|
149 | + echo " <strong>".$cat->knownFederations[$fedObject->tld]."</strong>"; |
|
150 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$fedObject->tld.'"/>'; |
|
151 | 151 | } else { |
152 | 152 | ?> |
153 | 153 | <select name="NRO-list" id="NRO-list"> |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | <?php |
156 | 156 | foreach ($feds as $oneFed) { |
157 | 157 | $fedObject = new \core\Federation($oneFed['value']); |
158 | - echo '<option value="' . strtoupper($fedObject->tld) . '">' . $cat->knownFederations[$fedObject->tld] . "</option>"; |
|
158 | + echo '<option value="'.strtoupper($fedObject->tld).'">'.$cat->knownFederations[$fedObject->tld]."</option>"; |
|
159 | 159 | } |
160 | 160 | ?> |
161 | 161 | </select> |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | } |
177 | 177 | foreach ($allIdPs as $id => $name) { |
178 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
178 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
179 | 179 | } |
180 | 180 | ?> |
181 | 181 | </select> |
@@ -49,9 +49,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -688,11 +688,11 @@ discard block |
||
688 | 688 | if (isset(CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-clientcerts'])) { |
689 | 689 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-clientcerts'] as $cadata) { |
690 | 690 | foreach ($cadata['certificates'] as $cert_files) { |
691 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) { |
|
692 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " "; |
|
691 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) { |
|
692 | + $defaultvalues .= "CERTIFICATE/".$cert_files['public']." "; |
|
693 | 693 | } |
694 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) { |
|
695 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " "; |
|
694 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) { |
|
695 | + $defaultvalues .= "CERTIFICATE/".$cert_files['private']." "; |
|
696 | 696 | } |
697 | 697 | } |
698 | 698 | } |
@@ -785,14 +785,14 @@ discard block |
||
785 | 785 | if ($global_no_cache) { |
786 | 786 | foreach ($Devs as $dev => $D) { |
787 | 787 | if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) { |
788 | - $no_cache_dev .= $dev . " "; |
|
788 | + $no_cache_dev .= $dev." "; |
|
789 | 789 | $no_cache_dev_count++; |
790 | 790 | } |
791 | 791 | } |
792 | 792 | } else { |
793 | 793 | foreach ($Devs as $dev => $D) { |
794 | 794 | if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) { |
795 | - $no_cache_dev .= $dev . " "; |
|
795 | + $no_cache_dev .= $dev." "; |
|
796 | 796 | $no_cache_dev_count++; |
797 | 797 | } |
798 | 798 | } |
@@ -831,13 +831,13 @@ discard block |
||
831 | 831 | $mail->isHTML(FALSE); |
832 | 832 | $mail->CharSet = 'UTF-8'; |
833 | 833 | $mail->From = CONFIG['APPEARANCE']['from-mail']; |
834 | - $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System"; |
|
834 | + $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System"; |
|
835 | 835 | $mail->addAddress(CONFIG['APPEARANCE']['abuse-mail']); |
836 | 836 | $mail->Subject = "testing CAT configuration mail"; |
837 | 837 | $mail->Body = "Testing CAT mailing\n"; |
838 | 838 | $sent = $mail->send(); |
839 | 839 | if ($sent) { |
840 | - $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . CONFIG['APPEARANCE']['abuse-mail'] . " mailbox if the message was receiced."); |
|
840 | + $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".CONFIG['APPEARANCE']['abuse-mail']." mailbox if the message was receiced."); |
|
841 | 841 | } else { |
842 | 842 | $this->testReturn(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS"); |
843 | 843 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function __construct() { |
96 | 96 | $this->loggerInstance = new Logging(); |
97 | - $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n"); |
|
97 | + $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n"); |
|
98 | 98 | $this->languageInstance = new Language(); |
99 | 99 | Entity::intoThePotatoes("core"); |
100 | 100 | // some config elements are displayable. We need some dummies to |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $dummy_inst2 = _("organisation"); |
107 | 107 | $dummy_inst3 = _("Identity Provider"); |
108 | 108 | // and do something useless with the strings so that there's no "unused" complaint |
109 | - if (strlen($dummy_NRO . $dummy_inst1 . $dummy_inst2 . $dummy_inst3) < 0) { |
|
109 | + if (strlen($dummy_NRO.$dummy_inst1.$dummy_inst2.$dummy_inst3) < 0) { |
|
110 | 110 | throw new \Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole."); |
111 | 111 | } |
112 | 112 | Entity::$nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * Logs the end of lifetime of the entity to the debug log on level 5. |
122 | 122 | */ |
123 | 123 | public function __destruct() { |
124 | - (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n"); |
|
124 | + (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n"); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1) { |
153 | 153 | $loggerInstance = new Logging(); |
154 | - $name = md5(time() . rand()); |
|
154 | + $name = md5(time().rand()); |
|
155 | 155 | $path = ROOT; |
156 | 156 | switch ($purpose) { |
157 | 157 | case 'silverbullet': |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | default: |
170 | 170 | throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n"); |
171 | 171 | } |
172 | - $tmpDir = $path . '/' . $name; |
|
172 | + $tmpDir = $path.'/'.$name; |
|
173 | 173 | $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n"); |
174 | 174 | if (!mkdir($tmpDir, 0700, true)) { |
175 | 175 | if ($failIsFatal) { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @return void |
190 | 190 | */ |
191 | 191 | public static function rrmdir($dir) { |
192 | - foreach (glob($dir . '/*') as $file) { |
|
192 | + foreach (glob($dir.'/*') as $file) { |
|
193 | 193 | if (is_dir($file)) { |
194 | 194 | Entity::rrmdir($file); |
195 | 195 | } else { |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | } |
215 | 215 | // these substr() are guaranteed to yield actual string data, as the |
216 | 216 | // base string is an MD5 hash - has sufficient length |
217 | - $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-'; |
|
218 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-'; |
|
219 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-'; |
|
220 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-'; |
|
217 | + $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-'; |
|
218 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-'; |
|
219 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-'; |
|
220 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-'; |
|
221 | 221 | $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12); |
222 | - return $prefix . $uuid; |
|
222 | + return $prefix.$uuid; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | for ($i = count($trace); $i--; $i > 0) { |
259 | 259 | if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) { |
260 | 260 | if ($showTrace) { |
261 | - echo "FOUND caller: ".print_r($trace[$i],true). " - class is ".$trace[$i]['class']; |
|
261 | + echo "FOUND caller: ".print_r($trace[$i], true)." - class is ".$trace[$i]['class']; |
|
262 | 262 | } |
263 | 263 | $caller = $trace[$i]; |
264 | 264 | break; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT)); |
270 | 270 | if ($showTrace === TRUE) { |
271 | 271 | echo "<pre>".print_r($trace, true)."</pre>"; |
272 | - echo "CLASS = " . $myName ."<br/>"; |
|
272 | + echo "CLASS = ".$myName."<br/>"; |
|
273 | 273 | } |
274 | 274 | if (preg_match("/diag/", $myName) == 1) { |
275 | 275 | $ret = "diagnostics"; |
@@ -302,10 +302,10 @@ discard block |
||
302 | 302 | if ($catalogue === NULL) { |
303 | 303 | $theCatalogue = Entity::determineOwnCatalogue($trace); |
304 | 304 | textdomain($theCatalogue); |
305 | - bindtextdomain($theCatalogue, ROOT . "/translation/"); |
|
305 | + bindtextdomain($theCatalogue, ROOT."/translation/"); |
|
306 | 306 | } else { |
307 | 307 | textdomain($catalogue); |
308 | - bindtextdomain($catalogue, ROOT . "/translation/"); |
|
308 | + bindtextdomain($catalogue, ROOT."/translation/"); |
|
309 | 309 | } |
310 | 310 | } |
311 | 311 |