Passed
Push — master ( c57d81...3d7ab7 )
by Maja
06:49
created
web/admin/overview_sp.php 1 patch
Spacing   +31 added lines, -31 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
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot));
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
     <?php echo $mapCode->bodyTagCode(); ?>>
76 76
     <?php
77 77
     echo $deco->productheader("ADMIN-SP");
78
-    function check_url ($host) {
78
+    function check_url($host) {
79 79
         $ch = curl_init();
80 80
         $timeout = 10;
81 81
         if ($ch === FALSE) {
82 82
             return NULL;
83 83
         }
84
-        curl_setopt ( $ch, CURLOPT_URL, 'http://'.$host );
85
-        curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
86
-        curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );
84
+        curl_setopt($ch, CURLOPT_URL, 'http://'.$host);
85
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
86
+        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
87 87
         curl_exec($ch);
88
-        $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
88
+        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
89 89
         if ($http_code == 200) {
90 90
             return 1;
91 91
         }
@@ -130,21 +130,21 @@  discard block
 block discarded – undo
130 130
         <?php
131 131
         if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
132 132
             echo "<tr>
133
-                        <td>" . _("Check another realm's reachability") . "</td>
133
+                        <td>" . _("Check another realm's reachability")."</td>
134 134
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
135 135
                               <input type='text' name='realm' id='realm'>
136 136
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
137
-                              <button type='submit'>" . _("Go!") . "</button>
137
+                              <button type='submit'>"._("Go!")."</button>
138 138
                             </form>
139 139
                         </td>
140 140
                     </tr>";
141 141
         }
142 142
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED
143 143
             echo "<tr>
144
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
144
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
145 145
                         <td>
146 146
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
147
-                              <button type='submit'>" . _("Go!") . "</button>
147
+                              <button type='submit'>" . _("Go!")."</button>
148 148
                            </form>
149 149
                         </td>
150 150
                     </tr>";
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
     <?php
156 156
     $hotspotProfiles = $my_inst->listDeployments();
157 157
     if (count($hotspotProfiles) == 0) { // no profiles yet.
158
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
158
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
159 159
     }
160 160
     if (count($hotspotProfiles) > 0) { // no profiles yet.
161
-        echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>";
161
+        echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>";
162 162
         // display an info box with the connection data
163 163
     }
164 164
    
@@ -170,19 +170,19 @@  discard block
 block discarded – undo
170 170
         ?>
171 171
         <div style='display: table-row; margin-bottom: 20px;'>
172 172
             <div class='profilebox' style='display: table-cell;'>
173
-                <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
173
+                <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
174 174
                 <table>
175 175
                     <tr>
176 176
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
177 177
                         <?php
178 178
                             if ($deploymentObject->host1_v4 !== NULL) {
179
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
179
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
180 180
                             }
181 181
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
182 182
                                 echo "<br/>";
183 183
                             }
184 184
                             if ($deploymentObject->host1_v6 !== NULL) {
185
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
185
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
186 186
                             }
187 187
                             ?>
188 188
                         </td>
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
                         <td><?php echo $deploymentObject->port1; ?></td>
191 191
                         <td>
192 192
                             <?php
193
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
194
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
195
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
193
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. 
194
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. 
195
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
196 196
                             ?>
197 197
                         </td>
198 198
                     </tr>
@@ -200,22 +200,22 @@  discard block
 block discarded – undo
200 200
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
201 201
                             <?php
202 202
                             if ($deploymentObject->host2_v4 !== NULL) {
203
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
203
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
204 204
                             }
205 205
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
206 206
                                 echo "<br/>";
207 207
                             }
208 208
                             if ($deploymentObject->host2_v6 !== NULL) {
209
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
209
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
210 210
                             }
211 211
                             ?></td>
212 212
                         <td><?php echo _("RADIUS port number: ") ?></td>
213 213
                         <td><?php echo $deploymentObject->port2; ?></td>
214 214
                         <td>
215 215
                             <?php
216
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
217
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
218
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
216
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
217
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. 
218
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
219 219
                             ?>
220 220
                         </td>
221 221
                     </tr>
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
                                     if (isset($res['FAILURE']) && $res[] > 0) {
267 267
                                         echo '<br>';
268 268
                                         if ($res['FAILURE'] == 2) {
269
-                                            echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
269
+                                            echo ' <span style="color: red;">'._("Activation failure.").'</span>';
270 270
                                         } else {
271 271
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
272
-                                                echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
272
+                                                echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
273 273
                                             } else {
274
-                                                echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
274
+                                                echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
275 275
                                             }
276 276
                                         }
277 277
                                     }
@@ -291,12 +291,12 @@  discard block
 block discarded – undo
291 291
                                     if ($res['FAILURE'] > 0) {
292 292
                                         echo '<br>';
293 293
                                         if ($res['FAILURE'] == 2) {
294
-                                            echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
294
+                                            echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
295 295
                                         } else {
296 296
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
297
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
297
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
298 298
                                             } else {
299
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
299
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
300 300
                                             }
301 301
                                         }
302 302
                                     }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                                 foreach ($retry as $key => $value) {
316 316
                                     if ($value == 1) {
317 317
                                     ?>
318
-                                    <input type="hidden" name='update[]' value='<?php echo $key;?>'>
318
+                                    <input type="hidden" name='update[]' value='<?php echo $key; ?>'>
319 319
                                     <?php
320 320
                                     }
321 321
                                 }
Please login to merge, or discard this patch.