Passed
Push — release_2_0 ( a4370a...b3afb7 )
by Stefan
09:03
created
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 use \Exception;
34 34
 
35
-require_once dirname(__DIR__) . "/config/_config.php";
35
+require_once dirname(__DIR__)."/config/_config.php";
36 36
 
37 37
 /**
38 38
  * This class is a singleton for establishing a connection to the database
@@ -60,24 +60,24 @@  discard block
 block discarded – undo
60 60
             case "EXTERNAL":
61 61
             case "FRONTEND":
62 62
             case "DIAGNOSTICS":
63
-                if (!isset(self::${"instance" . $theDb})) {
63
+                if (!isset(self::${"instance".$theDb})) {
64 64
                     $class = __CLASS__;
65
-                    self::${"instance" . $theDb} = new $class($database);
66
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
65
+                    self::${"instance".$theDb} = new $class($database);
66
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
67 67
                 }
68
-                return self::${"instance" . $theDb};
68
+                return self::${"instance".$theDb};
69 69
             case "RADIUS":
70
-                if (!isset(self::${"instance" . $theDb})) {
70
+                if (!isset(self::${"instance".$theDb})) {
71 71
                     $class = __CLASS__;
72 72
                     foreach (CONFIG_CONFASSISTANT['DB'] as $name => $oneRadiusAuthDb) {
73 73
                         $theInstance = new $class($name);
74
-                        self::${"instance" . $theDb}[] = $theInstance;
74
+                        self::${"instance".$theDb}[] = $theInstance;
75 75
                         $theInstance->databaseInstance = $theDb;
76 76
                     }
77 77
                 }
78
-                return self::${"instance" . $theDb};
78
+                return self::${"instance".$theDb};
79 79
             default:
80
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
80
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
81 81
         }
82 82
     }
83 83
 
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
             }
117 117
         }
118 118
         // log exact query to debug log, if log level is at 5
119
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
119
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
120 120
         if ($types !== NULL) {
121
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true));
121
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true));
122 122
         }
123 123
 
124 124
         if ($this->connection->connect_error) {
125
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
125
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
126 126
         }
127 127
         if ($types === NULL) {
128 128
             $result = $this->connection->query($querystring);
129 129
             if ($result === FALSE) {
130
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
130
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
131 131
             }
132 132
         } else {
133 133
             // fancy! prepared statement with dedicated argument list
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             }
141 141
             $prepResult = $statementObject->prepare($querystring);
142 142
             if ($prepResult === FALSE) {
143
-                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
143
+                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
144 144
             }
145 145
 
146 146
             // we have a variable number of arguments packed into the ... array
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
             array_unshift($localArray, $types);
153 153
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
154 154
             if ($retval === FALSE) {
155
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
155
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
156 156
             }
157 157
             $result = $statementObject->execute();
158 158
             if ($result === FALSE) {
159
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
159
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
160 160
             }
161 161
             $selectResult = $statementObject->get_result();
162 162
             if ($selectResult !== FALSE) {
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 
169 169
         // all cases where $result could be FALSE have been caught earlier
170 170
         if ($this->connection->errno) {
171
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
171
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
172 172
         }
173 173
 
174 174
 
175 175
         if ($isMoreThanSelect) {
176
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
176
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
177 177
             if ($types !== NULL) {
178
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true));
178
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true));
179 179
             }
180 180
         }
181 181
         return $result;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             $this->readOnly = CONFIG_CONFASSISTANT['DB'][$databaseCapitalised]['readonly'];
271 271
         }
272 272
         if ($this->connection->connect_error) {
273
-            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
273
+            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
274 274
         }
275 275
 
276 276
         if ($databaseCapitalised == "EXTERNAL" && CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +23 added lines, -23 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
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
48 48
             <tr>
49 49
                 <td>
50
-                    <?php echo "" . _("Unique Identifier") ?>
50
+                    <?php echo ""._("Unique Identifier") ?>
51 51
                 </td>
52 52
                 <td>
53 53
                 </td>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     $mgmt = new \core\UserManagement();
63 63
 
64 64
     if (!$user->isFederationAdmin()) {
65
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
65
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
66 66
         echo $deco->footer();
67 67
         exit(0);
68 68
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 <!-- fed properties -->
80 80
                 <tr>
81 81
                     <td>
82
-                        <?php echo "" . _("Country") ?>
82
+                        <?php echo ""._("Country") ?>
83 83
                     </td>
84 84
                     <td>
85 85
                     </td>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     default:
161 161
                         throw new Exception("Error: unknown encryption status of invitation!?!");
162 162
                 }
163
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
163
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
164 164
                 break;
165 165
             case "FAILURE":
166 166
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                     default:
181 181
                         throw new Exception("Error: unknown encryption status of invitation!?!");
182 182
                 }
183
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
183
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
184 184
                 break;
185 185
             case "INVALIDSYNTAX":
186 186
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         echo "</table></div>";
192 192
     }
193 193
     if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == 'eduroam') {
194
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
194
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
195 195
     } else {
196 196
         $helptext = "";
197 197
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $pending_invites = $mgmt->listPendingInvitations();
206 206
 
207 207
             if (CONFIG['DB']['enforce-external-sync']) {
208
-                echo "<th>" . sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</th>";
208
+                echo "<th>".sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</th>";
209 209
             }
210 210
             ?>
211 211
             <th>
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         foreach ($feds as $onefed) {
221 221
             $thefed = new \core\Federation(strtoupper($onefed['value']));
222 222
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
223
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
223
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
224 224
 
225 225
             // extract only pending invitations for *this* fed
226 226
             $display_pendings = FALSE;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 // deployment status; need to dive into profiles for this
246 246
                 // show happy eyeballs if at least one profile is configured/showtime                    
247 247
                 echo "<td>";
248
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
248
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
249 249
                 echo "</td>";
250 250
                 // name; and realm of silverbullet profiles if any
251 251
                 // instantiating all profiles is costly, so we only do this if
@@ -259,23 +259,23 @@  discard block
 block discarded – undo
259 259
                     }
260 260
                 }
261 261
                 echo "<td style='vertical-align:top;'>
262
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>",$listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
262
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
263 263
                       </td>";
264 264
                 // external DB sync, if configured as being necessary
265 265
                 if (CONFIG['DB']['enforce-external-sync']) {
266 266
                     echo "<td style='display: ruby;'>";
267 267
                     if ($readonly === FALSE) {
268
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
269
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
268
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
269
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
270 270
                     }
271 271
                     switch ($idp_instance->getExternalDBSyncState()) {
272 272
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
273 273
                             break;
274 274
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
275
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
275
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
276 276
                             break;
277 277
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
278
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
278
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
279 279
 
280 280
 
281 281
                             break;
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
                 echo "<td style='vertical-align: top;'>";
289 289
                 if ($readonly === FALSE) {
290 290
                     echo "<div style='white-space: nowrap;'>
291
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
291
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
292 292
                                       <button type='submit'>" .
293
-                    _("Add/Remove Administrators") . "
293
+                    _("Add/Remove Administrators")."
294 294
                                       </button>
295 295
                                   </form>
296 296
                                 </div>";
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 echo "<tr>
304 304
                             <td colspan='2'>
305 305
                                <strong>" .
306
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
306
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
307 307
                                </strong>
308 308
                             </td>
309 309
                          </tr>";
@@ -311,17 +311,17 @@  discard block
 block discarded – undo
311 311
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
312 312
                         echo "<tr>
313 313
                                     <td>" .
314
-                        $oneinvite['name'] . "
314
+                        $oneinvite['name']."
315 315
                                     </td>
316 316
                                     <td>" .
317
-                        $oneinvite['mail'] . "
317
+                        $oneinvite['mail']."
318 318
                                     </td>
319 319
                                     <td colspan=2>";
320 320
                         if ($readonly === FALSE) {
321 321
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
322
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
323
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
324
-                              . sprintf(_("(expires %s)"),$oneinvite['expiry'])
322
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
323
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
324
+                              . sprintf(_("(expires %s)"), $oneinvite['expiry'])
325 325
                               .     "</form>";
326 326
                         }
327 327
                         echo "      </td>
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @return array<AbstractProfile> list of Profiles of this IdP
111 111
      */
112 112
     public function listProfiles(bool $activeOnly = FALSE) {
113
-        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "");
113
+        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "");
114 114
         $allProfiles = $this->databaseHandle->exec($query);
115 115
         $returnarray = [];
116 116
         // SELECT -> resource, not boolean
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $returnarray[] = $oneProfile;
121 121
         }
122 122
 
123
-        $this->loggerInstance->debug(4, "listProfiles: " . print_r($returnarray, true));
123
+        $this->loggerInstance->debug(4, "listProfiles: ".print_r($returnarray, true));
124 124
         return $returnarray;
125 125
     }
126 126
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
220 220
                     $theProfile = new ProfileSilverbullet($identifier, $this);
221 221
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
222
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
222
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
223 223
                     return $theProfile;
224 224
                 default:
225 225
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
      */
337 337
     public function getExternalDBId() {
338 338
         if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
339
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
339
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
340 340
             // SELECT -> it's a resource, not a boolean
341 341
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
342 342
                 return FALSE;
Please login to merge, or discard this patch.
web/lib/common/InputValidation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     private function inputValidationError($customtext) {
39 39
         \core\common\Entity::intoThePotatoes();
40
-        $retval = "<p>" . _("Input validation error: ") . $customtext . "</p>";
40
+        $retval = "<p>"._("Input validation error: ").$customtext."</p>";
41 41
         \core\common\Entity::outOfThePotatoes();
42 42
         return $retval;
43 43
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function string($input, $allowWhitespace = FALSE) {
151 151
     // always chop out invalid characters, and surrounding whitespace
152
-    $retvalStep0 =  iconv("UTF-8", "UTF-8//TRANSLIT", $input);
152
+    $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input);
153 153
     if ($retvalStep0 === FALSE) {
154 154
         throw new Exception("iconv failure for string sanitisation. With TRANSLIT, this should never happen!");
155 155
     }
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
     try {
458 458
         $image->readImageBlob($binary);
459 459
     } catch (\ImagickException $exception) {
460
-        echo "Error" . $exception->getMessage();
460
+        echo "Error".$exception->getMessage();
461 461
         return FALSE;
462 462
     }
463 463
     // image survived the sanity check
Please login to merge, or discard this patch.
web/skins/modern/user/js/cat_js.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         otherdata = j.otherdata;
88 88
     if(! result) {
89 89
       alert("<?php escaped_echo(_("no matching data found"))?>");
90
-      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>';
90
+      document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>';
91 91
     }
92 92
     j = j.data;
93 93
     n = j.length;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
        result = j1.status;
225 225
        if(! result) {
226 226
             alert("<?php escaped_echo(_("no matching data found")) ?>");
227
-            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>';
227
+            document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>';
228 228
        }
229 229
        j = j1.data;
230 230
        if(j.description !== undefined && j.description) {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
          $("#profile_desc").hide();
236 236
          $("#profile_desc").text('');
237 237
        }
238
-       updateTxt = '<span class="user_info"><?php escaped_echo(_("This entry was last updated at:"));?>'+' '+j.last_changed+'</span><br/>';
238
+       updateTxt = '<span class="user_info"><?php escaped_echo(_("This entry was last updated at:")); ?>'+' '+j.last_changed+'</span><br/>';
239 239
        if(j.local_url !== undefined && j.local_url) 
240 240
        txt = txt+'<span class="user_info"><?php escaped_echo(_("WWW:")); ?> <a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></span><br/>';
241 241
        if(j.local_email !== undefined && j.local_email) 
Please login to merge, or discard this patch.
web/admin/edit_silverbullet.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  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";
24
-require_once dirname(dirname(dirname(__FILE__))) . "/core/phpqrcode.php";
23
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
24
+require_once dirname(dirname(dirname(__FILE__)))."/core/phpqrcode.php";
25 25
 const QRCODE_PIXELS_PER_SYMBOL = 12;
26 26
 
27 27
 $auth = new \web\lib\admin\Authentication();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     $fed = new \core\Federation($inst->federation);
56 56
     $allowSb = $fed->getAttributes("fed:silverbullet");
57 57
     if (count($allowSb) == 0) {
58
-        throw new Exception("We were told to create a new SB profile, but this " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " does not allow SB at all!");
58
+        throw new Exception("We were told to create a new SB profile, but this ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." does not allow SB at all!");
59 59
     }
60 60
     // okay, new SB profiles are allowed. 
61 61
     // but is there a support:email attribute on inst level?
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     // Create one.
67 67
     $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET);
68 68
     // and modify the REQUEST_URI to add the new profile ID
69
-    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier;
69
+    $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier;
70 70
     $_GET['profile_id'] = $newProfile->identifier;
71 71
     $profile = $newProfile;
72 72
 } else {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 if (isset($_POST['command'])) {
92 92
     switch ($_POST['command']) {
93 93
         case \web\lib\common\FormElements::BUTTON_CLOSE:
94
-            header("Location: overview_idp.php?inst_id=" . $inst->identifier);
94
+            header("Location: overview_idp.php?inst_id=".$inst->identifier);
95 95
             break;
96 96
         case \web\lib\common\FormElements::BUTTON_TERMSOFUSE:
97 97
             if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                         break;
135 135
                     }
136 136
                     $properName = $validator->User($elements[0]);
137
-                    $properDate = new DateTime($elements[1] . " 00:00:00");
137
+                    $properDate = new DateTime($elements[1]." 00:00:00");
138 138
                     $numberOfActivations = $elements[2] ?? 1;
139 139
                     $number = $validator->integer($numberOfActivations);
140 140
                     if ($number === FALSE) { // invalid input received, default to sane
@@ -237,18 +237,18 @@  discard block
 block discarded – undo
237 237
                     // warn and ask for confirmation unless already confirmed
238 238
                     if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") {
239 239
                         echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS");
240
-                        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>";
241
-                        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>";
242
-                        echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>";
240
+                        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>";
241
+                        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>";
242
+                        echo "<p>"._("Do you want the system to send this mail anyway?")."</p>";
243 243
                         echo $formtext;
244
-                        echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>";
244
+                        echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>";
245 245
                         echo "</form>";
246 246
                         echo $formtext;
247
-                        echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>";
247
+                        echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>";
248 248
                         echo "<input type='hidden' name='address' value='$properEmail'</>";
249
-                        echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>";
249
+                        echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>";
250 250
                         echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>";
251
-                        echo "<button type='submit'>" . _("Send anyway.") . "</button>";
251
+                        echo "<button type='submit'>"._("Send anyway.")."</button>";
252 252
                         echo "</form>";
253 253
                         echo $deco->footer();
254 254
                         exit;
@@ -358,19 +358,19 @@  discard block
 block discarded – undo
358 358
         case "NOSTIPULATION":
359 359
             break;
360 360
         case "EMAIL-SENT":
361
-            echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost;
361
+            echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost;
362 362
             break;
363 363
         case "EMAIL-NOTSENT":
364
-            echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost;
364
+            echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost;
365 365
             break;
366 366
         case "SMS-SENT":
367
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost;
367
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost;
368 368
             break;
369 369
         case "SMS-NOTSENT":
370
-            echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost;
370
+            echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost;
371 371
             break;
372 372
         case "SMS-FRAGMENT":
373
-            echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost;
373
+            echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost;
374 374
             break;
375 375
     }
376 376
     ?>
@@ -383,17 +383,17 @@  discard block
 block discarded – undo
383 383
             <?php
384 384
             $bufferCurrentUsers = "<table class='sb-user-table' style='max-width:1920px;'>
385 385
                 <tr class='sb-title-row'>
386
-                    <td>" . _("User") . "</td>
387
-                    <td>" . _("Token/Certificate details") . "</td>
388
-                    <td>" . _("User/Token Expiry") . "</td>
389
-                    <td>" . _("Actions") . "</td>
386
+                    <td>" . _("User")."</td>
387
+                    <td>" . _("Token/Certificate details")."</td>
388
+                    <td>" . _("User/Token Expiry")."</td>
389
+                    <td>" . _("Actions")."</td>
390 390
                 </tr>";
391 391
             $bufferPreviousUsers = "<table class='sb-user-table' style='max-width:1920px;'>
392 392
                 <tr class='sb-title-row'>
393
-                    <td>" . _("User") . "</td>
394
-                    <td>" . _("Certificate details") . "</td>
395
-                    <td>" . _("User Expiry") . "</td>
396
-                    <td>" . _("Actions") . "</td>
393
+                    <td>" . _("User")."</td>
394
+                    <td>" . _("Certificate details")."</td>
395
+                    <td>" . _("User Expiry")."</td>
396
+                    <td>" . _("Actions")."</td>
397 397
                 </tr>";
398 398
 
399 399
             natsort($allUsers);
@@ -449,23 +449,23 @@  discard block
 block discarded – undo
449 449
                     $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display'];
450 450
 
451 451
                     $bufferText = "<div class='sb-certificate-summary ca-summary' $style>
452
-                                    <div class='sb-certificate-details'>" . _("Device:") . " " . $display .
453
-                            "<br>" . _("Serial Number:") . "&nbsp;" . dechex($oneCert->serial) .
454
-                            "<br>" . _("CN:") . "&nbsp;" . explode('@', $oneCert->username)[0] . "@…" .
455
-                            "<br>" . _("Expiry:") . "&nbsp;" . $oneCert->expiry .
456
-                            "<br>" . _("Issued:") . "&nbsp;" . $oneCert->issued .
457
-                            "</div>" .
452
+                                    <div class='sb-certificate-details'>"._("Device:")." ".$display.
453
+                            "<br>"._("Serial Number:")."&nbsp;".dechex($oneCert->serial).
454
+                            "<br>"._("CN:")."&nbsp;".explode('@', $oneCert->username)[0]."@…".
455
+                            "<br>"._("Expiry:")."&nbsp;".$oneCert->expiry.
456
+                            "<br>"._("Issued:")."&nbsp;".$oneCert->issued.
457
+                            "</div>".
458 458
                             "<div style='text-align:right;padding-top: 5px; $buttonStyle'>";
459 459
 
460 460
                     if ($buttonText == "") {
461 461
                         $bufferText .= $formtext
462
-                                . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>"
463
-                                . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>"
462
+                                . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>"
463
+                                . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>"
464 464
                                 . "<button type='submit' "
465 465
                                 . "name='command' "
466
-                                . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' "
466
+                                . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' "
467 467
                                 . "class='delete' "
468
-                                . "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']) . "\")'>"
468
+                                . "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'])."\")'>"
469 469
                                 . _("Revoke")
470 470
                                 . "</button>"
471 471
                                 . "</form>";
@@ -490,13 +490,13 @@  discard block
 block discarded – undo
490 490
                 }
491 491
                 // wrap the revoked and expired certs in a div that is hidden by default
492 492
                 if ($textRevokedCerts !== "") {
493
-                    $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>";
493
+                    $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>";
494 494
                 }
495 495
                 if ($textExpiredCerts !== "") {
496
-                    $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>";
496
+                    $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>";
497 497
                 }
498 498
                 // and push out the HTML
499
-                ${$outputBuffer} .= $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts . "</td>";
499
+                ${$outputBuffer} .= $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts."</td>";
500 500
                 $tokenHtmlBuffer = "";
501 501
                 $hasOnePendingInvite = FALSE;
502 502
                 foreach ($tokensWithoutCerts as $invitationObject) {
@@ -507,38 +507,38 @@  discard block
 block discarded – undo
507 507
                             $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>";
508 508
                             $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody())));
509 509
                             $tokenHtmlBuffer .= "<td>";
510
-                            $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/>");
510
+                            $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/>");
511 511
                             $tokenHtmlBuffer .= "<table>
512
-                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td>
512
+                                    <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td>
513 513
                                     $formtext
514
-                                <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
514
+                                <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
515 515
                                 <input type='text' name='address' id='address-$invitationObject->identifier'/>
516
-                                <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>
517
-                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button>
516
+                                <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>
517
+                                <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button>
518 518
                                     </form>
519 519
                                     </td></tr>
520
-                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td>
520
+                                    <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td>
521 521
                                     $formtext
522
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
522
+                                    <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/>
523 523
                                     <input type='text' name='smsnumber' />
524
-				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button>
524
+				<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button>
525 525
                                     </form>
526 526
 				</td></tr>
527
-                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td>
528
-				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button>
527
+                                    <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td>
528
+				<button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button>
529 529
                                     <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'>
530
-                                    <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/>
531
-                                      <button type='submit'>" . _("Display QR code") . "</button>
530
+                                    <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/>
531
+                                      <button type='submit'>" . _("Display QR code")."</button>
532 532
                                   </form>
533 533
                                         </td></tr>
534 534
                                         
535 535
                                 </table>
536 536
                                 </td>";
537
-                            $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>";
537
+                            $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>";
538 538
                             $tokenHtmlBuffer .= "<td>"
539 539
                                     . $formtext
540
-                                    . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>"
541
-                                    . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>"
540
+                                    . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>"
541
+                                    . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>"
542 542
                                     . "</td></tr>";
543 543
                             break;
544 544
                         case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
@@ -554,10 +554,10 @@  discard block
 block discarded – undo
554 554
                 }
555 555
                 ${$outputBuffer} .= "<td>$formtext
556 556
                     <div class='sb-date-container' style='min-width: 200px;'>
557
-                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='" . $profile->getUserExpiryDate($oneUserId) . "'>&nbsp;(UTC)</span>
557
+                        <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='".$profile->getUserExpiryDate($oneUserId)."'>&nbsp;(UTC)</span>
558 558
                     </div>
559 559
                     <input type='hidden' name='userid' value='$oneUserId'/>
560
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY . "'>" . _("Update") . "</button>
560
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY."'>"._("Update")."</button>
561 561
                     </form>
562 562
                 </td>
563 563
                 <td>
@@ -565,33 +565,33 @@  discard block
 block discarded – undo
565 565
 
566 566
                 if ($hasOnePendingInvite || count($validCerts) > 0) {
567 567
                     $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']);
568
-                    ${$outputBuffer} .= $formtext . "
568
+                    ${$outputBuffer} .= $formtext."
569 569
                                     <input type='hidden' name='userid' value='$oneUserId'/>
570 570
                                     <button type='submit' "
571 571
                             . "name='command' "
572
-                            . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' "
572
+                            . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' "
573 573
                             . "class='delete' "
574
-                            . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" )
574
+                            . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "")
575 575
                             . ">"
576 576
                             . _("Deactivate User")
577 577
                             . "</button>
578 578
                                 </form>";
579 579
                 }
580
-                ${$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'>
581
-                    <button type='submit'>" . _("Show Authentication Records") . "</button>
580
+                ${$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'>
581
+                    <button type='submit'>"._("Show Authentication Records")."</button>
582 582
                 </form>";
583 583
                 if (new DateTime() < new DateTime($expiryDate)) { // current user, allow sending new token
584
-                    ${$outputBuffer} .= $formtext . "
584
+                    ${$outputBuffer} .= $formtext."
585 585
                     <input type='hidden' name='userid' value='$oneUserId'/>
586
-                    <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_NEWINVITATION . "'>" . _("New Invitation") . "</button>
587
-                    <label>" . _("Activations:") . "
586
+                    <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_NEWINVITATION."'>"._("New Invitation")."</button>
587
+                    <label>" . _("Activations:")."
588 588
                         <input type='text' name='invitationsquantity' value='5' maxlength='3' style='width: 30px;'/>
589 589
                     </label>
590 590
                     </form>";
591 591
                 } 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
592
-                    ${$outputBuffer} .= $formtext . "
592
+                    ${$outputBuffer} .= $formtext."
593 593
                     <input type='hidden' name='userid' value='$oneUserId'/>
594
-                    <button type='submit' class='delete' name='command' value='" . \web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete User") . "</button>
594
+                    <button type='submit' class='delete' name='command' value='".\web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete User")."</button>
595 595
                     </form>";
596 596
                 }
597 597
                 ${$outputBuffer} .= "</div>
@@ -623,13 +623,13 @@  discard block
 block discarded – undo
623 623
                                     . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".'
624 624
                                     . ' 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);
625 625
 
626
-                    echo $formtext . "<div style='padding-bottom: 20px;'>"
626
+                    echo $formtext."<div style='padding-bottom: 20px;'>"
627 627
                     . "
628 628
                     <p>$acknowledgeText</p>
629 629
                     <input type='checkbox' name='acknowledge' value='true'>
630
-                    <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</label>
630
+                    <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</label>
631 631
                 </div>
632
-                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>";
632
+                <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>";
633 633
                 }
634 634
                 ?>
635 635
             </div>
Please login to merge, or discard this patch.