@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $invitationObject = new SilverbulletInvitation($token); |
156 | 156 | $profile = new ProfileSilverbullet($invitationObject->profile); |
157 | 157 | $inst = new IdP($profile->institution); |
158 | - $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n"); |
|
158 | + $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n"); |
|
159 | 159 | if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) { |
160 | 160 | throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have gotten that far!"); |
161 | 161 | } |
@@ -168,12 +168,12 @@ discard block |
||
168 | 168 | throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!"); |
169 | 169 | } |
170 | 170 | $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow); |
171 | - $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n"); |
|
171 | + $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n"); |
|
172 | 172 | $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry); |
173 | 173 | if ($expiryDateObject === FALSE) { |
174 | 174 | throw new Exception("The expiry date we got from the DB is bogus!"); |
175 | 175 | } |
176 | - $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n"); |
|
176 | + $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n"); |
|
177 | 177 | // date_create with no parameters can't fail, i.e. is never FALSE |
178 | 178 | $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject); |
179 | 179 | $expiryDays = $validity->days + 1; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $certString = ""; |
223 | 223 | openssl_x509_export($cert, $certString); |
224 | 224 | $parsedCert = $x509->processCertificate($certString); |
225 | - $loggerInstance->debug(5, "CERTINFO: " . print_r($parsedCert['full_details'], true)); |
|
225 | + $loggerInstance->debug(5, "CERTINFO: ".print_r($parsedCert['full_details'], true)); |
|
226 | 226 | $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s"); |
227 | 227 | |
228 | 228 | // store new cert info in DB |
@@ -280,26 +280,26 @@ discard block |
||
280 | 280 | $cat = new CAT(); |
281 | 281 | $tempdirArray = $cat->createTemporaryDirectory("test"); |
282 | 282 | $tempdir = $tempdirArray['dir']; |
283 | - $nowIndexTxt = (new \DateTime())->format("ymdHis") . "Z"; |
|
284 | - $expiryIndexTxt = $originalExpiry->format("ymdHis") . "Z"; |
|
283 | + $nowIndexTxt = (new \DateTime())->format("ymdHis")."Z"; |
|
284 | + $expiryIndexTxt = $originalExpiry->format("ymdHis")."Z"; |
|
285 | 285 | $serialHex = strtoupper(dechex($this->serial)); |
286 | 286 | if (strlen($serialHex) % 2 == 1) { |
287 | - $serialHex = "0" . $serialHex; |
|
287 | + $serialHex = "0".$serialHex; |
|
288 | 288 | } |
289 | 289 | |
290 | - $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . CONFIG_CONFASSISTANT['CONSORTIUM']['name'] . "/OU=$federation/CN=$this->username\n"; |
|
290 | + $indexStatement = "$certstatus\t$expiryIndexTxt\t".($certstatus == "R" ? "$nowIndexTxt,unspecified" : "")."\t$serialHex\tunknown\t/O=".CONFIG_CONFASSISTANT['CONSORTIUM']['name']."/OU=$federation/CN=$this->username\n"; |
|
291 | 291 | $logHandle->debug(4, "index.txt contents-to-be: $indexStatement"); |
292 | - if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) { |
|
292 | + if (!file_put_contents($tempdir."/index.txt", $indexStatement)) { |
|
293 | 293 | $logHandle->debug(1, "Unable to write openssl index.txt file for revocation handling!"); |
294 | 294 | } |
295 | 295 | // index.txt.attr is dull but needs to exist |
296 | - file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n"); |
|
296 | + file_put_contents($tempdir."/index.txt.attr", "unique_subject = yes\n"); |
|
297 | 297 | // call "openssl ocsp" to manufacture our own OCSP statement |
298 | 298 | // adding "-rmd sha1" to the following command-line makes the |
299 | 299 | // choice of signature algorithm for the response explicit |
300 | 300 | // but it's only available from openssl-1.1.0 (which we do not |
301 | 301 | // want to require just for that one thing). |
302 | - $execCmd = CONFIG['PATHS']['openssl'] . " ocsp -issuer " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rsigner " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rkey " . ROOT . "/config/SilverbulletClientCerts/real-".$this->ca_type.".key -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der"; |
|
302 | + $execCmd = CONFIG['PATHS']['openssl']." ocsp -issuer ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -sha1 -ndays 10 -no_nonce -serial 0x$serialHex -CA ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rsigner ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".pem -rkey ".ROOT."/config/SilverbulletClientCerts/real-".$this->ca_type.".key -index $tempdir/index.txt -no_cert_verify -respout $tempdir/$serialHex.response.der"; |
|
303 | 303 | $logHandle->debug(2, "Calling openssl ocsp with following cmdline: $execCmd\n"); |
304 | 304 | $output = []; |
305 | 305 | $return = 999; |
@@ -307,11 +307,11 @@ discard block |
||
307 | 307 | if ($return !== 0) { |
308 | 308 | throw new Exception("Non-zero return value from openssl ocsp!"); |
309 | 309 | } |
310 | - $ocsp = file_get_contents($tempdir . "/$serialHex.response.der"); |
|
310 | + $ocsp = file_get_contents($tempdir."/$serialHex.response.der"); |
|
311 | 311 | // remove the temp dir! |
312 | - unlink($tempdir . "/$serialHex.response.der"); |
|
313 | - unlink($tempdir . "/index.txt.attr"); |
|
314 | - unlink($tempdir . "/index.txt"); |
|
312 | + unlink($tempdir."/$serialHex.response.der"); |
|
313 | + unlink($tempdir."/index.txt.attr"); |
|
314 | + unlink($tempdir."/index.txt"); |
|
315 | 315 | rmdir($tempdir); |
316 | 316 | break; |
317 | 317 | default: |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | $username = ""; |
366 | 366 | while ($usernameIsUnique === FALSE) { |
367 | 367 | $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz"); |
368 | - $username = $usernameLocalPart . "@" . $realm; |
|
368 | + $username = $usernameLocalPart."@".$realm; |
|
369 | 369 | $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ?", "s", $username); |
370 | 370 | // SELECT -> resource, not boolean |
371 | 371 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) { |
@@ -417,10 +417,10 @@ discard block |
||
417 | 417 | $databaseHandle = DBConnection::handle("INST"); |
418 | 418 | switch (CONFIG_CONFASSISTANT['SILVERBULLET']['CA']['type']) { |
419 | 419 | case "embedded": |
420 | - $rootCaPem = file_get_contents(ROOT . "/config/SilverbulletClientCerts/rootca-$certtype.pem"); |
|
421 | - $issuingCaPem = file_get_contents(ROOT . "/config/SilverbulletClientCerts/real-$certtype.pem"); |
|
420 | + $rootCaPem = file_get_contents(ROOT."/config/SilverbulletClientCerts/rootca-$certtype.pem"); |
|
421 | + $issuingCaPem = file_get_contents(ROOT."/config/SilverbulletClientCerts/real-$certtype.pem"); |
|
422 | 422 | $issuingCa = openssl_x509_read($issuingCaPem); |
423 | - $issuingCaKey = openssl_pkey_get_private("file://" . ROOT . "/config/SilverbulletClientCerts/real-$certtype.key"); |
|
423 | + $issuingCaKey = openssl_pkey_get_private("file://".ROOT."/config/SilverbulletClientCerts/real-$certtype.key"); |
|
424 | 424 | $nonDupSerialFound = FALSE; |
425 | 425 | do { |
426 | 426 | $serial = random_int(1000000000, PHP_INT_MAX); |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | throw new Exception("Unknown cert type!"); |
443 | 443 | } |
444 | 444 | return [ |
445 | - "CERT" => openssl_csr_sign($csr, $issuingCa, $issuingCaKey, $expiryDays, ['digest_alg' => $alg, 'config' => dirname(__DIR__) . "/config/SilverbulletClientCerts/openssl-$certtype.cnf"], $serial), |
|
445 | + "CERT" => openssl_csr_sign($csr, $issuingCa, $issuingCaKey, $expiryDays, ['digest_alg' => $alg, 'config' => dirname(__DIR__)."/config/SilverbulletClientCerts/openssl-$certtype.cnf"], $serial), |
|
446 | 446 | "SERIAL" => $serial, |
447 | 447 | "ISSUER" => $issuingCaPem, |
448 | 448 | "ROOT" => $rootCaPem, |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } else { |
147 | 147 | $this->databaseHandle->exec("INSERT INTO ownership (user_id, institution_id, blesslevel, orig_mail) VALUES(?, ?, ?, ?)", "siss", $owner, $catId, $level, $destMail); |
148 | 148 | } |
149 | - $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP " . $invitationDetails->cat_institution_id . " - added user as owner"); |
|
149 | + $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP ".$invitationDetails->cat_institution_id." - added user as owner"); |
|
150 | 150 | common\Entity::outOfThePotatoes(); |
151 | 151 | return new IdP($invitationDetails->cat_institution_id); |
152 | 152 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $idp = new IdP($fed->newIdP($owner, $invitationDetails->invite_issuer_level, $invitationDetails->invite_dest_mail, $bestnameguess)); |
169 | 169 | } |
170 | 170 | $idp->addAttribute("general:instname", 'C', $bestnameguess); |
171 | - $this->loggerInstance->writeAudit($owner, "NEW", "IdP " . $idp->identifier . " - created from invitation"); |
|
171 | + $this->loggerInstance->writeAudit($owner, "NEW", "IdP ".$idp->identifier." - created from invitation"); |
|
172 | 172 | |
173 | 173 | // in case we have more admins in the queue which were invited to |
174 | 174 | // administer the same inst but haven't redeemed their invitations |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | WHERE invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0 AND name = ? AND country = ? AND ( cat_institution_id IS NULL OR external_db_uniquehandle IS NULL ) ", "ss", $invitationDetails->name, $invitationDetails->country); |
183 | 183 | // SELECT -> resource, no boolean |
184 | 184 | while ($pendingDetail = mysqli_fetch_object(/** @scrutinizer ignore-type */ $otherPending)) { |
185 | - $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = " . $idp->identifier . " WHERE id = " . $pendingDetail->id); |
|
185 | + $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = ".$idp->identifier." WHERE id = ".$pendingDetail->id); |
|
186 | 186 | } |
187 | 187 | common\Entity::outOfThePotatoes(); |
188 | 188 | return $idp; |
@@ -276,9 +276,9 @@ discard block |
||
276 | 276 | $retval = []; |
277 | 277 | $invitations = $this->databaseHandle->exec("SELECT cat_institution_id, country, name, invite_issuer_level, invite_dest_mail, invite_token , TIMESTAMPADD(DAY, 1, invite_created) as expiry |
278 | 278 | FROM invitations |
279 | - WHERE cat_institution_id " . ( $idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL") . " AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
279 | + WHERE cat_institution_id " . ($idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL")." AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
280 | 280 | // SELECT -> resource, not boolean |
281 | - $this->loggerInstance->debug(4, "Retrieving pending invitations for " . ($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation" ) . ".\n"); |
|
281 | + $this->loggerInstance->debug(4, "Retrieving pending invitations for ".($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation").".\n"); |
|
282 | 282 | while ($invitationQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $invitations)) { |
283 | 283 | $retval[] = ["country" => $invitationQuery->country, "name" => $invitationQuery->name, "mail" => $invitationQuery->invite_dest_mail, "token" => $invitationQuery->invite_token, "expiry" => $invitationQuery->expiry]; |
284 | 284 | } |
@@ -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(); |
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 | /** |
@@ -264,8 +264,8 @@ discard block |
||
264 | 264 | // if called from a class, guess based on the class name; |
265 | 265 | // otherwise, on the filename relative to ROOT |
266 | 266 | $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT)); |
267 | - $loggerInstance->debug(1,$caller); |
|
268 | - $loggerInstance->debug(1,"\nFOUND ".$myName."\n"); |
|
267 | + $loggerInstance->debug(1, $caller); |
|
268 | + $loggerInstance->debug(1, "\nFOUND ".$myName."\n"); |
|
269 | 269 | if (preg_match("/diag/", $myName) == 1) { |
270 | 270 | $ret = "diagnostics"; |
271 | 271 | } elseif (preg_match("/core/", $myName) == 1) { |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | } else { |
280 | 280 | $ret = "web_user"; |
281 | 281 | } |
282 | - $loggerInstance->debug(1,"\nRETURNING ".$ret."\n"); |
|
282 | + $loggerInstance->debug(1, "\nRETURNING ".$ret."\n"); |
|
283 | 283 | return $ret; |
284 | 284 | } |
285 | 285 | |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | if ($catalogue === NULL) { |
298 | 298 | $theCatalogue = Entity::determineOwnCatalogue(); |
299 | 299 | textdomain($theCatalogue); |
300 | - bindtextdomain($theCatalogue, ROOT . "/translation/"); |
|
300 | + bindtextdomain($theCatalogue, ROOT."/translation/"); |
|
301 | 301 | } else { |
302 | 302 | textdomain($catalogue); |
303 | - bindtextdomain($catalogue, ROOT . "/translation/"); |
|
303 | + bindtextdomain($catalogue, ROOT."/translation/"); |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | use GeoIp2\Database\Reader; |
49 | 49 | use \Exception; |
50 | 50 | |
51 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
52 | -require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/PHPMailer.php"; |
|
53 | -require_once dirname(dirname(__FILE__)) . "/core/PHPMailer/src/SMTP.php"; |
|
51 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
52 | +require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/PHPMailer.php"; |
|
53 | +require_once dirname(dirname(__FILE__))."/core/PHPMailer/src/SMTP.php"; |
|
54 | 54 | |
55 | 55 | class SanityTests extends CAT { |
56 | 56 | /* in this section set current CAT requirements */ |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->test_result = []; |
91 | 91 | $this->test_result['global'] = 0; |
92 | 92 | // parse the schema file to find out the number of expected rows... |
93 | - $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql"); |
|
93 | + $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql"); |
|
94 | 94 | $this->profile_option_ct = 0; |
95 | 95 | $passedTheWindmill = FALSE; |
96 | 96 | foreach ($schema as $schemaLine) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function test($test) { |
117 | 117 | $this->out[$test] = []; |
118 | 118 | $this->name = $test; |
119 | - $m_name = $test . '_test'; |
|
119 | + $m_name = $test.'_test'; |
|
120 | 120 | $this->test_result[$test] = 0; |
121 | 121 | if (!method_exists($this, $m_name)) { |
122 | 122 | $this->testReturn(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>."); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $matchArray = []; |
205 | 205 | preg_match('/([^ ]+) ?/', $config['PATHS'][$pathToCheck], $matchArray); |
206 | 206 | $exe = $matchArray[1]; |
207 | - $the_path = exec("which " . $config['PATHS'][$pathToCheck]); |
|
207 | + $the_path = exec("which ".$config['PATHS'][$pathToCheck]); |
|
208 | 208 | if ($the_path == $exe) { |
209 | 209 | $exec_is = "EXPLICIT"; |
210 | 210 | } else { |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | */ |
224 | 224 | private function php_test() { |
225 | 225 | if (version_compare(phpversion(), $this->php_needversion, '>=')) { |
226 | - $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . "."); |
|
226 | + $this->testReturn(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion()."."); |
|
227 | 227 | } else { |
228 | - $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() . "."); |
|
228 | + $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()."."); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $this->testReturn(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly"); |
242 | 242 | } else { |
243 | 243 | $rootFromScript = $m[1] === '' ? '/' : $m[1]; |
244 | - $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>"); |
|
244 | + $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>"); |
|
245 | 245 | } |
246 | 246 | } |
247 | 247 | |
@@ -258,9 +258,9 @@ discard block |
||
258 | 258 | $SSPconfig = \SimpleSAML_Configuration::getInstance(); |
259 | 259 | $sspVersion = explode('.', $SSPconfig->getVersion()); |
260 | 260 | if ((int) $sspVersion[0] >= $this->ssp_needversion['major'] && (int) $sspVersion[1] >= $this->ssp_needversion['minor']) { |
261 | - $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion)); |
|
261 | + $this->testReturn(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion)); |
|
262 | 262 | } else { |
263 | - $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->ssp_needversion)); |
|
263 | + $this->testReturn(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->ssp_needversion)); |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | } |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | * @return void |
315 | 315 | */ |
316 | 316 | private function logdir_test() { |
317 | - if (fopen(CONFIG['PATHS']['logdir'] . "/debug.log", "a") == FALSE) { |
|
318 | - $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>" . CONFIG['PATHS']['logdir'] . "</strong> are not writable!"); |
|
317 | + if (fopen(CONFIG['PATHS']['logdir']."/debug.log", "a") == FALSE) { |
|
318 | + $this->testReturn(\core\common\Entity::L_WARN, "Log files in <strong>".CONFIG['PATHS']['logdir']."</strong> are not writable!"); |
|
319 | 319 | } else { |
320 | 320 | $this->testReturn(\core\common\Entity::L_OK, "Log directory is writable."); |
321 | 321 | } |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | private function openssl_test() { |
440 | 440 | $A = $this->getExecPath('openssl'); |
441 | 441 | if ($A['exec'] != "") { |
442 | - $t = exec($A['exec'] . ' version'); |
|
442 | + $t = exec($A['exec'].' version'); |
|
443 | 443 | if ($A['exec_is'] == "EXPLICIT") { |
444 | 444 | $this->testReturn(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config."); |
445 | 445 | } else { |
@@ -466,14 +466,14 @@ discard block |
||
466 | 466 | } |
467 | 467 | $A = $this->getExecPath('makensis'); |
468 | 468 | if ($A['exec'] != "") { |
469 | - $t = exec($A['exec'] . ' -VERSION'); |
|
469 | + $t = exec($A['exec'].' -VERSION'); |
|
470 | 470 | if ($A['exec_is'] == "EXPLICIT") { |
471 | 471 | $this->testReturn(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config."); |
472 | 472 | } else { |
473 | 473 | $this->testReturn(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config."); |
474 | 474 | } |
475 | 475 | $outputArray = []; |
476 | - exec($A['exec'] . ' -HELP', $outputArray); |
|
476 | + exec($A['exec'].' -HELP', $outputArray); |
|
477 | 477 | $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray)); |
478 | 478 | if ($t1 == 1 && CONFIG_CONFASSISTANT['NSIS_VERSION'] == 2) { |
479 | 479 | $this->testReturn(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!"); |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $NSIS_Module_status = []; |
503 | 503 | foreach ($this->NSIS_Modules as $module) { |
504 | 504 | unset($out); |
505 | - exec(CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
505 | + exec(CONFIG_CONFASSISTANT['PATHS']['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval); |
|
506 | 506 | if ($retval > 0) { |
507 | 507 | $NSIS_Module_status[$module] = 0; |
508 | 508 | } else { |
@@ -565,8 +565,8 @@ discard block |
||
565 | 565 | $locales = shell_exec("locale -a"); |
566 | 566 | $allthere = ""; |
567 | 567 | foreach (CONFIG['LANGUAGES'] as $onelanguage) { |
568 | - if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) { |
|
569 | - $allthere .= $onelanguage['locale'] . " "; |
|
568 | + if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) { |
|
569 | + $allthere .= $onelanguage['locale']." "; |
|
570 | 570 | } |
571 | 571 | } |
572 | 572 | if ($allthere == "") { |
@@ -580,47 +580,47 @@ discard block |
||
580 | 580 | ["SETTING" => CONFIG['APPEARANCE']['from-mail'], |
581 | 581 | "DEFVALUE" => "[email protected]", |
582 | 582 | "COMPLAINTSTRING" => "APPEARANCE/from-mail ", |
583 | - "REQUIRED" => FALSE,], |
|
583 | + "REQUIRED" => FALSE, ], |
|
584 | 584 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['url'], |
585 | 585 | "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!", |
586 | 586 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ", |
587 | - "REQUIRED" => FALSE,], |
|
587 | + "REQUIRED" => FALSE, ], |
|
588 | 588 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['display'], |
589 | 589 | "DEFVALUE" => "[email protected]", |
590 | 590 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ", |
591 | - "REQUIRED" => FALSE,], |
|
591 | + "REQUIRED" => FALSE, ], |
|
592 | 592 | ["SETTING" => CONFIG['APPEARANCE']['support-contact']['developer-mail'], |
593 | 593 | "DEFVALUE" => "[email protected]", |
594 | 594 | "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ", |
595 | - "REQUIRED" => FALSE,], |
|
595 | + "REQUIRED" => FALSE, ], |
|
596 | 596 | ["SETTING" => CONFIG['APPEARANCE']['abuse-mail'], |
597 | 597 | "DEFVALUE" => "[email protected]", |
598 | 598 | "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ", |
599 | - "REQUIRED" => FALSE,], |
|
599 | + "REQUIRED" => FALSE, ], |
|
600 | 600 | ["SETTING" => CONFIG['APPEARANCE']['MOTD'], |
601 | 601 | "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!", |
602 | 602 | "COMPLAINTSTRING" => "APPEARANCE/MOTD ", |
603 | - "REQUIRED" => FALSE,], |
|
603 | + "REQUIRED" => FALSE, ], |
|
604 | 604 | ["SETTING" => CONFIG['APPEARANCE']['webcert_CRLDP'], |
605 | 605 | "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'], |
606 | 606 | "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ", |
607 | - "REQUIRED" => TRUE,], |
|
607 | + "REQUIRED" => TRUE, ], |
|
608 | 608 | ["SETTING" => CONFIG['APPEARANCE']['webcert_OCSP'], |
609 | 609 | "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'], |
610 | 610 | "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ", |
611 | - "REQUIRED" => TRUE,], |
|
611 | + "REQUIRED" => TRUE, ], |
|
612 | 612 | ["SETTING" => CONFIG['DB']['INST']['host'], |
613 | 613 | "DEFVALUE" => "db.host.example", |
614 | 614 | "COMPLAINTSTRING" => "DB/INST ", |
615 | - "REQUIRED" => TRUE,], |
|
615 | + "REQUIRED" => TRUE, ], |
|
616 | 616 | ["SETTING" => CONFIG['DB']['INST']['host'], |
617 | 617 | "DEFVALUE" => "db.host.example", |
618 | 618 | "COMPLAINTSTRING" => "DB/USER ", |
619 | - "REQUIRED" => TRUE,], |
|
619 | + "REQUIRED" => TRUE, ], |
|
620 | 620 | ["SETTING" => CONFIG['DB']['EXTERNAL']['host'], |
621 | 621 | "DEFVALUE" => "customerdb.otherhost.example", |
622 | 622 | "COMPLAINTSTRING" => "DB/EXTERNAL ", |
623 | - "REQUIRED" => FALSE,], |
|
623 | + "REQUIRED" => FALSE, ], |
|
624 | 624 | ]; |
625 | 625 | |
626 | 626 | /** |
@@ -646,11 +646,11 @@ discard block |
||
646 | 646 | |
647 | 647 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-clientcerts'] as $cadata) { |
648 | 648 | foreach ($cadata['certificates'] as $cert_files) { |
649 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) { |
|
650 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " "; |
|
649 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) { |
|
650 | + $defaultvalues .= "CERTIFICATE/".$cert_files['public']." "; |
|
651 | 651 | } |
652 | - if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) { |
|
653 | - $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " "; |
|
652 | + if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) { |
|
653 | + $defaultvalues .= "CERTIFICATE/".$cert_files['private']." "; |
|
654 | 654 | } |
655 | 655 | } |
656 | 656 | } |
@@ -740,14 +740,14 @@ discard block |
||
740 | 740 | if ($global_no_cache) { |
741 | 741 | foreach ($Devs as $dev => $D) { |
742 | 742 | if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) { |
743 | - $no_cache_dev .= $dev . " "; |
|
743 | + $no_cache_dev .= $dev." "; |
|
744 | 744 | $no_cache_dev_count++; |
745 | 745 | } |
746 | 746 | } |
747 | 747 | } else { |
748 | 748 | foreach ($Devs as $dev => $D) { |
749 | 749 | if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) { |
750 | - $no_cache_dev .= $dev . " "; |
|
750 | + $no_cache_dev .= $dev." "; |
|
751 | 751 | $no_cache_dev_count++; |
752 | 752 | } |
753 | 753 | } |
@@ -785,13 +785,13 @@ discard block |
||
785 | 785 | $mail->isHTML(FALSE); |
786 | 786 | $mail->CharSet = 'UTF-8'; |
787 | 787 | $mail->From = CONFIG['APPEARANCE']['from-mail']; |
788 | - $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System"; |
|
788 | + $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System"; |
|
789 | 789 | $mail->addAddress(CONFIG['APPEARANCE']['abuse-mail']); |
790 | 790 | $mail->Subject = "testing CAT configuration mail"; |
791 | 791 | $mail->Body = "Testing CAT mailing\n"; |
792 | 792 | $sent = $mail->send(); |
793 | 793 | if ($sent) { |
794 | - $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . CONFIG['APPEARANCE']['abuse-mail'] . " mailbox if the message was receiced."); |
|
794 | + $this->testReturn(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".CONFIG['APPEARANCE']['abuse-mail']." mailbox if the message was receiced."); |
|
795 | 795 | } else { |
796 | 796 | $this->testReturn(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS"); |
797 | 797 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @return array list of Profiles of this IdP |
111 | 111 | */ |
112 | 112 | public function listProfiles(bool $activeOnly = FALSE) { |
113 | - $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : ""); |
|
113 | + $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : ""); |
|
114 | 114 | $allProfiles = $this->databaseHandle->exec($query); |
115 | 115 | $returnarray = []; |
116 | 116 | // SELECT -> resource, not boolean |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $returnarray[] = $oneProfile; |
121 | 121 | } |
122 | 122 | |
123 | - $this->loggerInstance->debug(4, "listProfiles: " . print_r($returnarray, true)); |
|
123 | + $this->loggerInstance->debug(4, "listProfiles: ".print_r($returnarray, true)); |
|
124 | 124 | return $returnarray; |
125 | 125 | } |
126 | 126 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | case AbstractProfile::PROFILETYPE_SILVERBULLET: |
220 | 220 | $theProfile = new ProfileSilverbullet($identifier, $this); |
221 | 221 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
222 | - $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'])); |
|
222 | + $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'])); |
|
223 | 223 | return $theProfile; |
224 | 224 | default: |
225 | 225 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | */ |
337 | 337 | public function getExternalDBId() { |
338 | 338 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
339 | - $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
339 | + $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
340 | 340 | // SELECT -> it's a resource, not a boolean |
341 | 341 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { |
342 | 342 | return FALSE; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @author Stefan Winter <[email protected]> |
28 | 28 | * @package UserGUI |
29 | 29 | */ |
30 | -require dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | $API = new \core\UserAPI(); |
32 | 32 | $loggerInstance = new \core\common\Logging(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -76,5 +76,5 @@ discard block |
||
76 | 76 | if ($accountPageUrl === FALSE) { |
77 | 77 | throw new Exception("Unable to find our accountstatus.php page."); |
78 | 78 | } |
79 | - header("Location: ../accountstatus/accountstatus.php?token=" . $cleanToken . "&errorcode=GENERATOR_CONSUMED"); |
|
79 | + header("Location: ../accountstatus/accountstatus.php?token=".$cleanToken."&errorcode=GENERATOR_CONSUMED"); |
|
80 | 80 | } |
81 | 81 | \ No newline at end of file |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/core/phpqrcode.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/core/phpqrcode.php"; |
|
31 | 31 | |
32 | 32 | |
33 | 33 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } else { |
41 | 41 | $link = 'http://'; |
42 | 42 | } |
43 | -$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
43 | +$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
44 | 44 | $link = htmlspecialchars($link); |
45 | 45 | |
46 | 46 | const QRCODE_PIXELS_PER_SYMBOL = 12; |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | <div class='infobox' style='text-align:center;'> |
77 | 77 | <h2><?php echo sprintf(_("%s download area QR code"), $uiElements->nomenclatureInst); ?></h2> |
78 | 78 | <?php |
79 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
79 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
80 | 80 | // never NULL, because $filename is FALSE; but make Scrutinizer happy |
81 | 81 | $rawQr = QRcode::png($idpLevelUrl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL); |
82 | 82 | if ($rawQr === NULL) { |
83 | 83 | throw new Exception("Something went seriously wrong during QR code generation!"); |
84 | 84 | } |
85 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL)); |
|
85 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL)); |
|
86 | 86 | $size = getimagesize($uri); |
87 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
87 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
88 | 88 | ?> |
89 | 89 | <br> |
90 | 90 | <?php echo "<a href='$idpLevelUrl'>$idpLevelUrl</a>"; ?> |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | </td> |
114 | 114 | <td> |
115 | 115 | <form action='edit_idp_result.php?inst_id=<?php echo $my_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
116 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureInst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureInst); ?></button> |
|
116 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed)." " : "").sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureInst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureInst); ?></button> |
|
117 | 117 | </form> |
118 | 118 | |
119 | 119 | </td> |
@@ -134,21 +134,21 @@ discard block |
||
134 | 134 | <?php |
135 | 135 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] !== NULL) { |
136 | 136 | echo "<tr> |
137 | - <td>" . _("Check another realm's reachability") . "</td> |
|
137 | + <td>" . _("Check another realm's reachability")."</td> |
|
138 | 138 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
139 | 139 | <input type='text' name='realm' id='realm'> |
140 | 140 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
141 | - <button type='submit'>" . _("Go!") . "</button> |
|
141 | + <button type='submit'>"._("Go!")."</button> |
|
142 | 142 | </form> |
143 | 143 | </td> |
144 | 144 | </tr>"; |
145 | 145 | } |
146 | 146 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { // SW: APPROVED |
147 | 147 | echo "<tr> |
148 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
148 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
149 | 149 | <td> |
150 | 150 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
151 | - <button type='submit'>" . _("Go!") . "</button> |
|
151 | + <button type='submit'>" . _("Go!")."</button> |
|
152 | 152 | </form> |
153 | 153 | </td> |
154 | 154 | </tr>"; |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | <?php |
160 | 160 | $profiles_for_this_idp = $my_inst->listProfiles(); |
161 | 161 | if (count($profiles_for_this_idp) == 0) { // no profiles yet. |
162 | - echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
162 | + echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
163 | 163 | } |
164 | 164 | if (count($profiles_for_this_idp) > 0) { // no profiles yet. |
165 | - echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>"; |
|
165 | + echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>"; |
|
166 | 166 | } |
167 | 167 | // if there is one profile and it is of type Silver Bullet, display a very |
168 | 168 | // simple widget with just a "Manage" button |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | echo _("Information needed!"); |
189 | 189 | echo "<ul style='margin:1px'>"; |
190 | 190 | foreach ($completeness as $missing_attrib) { |
191 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
191 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
192 | 192 | } |
193 | 193 | echo "</ul>"; |
194 | 194 | echo "</div>"; |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | if ($readonly === FALSE) { |
203 | 203 | ?> |
204 | 204 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
205 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
205 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
206 | 206 | </form> |
207 | 207 | <?php |
208 | 208 | } |
@@ -234,21 +234,21 @@ discard block |
||
234 | 234 | $has_overrides = TRUE; |
235 | 235 | } |
236 | 236 | } |
237 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
237 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
238 | 238 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
239 | 239 | $allcomplete = TRUE; |
240 | 240 | foreach ($typelist as $eaptype) { |
241 | 241 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
242 | 242 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
243 | 243 | if ($completeness === true) { |
244 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
244 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
245 | 245 | } else { |
246 | 246 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
247 | 247 | $buffer_eaptypediv .= _("Information needed!"); |
248 | 248 | if (is_array($completeness)) { |
249 | 249 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
250 | 250 | foreach ($completeness as $missing_attrib) { |
251 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
251 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
252 | 252 | } |
253 | 253 | $buffer_eaptypediv .= "</ul>"; |
254 | 254 | } |
@@ -260,12 +260,12 @@ discard block |
||
260 | 260 | foreach ($attribs as $attrib) { |
261 | 261 | if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
262 | 262 | $justOnce = TRUE; |
263 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
263 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
264 | 264 | } |
265 | 265 | } |
266 | 266 | $buffer_eaptypediv .= "<br/>"; |
267 | 267 | } |
268 | - $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>"; |
|
268 | + $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>"; |
|
269 | 269 | |
270 | 270 | $buffer_headline .= "<span style='float:right;'>"; |
271 | 271 | $readiness = $profile_list->readinessLevel(); |
@@ -297,18 +297,18 @@ discard block |
||
297 | 297 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == "LOCAL") { |
298 | 298 | $diagUrl = "../diag/"; |
299 | 299 | } else { |
300 | - $diagUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] . "/diag/"; |
|
300 | + $diagUrl = CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS']."/diag/"; |
|
301 | 301 | } |
302 | - echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
302 | + echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
303 | 303 | <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/> |
304 | - <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
|
305 | - " . _("Check realm reachability") . " |
|
304 | + <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'")."> |
|
305 | + " . _("Check realm reachability")." |
|
306 | 306 | </button> |
307 | 307 | </form>"; |
308 | 308 | } |
309 | 309 | echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
310 | - <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled' title='" . _("You have not fully configured any supported EAP types!") . "'") . "> |
|
311 | - " . _("Installer Fine-Tuning and Download") . " |
|
310 | + <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled' title='"._("You have not fully configured any supported EAP types!")."'")."> |
|
311 | + " . _("Installer Fine-Tuning and Download")." |
|
312 | 312 | </button> |
313 | 313 | </form> |
314 | 314 | </div>"; |
@@ -317,11 +317,11 @@ discard block |
||
317 | 317 | echo " <div class='buttongroupprofilebox' style='clear:both;'> |
318 | 318 | <form action='edit_profile.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
319 | 319 | <hr/> |
320 | - <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button> |
|
320 | + <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button> |
|
321 | 321 | </form> |
322 | 322 | <form action='edit_profile_result.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
323 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\"> |
|
324 | - " . _("Delete") . " |
|
323 | + <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\"> |
|
324 | + " . _("Delete")." |
|
325 | 325 | </button> |
326 | 326 | </form> |
327 | 327 | </div>"; |
@@ -330,24 +330,24 @@ discard block |
||
330 | 330 | // dummy width to keep a little distance |
331 | 331 | echo "<div style='width:20px;'></div>"; |
332 | 332 | if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) { |
333 | - echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>"; |
|
334 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
335 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
333 | + echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>"; |
|
334 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
335 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
336 | 336 | echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>"; |
337 | 337 | $rawQr = QRcode::png($QRurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL); |
338 | 338 | if ($rawQr === NULL) { |
339 | 339 | throw new Exception("Something went seriously wrong during QR code generation!"); |
340 | 340 | } |
341 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL)); |
|
341 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, QRCODE_PIXELS_PER_SYMBOL)); |
|
342 | 342 | $size = getimagesize($uri); |
343 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
343 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
344 | 344 | |
345 | 345 | //echo "<nobr>$displayurl</nobr></a>"; |
346 | 346 | echo "<p>$displayurl</p></a>"; |
347 | 347 | echo "</div>"; |
348 | 348 | // dummy width to keep a little distance |
349 | 349 | echo "<div style='width:20px;'></div>"; |
350 | - echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>"; |
|
350 | + echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>"; |
|
351 | 351 | $stats = $profile_list->getUserDownloadStats(); |
352 | 352 | foreach ($stats as $dev => $count) { |
353 | 353 | echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
@@ -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 | 'cat_base_url', |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'mailer', |
38 | 38 | ]; |
39 | 39 | |
40 | -if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
40 | +if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
41 | 41 | $Tests[] = 'makensis'; |
42 | 42 | $Tests[] = 'makensis=>NSISmodules'; |
43 | 43 | } |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | $message = "Your configuration appears to be fine."; |
72 | 72 | break; |
73 | 73 | default: |
74 | - throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!"); |
|
74 | + throw new Exception("The result code level ".$test->test_result['global']." is not defined!"); |
|
75 | 75 | } |
76 | 76 | $uiElements = new web\lib\admin\UIElements(); |
77 | - $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
77 | + $out .= $uiElements->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
78 | 78 | foreach ($test->out as $testValue) { |
79 | 79 | foreach ($testValue as $o) { |
80 | 80 | $out .= $uiElements->boxFlexible($o['level'], $o['message']); |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | /* |
21 | 21 | * Class autoloader invocation, should be included prior to any other code at the entry points to the application |
22 | 22 | */ |
23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/core/phpqrcode.php"; |
|
23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/core/phpqrcode.php"; |
|
25 | 25 | const QRCODE_PIXELS_PER_SYMBOL = 12; |
26 | 26 | |
27 | 27 | $auth = new \web\lib\admin\Authentication(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $fed = new \core\Federation($inst->federation); |
56 | 56 | $allowSb = $fed->getAttributes("fed:silverbullet"); |
57 | 57 | if (count($allowSb) == 0) { |
58 | - throw new Exception("We were told to create a new SB profile, but this " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " does not allow SB at all!"); |
|
58 | + throw new Exception("We were told to create a new SB profile, but this ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." does not allow SB at all!"); |
|
59 | 59 | } |
60 | 60 | // okay, new SB profiles are allowed. |
61 | 61 | // but is there a support:email attribute on inst level? |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // Create one. |
67 | 67 | $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET); |
68 | 68 | // and modify the REQUEST_URI to add the new profile ID |
69 | - $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier; |
|
69 | + $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier; |
|
70 | 70 | $_GET['profile_id'] = $newProfile->identifier; |
71 | 71 | $profile = $newProfile; |
72 | 72 | } else { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | break; |
135 | 135 | } |
136 | 136 | $properName = $validator->User($elements[0]); |
137 | - $properDate = new DateTime($elements[1] . " 00:00:00"); |
|
137 | + $properDate = new DateTime($elements[1]." 00:00:00"); |
|
138 | 138 | $numberOfActivations = $elements[2] ?? 1; |
139 | 139 | $number = $validator->integer($numberOfActivations); |
140 | 140 | if ($number === FALSE) { // invalid input received, default to sane |
@@ -227,18 +227,18 @@ discard block |
||
227 | 227 | // warn and ask for confirmation unless already confirmed |
228 | 228 | if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") { |
229 | 229 | echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS"); |
230 | - echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>"; |
|
231 | - echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>"; |
|
232 | - echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>"; |
|
230 | + echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>"; |
|
231 | + echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>"; |
|
232 | + echo "<p>"._("Do you want the system to send this mail anyway?")."</p>"; |
|
233 | 233 | echo $formtext; |
234 | - echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>"; |
|
234 | + echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>"; |
|
235 | 235 | echo "</form>"; |
236 | 236 | echo $formtext; |
237 | - echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>"; |
|
237 | + echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>"; |
|
238 | 238 | echo "<input type='hidden' name='address' value='$properEmail'</>"; |
239 | - echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>"; |
|
239 | + echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>"; |
|
240 | 240 | echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>"; |
241 | - echo "<button type='submit'>" . _("Send anyway.") . "</button>"; |
|
241 | + echo "<button type='submit'>"._("Send anyway.")."</button>"; |
|
242 | 242 | echo "</form>"; |
243 | 243 | echo $deco->footer(); |
244 | 244 | exit; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $allUsers = $profile->listAllUsers(); |
289 | 289 | $activeUsers = $profile->listActiveUsers(); |
290 | 290 | |
291 | -echo $deco->defaultPagePrelude(_(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME ))); |
|
291 | +echo $deco->defaultPagePrelude(_(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME))); |
|
292 | 292 | ?> |
293 | 293 | <script src='js/option_expand.js' type='text/javascript'></script> |
294 | 294 | <script src='../external/jquery/jquery.js' type='text/javascript'></script> |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | echo $deco->productHeader("ADMIN-IDP-USERS"); |
324 | 324 | ?> |
325 | 325 | <img src='../resources/images/icons/loading51.gif' id='spin' alt='loading...' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none; z-index: 100;'> |
326 | - <?php echo $uiElements->instLevelInfoBoxes($inst);?> |
|
326 | + <?php echo $uiElements->instLevelInfoBoxes($inst); ?> |
|
327 | 327 | <div class='infobox'> |
328 | 328 | <h2><?php echo sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); ?></h2> |
329 | 329 | <table> |
@@ -423,23 +423,23 @@ discard block |
||
423 | 423 | ?> |
424 | 424 | |
425 | 425 | <div class="sb-certificate-summary ca-summary" <?php echo $style; ?>> |
426 | - <div class="sb-certificate-details"><?php echo _("Device:") . " " . $display; ?> |
|
427 | - <br><?php echo _("Serial Number:") . " " . dechex($oneCert->serial); ?> |
|
428 | - <br><?php echo _("CN:") . " " . explode('@', $oneCert->username)[0] . "@…"; ?> |
|
429 | - <br><?php echo _("Expiry:") . " " . $oneCert->expiry; ?> |
|
430 | - <br><?php echo _("Issued:") . " " . $oneCert->issued; ?> |
|
426 | + <div class="sb-certificate-details"><?php echo _("Device:")." ".$display; ?> |
|
427 | + <br><?php echo _("Serial Number:")." ".dechex($oneCert->serial); ?> |
|
428 | + <br><?php echo _("CN:")." ".explode('@', $oneCert->username)[0]."@…"; ?> |
|
429 | + <br><?php echo _("Expiry:")." ".$oneCert->expiry; ?> |
|
430 | + <br><?php echo _("Issued:")." ".$oneCert->issued; ?> |
|
431 | 431 | </div> |
432 | 432 | <div style="text-align:right;padding-top: 5px; <?php echo $buttonStyle; ?>"> |
433 | 433 | <?php |
434 | 434 | if ($buttonText == "") { |
435 | 435 | echo "$formtext" |
436 | - . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>" |
|
437 | - . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>" |
|
436 | + . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>" |
|
437 | + . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>" |
|
438 | 438 | . "<button type='submit' " |
439 | 439 | . "name='command' " |
440 | - . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' " |
|
440 | + . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' " |
|
441 | 441 | . "class='delete' " |
442 | - . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "\")'>" |
|
442 | + . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."\")'>" |
|
443 | 443 | . _("Revoke") |
444 | 444 | . "</button>" |
445 | 445 | . "</form>"; |
@@ -465,38 +465,38 @@ discard block |
||
465 | 465 | $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>"; |
466 | 466 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody()))); |
467 | 467 | $tokenHtmlBuffer .= "<td>"; |
468 | - $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"),"<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>"); |
|
468 | + $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>"); |
|
469 | 469 | $tokenHtmlBuffer .= "<table> |
470 | 470 | <tr><td style='vertical-align:bottom;'>"._("E-Mail:")."</td><td> |
471 | 471 | $formtext |
472 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
472 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
473 | 473 | <input type='text' name='address' id='address-$invitationObject->identifier'/> |
474 | - <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button> |
|
475 | - <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>"._("Send with CAT")."</button> |
|
474 | + <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button> |
|
475 | + <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button> |
|
476 | 476 | </form> |
477 | 477 | </td></tr> |
478 | 478 | <tr><td style='vertical-align:bottom;'>"._("SMS:")."</td><td> |
479 | 479 | $formtext |
480 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
480 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
481 | 481 | <input type='text' name='smsnumber' /> |
482 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button> |
|
482 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button> |
|
483 | 483 | </form> |
484 | 484 | </td></tr> |
485 | 485 | <tr><td style='vertical-align:bottom;'>"._("Manual:")."</td><td> |
486 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button> |
|
486 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button> |
|
487 | 487 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'> |
488 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
489 | - <button type='submit'>" . _("Display QR code") . "</button> |
|
488 | + <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/> |
|
489 | + <button type='submit'>" . _("Display QR code")."</button> |
|
490 | 490 | </form> |
491 | 491 | </td></tr> |
492 | 492 | |
493 | 493 | </table> |
494 | 494 | </td>"; |
495 | - $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>"; |
|
495 | + $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>"; |
|
496 | 496 | $tokenHtmlBuffer .= "<td>" |
497 | 497 | . $formtext |
498 | - . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>" |
|
499 | - . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>"._("Revoke"). "</button></form>" |
|
498 | + . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>" |
|
499 | + . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>" |
|
500 | 500 | . "</td></tr>"; |
501 | 501 | break; |
502 | 502 | case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | <span><input type="text" maxlength="19" class="sb-date-picker" name="userexpiry" value="<?php echo $profile->getUserExpiryDate($oneUserId); ?>"> (UTC)</span> |
519 | 519 | </div> |
520 | 520 | <input type="hidden" name="userid" value="<?php echo $oneUserId; ?>"/> |
521 | - <button type="submit" name="command" value="<?php echo \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY ?>"><?php echo _("Update");?></button> |
|
521 | + <button type="submit" name="command" value="<?php echo \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY ?>"><?php echo _("Update"); ?></button> |
|
522 | 522 | </form> |
523 | 523 | </td> |
524 | 524 | <td> |
@@ -526,13 +526,13 @@ discard block |
||
526 | 526 | <?php |
527 | 527 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
528 | 528 | $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
529 | - echo $formtext . " |
|
529 | + echo $formtext." |
|
530 | 530 | <input type='hidden' name='userid' value='$oneUserId'/> |
531 | 531 | <button type='submit' " |
532 | 532 | . "name='command' " |
533 | - . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' " |
|
533 | + . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' " |
|
534 | 534 | . "class='delete' " |
535 | - . ( count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "" ) |
|
535 | + . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "") |
|
536 | 536 | . ">" |
537 | 537 | . _("Deactivate User") |
538 | 538 | . "</button> |
@@ -571,13 +571,13 @@ discard block |
||
571 | 571 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
572 | 572 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), CONFIG_CONFASSISTANT['SILVERBULLET']['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
573 | 573 | |
574 | - echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
574 | + echo $formtext."<div style='padding-bottom: 20px;'>" |
|
575 | 575 | . " |
576 | 576 | <p>$acknowledgeText</p> |
577 | 577 | <input type='checkbox' name='acknowledge' value='true'> |
578 | - <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</label> |
|
578 | + <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</label> |
|
579 | 579 | </div> |
580 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>"._("Save")."</button></form>"; |
|
580 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>"; |
|
581 | 581 | } |
582 | 582 | ?> |
583 | 583 | </div> |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | |
655 | 655 | <form action="overview_idp.php?inst_id=<?php echo $inst->identifier; ?>" method="POST"> |
656 | 656 | <p> |
657 | - <button type='submit' name='submitbutton' value="nomatter"><?php echo sprintf(_("Back to %s page"),$uiElements->nomenclatureInst);?></button> |
|
657 | + <button type='submit' name='submitbutton' value="nomatter"><?php echo sprintf(_("Back to %s page"), $uiElements->nomenclatureInst); ?></button> |
|
658 | 658 | </p> |
659 | 659 | </form> |
660 | 660 | <?php |