@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | // we need to know if we are serving a RTL language so we can flip some heading |
| 22 | 22 | // items |
| 23 | 23 | header("Content-Type:text/css"); |
| 24 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
| 24 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
| 25 | 25 | $langInstance = new core\common\Language(); |
| 26 | 26 | $start = $langInstance->rtl ? "right" : "left"; |
| 27 | 27 | $end = $langInstance->rtl ? "left" : "right"; |
@@ -82,16 +82,16 @@ discard block |
||
| 82 | 82 | margin-bottom:3px; |
| 83 | 83 | } |
| 84 | 84 | .sb-date-picker{ |
| 85 | - padding-<?php echo $end;?>:25px; |
|
| 85 | + padding-<?php echo $end; ?>:25px; |
|
| 86 | 86 | width: 140px; |
| 87 | 87 | } |
| 88 | 88 | .sb-date-button{ |
| 89 | - margin-<?php echo $start;?>:-30px; |
|
| 89 | + margin-<?php echo $start; ?>:-30px; |
|
| 90 | 90 | min-height: 22px; |
| 91 | - border-<?php echo $start;?>-style: solid; |
|
| 91 | + border-<?php echo $start; ?>-style: solid; |
|
| 92 | 92 | border-top-style: solid; |
| 93 | - border-<?php echo $end;?>-style: solid; |
|
| 94 | - border-<?php echo $end;?>-width: 1px; |
|
| 93 | + border-<?php echo $end; ?>-style: solid; |
|
| 94 | + border-<?php echo $end; ?>-width: 1px; |
|
| 95 | 95 | border-bottom-width: 1px; |
| 96 | 96 | border-radius: 1px; |
| 97 | 97 | box-shadow: 0px 0px 0px #666666; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | // we need to know if we are serving a RTL language so we can flip some heading |
| 23 | 23 | // items |
| 24 | 24 | header("Content-Type:text/css"); |
| 25 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
| 25 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
| 26 | 26 | |
| 27 | 27 | $langInstance = new core\common\Language(); |
| 28 | 28 | $start = $langInstance->rtl ? "right" : "left"; |
@@ -32,15 +32,15 @@ discard block |
||
| 32 | 32 | ol.eapmethods { list-style-position: inside; margin: 0; padding: 0px; padding-top: 20px; padding-bottom: 0px; width: 20em; } |
| 33 | 33 | ol.eapmethods li{ |
| 34 | 34 | background: #CCF; |
| 35 | - border-<?php echo $start;?>-style: inset; |
|
| 36 | - border-<?php echo $start;?>-width: 1px; |
|
| 37 | - border-<?php echo $start;?>-color: #8BBACB; |
|
| 35 | + border-<?php echo $start; ?>-style: inset; |
|
| 36 | + border-<?php echo $start; ?>-width: 1px; |
|
| 37 | + border-<?php echo $start; ?>-color: #8BBACB; |
|
| 38 | 38 | border-top-style: inset; |
| 39 | 39 | border-top-width: 1px; |
| 40 | 40 | border-top-color: #8BBACB; |
| 41 | - border-<?php echo $end;?>-style: outset; |
|
| 42 | - border-<?php echo $end;?>-width: 2px; |
|
| 43 | - border-<?php echo $end;?>-color: #043D52; |
|
| 41 | + border-<?php echo $end; ?>-style: outset; |
|
| 42 | + border-<?php echo $end; ?>-width: 2px; |
|
| 43 | + border-<?php echo $end; ?>-color: #043D52; |
|
| 44 | 44 | border-bottom-style: outset; |
| 45 | 45 | border-bottom-width: 2px; |
| 46 | 46 | border-bottom-color: #043D52; |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | background-position:95% 50%; |
| 52 | 52 | margin: 2px 0px 2px 0px; |
| 53 | 53 | padding: 3px; |
| 54 | - padding-<?php echo $start;?>: 1em; |
|
| 55 | - padding-<?php echo $end;?>: 0px; |
|
| 54 | + padding-<?php echo $start; ?>: 1em; |
|
| 55 | + padding-<?php echo $end; ?>: 0px; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | table.eaptable td { |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * <base_url>/copyright.php after deploying the software |
| 20 | 20 | */ |
| 21 | 21 | header("Content-Type:text/css"); |
| 22 | -require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/config/_config.php"; |
|
| 22 | +require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/config/_config.php"; |
|
| 23 | 23 | $langInstance = new core\common\Language(); |
| 24 | 24 | $start = $langInstance->rtl ? "right" : "left"; |
| 25 | 25 | $end = $langInstance->rtl ? "left" : "right"; |
@@ -399,8 +399,8 @@ discard block |
||
| 399 | 399 | |
| 400 | 400 | #message_only { |
| 401 | 401 | padding-top: 20px; |
| 402 | - padding-<?php echo $start;?>: 30px; |
|
| 403 | - padding-<?php echo $end;?>: 30px; |
|
| 402 | + padding-<?php echo $start; ?>: 30px; |
|
| 403 | + padding-<?php echo $end; ?>: 30px; |
|
| 404 | 404 | font-weight: normal; |
| 405 | 405 | position: relative; |
| 406 | 406 | font-size: 15px; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | case "core\User": |
| 140 | 140 | return $this->userName; |
| 141 | 141 | default: |
| 142 | - throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!"); |
|
| 142 | + throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!"); |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function beginFlushAttributes($extracondition = "") |
| 179 | 179 | { |
| 180 | - $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 180 | + $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 181 | 181 | $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND option_name NOT LIKE '%_file' $extracondition"); |
| 182 | 182 | $this->updateFreshness(); |
| 183 | 183 | $execFlush = $this->databaseHandle->exec("SELECT row_id FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier $extracondition"); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | public function commitFlushAttributes(array $tobedeleted) |
| 199 | 199 | { |
| 200 | - $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 200 | + $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : ""); |
|
| 201 | 201 | foreach (array_keys($tobedeleted) as $row_id) { |
| 202 | 202 | $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row_id = $row_id"); |
| 203 | 203 | $this->updateFreshness(); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | { |
| 227 | 227 | $relevantId = $this->getRelevantIdentifier(); |
| 228 | 228 | $identifierType = (is_int($relevantId) ? "i" : "s"); |
| 229 | - $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType . "sss", $relevantId, $attrName, $attrLang, $attrValue); |
|
| 229 | + $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType."sss", $relevantId, $attrName, $attrLang, $attrValue); |
|
| 230 | 230 | $this->updateFreshness(); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | $loggerInstance = new \core\common\Logging(); |
| 82 | 82 | $olddomain = textdomain(NULL); |
| 83 | 83 | $loggerInstance->debug(4, "set_locale($domain)\n"); |
| 84 | - $loggerInstance->debug(4, ROOT . "\n"); |
|
| 84 | + $loggerInstance->debug(4, ROOT."\n"); |
|
| 85 | 85 | textdomain($domain); |
| 86 | - bindtextdomain($domain, ROOT . "/translation/"); |
|
| 86 | + bindtextdomain($domain, ROOT."/translation/"); |
|
| 87 | 87 | bind_textdomain_codeset($domain, "UTF-8"); |
| 88 | 88 | return $olddomain; |
| 89 | 89 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // check if this language is supported by the CAT config |
| 138 | 138 | foreach (\config\Master::LANGUAGES as $language => $value) { |
| 139 | - if (preg_match("/^" . $language . ".*/", $tryLang)) { |
|
| 139 | + if (preg_match("/^".$language.".*/", $tryLang)) { |
|
| 140 | 140 | $localeTmp = $value['locale']; |
| 141 | 141 | $langIndex = $language; // ??? |
| 142 | 142 | break; |
@@ -152,12 +152,12 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | $isRtl = \config\Master::LANGUAGES[$langIndex]['rtl']; |
| 155 | - putenv("LC_ALL=" . $theLocale); |
|
| 156 | - putenv("LANGUAGE=" . $theLocale); |
|
| 155 | + putenv("LC_ALL=".$theLocale); |
|
| 156 | + putenv("LANGUAGE=".$theLocale); |
|
| 157 | 157 | $_SESSION['language'] = $langIndex; |
| 158 | 158 | $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n"); |
| 159 | 159 | $loggerInstance->debug(4, print_r($langConverted, true)); |
| 160 | - return([$langIndex, $theLocale,$isRtl]); |
|
| 160 | + return([$langIndex, $theLocale, $isRtl]); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | ], |
| 438 | 438 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 439 | 439 | "geteduroam", |
| 440 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
| 440 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
| 441 | 441 | |
| 442 | 442 | 'geteduroam_text' => sprintf(_("Use our app, it will guide you through the setup process:%s" |
| 443 | 443 | ."(or download it manually %s.)<p>" |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | 'mime' => 'application/eap-config', |
| 466 | 466 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 467 | 467 | "geteduroam", |
| 468 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>" . _("as local download") . "</a>"), |
|
| 468 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=app.eduroam.geteduroam'>Google Play</a>, <a target='_blank' href='geteduroam-stable.apk'>"._("as local download")."</a>"), |
|
| 469 | 469 | ], |
| 470 | 470 | ], |
| 471 | 471 | |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | ], |
| 483 | 483 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 484 | 484 | "eduroamCAT", |
| 485 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 485 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 486 | 486 | 'geteduroam_text' => sprintf(_("Use our app, it will guide you through the setup process:%s" |
| 487 | 487 | ."(or download it manually %s.)<p>" |
| 488 | 488 | . "After installation, open the app, select your home institution and the app will collect required information " |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | 'mime' => 'application/eap-config', |
| 510 | 510 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 511 | 511 | "eduroamCAT", |
| 512 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 512 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 513 | 513 | ], |
| 514 | 514 | ], |
| 515 | 515 | 'android_pie' => [ |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | 'mime' => 'application/eap-config', |
| 524 | 524 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 525 | 525 | "eduroamCAT", |
| 526 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 526 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 527 | 527 | ], |
| 528 | 528 | ], |
| 529 | 529 | 'android_oreo' => [ |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | 'mime' => 'application/eap-config', |
| 538 | 538 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 539 | 539 | "eduroamCAT", |
| 540 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 540 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 541 | 541 | ], |
| 542 | 542 | ], |
| 543 | 543 | 'android_nougat' => [ |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | 'mime' => 'application/eap-config', |
| 552 | 552 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 553 | 553 | "eduroamCAT", |
| 554 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 554 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 555 | 555 | ], |
| 556 | 556 | ], |
| 557 | 557 | 'android_marshmallow' => [ |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | 'mime' => 'application/eap-config', |
| 566 | 566 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 567 | 567 | "eduroamCAT", |
| 568 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 568 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 569 | 569 | ], |
| 570 | 570 | ], |
| 571 | 571 | 'android_lollipop' => [ |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | 'mime' => 'application/eap-config', |
| 580 | 580 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 581 | 581 | "eduroamCAT", |
| 582 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 582 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 583 | 583 | ], |
| 584 | 584 | ], |
| 585 | 585 | 'android_kitkat' => [ |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | 'mime' => 'application/eap-config', |
| 594 | 594 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 595 | 595 | "eduroamCAT", |
| 596 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 596 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 597 | 597 | ], |
| 598 | 598 | ], |
| 599 | 599 | 'android_43' => [ |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | 'mime' => 'application/eap-config', |
| 608 | 608 | 'message' => sprintf(_("Before you proceed with installation on Android systems, please make sure that you have installed the %s application. This application is available from these sites: %s and will use the configuration file downloaded from CAT to create all necessary settings."), |
| 609 | 609 | "eduroamCAT", |
| 610 | - "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>" . _("as local download") . "</a>"), |
|
| 610 | + "<a target='_blank' href='https://play.google.com/store/apps/details?id=uk.ac.swansea.eduroamcat'>Google Play</a>, <a target='_blank' href='https://www.amazon.com/dp/B01EACCX0S/'>Amazon Appstore</a>, <a target='_blank' href='eduroamCAT-stable.apk'>"._("as local download")."</a>"), |
|
| 611 | 611 | ], |
| 612 | 612 | ], |
| 613 | 613 | |
@@ -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(dirname(__FILE__)))) . "/config/_config.php"; |
|
| 22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
| 23 | 23 | |
| 24 | 24 | $auth = new \web\lib\admin\Authentication(); |
| 25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $remaining_attribs = $my_profile->beginFlushMethodLevelAttributes($eaptype->getIntegerRep(), NULL); |
| 91 | 91 | $optionParser->processSubmittedFields($my_profile, $_POST, $_FILES, $eaptype->getIntegerRep(), NULL); |
| 92 | 92 | } |
| 93 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $my_profile->identifier . " - device/EAP-Type settings changed"); |
|
| 93 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$my_profile->identifier." - device/EAP-Type settings changed"); |
|
| 94 | 94 | header("Location: ../overview_installers.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier"); |
| 95 | 95 | exit; |
| 96 | 96 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | $captiontext = sprintf(_("device <strong>%s</strong>"), $device['display']); |
| 106 | 106 | $keyword = "device-specific"; |
| 107 | - $extrainput = "<input type='hidden' name='device' value='" . $device_key . "'/>"; |
|
| 107 | + $extrainput = "<input type='hidden' name='device' value='".$device_key."'/>"; |
|
| 108 | 108 | $dev = $device_key; |
| 109 | 109 | } elseif ($eaptype !== NULL) { |
| 110 | 110 | foreach ($my_profile->getAttributes() as $attrib) { |
@@ -115,13 +115,13 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $captiontext = sprintf(_("EAP-Type <strong>%s</strong>"), $eaptype->getPrintableRep()); |
| 117 | 117 | $keyword = "eap-specific"; |
| 118 | - $extrainput = "<input type='hidden' name='eaptype' value='" . $eaptype->getIntegerRep() . "'>"; |
|
| 118 | + $extrainput = "<input type='hidden' name='eaptype' value='".$eaptype->getIntegerRep()."'>"; |
|
| 119 | 119 | $dev = ''; |
| 120 | 120 | } else { |
| 121 | 121 | throw new Exception("previous type checks make it impossible to reach this code path."); |
| 122 | 122 | } |
| 123 | 123 | ?> |
| 124 | -<p><?php echo _("Fine-tuning options for ") . $captiontext; ?></p> |
|
| 124 | +<p><?php echo _("Fine-tuning options for ").$captiontext; ?></p> |
|
| 125 | 125 | <hr/> |
| 126 | 126 | |
| 127 | 127 | <form action='inc/toggleRedirect.inc.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $my_profile->identifier; ?>' method='post' accept-charset='UTF-8'><?php echo $extrainput; ?> |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | // see if we already have any attributes; if so, display these |
| 130 | 130 | $interesting_attribs = []; |
| 131 | 131 | foreach ($attribs as $attrib) { |
| 132 | - if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^' . $keyword . ':/', $attrib['name'])) { |
|
| 132 | + if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^'.$keyword.':/', $attrib['name'])) { |
|
| 133 | 133 | $interesting_attribs[] = $attrib; |
| 134 | 134 | } |
| 135 | 135 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if (\config\Master::DB['INST']['readonly'] === FALSE) { |
| 139 | 139 | if ($editMode == 'fullaccess') { |
| 140 | 140 | ?> |
| 141 | - <button type='button' class='newoption' onclick='getXML("<?php echo $keyword;?>", "<?php echo $my_inst->federation;?>", "<?php echo $dev;?>")'><?php echo _("Add new option"); ?></button> |
|
| 141 | + <button type='button' class='newoption' onclick='getXML("<?php echo $keyword; ?>", "<?php echo $my_inst->federation; ?>", "<?php echo $dev; ?>")'><?php echo _("Add new option"); ?></button> |
|
| 142 | 142 | <br/> |
| 143 | 143 | <hr/> |
| 144 | 144 | <button type='submit' name='submitbutton' id='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_SAVE; ?>'><?php echo _("Save data"); ?></button> |
@@ -150,7 +150,6 @@ discard block |
||
| 150 | 150 | * mails, just configure the signing cert with these parameters. All must |
| 151 | 151 | * be non-NULL for signing to happen. If you don't need a keypass, make |
| 152 | 152 | * it an empty string instead. |
| 153 | - |
|
| 154 | 153 | * @var array |
| 155 | 154 | */ |
| 156 | 155 | const MAILSETTINGS = [// we always use Submission |
@@ -163,8 +162,8 @@ discard block |
||
| 163 | 162 | 'keyfilename' => NULL, |
| 164 | 163 | 'keypass' => NULL, |
| 165 | 164 | 'notify_nro' => false, // normally should be set to TRUE abd causes |
| 166 | - // notifications being sent to NRO admins when |
|
| 167 | - // important changes are made |
|
| 165 | + // notifications being sent to NRO admins when |
|
| 166 | + // important changes are made |
|
| 168 | 167 | ]; |
| 169 | 168 | /** |
| 170 | 169 | * List of all supported languages in CAT. Comment some if you want to disable them |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE, 'rtl' => FALSE], |
| 175 | 175 | 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
| 176 | 176 | 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
| 177 | - 'cy' => ['display' => 'Cymraeg', 'locale' => 'cy_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
|
| 177 | + 'cy' => ['display' => 'Cymraeg', 'locale' => 'cy_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
|
| 178 | 178 | 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
| 179 | 179 | 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE, 'rtl' => FALSE], |
| 180 | 180 | 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | 'db' => 'cat', |
| 222 | 222 | 'user' => 'kitty', |
| 223 | 223 | 'pass' => 'somepass', |
| 224 | - 'readonly' => FALSE,], |
|
| 224 | + 'readonly' => FALSE, ], |
|
| 225 | 225 | // this DB stores diagnostics data. The connection details can be |
| 226 | 226 | // identical to INST as there is no table overlap |
| 227 | 227 | 'DIAGNOSTICS' => [ |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | 'db' => 'cat', |
| 230 | 230 | 'user' => 'kitty', |
| 231 | 231 | 'pass' => 'somepass', |
| 232 | - 'readonly' => FALSE,], |
|
| 232 | + 'readonly' => FALSE, ], |
|
| 233 | 233 | // this slice of DB user is about the downloads table. The corresponding |
| 234 | 234 | // DB user should have write access to update statistics and the cache |
| 235 | 235 | // locations of installers. |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | 'db' => 'cat', |
| 240 | 240 | 'user' => 'kitty', |
| 241 | 241 | 'pass' => 'somepass', |
| 242 | - 'readonly' => FALSE,], |
|
| 242 | + 'readonly' => FALSE, ], |
|
| 243 | 243 | // this slice of DB use is about user management in the user_options |
| 244 | 244 | // table. Giving the corresponding user only read-only access means that |
| 245 | 245 | // all user properties have to "magically" occur in the table by OOB |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | 'db' => 'cat', |
| 251 | 251 | 'user' => 'kitty', |
| 252 | 252 | 'pass' => 'somepass', |
| 253 | - 'readonly' => FALSE,], |
|
| 253 | + 'readonly' => FALSE, ], |
|
| 254 | 254 | /* If you use this tool in conjunction with an external customer management database, you can configure that every |
| 255 | 255 | * institution entry in CAT MUST correspond to a customer entry in an external database. If you want this, set this |
| 256 | 256 | * config variable to TRUE. |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | 'db' => 'customer_db', |
| 277 | 277 | 'user' => 'customerservice', |
| 278 | 278 | 'pass' => '2lame4u', |
| 279 | - 'readonly' => TRUE,], |
|
| 279 | + 'readonly' => TRUE, ], |
|
| 280 | 280 | /* |
| 281 | 281 | * EXTERNAL_SOURCE is the source only used in the caching script, if you |
| 282 | 282 | * do not use local caching then these settings are irrelevant |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | 'db' => 'customer_db', |
| 287 | 287 | 'user' => 'customerservice', |
| 288 | 288 | 'pass' => '2lame4u', |
| 289 | - 'readonly' => TRUE,], |
|
| 289 | + 'readonly' => TRUE, ], |
|
| 290 | 290 | |
| 291 | 291 | 'enforce-external-sync' => TRUE, |
| 292 | 292 | ]; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($cert['full_details']['type'] == 'server') { |
| 94 | 94 | $reason = _("%s - server certificate (<a href='%s'>more info</a>)"); |
| 95 | 95 | $fail = true; |
| 96 | - } elseif($cert['basicconstraints_set'] === 0) { |
|
| 96 | + } elseif ($cert['basicconstraints_set'] === 0) { |
|
| 97 | 97 | $reason = _("%s - missing required CA extensions (<a href='%s'>more info</a>)"); |
| 98 | 98 | $fail = true; |
| 99 | 99 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $optionClass = \core\Options::instance(); |
| 123 | 123 | $optionProps = $optionClass->optionType($optiontype); |
| 124 | 124 | $allowedValues = explode(',', substr($optionProps["flags"], 7)); |
| 125 | - if (in_array($incomingBinary,$allowedValues)) { |
|
| 125 | + if (in_array($incomingBinary, $allowedValues)) { |
|
| 126 | 126 | return ['result'=>TRUE, 'details'=>'']; |
| 127 | 127 | } |
| 128 | 128 | return ['result'=>FALSE, 'details'=>'']; |
@@ -368,14 +368,14 @@ discard block |
||
| 368 | 368 | case \core\Options::TYPECODE_TEXT: |
| 369 | 369 | case \core\Options::TYPECODE_COORDINATES: |
| 370 | 370 | case \core\Options::TYPECODE_INTEGER: |
| 371 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
| 371 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
| 372 | 372 | if (!empty($varName)) { |
| 373 | 373 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
| 374 | 374 | break; |
| 375 | 375 | } |
| 376 | 376 | continue 2; |
| 377 | 377 | case \core\Options::TYPECODE_BOOLEAN: |
| 378 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
| 378 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
| 379 | 379 | if (!empty($varName)) { |
| 380 | 380 | $contentValid = $this->validator->boolean($varName); |
| 381 | 381 | if ($contentValid) { |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | } |
| 389 | 389 | continue 2; |
| 390 | 390 | case \core\Options::TYPECODE_STRING: |
| 391 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
| 391 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
| 392 | 392 | if (!empty(trim($previsionalContent))) { |
| 393 | 393 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
| 394 | 394 | if ($content === FALSE) { |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | continue 2; |
| 400 | 400 | |
| 401 | 401 | case \core\Options::TYPECODE_ENUM_OPENROAMING: |
| 402 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
| 402 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
| 403 | 403 | if (!empty($previsionalContent)) { |
| 404 | 404 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
| 405 | 405 | if ($content === FALSE) { |
@@ -410,15 +410,15 @@ discard block |
||
| 410 | 410 | continue 2; |
| 411 | 411 | case \core\Options::TYPECODE_FILE: |
| 412 | 412 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
| 413 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
| 413 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
| 414 | 414 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
| 415 | 415 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
| 416 | 416 | $content = $this->validator->string(urldecode($reference), TRUE); |
| 417 | 417 | break; |
| 418 | 418 | } |
| 419 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
| 419 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
| 420 | 420 | if ($fileName != "") { // let's do the download |
| 421 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
| 421 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
| 422 | 422 | $sanity = $this->checkUploadSanity($objValue, $rawContent); |
| 423 | 423 | if ($rawContent === FALSE || !$sanity['result']) { |
| 424 | 424 | $bad[] = ['type'=>$objValue, 'details'=>$sanity['details']]; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | } |
| 430 | 430 | continue 2; |
| 431 | 431 | default: |
| 432 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
| 432 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
| 433 | 433 | } |
| 434 | 434 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
| 435 | 435 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |