Test Failed
Push — master ( 6f90ed...56e405 )
by Maja
10:12
created
web/diag/findRealm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $telepath = new \core\diag\Telepath($givenRealm);
109 109
             $outerUser = $telepath->getOuter();
110 110
         }
111
-        $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser . '@' . $givenRealm);
111
+        $testsuite = new \core\diag\RADIUSTests($givenRealm, $outerUser.'@'.$givenRealm);
112 112
        
113 113
         $naptr = $rfc7585suite->relevantNAPTR(); 
114 114
         if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED && $naptr > 0) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 $json_data = json_encode($returnArray);
207 207
 
208 208
 if ($token) {
209
-    $loggerInstance->debug(4, 'JSON data written to ' .$jsonDir.'/'.$token);
209
+    $loggerInstance->debug(4, 'JSON data written to '.$jsonDir.'/'.$token);
210 210
     file_put_contents($jsonDir.'/'.$token.'/realm', $json_data);
211 211
 }
212 212
 header("Content-type: application/json; utf-8");
Please login to merge, or discard this patch.
core/ExternalEduroamDBData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             return $this->counter;
127 127
         }
128 128
 
129
-        $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised");
129
+        $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised");
130 130
         if ($cachedNumber !== FALSE) {
131 131
             $numberData = unserialize($cachedNumber);
132 132
             $now = new \DateTime();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         } else { // data in cache is too old or doesn't exist. We really need to ask the database
140 140
             $list = $this->listAllServiceProviders();
141 141
             $this->counter = count($list);
142
-            file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
142
+            file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
143 143
             return $this->counter;
144 144
         }
145 145
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $returnarray = [];
189 189
         $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?";
190 190
         if ($eduroamDbType !== NULL) {
191
-            $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')";
191
+            $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')";
192 192
         }
193 193
         $externals = $this->db->exec($query, "s", $tld);
194 194
         // was a SELECT query, so a resource and not a boolean
@@ -284,19 +284,19 @@  discard block
 block discarded – undo
284 284
      * 
285 285
      * @return array
286 286
      */
287
-    public function listExternalTlsServersInstitution($tld, $include_not_ready=FALSE) {
287
+    public function listExternalTlsServersInstitution($tld, $include_not_ready = FALSE) {
288 288
         $retval = [];
289 289
         // this includes servers of type "staging", which is fine
290 290
         $query = "SELECT ROid, instid, type, inst_name, servers, contacts, ts FROM eduroamv2.view_tls_inst WHERE country = ?";
291 291
         if (!$include_not_ready) {
292
-            $query = $query . " AND servers IS NOT NULL AND contacts IS NOT NULL";
292
+            $query = $query." AND servers IS NOT NULL AND contacts IS NOT NULL";
293 293
         }
294 294
         $instServerTransaction = $this->db->exec($query, "s", $tld);
295 295
         while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) {
296 296
             $contactList = $this::dissectCollapsedContacts($instServerResponses->contacts);
297 297
             $names = $this->splitNames($instServerResponses->inst_name);
298 298
             $thelanguage = $names[$this->languageInstance->getLang()] ?? $names["en"] ?? array_shift($names);
299
-            $retval[$instServerResponses->ROid . "-". $instServerResponses->instid] = [
299
+            $retval[$instServerResponses->ROid."-".$instServerResponses->instid] = [
300 300
                 "names" => $names,
301 301
                 "name" => $thelanguage,
302 302
                 "type" => array_search($instServerResponses->type, self::TYPE_MAPPING),
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                     // for now (no OpenRoaming client certs available) only run server-side tests
333 333
                     foreach ($listOfIPs as $oneIP) {
334 334
                         $connectionResult = $connectionTests->cApathCheck($oneIP);
335
-                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
335
+                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
336 336
                             $allHostsOkay = FALSE;
337 337
                         } else {
338 338
                             $oneHostOkay = TRUE;
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             // which is different from the outer username we put into installers
487 487
             return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm;
488 488
         }
489
-        if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL ) {
489
+        if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL) {
490 490
             // no special check username, but there is an anon outer ID for
491 491
             // installers - so let's use that one
492 492
             return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         }
643 643
 
644 644
         $monthlyList = [];
645
-        $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i",  $this->identifier);
645
+        $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier);
646 646
         while ($statsQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $monthly)) {
647 647
             $monthlyList[$statsQuery->device_id] = $statsQuery->downloads_user;
648 648
         }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         }        
655 655
         
656 656
         \core\common\Entity::intoThePotatoes();
657
-        ksort($finalarray, SORT_STRING|SORT_FLAG_CASE);
657
+        ksort($finalarray, SORT_STRING | SORT_FLAG_CASE);
658 658
         \core\common\Entity::outOfThePotatoes();
659 659
         return $finalarray;
660 660
     }
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
         $profileStatus = self::CERT_STATUS_NONE;
965 965
         foreach ($rows as $row) {
966 966
             $encodedCert = $row[0];
967
-            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time();
967
+            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time();
968 968
             if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) {
969 969
                 $certStatus = self::CERT_STATUS_ERROR;
970 970
             } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) {
Please login to merge, or discard this patch.
web/admin/overview_radsec_readiness.php 1 patch
Spacing   +22 added lines, -22 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
 
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
         echo '<br/>';
83 83
         echo _("In the 'Timestamp' column we show last update time.");
84 84
         echo '<p/>';
85
-        echo _('To check eduroam database specification see') . 
86
-                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">' .
87
-                _('this document') . '</a>.<p/>';
85
+        echo _('To check eduroam database specification see'). 
86
+                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">'.
87
+                _('this document').'</a>.<p/>';
88 88
         echo _('If you cannot find your institution on this list it means that this institiution is not present in your upstream data.');        
89 89
         echo '<p/>';
90 90
         $allAuthorizedFeds = $user->getAttributes("user:fedadmin");
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         ?>
94 94
         
95 95
     <select name="INST-list" id="INST-list">
96
-        <option value=""><?php echo _('---PLEASE CHOOSE---');?></option>
96
+        <option value=""><?php echo _('---PLEASE CHOOSE---'); ?></option>
97 97
         <?php 
98 98
         $instdata = array();
99 99
         foreach ($extInsts as $iid => $oneInst) {
100
-            print '<option value="' . $iid . '">' . $oneInst['name'] . '</option>';
100
+            print '<option value="'.$iid.'">'.$oneInst['name'].'</option>';
101 101
             $instdata[$iid] = array();
102 102
             $instdata[$iid]['name'] = $oneInst['name'];   
103 103
             $instdata[$iid]['type'] = _('no data');
@@ -111,22 +111,22 @@  discard block
 block discarded – undo
111 111
             $contactdata = '';
112 112
             foreach ($oneInst['contacts'] as $oneContact) {
113 113
                 if ($contactdata != '') {
114
-                    $contactdata = $contactdata . '<br>';
114
+                    $contactdata = $contactdata.'<br>';
115 115
                 }
116 116
                 if ($oneContact['name']) {
117
-                    $contactdata = $contactdata . $oneContact['name'];
117
+                    $contactdata = $contactdata.$oneContact['name'];
118 118
                 }
119 119
                 if ($contactdata != '') {
120
-                    $contactdata = $contactdata . '<br>';
120
+                    $contactdata = $contactdata.'<br>';
121 121
                 }
122 122
                 if ($oneContact['mail']) {
123
-                    $contactdata = $contactdata . $oneContact['mail'];
123
+                    $contactdata = $contactdata.$oneContact['mail'];
124 124
                 }
125 125
                 if ($contactdata != '') {
126
-                    $contactdata = $contactdata . '<br>';
126
+                    $contactdata = $contactdata.'<br>';
127 127
                 }
128 128
                 if ($oneContact['phone']) {
129
-                    $contactdata = $contactdata . $oneContact['phone'];
129
+                    $contactdata = $contactdata.$oneContact['phone'];
130 130
                 }        
131 131
             }
132 132
             if ($contactdata == '') {
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
             var instts = [];
146 146
             <?php
147 147
             foreach (array_keys($instdata) as $iid) {
148
-                echo "instservers['" . $iid . "']='" . $instdata[$iid]['servers']. "';\n";
149
-                echo "instname['" . $iid . "']='" . $instdata[$iid]['name']. "';\n";
150
-                echo "insttype['" . $iid . "']='" . $instdata[$iid]['type']. "';\n";
151
-                echo "instcontact['" . $iid . "']='" . $instdata[$iid]['contacts']. "';\n";
152
-                echo "instts['" . $iid . "']='" . $instdata[$iid]['ts']. "';\n";
148
+                echo "instservers['".$iid."']='".$instdata[$iid]['servers']."';\n";
149
+                echo "instname['".$iid."']='".$instdata[$iid]['name']."';\n";
150
+                echo "insttype['".$iid."']='".$instdata[$iid]['type']."';\n";
151
+                echo "instcontact['".$iid."']='".$instdata[$iid]['contacts']."';\n";
152
+                echo "instts['".$iid."']='".$instdata[$iid]['ts']."';\n";
153 153
             }
154 154
             ?>
155 155
             $(document).ready(function(){
@@ -171,18 +171,18 @@  discard block
 block discarded – undo
171 171
     <div id="instdata_area">
172 172
         <table>
173 173
             <tr><th align="left" width="350">
174
-                    <?php echo _('Name');?>
174
+                    <?php echo _('Name'); ?>
175 175
                 </th><th align="left" width="100">
176
-                    <?php echo _('Type');?>
176
+                    <?php echo _('Type'); ?>
177 177
                 </th>
178 178
                 <th align="left" width="200">
179
-                    <?php echo _('Servers');?>
179
+                    <?php echo _('Servers'); ?>
180 180
                 </th>
181 181
                 <th align="left" width="200">
182
-                    <?php echo _('Contact data');?>
182
+                    <?php echo _('Contact data'); ?>
183 183
                 </th>
184 184
                 <th align="left" width="100">
185
-                    <?php echo _('Timestamp');?>
185
+                    <?php echo _('Timestamp'); ?>
186 186
                 </th>
187 187
             </tr>
188 188
             <tr id="toshow"></tr>
Please login to merge, or discard this patch.
web/admin/edit_hotspot.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  */
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
             ( $_POST['consortium'] == "OpenRoaming" && count($myfed->getAttributes("fed:openroaming")) > 0 )
42 42
             )
43 43
     ) {*/
44
-    if (isset($_POST['consortium']) &&  $_POST['consortium'] == "eduroam")
44
+    if (isset($_POST['consortium']) && $_POST['consortium'] == "eduroam")
45 45
     {
46 46
         $deployment = $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']);
47
-        header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier);
47
+        header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier);
48 48
         exit(0);
49 49
     } else {
50 50
         throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!");
@@ -101,23 +101,23 @@  discard block
 block discarded – undo
101 101
                 if (isset($_POST['agreement']) && $_POST['agreement'] == "true") {
102 102
                     $deployment->addAttribute("hiddenmanagedsp:tou_accepted", NULL, 1);
103 103
                 }
104
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier);
104
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier);
105 105
                 exit(0);
106 106
             case web\lib\common\FormElements::BUTTON_DELETE:
107 107
                 $response = $deployment->setRADIUSconfig();
108 108
                 if (in_array('OK', $response)) {
109 109
                     $deployment->deactivate();
110 110
                 }
111
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . 
111
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'. 
112 112
                        $deployment->identifier);
113 113
                 exit(0);
114 114
             case web\lib\common\FormElements::BUTTON_REMOVESP:
115 115
                 $deployment->remove();
116
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
116
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier);
117 117
                 exit(0);
118 118
             case web\lib\common\FormElements::BUTTON_RENEWTLS:
119 119
                 $deployment->renewtls();
120
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier);
120
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier);
121 121
                 exit(0);
122 122
             case web\lib\common\FormElements::BUTTON_ACTIVATE:
123 123
                 if (count($deployment->getAttributes("hiddenmanagedsp:tou_accepted")) > 0) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                     if (in_array('OK', $response)) {
126 126
                         $deployment->activate();
127 127
                     }
128
-                    header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . $deployment->identifier);
128
+                    header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'.$deployment->identifier);
129 129
                     exit(0);
130 130
                 } else {
131 131
                     throw new Exception("Activate button pushed without acknowledged ToUs!");
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 } else {
155 155
                     $response = ['NOOP', 'NOOP'];
156 156
                 }
157
-                header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)) . '#profilebox_' . $deployment->identifier);
157
+                header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)).'#profilebox_'.$deployment->identifier);
158 158
                 exit(0);
159 159
             default:
160 160
                 throw new Exception("Unknown button action requested!");
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
     if (isset($_POST['command'])) {
164 164
         switch ($_POST['command']) {
165 165
         case web\lib\common\FormElements::BUTTON_CLOSE:
166
-            header("Location: overview_org.php?inst_id=" . $my_inst->identifier) . '#profilebox_' . $deployment->identifier;
166
+            header("Location: overview_org.php?inst_id=".$my_inst->identifier).'#profilebox_'.$deployment->identifier;
167 167
             exit(0);
168 168
         default:
169
-            header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '#profilebox_' . $deployment->identifier);
169
+            header("Location: overview_org.php?inst_id=".$my_inst->identifier.'#profilebox_'.$deployment->identifier);
170 170
             exit(0);
171 171
         }
172 172
     }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     echo $uiElements->instLevelInfoBoxes($my_inst);
194 194
     $deploymentOptions = $deployment->getAttributes();
195 195
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
196
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
196
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>";
197 197
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
198 198
     ?>
199 199
     <fieldset class='option_container' id='managedsp_override'>
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 <!-- input for VLAN identifier for home users-->
228 228
                 <td>
229 229
                     <span id='vlan_label'>
230
-                        <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
230
+                        <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
231 231
                     </span>
232 232
                 </td>
233 233
                 <td>
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     </fieldset>
248 248
 
249 249
     <?php
250
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
250
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
251 251
     echo $deco->footer();
252 252
 
253 253
     
254 254
\ No newline at end of file
Please login to merge, or discard this patch.
web/admin/action_req_certificate.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  */
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -90,23 +90,23 @@  discard block
 block discarded – undo
90 90
     $subject_prefix = implode(', ', array_reverse($DN));
91 91
     /* Messages */
92 92
     $messages = [
93
-    'WRONG_SUBJECT' => _('Submitted Certificate Signing Request contains subject field that does not start with') . ' ' .
94
-                       $subject_prefix  . '<br>' . _("See CSR generation rules below."),
93
+    'WRONG_SUBJECT' => _('Submitted Certificate Signing Request contains subject field that does not start with').' '.
94
+                       $subject_prefix.'<br>'._("See CSR generation rules below."),
95 95
     'WRONG_CSR' => _('Submitted Certificate Signing Request is broken - unable to extract the public key from CSR')
96 96
     ];
97 97
     $settings = array();
98
-    if  (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
99
-        print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']].'</font></h3>';
98
+    if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
99
+        print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']].'</font></h3>';
100 100
         unset($_SESSION['CSR_ERRORS']);
101 101
     }
102
-    if  (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
102
+    if (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
103 103
         $settings = $_SESSION['FORM_SETTINGS'];
104 104
         unset($_SESSION['FORM_SETTINGS']);
105 105
     }
106 106
     if (empty($settings) && isset($_POST['LEVEL'])) {
107 107
         $settings = array('LEVEL' => $_POST['LEVEL'], 'NRO-list' => $_POST['NRO-list'], 'INST-list' => $_POST['INST-list']);
108 108
     }
109
-    if  ( isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
109
+    if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
110 110
         // basic sanity checks before we hand this over to openssl
111 111
         $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE);
112 112
         
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if (!empty($subject_keys)) {
124 124
             if ($subject_keys[0] == 'DC' && $subject['DC']) {
125 125
                 foreach ($subject['DC'] as $v) {
126
-                    $dc[] = 'DC=' . $v;
126
+                    $dc[] = 'DC='.$v;
127 127
                 }
128 128
                 if ($DN !== array_reverse($dc)) {
129 129
                    $dc = array();
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
                 }
148 148
                 $fed = $validator->existingFederation($_POST['NRO-list']);
149 149
                 $country = strtoupper($fed->tld);
150
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
150
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
151 151
                 $DN[] = "C=$code";
152
-                $DN[] = "O=NRO of " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
152
+                $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
153 153
                 $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld);
154 154
                 $serverList = explode(",", array_key_first($serverInfo));
155
-                $DN[] = "CN=" . $serverList[0];
155
+                $DN[] = "CN=".$serverList[0];
156 156
                 $policies[] = "eduroam IdP";
157 157
                 $policies[] = "eduroam SP";
158 158
                 $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"];
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                     throw new Exception(sprintf("Sorry: you are not %s admin for the %s requested in the form.", $uiElements->nomenclatureFed, $uiElements->nomenclatureFed));
168 168
                 }
169 169
                 $country = strtoupper($matches[1]);
170
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
170
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
171 171
                 $DN[] = "C=$code";
172 172
                 $serverInfo = $extInsts[$_POST['INST-list']];
173 173
                 if (isset($serverInfo["names"]["en"])) {
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 		    $modou = 1;
181 181
 		    $ou = str_replace(",", "/,", $ou);
182 182
 		}
183
-		$ou = preg_replace('/\s+/', ' ',  $ou);
183
+		$ou = preg_replace('/\s+/', ' ', $ou);
184 184
 		if (strlen($ou) >= 64) {
185 185
 			$ou = substr($ou, 0, 64);
186 186
 			$modou += 2;
187 187
 		}
188 188
                 $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou);
189 189
                 $serverList = explode(",", $serverInfo["servers"]);
190
-                $DN[] = "CN=" . $serverList[0];
190
+                $DN[] = "CN=".$serverList[0];
191 191
                 switch ($serverInfo["type"]) {
192 192
                     case core\IdP::TYPE_IDPSP:
193 193
                         $policies[] = "eduroam IdP";
@@ -206,13 +206,13 @@  discard block
 block discarded – undo
206 206
             default:
207 207
                 throw new Exception("Sorry: Unknown level of issuance requested.");
208 208
         }
209
-        echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties");
209
+        echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties");
210 210
         echo "<ul>";
211
-        echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
212
-	echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN);
211
+        echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>";
212
+	echo "<li>"._("Distinguished Name: ").implode(", ", $DN);
213 213
 	if ($modou > 0) {
214 214
 	    echo " (";
215
-            echo _("Organization field adjusted"). ': ';
215
+            echo _("Organization field adjusted").': ';
216 216
 	    $desc = array();
217 217
 	    if ($modou >= 2) {
218 218
 		$desc[] = _("truncated to 64 chars");
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 	    echo ")";
225 225
 	}
226 226
         echo "</li>";
227
-        echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>";
228
-        echo "<li>" . _("Requester Contact Details: ") . $firstName . " &lt;" . $firstMail . "&gt;" . "</li>";
227
+        echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>";
228
+        echo "<li>"._("Requester Contact Details: ").$firstName." &lt;".$firstMail."&gt;"."</li>";
229 229
         echo "</ul></p>";
230 230
 
231 231
         $vettedCsr = $validator->string($_POST['CSR'], true);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $loggerInstance->debug(2, $DN, "CERT DN: ", "\n");
242 242
         // our certs can be good for max 5 years
243 243
         $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays);
244
-        echo "<p>" . _("The certificate was requested.") . "</p>";
244
+        echo "<p>"._("The certificate was requested.")."</p>";
245 245
         ?>
246 246
         <form action="overview_certificates.php" method="GET">
247 247
             <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button>
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         switch (count($feds)) {
260 260
             case 0:
261 261
                 echo "<div>";
262
-                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."));
262
+                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."));
263 263
                 echo "</div>";
264 264
                 break;
265 265
             case 1:
@@ -267,22 +267,22 @@  discard block
 block discarded – undo
267 267
                 if (empty($settings) || (isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO')) {
268 268
                     echo ' checked';
269 269
                 }
270
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
271
-                echo " <strong>" . $cat->knownFederations[$feds[0]->tld]['name'] . "</strong>";
272
-                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>';
270
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
271
+                echo " <strong>".$cat->knownFederations[$feds[0]->tld]['name']."</strong>";
272
+                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>';
273 273
                 break;
274 274
             default:
275 275
                 echo '<input type="radio" name="LEVEL" id="NRO" value="NRO"';
276 276
                 if (empty($settings) || isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO') {
277 277
                     echo ' checked';
278 278
                 }
279
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
279
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
280 280
                 ?>
281 281
                 <select name="NRO-list" id="NRO-list">
282 282
                     <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
283 283
                     <?php
284 284
                     foreach ($feds as $oneFed) {
285
-                        echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld]['name'] . "</option>";
285
+                        echo '<option value="'.strtoupper($oneFed->tld).'">'.$cat->knownFederations[$oneFed->tld]['name']."</option>";
286 286
                         #echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>";
287 287
                         
288 288
                     }
@@ -295,18 +295,18 @@  discard block
 block discarded – undo
295 295
         <script>
296 296
             var instservers = [];
297 297
             var instpolicies = [];
298
-            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>';
298
+            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>';
299 299
         <?php 
300 300
         $allIdPs = [];
301 301
         foreach ($allAuthorizedFeds as $oneFed) {
302 302
             foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) {
303
-                $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["name"];            
304
-                echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n";
305
-                echo "instpolicies['" . $id . "']='";
303
+                $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["name"];            
304
+                echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n";
305
+                echo "instpolicies['".$id."']='";
306 306
                 if ($oneIdP["type"] == 'IdPSP') {
307 307
                     echo "eduroam IdP/SP";
308 308
                 } else {
309
-                    echo "eduroam " . $oneIdP["type"];
309
+                    echo "eduroam ".$oneIdP["type"];
310 310
                 }
311 311
                 echo "';\n";
312 312
             }
@@ -352,9 +352,9 @@  discard block
 block discarded – undo
352 352
             <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
353 353
 <?php
354 354
 foreach ($allIdPs as $id => $name) {
355
-    echo '<option value="' . $id . '"';
355
+    echo '<option value="'.$id.'"';
356 356
     if (isset($settings['INST-list']) && $settings['INST-list'] == $id) { echo ' selected'; }
357
-    echo '>' . $name . "</option>";
357
+    echo '>'.$name."</option>";
358 358
 }
359 359
 ?>
360 360
         </select>
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
             <?php 
369 369
             echo _('According to the above settings you will receive')
370 370
             ?>
371
-            <span id='certlevel'><?php echo _('NRO level certificate');?></span>
371
+            <span id='certlevel'><?php echo _('NRO level certificate'); ?></span>
372 372
             
373 373
         for server names:
374 374
         <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span>
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
         <?php
385 385
         } else {
386 386
             echo "<div>";
387
-            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);
387
+            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);
388 388
             echo "</div>";
389 389
         }
390 390
         ?>
391 391
         <?php
392
-        echo '<div id="ondb"><h4 style="margin: 0">' . _("Can't you find an institution on the select list above?") . '</h4>';
392
+        echo '<div id="ondb"><h4 style="margin: 0">'._("Can't you find an institution on the select list above?").'</h4>';
393 393
         echo _("Most likely we do not have required data on this institution in the eduroam database.");
394 394
         echo '<br/>';
395 395
         ?>
@@ -397,16 +397,16 @@  discard block
 block discarded – undo
397 397
         <?php
398 398
         echo _('On this page');
399 399
         echo '</a> ';
400
-        echo _('you can check what information is in the datatabase') . '.';
400
+        echo _('you can check what information is in the datatabase').'.';
401 401
         echo '</div>';
402 402
         if (count($feds) > 0 || count($allIdPs) > 0) {?>
403 403
         <h2><?php echo _("2. CSR generation"); ?></h2>
404 404
         <p>
405 405
         <?php 
406
-        echo _("The CSR subject field has to start with ") .'<b>' . $subject_prefix . '</b><br>';
406
+        echo _("The CSR subject field has to start with ").'<b>'.$subject_prefix.'</b><br>';
407 407
         echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p>
408 408
         <?php 
409
-        echo "<b>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</b>";
409
+        echo "<b>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</b>";
410 410
         ?>
411 411
         <h2><?php echo _("3. Submission"); ?></h2>
412 412
 <?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.
core/DeploymentManaged.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
                 $serverCandidates[IdPlist::geoDistance($adminLocation, ['lat' => $iterator->location_lat, 'lon' => $iterator->location_lon])] = $iterator->server_id;
317 317
             }
318 318
             if ($clients > $maxSupportedClients * 0.9) {
319
-                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (" . $iterator->server_id . ") is serving at more than 90% capacity!");
319
+                $this->loggerInstance->debug(1, "A RADIUS server for Managed SP (".$iterator->server_id.") is serving at more than 90% capacity!");
320 320
             }
321 321
         }
322 322
         if (count($serverCandidates) == 0 && $federation != "DEFAULT") {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     private function createTLScredentials()
342 342
     {
343
-        $clientName = "SP_" . $this->identifier . '-' . $this->institution;
343
+        $clientName = "SP_".$this->identifier.'-'.$this->institution;
344 344
         $dn = array(
345 345
                     "organizationName" => "eduroam",
346 346
                     "organizationalUnitName" => "eduroam Managed SP",
@@ -354,13 +354,13 @@  discard block
 block discarded – undo
354 354
         openssl_pkey_export($privkey, $this->radsec_priv);
355 355
         // Generate a certificate signing request
356 356
         $csr = openssl_csr_new($dn, $privkey,
357
-                               array('digest_alg' => 'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf"));
357
+                               array('digest_alg' => 'sha256', 'config' => ROOT."/config/ManagedSPCerts/openssl.cnf"));
358 358
         // get CA certificate and private key
359
-        $caprivkey = array(file_get_contents(ROOT . "/config/ManagedSPCerts/eduroamSP-CA.key"),
359
+        $caprivkey = array(file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.key"),
360 360
                             \config\Master::MANAGEDSP['capass']);
361
-        $cacert = file_get_contents(ROOT .  "/config/ManagedSPCerts/eduroamSP-CA.pem");
361
+        $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem");
362 362
         $clientcert = openssl_csr_sign($csr, $cacert, $caprivkey, \config\Master::MANAGEDSP['daystoexpiry'],
363
-                          array('digest_alg'=>'sha256', 'config' => ROOT . "/config/ManagedSPCerts/openssl.cnf"), rand());
363
+                          array('digest_alg'=>'sha256', 'config' => ROOT."/config/ManagedSPCerts/openssl.cnf"), rand());
364 364
         openssl_x509_export($clientcert, $this->radsec_cert);
365 365
     } 
366 366
     /**
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
             $conditional1 = "AND activity_time > DATE_SUB(NOW(), INTERVAL $backlog SECOND)";
386 386
             $conditional2 = "";
387 387
         }
388
-        $stats = $this->databaseHandle->exec("SELECT activity_time, realm, mac, cui, result, ap_id FROM activity WHERE operatorname = ? $conditional1 ORDER BY activity_time $conditional2", "s", $opName );
388
+        $stats = $this->databaseHandle->exec("SELECT activity_time, realm, mac, cui, result, ap_id FROM activity WHERE operatorname = ? $conditional1 ORDER BY activity_time $conditional2", "s", $opName);
389 389
         return mysqli_fetch_all($stats, \MYSQLI_ASSOC);
390 390
     }
391 391
         
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
     {
517 517
         $customAttrib = $this->getAttributes("managedsp:operatorname");
518 518
         if (count($customAttrib) == 0) {
519
-            return "1sp." . $this->identifier . "-" . $this->institution . \config\ConfAssistant::SILVERBULLET['realm_suffix'];
519
+            return "1sp.".$this->identifier."-".$this->institution.\config\ConfAssistant::SILVERBULLET['realm_suffix'];
520 520
         }
521 521
         return $customAttrib[0]["value"];
522 522
     }
@@ -531,14 +531,14 @@  discard block
 block discarded – undo
531 531
     private function sendToRADIUS(int $idx, $post)
532 532
     {
533 533
         $hostname = "radius_hostname_$idx";
534
-        $ch = curl_init("http://" . $this->$hostname . ':' . \config\Master::MANAGEDSP['radiusconfigport']);
534
+        $ch = curl_init("http://".$this->$hostname.':'.\config\Master::MANAGEDSP['radiusconfigport']);
535 535
         if ($ch === FALSE) {
536 536
             $res = 'FAILURE';
537 537
         } else {
538 538
             curl_setopt($ch, CURLOPT_USERAGENT, "CAT-ManagedSP");
539 539
             curl_setopt($ch, CURLOPT_POST, 1);
540 540
             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
541
-            $this->loggerInstance->debug(1, "Posting to http://" . $this->$hostname . ':' . \config\Master::MANAGEDSP['radiusconfigport'] . "/$post\n");
541
+            $this->loggerInstance->debug(1, "Posting to http://".$this->$hostname.':'.\config\Master::MANAGEDSP['radiusconfigport']."/$post\n");
542 542
             curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
543 543
             curl_setopt($ch, CURLOPT_HEADER, 0);
544 544
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -577,19 +577,19 @@  discard block
 block discarded – undo
577 577
         } else {
578 578
             $txt = $remove ? _('Profile deactivation failed') : _('Profile activation/modification failed');
579 579
         }
580
-        $txt = $txt . ' ';
580
+        $txt = $txt.' ';
581 581
         if (array_count_values($response)[$status] == 2) {
582
-            $txt = $txt . _('on both RADIUS servers: primary and backup') . '.';
582
+            $txt = $txt._('on both RADIUS servers: primary and backup').'.';
583 583
         } else {
584 584
             if ($response['res[1]'] == $status) {
585
-                $txt = $txt . _('on primary RADIUS server') . '.';
585
+                $txt = $txt._('on primary RADIUS server').'.';
586 586
             } else {
587
-                $txt = $txt . _('on backup RADIUS server') . '.';
587
+                $txt = $txt._('on backup RADIUS server').'.';
588 588
             }
589 589
         }
590 590
         $mail = \core\common\OutsideComm::mailHandle();
591 591
         $email = $this->getAttributes("support:email")[0]['value'];
592
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
592
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
593 593
         $mail->addAddress($email);
594 594
         if ($status == 'OK') {
595 595
             $mail->Subject = _('RADIUS profile update problem fixed');
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
             return NULL;
624 624
         }
625 625
         $timeout = 10;
626
-        curl_setopt($ch, CURLOPT_URL, 'http://' . $host);
626
+        curl_setopt($ch, CURLOPT_URL, 'http://'.$host);
627 627
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
628 628
         curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
629 629
         curl_exec($ch);
@@ -715,41 +715,41 @@  discard block
 block discarded – undo
715 715
     {
716 716
         $remove = ($this->status == \core\AbstractDeployment::INACTIVE) ? 0 : 1;
717 717
         $toPost = ($onlyone ? array($onlyone => '') : array(1 => '', 2 => ''));
718
-        $toPostTemplate = 'instid=' . $this->institution . '&deploymentid=' . $this->identifier . 
719
-                '&secret=' . $this->secret .
720
-                '&country=' . $this->getAttributes("internal:country")[0]['value'] .
721
-                '&pskkey=' . $this->pskkey . '&';
718
+        $toPostTemplate = 'instid='.$this->institution.'&deploymentid='.$this->identifier. 
719
+                '&secret='.$this->secret.
720
+                '&country='.$this->getAttributes("internal:country")[0]['value'].
721
+                '&pskkey='.$this->pskkey.'&';
722 722
         if ($remove) {
723
-            $toPostTemplate = $toPostTemplate . 'remove=1&';
723
+            $toPostTemplate = $toPostTemplate.'remove=1&';
724 724
         } else {
725
-            $toPostTemplate = $toPostTemplate . 'operatorname=' . $this->getOperatorName() . '&'; 
725
+            $toPostTemplate = $toPostTemplate.'operatorname='.$this->getOperatorName().'&'; 
726 726
             if ($this->getAttributes("managedsp:vlan")[0]['value'] ?? NULL) {
727 727
                 $allRealms = $this->getAllRealms();
728 728
                 if (!empty($allRealms)) {
729
-                    $toPostTemplate = $toPostTemplate . 'vlan=' . $this->getAttributes("managedsp:vlan")[0]['value'] . '&';
730
-                    $toPostTemplate = $toPostTemplate . 'realmforvlan[]=' . implode('&realmforvlan[]=', $allRealms) . '&';
729
+                    $toPostTemplate = $toPostTemplate.'vlan='.$this->getAttributes("managedsp:vlan")[0]['value'].'&';
730
+                    $toPostTemplate = $toPostTemplate.'realmforvlan[]='.implode('&realmforvlan[]=', $allRealms).'&';
731 731
                 }
732 732
             }
733 733
         }
734 734
         foreach (array_keys($toPost) as $key) {
735
-            $elem = 'port' . $key;
736
-            $toPost[$key] = $toPostTemplate . 'port=' . $this->$elem;
735
+            $elem = 'port'.$key;
736
+            $toPost[$key] = $toPostTemplate.'port='.$this->$elem;
737 737
         }
738 738
         $response = array();
739 739
         foreach ($toPost as $key => $value) {
740
-            $this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n");
740
+            $this->loggerInstance->debug(1, 'toPost '.$toPost[$key]."\n");
741 741
             // temporarly one server $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
742 742
             //if ($key == 2) {
743 743
             //    $response['res[2]'] = 'OK'; 
744 744
             //} else {
745
-                $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
745
+                $response['res['.$key.']'] = $this->sendToRADIUS($key, $toPost[$key]);
746 746
             //}
747 747
         }
748 748
         if ($onlyone) {
749
-            $response['res[' . ($onlyone == 1) ? 2 : 1 . ']'] = \core\AbstractDeployment::RADIUS_OK;
749
+            $response['res['.($onlyone == 1) ? 2 : 1.']'] = \core\AbstractDeployment::RADIUS_OK;
750 750
         }
751 751
         foreach (array('OK', 'FAILURE') as $status) {
752
-            if ( ( ($status == 'OK' && $notify) || ($status == 'FAILURE') ) && ( in_array($status, $response) ) ) {
752
+            if ((($status == 'OK' && $notify) || ($status == 'FAILURE')) && (in_array($status, $response))) {
753 753
                 $this->sendMailtoAdmin($remove, $response, $status);
754 754
             }
755 755
         }
Please login to merge, or discard this patch.
web/admin/overview_org.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  */
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 function displaySilverbulletPropertyWidget(&$theProfile, $readonly, &$uiElements) {
33 33
     ?>
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
                 <ul style='margin:1px'>
45 45
                     <?php
46 46
                     foreach ($completeness as $missing_attrib) {
47
-                        echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
47
+                        echo "<li>".$uiElements->displayName($missing_attrib)."</li>";
48 48
                     }
49 49
                     ?>
50 50
                 </ul>
51 51
             </div>
52 52
             <?php
53 53
         } else {
54
-            echo sprintf(_("You can create up to %d users."), $maxusers[0]['value']) . "<br/>" . sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm);
54
+            echo sprintf(_("You can create up to %d users."), $maxusers[0]['value'])."<br/>".sprintf(_("Their credentials will carry the name <strong>%s</strong>."), $theProfile->realm);
55 55
         }
56 56
         ?>
57 57
         <br/>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         if ($readonly === FALSE) {
61 61
             ?>
62 62
             <form action='edit_silverbullet.php?inst_id=<?php echo $theProfile->institution; ?>&amp;profile_id=<?php echo $theProfile->identifier; ?>' method='POST'>
63
-                <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
63
+                <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button>
64 64
             </form>
65 65
             <?php
66 66
         }
@@ -96,21 +96,21 @@  discard block
 block discarded – undo
96 96
                 $has_overrides = TRUE;
97 97
             }
98 98
         }
99
-        $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>";
99
+        $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>";
100 100
         $typelist = $theProfile->getEapMethodsinOrderOfPreference();
101 101
         $allcomplete = TRUE;
102 102
         foreach ($typelist as $eaptype) {
103 103
             $buffer_eaptypediv .= $eaptype->getPrintableRep();
104 104
             $completeness = $theProfile->isEapTypeDefinitionComplete($eaptype);
105 105
             if ($completeness === true) {
106
-                $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>";
106
+                $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>";
107 107
             } else {
108 108
                 $buffer_eaptypediv .= " <div class='notacceptable'>";
109 109
                 $buffer_eaptypediv .= _("Information needed!");
110 110
                 if (is_array($completeness)) {
111 111
                     $buffer_eaptypediv .= "<ul style='margin:1px'>";
112 112
                     foreach ($completeness as $missing_attrib) {
113
-                        $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>";
113
+                        $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>";
114 114
                     }
115 115
                     $buffer_eaptypediv .= "</ul>";
116 116
                 }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             foreach ($attribs as $attrib) {
123 123
                 if ($attrib['level'] == \core\Options::LEVEL_METHOD && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) {
124 124
                     $justOnce = TRUE;
125
-                    $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>";
125
+                    $buffer_eaptypediv .= "<img src='../resources/images/icons/Tabler/square-rounded-letter-e-blue.svg' alt='"._("Options on EAP Method/Device level are in effect.")."'>";
126 126
                 }
127 127
             }
128 128
             $buffer_eaptypediv .= "<br/>";
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         if ($theProfile->isRedirected()) {
149 149
             $iconData = $uiElements->iconData('PROFILES_REDIRECTED');
150 150
             $iconData['text'] = _("Profile redirected");
151
-            $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData));
151
+            $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData));
152 152
             
153 153
         } 
154 154
         
@@ -156,15 +156,15 @@  discard block
 block discarded – undo
156 156
         switch ($certStatus) {
157 157
             case core\AbstractProfile::CERT_STATUS_OK:
158 158
                 $iconData = $uiElements->iconData('CERT_STATUS_OK');
159
-                $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData));
159
+                $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData));
160 160
                 break;
161 161
             case core\AbstractProfile::CERT_STATUS_WARN:
162 162
                 $iconData = $uiElements->iconData('CERT_STATUS_WARN');
163
-                $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData));                
163
+                $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData));                
164 164
                 break;
165 165
             case core\AbstractProfile::CERT_STATUS_ERROR:
166 166
                 $iconData = $uiElements->iconData('CERT_STATUS_ERROR');
167
-                $buffer_headline .= "<br/>" . $uiElements->catIcon(($iconData));
167
+                $buffer_headline .= "<br/>".$uiElements->catIcon(($iconData));
168 168
                 break;            
169 169
         }
170 170
         $buffer_headline .= "</div>";
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
                 if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") {
191 191
                     $diagUrl = "../diag/";
192 192
                 } else {
193
-                    $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/";
193
+                    $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/";
194 194
                 }
195 195
                 ?>
196
-                <form action='<?php echo $diagUrl . "action_realmcheck.php?inst_id=" . $theProfile->institution . "&profile_id=" . $theProfile->identifier ?>' method='post' accept-charset='UTF-8'>
197
-                    <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link . $_SERVER['SCRIPT_NAME']); ?>'/>
196
+                <form action='<?php echo $diagUrl."action_realmcheck.php?inst_id=".$theProfile->institution."&profile_id=".$theProfile->identifier ?>' method='post' accept-charset='UTF-8'>
197
+                    <input type='hidden' name='comefrom' value='<?php echo htmlspecialchars($link.$_SERVER['SCRIPT_NAME']); ?>'/>
198 198
                     <button type='submit' name='profile_action' value='check' <?php echo ($has_realm ? "" : "disabled='disabled'"); ?> title='<?php echo _("The realm can only be checked if you configure the realm!"); ?>'>
199 199
                         <?php echo _("Check realm reachability"); ?>
200 200
                     </button>
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
                 ?>
242 242
                 <div style='display: flex;'>
243 243
                     <?php
244
-                    $idpLevelUrl = $link . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $theProfile->institution;
245
-                    $displayurl = $idpLevelUrl . "&amp;profile=" . $theProfile->identifier;
246
-                    $QRurl = $idpLevelUrl . "&profile=" . $theProfile->identifier;
244
+                    $idpLevelUrl = $link.dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$theProfile->institution;
245
+                    $displayurl = $idpLevelUrl."&amp;profile=".$theProfile->identifier;
246
+                    $QRurl = $idpLevelUrl."&profile=".$theProfile->identifier;
247 247
                     $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([
248 248
                                 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG,
249 249
                                 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H,
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
                     if (empty($rawQr)) {
256 256
                         throw new Exception("Something went seriously wrong during QR code generation!");
257 257
                     }
258
-                    $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
258
+                    $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL));
259 259
                     $size = getimagesize($uri);
260
-                    echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>";
260
+                    echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>";
261 261
 
262 262
                     //echo "<nobr>$displayurl</nobr></a>";
263 263
                     echo "<p>$displayurl</p></a>";
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     $radius_status = array();
287 287
     $radius_status[0] = $deploymentObject->radius_status_1;
288 288
     $radius_status[1] = $deploymentObject->radius_status_2;
289
-    $cacert = file_get_contents(ROOT .  "/config/ManagedSPCerts/eduroamSP-CA.pem");
289
+    $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem");
290 290
     $retry = $deploymentObject->checkRADIUSHostandConfigDaemon();
291 291
     $isradiusready = radius_ready($deploymentObject);
292 292
     if (is_array($retry)) {
@@ -298,11 +298,11 @@  discard block
 block discarded – undo
298 298
     }
299 299
     ?>
300 300
     <div style='display: table-row_id;'>
301
-        <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier;?>" style='display: table-cell;'>
301
+        <div class='profilebox' id="profilebox_<?php echo $deploymentObject->identifier; ?>" style='display: table-cell;'>
302 302
             <h2><?php
303 303
                 switch ($deploymentObject->consortium) {
304 304
                     case "eduroam":
305
-                        $displayname = config\ConfAssistant::CONSORTIUM['name'] . " " . core\DeploymentManaged::PRODUCTNAME;
305
+                        $displayname = config\ConfAssistant::CONSORTIUM['name']." ".core\DeploymentManaged::PRODUCTNAME;
306 306
                         break;
307 307
                     case "OpenRoaming":
308 308
                         $displayname = "OpenRoaming ANP";
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                     default:
311 311
                         throw new Exception("We are supposed to operate on a roaming consortium we don't know.");
312 312
                 }
313
-                echo $displayname . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)";
313
+                echo $displayname." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)";
314 314
                 ?></h2>
315 315
             <table>
316 316
                 <caption><?php echo _("Deployment Details"); ?></caption>
@@ -328,13 +328,13 @@  discard block
 block discarded – undo
328 328
                     <td>
329 329
                         <?php
330 330
                         if ($deploymentObject->host1_v4 !== NULL) {
331
-                            echo _("IPv4") . ": " . $deploymentObject->host1_v4;
331
+                            echo _("IPv4").": ".$deploymentObject->host1_v4;
332 332
                         }
333 333
                         if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
334 334
                             echo "<br/>";
335 335
                         }
336 336
                         if ($deploymentObject->host1_v6 !== NULL) {
337
-                            echo _("IPv6") . ": " . $deploymentObject->host1_v6;
337
+                            echo _("IPv6").": ".$deploymentObject->host1_v6;
338 338
                         }
339 339
                         ?>
340 340
                     </td>
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
                     <td>
351 351
                         <?php
352 352
                         if ($deploymentObject->status) {
353
-                            echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] .
354
-                                "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] .
355
-                                "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "' class='cat-icon'>";
353
+                            echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon'].
354
+                                "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text'].
355
+                                "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."' class='cat-icon'>";
356 356
                         }
357 357
                         ?>
358 358
                     </td>
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
                     <td>
365 365
                         <?php
366 366
                         if ($deploymentObject->host2_v4 !== NULL) {
367
-                            echo _("IPv4") . ": " . $deploymentObject->host1_v4;
367
+                            echo _("IPv4").": ".$deploymentObject->host1_v4;
368 368
                         }
369 369
                         if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
370 370
                             echo "<br/>";
371 371
                         }
372 372
                         if ($deploymentObject->host2_v6 !== NULL) {
373
-                            echo _("IPv6") . ": " . $deploymentObject->host2_v6;
373
+                            echo _("IPv6").": ".$deploymentObject->host2_v6;
374 374
                         }
375 375
                         ?>
376 376
                     </td>
@@ -386,9 +386,9 @@  discard block
 block discarded – undo
386 386
                     <td>
387 387
                         <?php
388 388
                         if ($deploymentObject->status) {
389
-                            echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
390
-                                "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] .
391
-                            "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "' class='cat-icon'>";
389
+                            echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
390
+                                "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text'].
391
+                            "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."' class='cat-icon'>";
392 392
                         }
393 393
                         ?>
394 394
                     </td>
@@ -417,29 +417,29 @@  discard block
 block discarded – undo
417 417
                 <tr>
418 418
                     <td><strong><?php echo _("RADSEC over TLS credentials"); ?></strong></td>
419 419
                         <td>
420
-                            <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_priv;?>">
421
-                            <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier;?>" value="<?php echo $deploymentObject->radsec_cert;?>">
422
-                            <input type="hidden" id="ca_cert_data" value="<?php echo $cacert;?>">
423
-                            <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier;?>" name="showc" style="background-color: gray; color: white" type="submit"><?php echo _('private key');?></button>
424
-                            <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier;?>" name="showp" style="background-color: gray; color: white" type="submit"><?php echo _('certificate');?></button>
425
-                            <button class="ca_cert" name="showca" style="background-color: gray; color: white" type="submit"><?php echo _('CA certificate');?></button>
426
-                            <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution;?>&dep_id=<?php echo $deploymentObject->identifier;?>'" style="background-color: gray; color: white" type="button"><?php echo _('download ZIP-file with full data');?></button>
420
+                            <input type="hidden" id="priv_key_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_priv; ?>">
421
+                            <input type="hidden" id="cert_data_<?php echo $deploymentObject->identifier; ?>" value="<?php echo $deploymentObject->radsec_cert; ?>">
422
+                            <input type="hidden" id="ca_cert_data" value="<?php echo $cacert; ?>">
423
+                            <button class="sp_priv_key" id="priv_key_<?php echo $deploymentObject->identifier; ?>" name="showc" style="background-color: gray; color: white" type="submit"><?php echo _('private key'); ?></button>
424
+                            <button class="sp_cert" id="cert_<?php echo $deploymentObject->identifier; ?>" name="showp" style="background-color: gray; color: white" type="submit"><?php echo _('certificate'); ?></button>
425
+                            <button class="ca_cert" name="showca" style="background-color: gray; color: white" type="submit"><?php echo _('CA certificate'); ?></button>
426
+                            <button name="sendzip" onclick="location.href='inc/sendzip.inc.php?inst_id=<?php echo $deploymentObject->institution; ?>&dep_id=<?php echo $deploymentObject->identifier; ?>'" style="background-color: gray; color: white" type="button"><?php echo _('download ZIP-file with full data'); ?></button>
427 427
                         </td
428 428
                 </tr>
429 429
                 <tr> <td></td><td>
430 430
                     <?php 
431
-                    echo _('Not valid after:') . ' '. date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s') . ' UTC';
432
-                    $dleft = floor(($data['validTo_time_t']-time())/(24*60*60));
431
+                    echo _('Not valid after:').' '.date_create_from_format('ymdGis', substr($data['validTo'], 0, -1))->format('Y-m-d H:i:s').' UTC';
432
+                    $dleft = floor(($data['validTo_time_t'] - time()) / (24 * 60 * 60));
433 433
                     if ($dleft > 0) {
434
-                        echo '<br>' . _('Number of days to expiry:') . ' ' . $dleft;
434
+                        echo '<br>'._('Number of days to expiry:').' '.$dleft;
435 435
                     } else {
436
-                        echo '<br>' . _('If you are using RADSEC over TLS you should urgently renew your credentisls') . '!';
436
+                        echo '<br>'._('If you are using RADSEC over TLS you should urgently renew your credentisls').'!';
437 437
                     }
438 438
                     ?></td></tr>
439 439
                 <tr> <td></td><td>
440 440
                         <?php
441 441
                         if ($deploymentObject->radsec_cert != NULL) {
442
-                            echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials') . '<br>' .
442
+                            echo _('If your certificate is close to expiry or you need to create new RADSEC over TLS credentials').'<br>'.
443 443
                                  _('click on "Renew RADSEC over TLS credentials" button');
444 444
                         }
445 445
                         ?>
@@ -451,14 +451,14 @@  discard block
 block discarded – undo
451 451
                 <tr>
452 452
                         <td><strong><?php echo _("RADSEC TLS-PSK identity"); ?></strong></td>
453 453
                         <td>
454
-                           SP_<?php echo $deploymentObject->identifier . '-' . $deploymentObject->institution;?>
454
+                           SP_<?php echo $deploymentObject->identifier.'-'.$deploymentObject->institution; ?>
455 455
                         </td>
456 456
                 </tr>
457 457
                 
458 458
                 <tr>
459 459
                         <td><strong><?php echo _("RADSEC TLS-PSK key"); ?></strong></td>
460 460
                         <td>
461
-                           <?php echo $deploymentObject->pskkey;?>
461
+                           <?php echo $deploymentObject->pskkey; ?>
462 462
                         </td>
463 463
                 </tr>
464 464
                 <?php } ?>
@@ -515,12 +515,12 @@  discard block
 block discarded – undo
515 515
                             if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) {
516 516
                                 echo '<br>';
517 517
                                 if ($res['FAILURE'] == 2) {
518
-                                    echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
518
+                                    echo ' <span style="color: red;">'._("Activation failure.").'</span>';
519 519
                                 } else {
520 520
                                     if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
521
-                                        echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
521
+                                        echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
522 522
                                     } else {
523
-                                        echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
523
+                                        echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
524 524
                                     }
525 525
                                 }
526 526
                             }
@@ -555,12 +555,12 @@  discard block
 block discarded – undo
555 555
                                 if (array_key_exists('FAILURE', $res) && $res['FAILURE'] > 0) {
556 556
                                     echo '<br>';
557 557
                                     if ($res['FAILURE'] == 2) {
558
-                                        echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
558
+                                        echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
559 559
                                     } else {
560 560
                                         if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
561
-                                            echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
561
+                                            echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
562 562
                                         } else {
563
-                                            echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
563
+                                            echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
564 564
                                         }
565 565
                                     }
566 566
                                 }
@@ -585,28 +585,28 @@  discard block
 block discarded – undo
585 585
                     </form>
586 586
                     </div>
587 587
             </div>
588
-            <?php } else { echo _("We are not able to handle a new configuration request now.") . '<br>' . _("Check later.");} ?>
588
+            <?php } else { echo _("We are not able to handle a new configuration request now.").'<br>'._("Check later."); } ?>
589 589
         </div>
590 590
         <div style='width:20px;'></div> <!-- QR code space, reserved -->
591 591
         <div style='display: table-cell; min-width:200px;'>
592
-            <?php $tablecaption = _("Hotspot Usage Statistics");?>
592
+            <?php $tablecaption = _("Hotspot Usage Statistics"); ?>
593 593
             <h1><?php echo $tablecaption; ?></h1>
594
-            <h2><?php echo _("5 most recent authentications");?></h2>
595
-            <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)");?></p>
594
+            <h2><?php echo _("5 most recent authentications"); ?></h2>
595
+            <p><?php echo _("(AP Identifier is a /-separated tuple of NAS-Identifier/NAS-IP-Address/NAS-IPv6-Address/Called-Station-Id)"); ?></p>
596 596
             <table class='authrecord'>
597
-    <caption><?php echo $tablecaption;?></caption>
597
+    <caption><?php echo $tablecaption; ?></caption>
598 598
     <tr style='text-align: left;'>
599
-        <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th>
600
-        <th scope="col"><strong><?php echo _("Realm");?></strong></th>
601
-        <th scope="col"><strong><?php echo _("MAC Address");?></strong></th>
602
-        <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th>
603
-        <th scope="col"><strong><?php echo _("Result");?></strong></th>
604
-        <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th>
599
+        <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th>
600
+        <th scope="col"><strong><?php echo _("Realm"); ?></strong></th>
601
+        <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th>
602
+        <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th>
603
+        <th scope="col"><strong><?php echo _("Result"); ?></strong></th>
604
+        <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th>
605 605
     </tr>
606 606
     <?php
607
-    $userAuthData = $deploymentObject->retrieveStatistics(0,5);
607
+    $userAuthData = $deploymentObject->retrieveStatistics(0, 5);
608 608
     foreach ($userAuthData as $oneRecord) {
609
-        echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>"
609
+        echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>"
610 610
                 . "<td>".$oneRecord['activity_time']."</td>"
611 611
                 . "<td>".$oneRecord['realm']."</td>"
612 612
                 . "<td>".$oneRecord['mac']."</td>"
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
             }
815 815
             ?>
816 816
         </h2>
817
-        <?php if(count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?>
817
+        <?php if (count($profiles_for_this_idp) > 1 && $readonly === FALSE && $editMode === 'fullaccess') { ?>
818 818
                     <form method='post' action='sort_profiles.php?inst_id=<?php echo $my_inst->identifier; ?>' accept-charset='UTF-8'>
819 819
                         <div>
820 820
                             <button type='submit' name='profile_sorting'>
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
                         <div>
884 884
                             <input type="hidden" name="consortium" value="eduroam"/>
885 885
                             <button type='submit' <?php echo ($hasMail > 0 ? "" : "disabled"); ?> name='profile_action' value='new'>
886
-                                <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name'] . " " . \core\DeploymentManaged::PRODUCTNAME); ?>
886
+                                <?php echo sprintf(_("Add %s deployment ..."), \config\ConfAssistant::CONSORTIUM['name']." ".\core\DeploymentManaged::PRODUCTNAME); ?>
887 887
                             </button>
888 888
                             <span style='color: red;'>
889 889
                             <?php if ($hasMail == 0) { 
Please login to merge, or discard this patch.