Test Failed
Pull Request — master (#300)
by ken
19:53
created
web/admin/action_req_certificate.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 $auth = new \web\lib\admin\Authentication();
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
                 $fed = $validator->existingFederation($_POST['NRO-list']);
106 106
                 $country = strtoupper($fed->tld);
107 107
                 $DN[] = "C=$country";
108
-                $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)];
108
+                $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)];
109 109
                 $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld);
110 110
                 $serverList = explode(",", array_key_first($serverInfo));
111
-                $DN[] = "CN=" . $serverList[0];
111
+                $DN[] = "CN=".$serverList[0];
112 112
                 $policies[] = "eduroam IdP";
113 113
                 $policies[] = "eduroam SP";
114 114
                 $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"];
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 }
133 133
                 $DN[] = "O=$ou";
134 134
                 $serverList = explode(",", $serverInfo["servers"]);
135
-                $DN[] = "CN=" . $serverList[0];
135
+                $DN[] = "CN=".$serverList[0];
136 136
                 switch ($serverInfo["type"]) {
137 137
                     case core\IdP::TYPE_IDPSP:
138 138
                         $policies[] = "eduroam IdP";
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
             default:
153 153
                 throw new Exception("Sorry: Unknown level of issuance requested.");
154 154
         }
155
-        echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties");
155
+        echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties");
156 156
         echo "<ul>";
157
-        echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
158
-        echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>";
159
-        echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>";
160
-        echo "<li>" . _("Requester Contact Details: ") . $firstName . " &lt;" . $firstMail . "&gt;" . "</li>";
157
+        echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>";
158
+        echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>";
159
+        echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>";
160
+        echo "<li>"._("Requester Contact Details: ").$firstName." &lt;".$firstMail."&gt;"."</li>";
161 161
         echo "</ul></p>";
162 162
 
163 163
         $vettedCsr = $validator->string($_POST['CSR'], true);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             "FED" => $country];
172 172
         // our certs can be good for max 5 years
173 173
         $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays);
174
-        echo "<p>" . _("The certificate was requested.") . "</p>";
174
+        echo "<p>"._("The certificate was requested.")."</p>";
175 175
         ?>
176 176
         <form action="overview_certificates.php" method="GET">
177 177
             <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button>
@@ -189,23 +189,23 @@  discard block
 block discarded – undo
189 189
         switch (count($feds)) {
190 190
             case 0:
191 191
                 echo "<div>";
192
-                echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required."));
192
+                echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required."));
193 193
                 echo "</div>";
194 194
                 break;
195 195
             case 1:
196
-                echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
197
-                echo " <strong>" . $cat->knownFederations[$feds[0]->tld] . "</strong>";
198
-                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>';
196
+                echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
197
+                echo " <strong>".$cat->knownFederations[$feds[0]->tld]."</strong>";
198
+                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>';
199 199
                 break;
200 200
             default:
201
-                echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
201
+                echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
202 202
                 ?>
203 203
                 <select name="NRO-list" id="NRO-list">
204 204
                     <option value="notset"><?php echo _("---PPPLEASE CHOOSE---"); ?></option>
205 205
                     <?php
206 206
                     foreach ($feds as $oneFed) {
207 207
                         #echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld] . "</option>";
208
-                        echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>";
208
+                        echo '<option value="AAA'.strtoupper($oneFed->tld).'">'.$oneIdP["names"][$langObject->getLang()]."</option>";
209 209
                         
210 210
                     }
211 211
                     ?>
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $allIdPs = [];
216 216
         foreach ($allAuthorizedFeds as $oneFed) {
217 217
             foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) {
218
-                $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()];
218
+                $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["names"][$langObject->getLang()];
219 219
             }
220 220
         }
221 221
         if (count($allIdPs) > 0) {
@@ -226,14 +226,14 @@  discard block
 block discarded – undo
226 226
             <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
227 227
 <?php
228 228
 foreach ($allIdPs as $id => $name) {
229
-    echo '<option value="' . $id . '">' . $name . "</option>";
229
+    echo '<option value="'.$id.'">'.$name."</option>";
230 230
 }
231 231
 ?>
232 232
         </select>
233 233
         <?php
234 234
         } else {
235 235
             echo "<div>";
236
-            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true);
236
+            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true);
237 237
             echo "</div>";
238 238
         }
239 239
         ?>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         <h2><?php echo _("2. CSR generation"); ?></h2>
244 244
         <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p>
245 245
         <?php 
246
-        echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced";
246
+        echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced";
247 247
         ?>
248 248
         <h2><?php echo _("3. Submission"); ?></h2>
249 249
 <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/>
Please login to merge, or discard this patch.
web/skins/modern/resources/css/cat-user.css.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
core/EntityWithDBProperties.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(3, "--- END Constructing new Profile object ... ---\n");
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
web/admin/edit_silverbullet.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $auth->authenticate();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     $fed = new \core\Federation($inst->federation);
54 54
     $allowSb = $fed->getAttributes("fed:silverbullet");
55 55
     if (count($allowSb) == 0) {
56
-        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!");
56
+        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!");
57 57
     }
58 58
     // okay, new SB profiles are allowed. 
59 59
     // but is there a support:email attribute on inst level?
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     // Create one.
65 65
     $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET);
66 66
     // and modify the REQUEST_URI to add the new profile ID
67
-    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier;
67
+    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier;
68 68
     $_GET['profile_id'] = $newProfile->identifier;
69 69
     $profile = $newProfile;
70 70
 } else {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 if (isset($_POST['command'])) {
90 90
     switch ($_POST['command']) {
91 91
         case \web\lib\common\FormElements::BUTTON_CLOSE:
92
-            header("Location: overview_org.php?inst_id=" . $inst->identifier);
92
+            header("Location: overview_org.php?inst_id=".$inst->identifier);
93 93
             break;
94 94
         case \web\lib\common\FormElements::BUTTON_TERMSOFUSE_ACCEPTED:
95 95
             if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                         break;
133 133
                     }
134 134
                     $properName = $validator->syntaxConformUser($elements[0]);
135
-                    $properDate = new DateTime($elements[1] . " 00:00:00");
135
+                    $properDate = new DateTime($elements[1]." 00:00:00");
136 136
                     $numberOfActivations = $elements[2] ?? 5;
137 137
                     $number = $validator->integer($numberOfActivations);
138 138
                     if ($number === FALSE) { // invalid input received, default to sane
@@ -235,18 +235,18 @@  discard block
 block discarded – undo
235 235
                     // warn and ask for confirmation unless already confirmed
236 236
                     if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") {
237 237
                         echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS");
238
-                        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>";
239
-                        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>";
240
-                        echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>";
238
+                        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>";
239
+                        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>";
240
+                        echo "<p>"._("Do you want the system to send this mail anyway?")."</p>";
241 241
                         echo $formtext;
242
-                        echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>";
242
+                        echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>";
243 243
                         echo "</form>";
244 244
                         echo $formtext;
245
-                        echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>";
245
+                        echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>";
246 246
                         echo "<input type='hidden' name='address' value='$properEmail'</>";
247
-                        echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>";
247
+                        echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>";
248 248
                         echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>";
249
-                        echo "<button type='submit'>" . _("Send anyway.") . "</button>";
249
+                        echo "<button type='submit'>"._("Send anyway.")."</button>";
250 250
                         echo "</form>";
251 251
                         echo $deco->footer();
252 252
                         exit;
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 $activeUsers = $profile->listActiveUsers();
298 298
 
299 299
 
300
-echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME ));
300
+echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME));
301 301
 
302 302
 ?>
303 303
 <script src='js/option_expand.js' type='text/javascript'></script>
@@ -337,12 +337,12 @@  discard block
 block discarded – undo
337 337
     <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;'>
338 338
     <?php echo $uiElements->instLevelInfoBoxes($inst); ?>
339 339
     <div class='infobox'>
340
-        <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption;?></h2>
340
+        <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption; ?></h2>
341 341
         <table>
342
-            <caption><?php echo $tablecaption;?></caption>
342
+            <caption><?php echo $tablecaption; ?></caption>
343 343
             <tr>
344
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
345
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
344
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
345
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
346 346
             </tr>
347 347
 
348 348
             <tr>
@@ -366,19 +366,19 @@  discard block
 block discarded – undo
366 366
         case "NOSTIPULATION":
367 367
             break;
368 368
         case "EMAIL-SENT":
369
-            echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost;
369
+            echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost;
370 370
             break;
371 371
         case "EMAIL-NOTSENT":
372
-            echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost;
372
+            echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost;
373 373
             break;
374 374
         case "SMS-SENT":
375
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost;
375
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost;
376 376
             break;
377 377
         case "SMS-NOTSENT":
378
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost;
378
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost;
379 379
             break;
380 380
         case "SMS-FRAGMENT":
381
-            echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost;
381
+            echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost;
382 382
             break;
383 383
     }
384 384
     ?>
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
             <?php
392 392
             $bufferCurrentUsers = "<table class='sb-user-table' style='max-width:1920px;'>
393 393
                 <tr class='sb-title-row_id'>
394
-                    <td>" . _("User") . "</td>
395
-                    <td>" . _("Token/Certificate details") . "</td>
396
-                    <td>" . _("User/Token Expiry") . "</td>
397
-                    <td>" . _("Actions") . "</td>
394
+                    <td>" . _("User")."</td>
395
+                    <td>" . _("Token/Certificate details")."</td>
396
+                    <td>" . _("User/Token Expiry")."</td>
397
+                    <td>" . _("Actions")."</td>
398 398
                 </tr>";
399 399
             $bufferPreviousUsers = "<table class='sb-user-table' style='max-width:1920px;'>
400 400
                 <tr class='sb-title-row_id'>
401
-                    <td>" . _("User") . "</td>
402
-                    <td>" . _("Certificate details") . "</td>
403
-                    <td>" . _("User Expiry") . "</td>
404
-                    <td>" . _("Actions") . "</td>
401
+                    <td>" . _("User")."</td>
402
+                    <td>" . _("Certificate details")."</td>
403
+                    <td>" . _("User Expiry")."</td>
404
+                    <td>" . _("Actions")."</td>
405 405
                 </tr>";
406 406
 
407 407
             natsort($allUsers);
@@ -458,23 +458,23 @@  discard block
 block discarded – undo
458 458
                     $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display'];
459 459
 
460 460
                     $bufferText = "<div class='sb-certificate-summary ca-summary' $style>
461
-                                    <div class='sb-certificate-details'>" . _("Device:") . " " . $display .
462
-                            "<br>" . _("Serial Number:") . "&nbsp;" . dechex($oneCert->serial) .
463
-                            "<br>" . _("CN:") . "&nbsp;" . explode('@', $oneCert->username)[0] . "@…" .
464
-                            "<br>" . _("Expiry:") . "&nbsp;" . $oneCert->expiry .
465
-                            "<br>" . _("Issued:") . "&nbsp;" . $oneCert->issued .
466
-                            "</div>" .
461
+                                    <div class='sb-certificate-details'>"._("Device:")." ".$display.
462
+                            "<br>"._("Serial Number:")."&nbsp;".dechex($oneCert->serial).
463
+                            "<br>"._("CN:")."&nbsp;".explode('@', $oneCert->username)[0]."@…".
464
+                            "<br>"._("Expiry:")."&nbsp;".$oneCert->expiry.
465
+                            "<br>"._("Issued:")."&nbsp;".$oneCert->issued.
466
+                            "</div>".
467 467
                             "<div style='text-align:right;padding-top: 5px; $buttonStyle'>";
468 468
 
469 469
                     if ($buttonText == "") {
470 470
                         $bufferText .= $formtext
471
-                                . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>"
472
-                                . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>"
471
+                                . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>"
472
+                                . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>"
473 473
                                 . "<button type='submit' "
474 474
                                 . "name='command' "
475
-                                . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' "
475
+                                . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' "
476 476
                                 . "class='delete' "
477
-                                . "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']) . "\")'>"
477
+                                . "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'])."\")'>"
478 478
                                 . _("Revoke")
479 479
                                 . "</button>"
480 480
                                 . "</form>";
@@ -499,13 +499,13 @@  discard block
 block discarded – undo
499 499
                 }
500 500
                 // wrap the revoked and expired certs in a div that is hidden by default
501 501
                 if ($textRevokedCerts !== "") {
502
-                    $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked) . "</span><div id='$oneUserId-revoked-certs' style='display:none;'>" . $textRevokedCerts . "</div>";
502
+                    $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked)."</span><div id='$oneUserId-revoked-certs' style='display:none;'>".$textRevokedCerts."</div>";
503 503
                 }
504 504
                 if ($textExpiredCerts !== "") {
505
-                    $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired) . "</span><div id='$oneUserId-expired-certs' style='display:none;'>" . $textExpiredCerts . "</div>";
505
+                    $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired)."</span><div id='$oneUserId-expired-certs' style='display:none;'>".$textExpiredCerts."</div>";
506 506
                 }
507 507
                 // and push out the HTML
508
-                ${$outputBuffer} .= $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts . "</td>";
508
+                ${$outputBuffer} .= $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts."</td>";
509 509
                 $tokenHtmlBuffer = "";
510 510
                 $hasOnePendingInvite = FALSE;
511 511
                 foreach ($tokensWithoutCerts as $invitationObject) {
@@ -516,38 +516,38 @@  discard block
 block discarded – undo
516 516
                             $tokenHtmlBuffer .= "<tr class='sb-certificate-row_id'><td></td>";
517 517
                             $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody())));
518 518
                             $tokenHtmlBuffer .= "<td>";
519
-                            $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/>");
519
+                            $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/>");
520 520
                             $tokenHtmlBuffer .= "<table>
521
-                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td>
521
+                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td>
522 522
                                     $formtext
523
-                                <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
523
+                                <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
524 524
                                 <input type='text' name='address' id='address-$invitationObject->identifier'/>
525
-                                <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&amp;body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button>
526
-                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button>
525
+                                <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&amp;body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button>
526
+                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button>
527 527
                                     </form>
528 528
                                     </td></tr>
529
-                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td>
529
+                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td>
530 530
                                     $formtext
531
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
531
+                                    <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
532 532
                                     <input type='text' name='smsnumber' />
533
-				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button>
533
+				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button>
534 534
                                     </form>
535 535
 				</td></tr>
536
-                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td>
537
-				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button>
536
+                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td>
537
+				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button>
538 538
                                     <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'>
539
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
540
-                                      <button type='submit'>" . _("Display QR code") . "</button>
539
+                                    <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/>
540
+                                      <button type='submit'>" . _("Display QR code")."</button>
541 541
                                   </form>
542 542
                                         </td></tr>
543 543
                                         
544 544
                                 </table>
545 545
                                 </td>";
546
-                            $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>";
546
+                            $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>";
547 547
                             $tokenHtmlBuffer .= "<td>"
548 548
                                     . $formtext
549
-                                    . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>"
550
-                                    . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>"
549
+                                    . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>"
550
+                                    . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>"
551 551
                                     . "</td></tr>";
552 552
                             break;
553 553
                         case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
@@ -563,10 +563,10 @@  discard block
 block discarded – undo
563 563
                 }
564 564
                 ${$outputBuffer} .= "<td>$formtext
565 565
                     <div class='sb-date-container' style='min-width: 200px;'>
566
-                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='" . $profile->getUserExpiryDate($oneUserId) . "'>&nbsp;(UTC)</span>
566
+                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='".$profile->getUserExpiryDate($oneUserId)."'>&nbsp;(UTC)</span>
567 567
                     </div>
568 568
                     <input type='hidden' name='userid' value='$oneUserId'/>
569
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY . "'>" . _("Update") . "</button>
569
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY."'>"._("Update")."</button>
570 570
                     </form>
571 571
                 </td>
572 572
                 <td>
@@ -574,33 +574,33 @@  discard block
 block discarded – undo
574 574
 
575 575
                 if ($hasOnePendingInvite || count($validCerts) > 0) {
576 576
                     $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']);
577
-                    ${$outputBuffer} .= $formtext . "
577
+                    ${$outputBuffer} .= $formtext."
578 578
                                     <input type='hidden' name='userid' value='$oneUserId'/>
579 579
                                     <button type='submit' "
580 580
                             . "name='command' "
581
-                            . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' "
581
+                            . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' "
582 582
                             . "class='delete' "
583
-                            . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" )
583
+                            . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "")
584 584
                             . ">"
585 585
                             . _("Deactivate User")
586 586
                             . "</button>
587 587
                                 </form>";
588 588
                 }
589
-                ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=" . $profile->institution . "&amp;profile_id=" . $profile->identifier . "&amp;user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'>
590
-                    <button type='submit'>" . _("Show Authentication Records") . "</button>
589
+                ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=".$profile->institution."&amp;profile_id=".$profile->identifier."&amp;user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'>
590
+                    <button type='submit'>"._("Show Authentication Records")."</button>
591 591
                 </form>";
592 592
                 if (new DateTime() < new DateTime($expiryDate)) { // current user, allow sending new token
593
-                    ${$outputBuffer} .= $formtext . "
593
+                    ${$outputBuffer} .= $formtext."
594 594
                     <input type='hidden' name='userid' value='$oneUserId'/>
595
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_NEWINVITATION . "'>" . _("New Invitation") . "</button>
596
-                    <label>" . _("Activations:") . "
595
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_NEWINVITATION."'>"._("New Invitation")."</button>
596
+                    <label>" . _("Activations:")."
597 597
                         <input type='text' name='invitationsquantity' value='5' maxlength='3' style='width: 30px;'/>
598 598
                     </label>
599 599
                     </form>";
600 600
                 } elseif (count($profile->getUserAuthRecords($oneUserId)) == 0) { // previous user; if there are NO authentication records, allow full deletion - otherwise, need to keep user trace for abuse handling
601
-                    ${$outputBuffer} .= $formtext . "
601
+                    ${$outputBuffer} .= $formtext."
602 602
                     <input type='hidden' name='userid' value='$oneUserId'/>
603
-                    <button type='submit' class='delete' name='command' value='" . \web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete User") . "</button>
603
+                    <button type='submit' class='delete' name='command' value='".\web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete User")."</button>
604 604
                     </form>";
605 605
                 }
606 606
                 ${$outputBuffer} .= "</div>
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
                                     . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".'
633 633
                                     . ' 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);
634 634
 
635
-                    echo $formtext . "<div style='padding-bottom: 20px;'>"
635
+                    echo $formtext."<div style='padding-bottom: 20px;'>"
636 636
                     . "
637 637
                     <p>$acknowledgeText</p>
638 638
                     <input type='checkbox' name='acknowledge' value='true'>
639
-                    <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),\config\ConfAssistant::CONSORTIUM['display_name']) . "</label>
639
+                    <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), \config\ConfAssistant::CONSORTIUM['display_name'])."</label>
640 640
                 </div>
641
-                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>";
641
+                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>";
642 642
                 }
643 643
                 ?>
644 644
             </div>
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function prefilledOptionTable(string $attributePrefix, $fed)
114 114
     {
115
-        $retval = "<table id='expandable_$attributePrefix" . "_options'>";
115
+        $retval = "<table id='expandable_$attributePrefix"."_options'>";
116 116
 
117 117
         $prepopulate = [];
118 118
         foreach ($this->listOfOptions as $existingAttribute) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $prepopulate[] = $existingAttribute;
121 121
             }
122 122
         }
123
-        if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values
123
+        if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values
124 124
             $retval .= $this->addOptionEdit($attributePrefix, $prepopulate);
125 125
         } else {
126 126
             $retval .= $this->addOptionNew($attributePrefix, $fed);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 $optiontypearray = $optioninfo->optionType($option['name']);
154 154
                 $loggerInstance = new \core\common\Logging();
155 155
                 $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n");
156
-                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row_id'] : $option['value']), $option['lang']);
156
+                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row_id'] : $option['value']), $option['lang']);
157 157
             }
158 158
         }
159 159
         return $retval;
@@ -250,18 +250,18 @@  discard block
 block discarded – undo
250 250
         }
251 251
         $descriptions["media:force_proxy"] = sprintf(_("The format of this option is: IPv4|IPv6|hostname:port . Forcing your users through a content filter of your own is a significant invasion of user self-determination. It also has technical issues. Please thoroughly read the discussion at %s before specifying a proxy with this option. This feature is currently experimental and only has an effect in Apple installers."), "https://github.com/GEANT/CAT/issues/96");
252 252
         $descriptions["managedsp:realmforvlan"] = sprintf(_("If you are also using %s, then your own realm is automatically tagged with the VLAN you choose, there is no need to add it here manually."), \core\ProfileSilverbullet::PRODUCTNAME);
253
-        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy") .
254
-                " " .
255
-                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']) .
256
-                " " .
257
-                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.") .
258
-                " " .
253
+        $descriptions["media:openroaming"] = sprintf(_("By opting in to OpenRoaming, you agree to be bound by the %s."), "eduroam Ecosystem Broker OpenRoaming Identity Provider Policy").
254
+                " ".
255
+                sprintf(_("Note that your requirement to inform users about the OpenRoaming End User Terms and Conditions is fulfilled when directing your end users to the %s download portal for installer download. Any other means of providing the installers needs to present this information via its own channel."), \config\Master::APPEARANCE['productname']).
256
+                " ".
257
+                _("You are also aware that for best technical interoperability, you need to add a DNS entry into the DNS zone of your RADIUS realm.").
258
+                " ".
259 259
                 _("Read the instructions in the wiki.");
260 260
         \core\common\Entity::outOfThePotatoes();
261 261
         if (!isset($descriptions[$input])) {
262 262
             return "";
263 263
         }
264
-        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>";
264
+        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>";
265 265
     }
266 266
 
267 267
     /**
@@ -275,19 +275,19 @@  discard block
 block discarded – undo
275 275
     private function selectElement($rowid, $list)
276 276
     {
277 277
         $jsmagic = "onchange='
278
-                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
278
+                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) {
279 279
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
280 280
                                    } else {
281 281
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\";
282 282
                                    }";
283 283
         foreach (array_keys($this->htmlDatatypeTexts) as $key) {
284
-            $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
285
-                                  document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\";
286
-                                  document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\";
287
-                                  document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\";
288
-                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"" . ($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none") . "\";
289
-                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\";
290
-                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\";
284
+            $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) {
285
+                                  document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\";
286
+                                  document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\";
287
+                                  document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\";
288
+                                  document.getElementById(\"S$rowid-input-enum_openroaming\").style.display = \"".($key == \core\Options::TYPECODE_ENUM_OPENROAMING ? "block" : "none")."\";
289
+                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\";
290
+                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\";
291 291
                              }
292 292
                              ";
293 293
             // hide all tooltips (each is a <span>, and there are no other <span>s)
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                 $value = array_shift($list);
319 319
                 $listtype = $optioninfo->optionType($value);
320 320
                 $retval .= $uiElements->displayName($value);
321
-                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>";
321
+                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>";
322 322
                 $activelisttype = $listtype;
323 323
                 $tooltips = $this->tooltip($rowid, $value, TRUE);
324 324
                 break;
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                 $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>";
327 327
                 foreach ($list as $value) {
328 328
                     $listtype = $optioninfo->optionType($value);
329
-                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
329
+                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' ";
330 330
                     if ($iterator == $this->optionIterator) {
331 331
                         $retval .= "selected='selected'";
332 332
                         $activelisttype = $listtype;
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                     } else {
335 335
                         $tooltips .= $this->tooltip($rowid, $value, FALSE);
336 336
                     }
337
-                    $retval .= ">" . $uiElements->displayName($value) . "</option>";
337
+                    $retval .= ">".$uiElements->displayName($value)."</option>";
338 338
                     $iterator++;
339 339
                 }
340 340
 
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
     private function selectLanguage($rowid, $makeVisible)
361 361
     {
362 362
         \core\common\Entity::intoThePotatoes();
363
-        $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
364
-            <option value='' name='select_language' selected>" . _("select language") . "</option>
365
-            <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
363
+        $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'>
364
+            <option value='' name='select_language' selected>" . _("select language")."</option>
365
+            <option value='C' name='all_languages'>" . _("default/other languages")."</option>";
366 366
         foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) {
367 367
             $thislang = $possibleLang['display'];
368 368
             $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>";
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     {
384 384
         $retval = "";
385 385
         foreach ($this->htmlDatatypeTexts as $key => $type) {
386
-            $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">";
386
+            $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">";
387 387
         }
388 388
         return $retval;
389 389
     }
@@ -399,11 +399,11 @@  discard block
 block discarded – undo
399 399
     {
400 400
         // first column: the <select> element with the names of options and their field-toggling JS magic
401 401
         $selectorInfo = $this->selectElement($rowid, $list);
402
-        $retval = "<td>" . $selectorInfo["TEXT"] . "</td>";
402
+        $retval = "<td>".$selectorInfo["TEXT"]."</td>";
403 403
         // second column: the <select> element for language selection - only visible if the active option is multi-lang
404
-        $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>";
404
+        $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>";
405 405
         // third column: the actual input fields; the data type of the active option is visible, all others hidden
406
-        $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>";
406
+        $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>";
407 407
         return $retval;
408 408
     }
409 409
 
@@ -427,20 +427,20 @@  discard block
 block discarded – undo
427 427
         $retval .= "<td>";
428 428
         $uiElements = new UIElements();
429 429
         $listtype = $optioninfo->optionType($optionName);
430
-        $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName);
431
-        $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>";
432
-        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>";
430
+        $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName);
431
+        $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>";
432
+        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>";
433 433
 
434 434
         // language tag if any
435 435
         $retval .= "<td>";
436 436
         if ($listtype["flag"] == "ML") {
437 437
 
438
-            $language = "(" . strtoupper($optionLang) . ")";
438
+            $language = "(".strtoupper($optionLang).")";
439 439
             if ($optionLang == 'C') {
440 440
                 $language = _("(default/other languages)");
441 441
             }
442 442
             $retval .= $language;
443
-            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>";
443
+            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>";
444 444
         }
445 445
         $retval .= "</td>";
446 446
 // attribute content
@@ -450,12 +450,12 @@  discard block
 block discarded – undo
450 450
             case \core\Options::TYPECODE_COORDINATES:
451 451
                 $this->allLocationCount = $this->allLocationCount + 1;
452 452
                 // display of the locations varies by map provider
453
-                $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'];
453
+                $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'];
454 454
                 $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount);
455
-                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
455
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link";
456 456
                 break;
457 457
             case \core\Options::TYPECODE_FILE:
458
-                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
458
+                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>";
459 459
                 $uiElements = new UIElements();
460 460
                 switch ($optionName) {
461 461
                     case "eap:ca_file":
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                 break;
478 478
             case \core\Options::TYPECODE_ENUM_OPENROAMING: // is a string after all
479 479
                 $displayedVariant = $this->enumPrettyPrints[$optionValue];
480
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
480
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
481 481
                 break;
482 482
             case \core\Options::TYPECODE_STRING:
483 483
             // fall-thorugh is intentional; mostly identical HTML code for the three types
@@ -485,11 +485,11 @@  discard block
 block discarded – undo
485 485
             // fall-thorugh is intentional; mostly identical HTML code for the three types
486 486
             case \core\Options::TYPECODE_TEXT:
487 487
                 $displayedVariant = $optionValue; // for all three types, value tag and actual display are identical
488
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
488
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
489 489
                 break;
490 490
             case \core\Options::TYPECODE_BOOLEAN:
491 491
                 $displayedVariant = ($optionValue == "on" ? _("on") : _("off"));
492
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
492
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
493 493
                 break;
494 494
             default:
495 495
                 // this should never happen!
@@ -535,10 +535,10 @@  discard block
 block discarded – undo
535 535
        <td>
536 536
           <button type='button' class='delete' onclick='";
537 537
         if ($prefillValue !== NULL && $item == "general:geo_coordinates") {
538
-            $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord';
539
-            $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } ';
538
+            $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord';
539
+            $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } ';
540 540
         }
541
-        $retval .= 'deleteOption("option-S' . $rowid . '")';
541
+        $retval .= 'deleteOption("option-S'.$rowid.'")';
542 542
         $retval .= "'>-</button>
543 543
        </td>
544 544
     </tr>";
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm",
134 134
             sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers",
135 135
             sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP) => "fed:minted_ca_file",
136
-            sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming",
136
+            sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming",
137 137
             _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget",
138 138
             $ssidText => "media:SSID",
139 139
             $passpointOiText => "media:consortium_OI",
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $find = array_keys($displayNames, $input, TRUE);
146 146
 
147 147
         if (count($find) == 0) { // this is an error! throw an Exception
148
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
148
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
149 149
         }
150 150
         \core\common\Entity::outOfThePotatoes();
151 151
         // none of the strings have HTML in them, only translators can provide own text for it -> no threat, but complained about by the security review
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         foreach ($optionlist as $option) {
169 169
             $type = $optioninfo->optionType($option['name']);
170
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
170
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
171 171
                 // all non-multilang attribs get this assignment ...
172 172
                 $language = "";
173 173
                 $content = $option['value'];
@@ -185,19 +185,19 @@  discard block
 block discarded – undo
185 185
                         $locationMarkers[] = $coords;
186 186
                         break;
187 187
                     case "file":
188
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
188
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
189 189
                         switch ($option['name']) {
190 190
                             case "general:logo_file":
191 191
                             case "fed:logo_file":
192
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
192
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
193 193
                                 break;
194 194
                             case "eap:ca_file":
195 195
                             // fall-through intended: display both the same way
196 196
                             case "fed:minted_ca_file":
197
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
197
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
198 198
                                 break;
199 199
                             case "support:info_file":
200
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
200
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
201 201
                                 break;
202 202
                             default:
203 203
                         }
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
208 208
                             break;
209 209
                         }
210
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
210
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
211 211
                         break;
212 212
                     default:
213
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
213
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
214 214
                 }
215 215
             }
216 216
         }
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
             $locationCount = 0;
220 220
             foreach ($locationMarkers as $g) {
221 221
                 $locationCount++;
222
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
222
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
223 223
             }
224 224
             $marker .= '<\/markers>'; // some validator says this should be escaped
225 225
             $jMarker = json_encode($locationMarkers);
226
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
226
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
227 227
         }
228 228
         \core\common\Entity::outOfThePotatoes();
229 229
         return $retval;
@@ -239,11 +239,11 @@  discard block
 block discarded – undo
239 239
         \core\common\Entity::intoThePotatoes();
240 240
         $idpoptions = $myInst->getAttributes();
241 241
         $retval = "<div class='infobox'>
242
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2>
242
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2>
243 243
         <table>
244 244
             <tr>
245 245
                 <td>
246
-                    " . _("Country:") . "
246
+                    " . _("Country:")."
247 247
                 </td>
248 248
                 <td>
249 249
                 </td>
@@ -253,16 +253,16 @@  discard block
 block discarded – undo
253 253
         $retval .= $myFed->name;
254 254
         $retval .= "</strong>
255 255
                 </td>
256
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
256
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
257 257
         </table>
258 258
     </div>";
259 259
 
260 260
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
261 261
         foreach ($blocks as $block) {
262 262
             $retval .= "<div class='infobox'>
263
-            <h2>" . $block[1] . "</h2>
263
+            <h2>" . $block[1]."</h2>
264 264
             <table>" .
265
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
265
+                    $this->infoblock($idpoptions, $block[0], "IdP").
266 266
                     "</table>
267 267
         </div>";
268 268
         }
@@ -277,12 +277,12 @@  discard block
 block discarded – undo
277 277
      */
278 278
     private function displaySize(int $number) {
279 279
         if ($number > 1024 * 1024) {
280
-            return round($number / 1024 / 1024, 2) . " MiB";
280
+            return round($number / 1024 / 1024, 2)." MiB";
281 281
         }
282 282
         if ($number > 1024) {
283
-            return round($number / 1024, 2) . " KiB";
283
+            return round($number / 1024, 2)." KiB";
284 284
         }
285
-        return $number . " B";
285
+        return $number." B";
286 286
     }
287 287
 
288 288
     /**
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $ref = $validator->databaseReference($cAReference);
337 337
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
338 338
         if (is_bool($rawResult)) { // we didn't actually get a CA!
339
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
339
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
340 340
             \core\common\Entity::outOfThePotatoes();
341 341
             return $retval;
342 342
         }
@@ -352,14 +352,14 @@  discard block
 block discarded – undo
352 352
 
353 353
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
354 354
         $details['name'] = preg_replace('/\//', "", $details['name']);
355
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
356
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
355
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
356
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
357 357
         if ($details['ca'] == 0 && $details['root'] != 1) {
358
-            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
358
+            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>";
359 359
             \core\common\Entity::outOfThePotatoes();
360 360
             return $retval;
361 361
         }
362
-        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>";
362
+        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>";
363 363
         \core\common\Entity::outOfThePotatoes();
364 364
         return $retval;
365 365
     }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function previewImageinHTML($imageReference) {
374 374
         \core\common\Entity::intoThePotatoes();
375
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
375
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
376 376
         \core\common\Entity::outOfThePotatoes();
377 377
         return $retval;
378 378
     }
@@ -389,13 +389,13 @@  discard block
 block discarded – undo
389 389
         $ref = $validator->databaseReference($fileReference);
390 390
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
391 391
         if (is_bool($fileBlob)) { // we didn't actually get a file!
392
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
392
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
393 393
             \core\common\Entity::outOfThePotatoes();
394 394
             return $retval;
395 395
         }
396 396
         $decodedFileBlob = base64_decode($fileBlob);
397 397
         $fileinfo = new \finfo();
398
-        $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>";
398
+        $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>";
399 399
         \core\common\Entity::outOfThePotatoes();
400 400
         return $retval;
401 401
     }
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             $retval .= "<tr><td>";
424 424
         }
425 425
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
426
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
426
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
427 427
         if (!$omittabletags) {
428 428
             $retval .= "</td><td>";
429 429
         }
@@ -505,8 +505,8 @@  discard block
 block discarded – undo
505 505
             return "";
506 506
         }
507 507
 
508
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
509
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
508
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
509
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
510 510
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
511 511
             return "";
512 512
         }
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
         imagecolorallocate($whiteimage, 255, 255, 255);
533 533
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
534 534
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
535
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
535
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
536 536
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
537 537
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
538 538
         ob_start();
@@ -582,9 +582,9 @@  discard block
 block discarded – undo
582 582
                 $message = "Your configuration appears to be fine.";
583 583
                 break;
584 584
             default:
585
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
585
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
586 586
         }
587
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
587
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
588 588
         foreach ($test->out as $testValue) {
589 589
             foreach ($testValue as $o) {
590 590
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
devices/Devices-template.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                     'message_only' => 0,
424 424
                     '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."),
425 425
                             "geteduroam",
426
-                            "<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>"),
426
+                            "<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>"),
427 427
  
428 428
                     'geteduroam_text' =>  sprintf(_("Use our app, it will guide you through the setup process:%s"
429 429
                             ."(or download it manually %s.)<p>"
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                     'mime' => 'application/eap-config',
452 452
                     '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."),
453 453
                             "geteduroam",
454
-                            "<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>"),
454
+                            "<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>"),
455 455
                 ],
456 456
             ],              
457 457
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                     'message_only' => 0,
467 467
                     '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."),
468 468
                             "eduroamCAT",
469
-                            "<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>"),
469
+                            "<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>"),
470 470
                     'geteduroam_text' => sprintf(_("Use our app, it will guide you through the setup process:%s"
471 471
                             ."(or download it manually %s.)<p>"
472 472
                         . "After installation, open the app, select your home institution and the app will collect required information "
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
                     'mime' => 'application/eap-config',
494 494
                     '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."),
495 495
                             "eduroamCAT",
496
-                            "<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>"),
496
+                            "<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>"),
497 497
                 ],
498 498
             ],
499 499
             'android_pie' => [
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
                     'mime' => 'application/eap-config',
508 508
                     '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."),
509 509
                             "eduroamCAT",
510
-                            "<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>"),
510
+                            "<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>"),
511 511
                 ],
512 512
             ],
513 513
             'android_oreo' => [
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
                     'mime' => 'application/eap-config',
522 522
                     '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."),
523 523
                             "eduroamCAT",
524
-                            "<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>"),
524
+                            "<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>"),
525 525
                 ],
526 526
             ],
527 527
             'android_nougat' => [
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
                     'mime' => 'application/eap-config',
536 536
                     '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."),
537 537
                             "eduroamCAT",
538
-                            "<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>"),
538
+                            "<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>"),
539 539
                 ],
540 540
             ],
541 541
             'android_marshmallow' => [
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                     'mime' => 'application/eap-config',
550 550
                     '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."),
551 551
                             "eduroamCAT",
552
-                            "<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>"),
552
+                            "<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>"),
553 553
                 ],
554 554
             ],
555 555
             'android_lollipop' => [
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                     'mime' => 'application/eap-config',
564 564
                     '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."),
565 565
                             "eduroamCAT",
566
-                            "<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>"),
566
+                            "<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>"),
567 567
                 ],
568 568
             ],
569 569
             'android_kitkat' => [
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
                     'mime' => 'application/eap-config',
578 578
                     '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."),
579 579
                             "eduroamCAT",
580
-                            "<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>"),
580
+                            "<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>"),
581 581
                 ],
582 582
             ],
583 583
             'android_43' => [
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
                     'mime' => 'application/eap-config',
592 592
                     '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."),
593 593
                             "eduroamCAT",
594
-                            "<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>"),
594
+                            "<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>"),
595 595
                 ],
596 596
             ],
597 597
 
Please login to merge, or discard this patch.
core/common/Language.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.