@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | public function __construct() |
111 | 111 | { |
112 | 112 | $this->loggerInstance = new Logging(); |
113 | - $this->loggerInstance->debug(4, "--- BEGIN constructing class " . get_class($this) . " .\n"); |
|
113 | + $this->loggerInstance->debug(4, "--- BEGIN constructing class ".get_class($this)." .\n"); |
|
114 | 114 | $this->languageInstance = new Language(); |
115 | 115 | Entity::intoThePotatoes("core"); |
116 | 116 | // some config elements are displayable. We need some dummies to |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | $dummy_organisation2a = _("organization"); |
130 | 130 | $dummy_organisation3 = _("entity"); |
131 | 131 | // and do something useless with the strings so that there's no "unused" complaint |
132 | - if (strlen($dummy_NRO . $dummy_idp1 . $dummy_idp2 . $dummy_idp3 . $dummy_hotspot1 . $dummy_hotspot2 . $dummy_hotspot3 . $dummy_organisation1 . $dummy_organisation2 . $dummy_organisation2a . $dummy_organisation3) < 0) { |
|
132 | + if (strlen($dummy_NRO.$dummy_idp1.$dummy_idp2.$dummy_idp3.$dummy_hotspot1.$dummy_hotspot2.$dummy_hotspot3.$dummy_organisation1.$dummy_organisation2.$dummy_organisation2a.$dummy_organisation3) < 0) { |
|
133 | 133 | throw new Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole."); |
134 | 134 | } |
135 | - $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . ""; |
|
136 | - $xyzVariableIdP = \config\ConfAssistant::CONSORTIUM['nomenclature_idp'] . ""; |
|
137 | - $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'] . ""; |
|
138 | - $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] . ""; |
|
135 | + $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'].""; |
|
136 | + $xyzVariableIdP = \config\ConfAssistant::CONSORTIUM['nomenclature_idp'].""; |
|
137 | + $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'].""; |
|
138 | + $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'].""; |
|
139 | 139 | Entity::$nomenclature_fed = _($xyzVariableFed); |
140 | 140 | Entity::$nomenclature_idp = _($xyzVariableIdP); |
141 | 141 | Entity::$nomenclature_hotspot = _($xyzVariableHotspot); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function __destruct() |
153 | 153 | { |
154 | - (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n"); |
|
154 | + (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n"); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1) |
185 | 185 | { |
186 | 186 | $loggerInstance = new Logging(); |
187 | - $name = md5(time() . rand()); |
|
187 | + $name = md5(time().rand()); |
|
188 | 188 | $path = ROOT; |
189 | 189 | switch ($purpose) { |
190 | 190 | case 'silverbullet': |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | default: |
203 | 203 | throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n"); |
204 | 204 | } |
205 | - $tmpDir = $path . '/' . $name; |
|
205 | + $tmpDir = $path.'/'.$name; |
|
206 | 206 | $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n"); |
207 | 207 | if (!mkdir($tmpDir, 0700, true)) { |
208 | 208 | if ($failIsFatal) { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | */ |
224 | 224 | public static function rrmdir($dir) |
225 | 225 | { |
226 | - foreach (glob($dir . '/*') as $file) { |
|
226 | + foreach (glob($dir.'/*') as $file) { |
|
227 | 227 | if (is_dir($file)) { |
228 | 228 | Entity::rrmdir($file); |
229 | 229 | } else { |
@@ -249,12 +249,12 @@ discard block |
||
249 | 249 | } |
250 | 250 | // these substr() are guaranteed to yield actual string data, as the |
251 | 251 | // base string is an MD5 hash - has sufficient length |
252 | - $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-'; |
|
253 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-'; |
|
254 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-'; |
|
255 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-'; |
|
252 | + $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-'; |
|
253 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-'; |
|
254 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-'; |
|
255 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-'; |
|
256 | 256 | $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12); |
257 | - return $prefix . $uuid; |
|
257 | + return $prefix.$uuid; |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | for ($i = count($trace); $i--; $i > 0) { |
296 | 296 | if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) { |
297 | 297 | if ($showTrace) { |
298 | - echo "FOUND caller: " . /** @scrutinizer ignore-type */ print_r($trace[$i], true) . " - class is " . $trace[$i]['class']; |
|
298 | + echo "FOUND caller: "./** @scrutinizer ignore-type */ print_r($trace[$i], true)." - class is ".$trace[$i]['class']; |
|
299 | 299 | } |
300 | 300 | $caller = $trace[$i]; |
301 | 301 | break; |
@@ -305,8 +305,8 @@ discard block |
||
305 | 305 | // otherwise, on the filename relative to ROOT |
306 | 306 | $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT)); |
307 | 307 | if ($showTrace === TRUE) { |
308 | - echo "<pre>" . /** @scrutinizer ignore-type */ print_r($trace, true) . "</pre>"; |
|
309 | - echo "CLASS = " . $myName . "<br/>"; |
|
308 | + echo "<pre>"./** @scrutinizer ignore-type */ print_r($trace, true)."</pre>"; |
|
309 | + echo "CLASS = ".$myName."<br/>"; |
|
310 | 310 | } |
311 | 311 | if (preg_match("/diag/", $myName) == 1) { |
312 | 312 | $ret = "diagnostics"; |
@@ -340,11 +340,11 @@ discard block |
||
340 | 340 | if ($catalogue === NULL) { |
341 | 341 | $theCatalogue = Entity::determineOwnCatalogue($trace); |
342 | 342 | textdomain($theCatalogue); |
343 | - bindtextdomain($theCatalogue, ROOT . "/translation/"); |
|
343 | + bindtextdomain($theCatalogue, ROOT."/translation/"); |
|
344 | 344 | bind_textdomain_codeset($theCatalogue, "UTF-8"); |
345 | 345 | } else { |
346 | 346 | textdomain($catalogue); |
347 | - bindtextdomain($catalogue, ROOT . "/translation/"); |
|
347 | + bindtextdomain($catalogue, ROOT."/translation/"); |
|
348 | 348 | bind_textdomain_codeset($catalogue, "UTF-8"); |
349 | 349 | } |
350 | 350 | } |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | |
106 | 106 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
107 | 107 | |
108 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
109 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
110 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
108 | + $this->loggerInstance->debug(5, "Device-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->deviceLevelAttributes, true)); |
|
109 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: "./** @scrutinizer ignore-type */ print_r($this->eapLevelAttributes, true)); |
|
110 | + $this->loggerInstance->debug(5, "All low-Level Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
111 | 111 | |
112 | 112 | // now fetch and merge profile-level attributes if not already set on deeper level |
113 | 113 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | - $this->loggerInstance->debug(5, "Merged Attributes: " . /** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
140 | + $this->loggerInstance->debug(5, "Merged Attributes: "./** @scrutinizer ignore-type */ print_r($attributesLowLevel, true)); |
|
141 | 141 | |
142 | 142 | // now, fetch and merge IdP-wide attributes |
143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | // add the internal attribute to that effect |
153 | 153 | |
154 | 154 | if (isset($this->attributes['media:openroaming_always'])) { |
155 | - $this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] )); |
|
155 | + $this->attributes = array_merge($this->attributes, $this->addInternalAttributes(["internal:openroaming" => TRUE])); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | $this->loggerInstance->debug(4, "--- END Constructing new Profile object ... ---\n"); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | "row_id" => $attributeQuery->row_id, |
201 | 201 | "flag" => $optinfo['flag'], |
202 | 202 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
203 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
203 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
204 | 204 | } |
205 | 205 | return $temparray; |
206 | 206 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function setAnonymousIDSupport($shallwe) |
311 | 311 | { |
312 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
312 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** Toggle special username for realm checks |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | * @return void |
320 | 320 | */ |
321 | 321 | public function setRealmCheckUser($shallwe, $localpart = NULL) { |
322 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
322 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
323 | 323 | if ($localpart !== NULL) { |
324 | 324 | $this->databaseHandle->exec("UPDATE profile SET checkuser_value = ? WHERE profile_id = $this->identifier", "s", $localpart); |
325 | 325 | } |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function setInputVerificationPreference($verify, $hint) |
336 | 336 | { |
337 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
338 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
337 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
338 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
339 | 339 | " WHERE profile_id = $this->identifier"); |
340 | 340 | } |
341 | 341 |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $result = $this->databaseHandle->exec($query); |
455 | 455 | $rows = $result->fetch_all(); |
456 | 456 | foreach ($rows as $row) { |
457 | - $activeProfiles[] = $row[0]; |
|
457 | + $activeProfiles[] = $row[0]; |
|
458 | 458 | } |
459 | 459 | $query = "SELECT institution.inst_id AS inst_id, profile.profile_id AS profile_id, profile_option.option_value AS cert FROM profile_option JOIN profile ON profile_option.profile_id=profile.profile_id JOIN institution ON profile.inst_id=institution.inst_id WHERE profile_option.option_name='eap:ca_file' and institution.country='".$this->tld."'"; |
460 | 460 | $result = $this->databaseHandle->exec($query); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | 'country' => strtoupper($idp->federation), |
532 | 532 | 'instance' => $idp, |
533 | 533 | 'realms' => $idpQuery->realms] |
534 | - ; |
|
534 | + ; |
|
535 | 535 | $returnarray[$idp->identifier] = $idpInfo; |
536 | 536 | } |
537 | 537 | if ($activeOnly != 0) { // we're only doing this once. |
@@ -374,7 +374,7 @@ |
||
374 | 374 | throw new Exception("Unknown test requested: default case reached!"); |
375 | 375 | } |
376 | 376 | $returnarray['datetime'] = date("Y-m-d H:i:s"); |
377 | -if ($token!= '' && is_dir($jsonDir.'/'.$token)) { |
|
377 | +if ($token != '' && is_dir($jsonDir.'/'.$token)) { |
|
378 | 378 | @mkdir($jsonDir.'/'.$token, 0777, true); |
379 | 379 | } |
380 | 380 | $json_data = json_encode($returnarray); |
@@ -424,17 +424,17 @@ discard block |
||
424 | 424 | } |
425 | 425 | echo "<td class='inst_td'> |
426 | 426 | <input type='hidden' name='inst' value='" |
427 | - . $index."'>" |
|
428 | - . "<span style='display:none' class='inst_name'>".$my_idp."</span>" |
|
429 | - . "<span>". $idp_instance->name."</span>" |
|
430 | - . " (<a href='overview_org.php?inst_id=" |
|
431 | - . $idp_instance->identifier."'>" |
|
432 | - . (in_array($index, $userIdps) ? _("manage") : _("view")) |
|
433 | - . "</a>)" |
|
434 | - . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) |
|
435 | - . implode("</li><li>", $listOfSilverbulletRealms) |
|
436 | - . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) |
|
437 | - . "</td>"; |
|
427 | + . $index."'>" |
|
428 | + . "<span style='display:none' class='inst_name'>".$my_idp."</span>" |
|
429 | + . "<span>". $idp_instance->name."</span>" |
|
430 | + . " (<a href='overview_org.php?inst_id=" |
|
431 | + . $idp_instance->identifier."'>" |
|
432 | + . (in_array($index, $userIdps) ? _("manage") : _("view")) |
|
433 | + . "</a>)" |
|
434 | + . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) |
|
435 | + . implode("</li><li>", $listOfSilverbulletRealms) |
|
436 | + . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) |
|
437 | + . "</td>"; |
|
438 | 438 | // deployment status; need to dive into profiles for this |
439 | 439 | // show happy eyeballs if at least one profile is configured/showtime |
440 | 440 | echo "<td>$profileIcon</td>"; |
@@ -489,8 +489,8 @@ discard block |
||
489 | 489 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
490 | 490 | <input type='hidden' name='invitation_id' value='".$oneinvite['token']."'/> |
491 | 491 | <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
492 | - . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
|
493 | - . "</form>"; |
|
492 | + . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
|
493 | + . "</form>"; |
|
494 | 494 | } |
495 | 495 | echo " </td>"; |
496 | 496 | echo " </tr>"; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | <?php |
98 | 98 | foreach ($cat->printCountryList(1) as $country => $name) { |
99 | 99 | $selected = ''; |
100 | - if ($country == strtoupper($fed_id) ) { |
|
100 | + if ($country == strtoupper($fed_id)) { |
|
101 | 101 | $selected = 'selected'; |
102 | 102 | } |
103 | 103 | echo "<option value='$country' $selected>$name</option>\n"; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
316 | 316 | echo "<tr><td colspan='9'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
317 | 317 | echo "<tbody class='fedlist'>"; |
318 | - echo "<tr><td colspan='1'><strong>". _("Quick search:")." </strong><input style='background:#eeeeee;' type='text' id='qsearch_".$fedId."'></td>"; |
|
318 | + echo "<tr><td colspan='1'><strong>"._("Quick search:")." </strong><input style='background:#eeeeee;' type='text' id='qsearch_".$fedId."'></td>"; |
|
319 | 319 | echo "<td style='border-bottom-style: dotted;border-bottom-width: 1px;'><input type='checkbox' name='profilecheck' id='profile_ck_".$fedId."'></td>"; |
320 | 320 | echo "<td style='border-bottom-style: dotted;border-bottom-width: 1px;'><input type='checkbox' name='orcheck' id='or_ck_".$fedId."'></td>"; |
321 | 321 | echo "<td style='border-bottom-style: dotted;border-bottom-width: 1px;'><input type='checkbox' name='brokencert' id='brokencert_ck_".$fedId."'></td>"; |
@@ -428,14 +428,14 @@ discard block |
||
428 | 428 | <input type='hidden' name='inst' value='" |
429 | 429 | . $index."'>" |
430 | 430 | . "<span style='display:none' class='inst_name'>".$my_idp."</span>" |
431 | - . "<span>". $idp_instance->name."</span>" |
|
431 | + . "<span>".$idp_instance->name."</span>" |
|
432 | 432 | . " (<a href='overview_org.php?inst_id=" |
433 | 433 | . $idp_instance->identifier."'>" |
434 | 434 | . (in_array($index, $userIdps) ? _("manage") : _("view")) |
435 | 435 | . "</a>)" |
436 | - . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) |
|
436 | + . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>") |
|
437 | 437 | . implode("</li><li>", $listOfSilverbulletRealms) |
438 | - . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) |
|
438 | + . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>") |
|
439 | 439 | . "</td>"; |
440 | 440 | // deployment status; need to dive into profiles for this |
441 | 441 | // show happy eyeballs if at least one profile is configured/showtime |
@@ -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(); |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | ?> |
71 | 71 | </h1> |
72 | 72 | <div class='infobox'> |
73 | - <h2><?php $tablecaption = sprintf(_("%s Properties"),$uiElements->nomenclatureFed); echo $tablecaption?></h2> |
|
73 | + <h2><?php $tablecaption = sprintf(_("%s Properties"), $uiElements->nomenclatureFed); echo $tablecaption?></h2> |
|
74 | 74 | <table> |
75 | - <caption><?php echo $tablecaption;?></caption> |
|
75 | + <caption><?php echo $tablecaption; ?></caption> |
|
76 | 76 | <tr> |
77 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
78 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
79 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
77 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
78 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
79 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
80 | 80 | </tr> |
81 | 81 | <tr> |
82 | 82 | <td><?php echo _("Country:"); ?></td> |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | </table> |
88 | 88 | </div> |
89 | 89 | <?php |
90 | - echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'> |
|
91 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
90 | + echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'> |
|
91 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
92 | 92 | ?> |
93 | 93 | <fieldset class="option_container"> |
94 | - <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend> |
|
94 | + <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend> |
|
95 | 95 | <?php |
96 | 96 | $optionDisplay = new \web\lib\admin\OptionDisplay($fed_options, \core\Options::LEVEL_FED); |
97 | 97 | echo $optionDisplay->prefilledOptionTable("fed", $my_fed->tld); |
@@ -101,10 +101,10 @@ discard block |
||
101 | 101 | <?php |
102 | 102 | echo "<div>"; |
103 | 103 | if ($editMode === 'fullaccess') { |
104 | - echo "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button>"; |
|
104 | + echo "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button>"; |
|
105 | 105 | $discardLabel = _("Discard changes"); |
106 | 106 | } else { |
107 | 107 | $discardLabel = _("Return"); |
108 | 108 | } |
109 | - echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>" . $discardLabel . "</button></div></form>"; |
|
109 | + echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>".$discardLabel."</button></div></form>"; |
|
110 | 110 | echo $deco->footer(); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | private function inputValidationError($customtext) |
41 | 41 | { |
42 | 42 | \core\common\Entity::intoThePotatoes(); |
43 | - $retval = "<p>" . _("Input validation error: ") . $customtext . "</p>"; |
|
43 | + $retval = "<p>"._("Input validation error: ").$customtext."</p>"; |
|
44 | 44 | \core\common\Entity::outOfThePotatoes(); |
45 | 45 | return $retval; |
46 | 46 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $postFed = $fedIdentifiers[$correctIndex]; |
98 | 98 | $temp = new \core\Federation($postFed); |
99 | 99 | if ($owner === NULL) { |
100 | - return [$temp,'readonly']; |
|
100 | + return [$temp, 'readonly']; |
|
101 | 101 | } |
102 | 102 | $user = new \core\User($owner); |
103 | 103 | foreach ($temp->listFederationAdmins() as $oneowner) { |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | return [$temp, 'fullaccess']; |
106 | 106 | } |
107 | 107 | } |
108 | - if ($user->isSuperadmin()|| $user->isSupport()) { |
|
108 | + if ($user->isSuperadmin() || $user->isSupport()) { |
|
109 | 109 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
110 | - return [$temp,'readonly']; |
|
110 | + return [$temp, 'readonly']; |
|
111 | 111 | } |
112 | 112 | throw new Exception($this->inputValidationError(sprintf("User is not %s administrator!", \core\common\Entity::$nomenclature_fed))); |
113 | 113 | } |
@@ -168,18 +168,18 @@ discard block |
||
168 | 168 | } |
169 | 169 | if ($user->isFederationAdmin($temp->federation)) { |
170 | 170 | $this->loggerInstance->debug(4, "You are fed admin for this IdP\n"); |
171 | - return [$temp,'readonly']; |
|
171 | + return [$temp, 'readonly']; |
|
172 | 172 | } |
173 | 173 | if ($user->isSuperadmin() || $user->isSupport()) { |
174 | 174 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
175 | - return [$temp,'readonly']; |
|
175 | + return [$temp, 'readonly']; |
|
176 | 176 | } |
177 | 177 | throw new Exception($this->inputValidationError("This IdP identifier is not accessible!")); |
178 | 178 | } |
179 | 179 | if ($claimedFedBinding !== NULL && strtoupper($temp->federation) != strtoupper($claimedFedBinding->tld)) { |
180 | 180 | throw new Exception($this->inputValidationError("This IdP does not belong to the claimed federation!")); |
181 | 181 | } |
182 | - return [$temp,'nouser']; |
|
182 | + return [$temp, 'nouser']; |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | try { |
622 | 622 | $image->readImageBlob($binary); |
623 | 623 | } catch (\ImagickException $exception) { |
624 | - echo "Error" . $exception->getMessage(); |
|
624 | + echo "Error".$exception->getMessage(); |
|
625 | 625 | return FALSE; |
626 | 626 | } |
627 | 627 | // image survived the sanity check |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * License: see the web/copyright.php file in the file structure |
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
11 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * The sctipt will be called from crontab |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | -while ( $row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) { |
|
31 | +while ($row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) { |
|
32 | 32 | $profileId = $row->profile_id; |
33 | 33 | $profile = \core\ProfileFactory::instantiate($profileId); |
34 | 34 | $res = $profile->openroamingRedinessTest(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * update the local copy |
25 | 25 | */ |
26 | 26 | |
27 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
27 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
28 | 28 | setlocale(LC_CTYPE, "en_US.UTF-8"); |
29 | 29 | |
30 | 30 | class updateFromMonitor { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $tmp_table = 'tmp_'.$table_name; |
114 | 114 | if ($this->tablesource[$table_name] == 'eduroam') { |
115 | 115 | $this->db_local->select_db('monitor_copy'); |
116 | - } elseif($this->tablesource[$table_name] == 'eduroamv2') { |
|
116 | + } elseif ($this->tablesource[$table_name] == 'eduroamv2') { |
|
117 | 117 | $this->db_local->select_db('eduroamv2'); |
118 | 118 | } |
119 | 119 | $this->db_local->query("CREATE TEMPORARY TABLE $tmp_table SELECT * FROM $table LIMIT 0"); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $this->db->query("SET NAMES 'utf8'"); |
123 | 123 | $this->db_local->query("SET NAMES 'utf8mb4'"); |
124 | 124 | $result = $this->db->query("SELECT * FROM $table"); |
125 | - $queryFields = implode(',', array_column($this->fields[$table_name],0)); |
|
125 | + $queryFields = implode(',', array_column($this->fields[$table_name], 0)); |
|
126 | 126 | while ($row = $result->fetch_assoc()) { |
127 | 127 | $v = []; |
128 | 128 | foreach ($this->fields[$table_name] as $field) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | } |
142 | 142 | } |
143 | - $queryValues = implode(',',$v); |
|
143 | + $queryValues = implode(',', $v); |
|
144 | 144 | $query = "INSERT INTO $tmp_table (".$queryFields.") VALUES (".$queryValues.")"; |
145 | 145 | $this->db_local->query($query); |
146 | 146 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $tmp_table = 'tmp_'.$table_name; |
153 | 153 | if ($this->tablesource[$table_name] == 'eduroam') { |
154 | 154 | $this->db_local->select_db('monitor_copy'); |
155 | - } elseif($this->tablesource[$table_name] == 'eduroamv2') { |
|
155 | + } elseif ($this->tablesource[$table_name] == 'eduroamv2') { |
|
156 | 156 | $this->db_local->select_db('eduroamv2'); |
157 | 157 | } |
158 | 158 | $this->db_local->query("SET NAMES 'utf8mb4'"); |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | private function escape($inp) { |
164 | - $out=str_replace('\\','\\\\',$inp); |
|
165 | - $out=str_replace('"','\"',$out); |
|
166 | - $out=str_replace('?','\?',$out); |
|
164 | + $out = str_replace('\\', '\\\\', $inp); |
|
165 | + $out = str_replace('"', '\"', $out); |
|
166 | + $out = str_replace('?', '\?', $out); |
|
167 | 167 | $out = 'convert(cast(convert("'.$out.'" using latin1) as binary) using utf8)'; |
168 | 168 | return($out); |
169 | 169 | } |