@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | private function writeToFile($filename, $message) |
51 | 51 | { |
52 | - file_put_contents(\config\Master::PATHS['logdir'] . "/$filename", sprintf("%-015s", microtime(TRUE)) . $message, FILE_APPEND); |
|
52 | + file_put_contents(\config\Master::PATHS['logdir']."/$filename", sprintf("%-015s", microtime(TRUE)).$message, FILE_APPEND); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } else { |
82 | 82 | $output .= var_export($stuff, TRUE); |
83 | 83 | } |
84 | - $output = $prefix . $output . $suffix; |
|
84 | + $output = $prefix.$output.$suffix; |
|
85 | 85 | $this->writeToFile("debug.log", $output); |
86 | 86 | |
87 | 87 | return; |
@@ -129,6 +129,6 @@ discard block |
||
129 | 129 | $logTextStep1 = preg_replace("/[\n\r]/", "", $query); |
130 | 130 | $logTextStep2 = preg_replace("/ +/", " ", $logTextStep1); |
131 | 131 | $logTextStep3 = iconv("UTF-8", "UTF-8//IGNORE", $logTextStep2); |
132 | - $this->writeToFile("audit-SQL.log", " " . $logTextStep3 . "\n"); |
|
132 | + $this->writeToFile("audit-SQL.log", " ".$logTextStep3."\n"); |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | \ No newline at end of file |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $returnArray = []; |
70 | 70 | $returnArray['status'] = $status; |
71 | 71 | $returnArray['data'] = $data; |
72 | - $returnArray['tou'] = "Please consult Terms of Use at: //" . $host . \core\CAT::getRootUrlPath() . "/tou.php"; |
|
72 | + $returnArray['tou'] = "Please consult Terms of Use at: //".$host.\core\CAT::getRootUrlPath()."/tou.php"; |
|
73 | 73 | if (!empty($otherData)) { |
74 | 74 | $returnArray['otherdata'] = $otherData; |
75 | 75 | } |
@@ -311,8 +311,8 @@ discard block |
||
311 | 311 | public function sendLogo($identifier, $type, $width, $height) |
312 | 312 | { |
313 | 313 | $logo = $this->getLogo($identifier, $type, $width, $height); |
314 | - $blob = $logo === NULL ? file_get_contents(ROOT . '/web/resources/images/empty.png') : $logo['blob']; |
|
315 | - header("Content-type: " . $logo['filetype']); |
|
314 | + $blob = $logo === NULL ? file_get_contents(ROOT.'/web/resources/images/empty.png') : $logo['blob']; |
|
315 | + header("Content-type: ".$logo['filetype']); |
|
316 | 316 | header("Cache-Control:max-age=36000, must-revalidate"); |
317 | 317 | header($logo['expires']); |
318 | 318 | echo $blob; |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | parent::__construct(); |
66 | 66 | $Dev = \devices\Devices::listDevices(); |
67 | 67 | if (isset($Dev[$blueprint])) { |
68 | - $this->loggerInstance->debug(4, "loaded: devices/" . $Dev[$blueprint]['directory'] . "/" . $Dev[$blueprint]['module'] . ".php\n"); |
|
69 | - $class_name = "\devices\\" . $Dev[$blueprint]['directory'] . "\Device" . $Dev[$blueprint]['module']; |
|
68 | + $this->loggerInstance->debug(4, "loaded: devices/".$Dev[$blueprint]['directory']."/".$Dev[$blueprint]['module'].".php\n"); |
|
69 | + $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device".$Dev[$blueprint]['module']; |
|
70 | 70 | $this->device = new $class_name(); |
71 | 71 | if (!$this->device) { |
72 | 72 | $this->loggerInstance->debug(2, "module loading failed"); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } else { |
76 | 76 | echo("unknown devicename:$blueprint\n"); |
77 | 77 | } |
78 | - $this->device->module_path = ROOT . '/devices/' . $Dev[$blueprint]['directory']; |
|
78 | + $this->device->module_path = ROOT.'/devices/'.$Dev[$blueprint]['directory']; |
|
79 | 79 | $this->device->signer = isset($Dev[$blueprint]['signer']) ? $Dev[$blueprint]['signer'] : 0; |
80 | 80 | $this->device->device_id = $blueprint; |
81 | 81 | $options = \devices\Devices::$Options; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | "TXT" => _("If you use more than one device: do your other devices still work?"), |
109 | 109 | "FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
110 | 110 | "FACTOR_NO" => 3, // now that is suspicious indeed |
111 | - "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
111 | + "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ], |
|
112 | 112 | 6 => ["AREA" => AbstractTest::INFRA_SP_80211, |
113 | 113 | "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
114 | 114 | "FACTOR_YES" => 3, |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | $questionDetails = $this->qaArray[$questionNumber]; |
145 | 145 | if ($answer === TRUE) { |
146 | 146 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"]; |
147 | - $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_YES"] . "\n"); |
|
147 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
148 | 148 | $factor = $questionDetails["FACTOR_YES"]; |
149 | 149 | } elseif ($answer === FALSE) { |
150 | 150 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"]; |
151 | - $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_NO"] . "\n"); |
|
151 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
152 | 152 | $factor = $questionDetails["FACTOR_NO"]; |
153 | 153 | } else { |
154 | 154 | $factor = 1; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | // if both are identical, take any of the questions in the pool of both |
184 | 184 | foreach ($this->qaArray as $questionNumber => $questionDetails) { |
185 | 185 | // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it |
186 | - if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
186 | + if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
187 | 187 | return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]); |
188 | 188 | } |
189 | 189 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $text = $this->genericVerdictTexts[$area]; |
212 | 212 | foreach ($this->previousQuestions as $number => $factor) { |
213 | 213 | if ($this->qaArray[$number]["AREA"] == $area && $factor > 1) { |
214 | - $text .= "\n\n" . $this->qaArray[$number]["VERDICTLECTURE"]; |
|
214 | + $text .= "\n\n".$this->qaArray[$number]["VERDICTLECTURE"]; |
|
215 | 215 | } |
216 | 216 | } |
217 | 217 | return $text; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if ($this->idPFederation === NULL && preg_match("/\.(..)$/", $realm, $matches)) { |
114 | 114 | $this->idPFederation = strtoupper($matches[1]); |
115 | 115 | } |
116 | - $this->loggerInstance->debug(4, "XYZ: IdP-side NRO is " . $this->idPFederation . "\n"); |
|
116 | + $this->loggerInstance->debug(4, "XYZ: IdP-side NRO is ".$this->idPFederation."\n"); |
|
117 | 117 | } |
118 | 118 | /* The eduroam OT monitoring has the following return codes: |
119 | 119 | * |
@@ -443,12 +443,12 @@ discard block |
||
443 | 443 | break; |
444 | 444 | case \core\AbstractProfile::READINESS_LEVEL_NOTREADY: |
445 | 445 | $this->additionalFindings[AbstractTest::INFRA_IDP_RADIUS][] = ["Profile" => "UNCONCLUSIVE"]; |
446 | - $this->testsuite = new RADIUSTests($this->realm, "anonymous@" . $this->realm); |
|
446 | + $this->testsuite = new RADIUSTests($this->realm, "anonymous@".$this->realm); |
|
447 | 447 | break; |
448 | 448 | default: |
449 | 449 | } |
450 | 450 | } else { |
451 | - $this->testsuite = new RADIUSTests($this->realm, "anonymous@" . $this->realm); |
|
451 | + $this->testsuite = new RADIUSTests($this->realm, "anonymous@".$this->realm); |
|
452 | 452 | } |
453 | 453 | } |
454 | 454 |
@@ -148,27 +148,27 @@ discard block |
||
148 | 148 | { |
149 | 149 | // it could match CN or sAN:DNS, we don't care which |
150 | 150 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) { |
151 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against Subject: "); |
|
151 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against Subject: "); |
|
152 | 152 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['subject']); |
153 | 153 | // we are checking against accidental misconfig, not attacks, so loosely checking against end of string is appropriate |
154 | - if (preg_match("/CN=" . $this->expectedName . "/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
154 | + if (preg_match("/CN=".$this->expectedName."/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
|
155 | 155 | return TRUE; |
156 | 156 | } |
157 | 157 | } |
158 | 158 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
159 | - $this->loggerInstance->debug(4, "Checking expected server name " . $this->expectedName . " against sANs: "); |
|
159 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against sANs: "); |
|
160 | 160 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']); |
161 | 161 | $testNames = $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
162 | 162 | if (!is_array($testNames)) { |
163 | 163 | $testNames = [$testNames]; |
164 | 164 | } |
165 | 165 | foreach ($testNames as $oneName) { |
166 | - if (preg_match("/" . $this->expectedName . "/", $oneName) === 1) { |
|
166 | + if (preg_match("/".$this->expectedName."/", $oneName) === 1) { |
|
167 | 167 | return TRUE; |
168 | 168 | } |
169 | 169 | } |
170 | 170 | } |
171 | - $this->loggerInstance->debug(3, "Tried to check expected server name " . $this->expectedName . " but neither CN nor sANs matched."); |
|
171 | + $this->loggerInstance->debug(3, "Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
172 | 172 | |
173 | 173 | $this->TLS_CA_checks_result[$host]['cert_oddity'] = RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH; |
174 | 174 | return FALSE; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
199 | 199 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
200 | 200 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
201 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
201 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
202 | 202 | if (!isset($this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k])) { |
203 | 203 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k] = []; |
204 | 204 | } |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | // but code analysers want this more explicit, so here is this extra |
244 | 244 | // call to escapeshellarg() |
245 | 245 | $escapedHost = escapeshellarg($host); |
246 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1\n"); |
|
246 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1\n"); |
|
247 | 247 | $time_start = microtime(true); |
248 | 248 | $opensslbabble = []; |
249 | 249 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
250 | - exec(\config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -no_ssl3 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
250 | + exec(\config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -no_ssl3 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
251 | 251 | $time_stop = microtime(true); |
252 | 252 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
253 | 253 | $testresults['returncode'] = $result; |
@@ -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 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) { |
202 | 202 | $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row = $row"); |
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 |
@@ -109,7 +109,6 @@ |
||
109 | 109 | * ["my.server.name"] => "my.server.name" |
110 | 110 | * ["foo.bar.de", "baz.bar.ge"] => "e" |
111 | 111 | * ["server1.example.com", "server2.example.com", "serverN.example.com"] => ".example.com" |
112 | - |
|
113 | 112 | * @return string |
114 | 113 | */ |
115 | 114 | public function longestNameSuffix() |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | protected function setSupportedEapMethods($eapArray) |
86 | 86 | { |
87 | 87 | $this->supportedEapMethods = $eapArray; |
88 | - $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: "); |
|
88 | + $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: "); |
|
89 | 89 | $this->loggerInstance->debug(4, $this->supportedEapMethods); |
90 | 90 | } |
91 | 91 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | break 2; |
138 | 138 | } |
139 | 139 | } |
140 | - $longestSuffix = $candidate . $longestSuffix; |
|
140 | + $longestSuffix = $candidate.$longestSuffix; |
|
141 | 141 | } |
142 | 142 | return $longestSuffix; |
143 | 143 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | throw new Exception("No EAP type available."); |
176 | 176 | } |
177 | 177 | $this->attributes = $this->getProfileAttributes($profile); |
178 | - $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id); |
|
178 | + $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id); |
|
179 | 179 | |
180 | 180 | |
181 | 181 | // if we are instantiating a Silverbullet profile AND have been given |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | // create temporary directory, its full path will be saved in $this->FPATH; |
201 | 201 | $tempDir = \core\common\Entity::createTemporaryDirectory($purpose); |
202 | 202 | $this->FPATH = $tempDir['dir']; |
203 | - mkdir($tempDir['dir'] . '/tmp'); |
|
204 | - chdir($tempDir['dir'] . '/tmp'); |
|
203 | + mkdir($tempDir['dir'].'/tmp'); |
|
204 | + chdir($tempDir['dir'].'/tmp'); |
|
205 | 205 | $caList = []; |
206 | 206 | $x509 = new \core\common\X509(); |
207 | 207 | if (isset($this->attributes['eap:ca_file'])) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $this->support_url_substitute = sprintf(_("your local %s support page"), \config\ConfAssistant::CONSORTIUM['display_name']); |
240 | 240 | |
241 | 241 | if ($this->signer && $this->options['sign']) { |
242 | - $this->sign = ROOT . '/signer/' . $this->signer; |
|
242 | + $this->sign = ROOT.'/signer/'.$this->signer; |
|
243 | 243 | } |
244 | 244 | $this->installerBasename = $this->getInstallerBasename(); |
245 | 245 | common\Entity::outOfThePotatoes(); |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | */ |
300 | 300 | protected function findSourceFile($file) |
301 | 301 | { |
302 | - if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { |
|
303 | - return $this->module_path . '/Files/' . $this->device_id . '/' . $file; |
|
304 | - } elseif (is_file($this->module_path . '/Files/' . $file)) { |
|
305 | - return $this->module_path . '/Files/' . $file; |
|
302 | + if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) { |
|
303 | + return $this->module_path.'/Files/'.$this->device_id.'/'.$file; |
|
304 | + } elseif (is_file($this->module_path.'/Files/'.$file)) { |
|
305 | + return $this->module_path.'/Files/'.$file; |
|
306 | 306 | } else { |
307 | 307 | $this->loggerInstance->debug(2, "requested file $file does not exist\n"); |
308 | 308 | return FALSE; |
@@ -426,19 +426,19 @@ discard block |
||
426 | 426 | */ |
427 | 427 | private function getInstallerBasename() |
428 | 428 | { |
429 | - $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name']) . "-" . $this->getDeviceId(); |
|
429 | + $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name'])."-".$this->getDeviceId(); |
|
430 | 430 | if (isset($this->attributes['profile:customsuffix'][1])) { |
431 | 431 | // this string will end up as a filename on a filesystem, so always |
432 | 432 | // take a latin-based language variant if available |
433 | 433 | // and then scrub non-ASCII just in case |
434 | - return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
434 | + return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
435 | 435 | } |
436 | 436 | // Okay, no custom suffix. |
437 | 437 | // Use the configured inst name and apply shortening heuristics |
438 | 438 | // if an instshortname is set, base on that, otherwise, the normal instname |
439 | 439 | $attribToUse = (isset($this->attributes['general:instshortname']) ? 'general:instshortname' : 'general:instname'); |
440 | 440 | $lang_pointer = \config\Master::LANGUAGES[$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1; |
441 | - $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes[$attribToUse][$lang_pointer] . "\n"); |
|
441 | + $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes[$attribToUse][$lang_pointer]."\n"); |
|
442 | 442 | $inst = $this->customTranslit($this->attributes[$attribToUse][$lang_pointer]); |
443 | 443 | $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n"); |
444 | 444 | $Inst_a = explode('_', $inst); |
@@ -453,10 +453,10 @@ discard block |
||
453 | 453 | if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) { |
454 | 454 | $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]); |
455 | 455 | $prof = preg_replace('/_+$/', '', $profTemp); |
456 | - return $baseName . $inst . '-' . $prof; |
|
456 | + return $baseName.$inst.'-'.$prof; |
|
457 | 457 | } |
458 | 458 | } |
459 | - return $baseName . $inst; |
|
459 | + return $baseName.$inst; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | $ext = 'unsupported'; |
641 | 641 | } |
642 | 642 | $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n"); |
643 | - $fileName = 'logo-' . $type . $iterator . '.' . $ext; |
|
643 | + $fileName = 'logo-'.$type.$iterator.'.'.$ext; |
|
644 | 644 | $fileHandle = fopen($fileName, "w"); |
645 | 645 | if (!$fileHandle) { |
646 | 646 | $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n"); |
@@ -667,13 +667,13 @@ discard block |
||
667 | 667 | $mime = $finfo->buffer($blob); |
668 | 668 | $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported'; |
669 | 669 | $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n"); |
670 | - $fileHandle = fopen('local-info.' . $ext, "w"); |
|
670 | + $fileHandle = fopen('local-info.'.$ext, "w"); |
|
671 | 671 | if ($fileHandle === FALSE) { |
672 | 672 | throw new Exception("problem opening the file"); |
673 | 673 | } |
674 | 674 | fwrite($fileHandle, $blob); |
675 | 675 | fclose($fileHandle); |
676 | - return(['name' => 'local-info.' . $ext, 'mime' => $ext]); |
|
676 | + return(['name' => 'local-info.'.$ext, 'mime' => $ext]); |
|
677 | 677 | } |
678 | 678 | |
679 | 679 | /** |
@@ -727,9 +727,9 @@ discard block |
||
727 | 727 | { |
728 | 728 | $outerId = NULL; |
729 | 729 | if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) { |
730 | - $outerId = "@" . $this->attributes['internal:realm'][0]; |
|
730 | + $outerId = "@".$this->attributes['internal:realm'][0]; |
|
731 | 731 | if (isset($this->attributes['internal:anon_local_value'])) { |
732 | - $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId; |
|
732 | + $outerId = $this->attributes['internal:anon_local_value'][0].$outerId; |
|
733 | 733 | } |
734 | 734 | } |
735 | 735 | return $outerId; |
@@ -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 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | try { |
542 | 542 | $image->readImageBlob($binary); |
543 | 543 | } catch (\ImagickException $exception) { |
544 | - echo "Error" . $exception->getMessage(); |
|
544 | + echo "Error".$exception->getMessage(); |
|
545 | 545 | return FALSE; |
546 | 546 | } |
547 | 547 | // image survived the sanity check |