@@ -607,8 +607,7 @@ |
||
607 | 607 | $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT); |
608 | 608 | if ($output === FALSE) { |
609 | 609 | $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg()); |
610 | - } |
|
611 | - else { |
|
610 | + } else { |
|
612 | 611 | echo $output; |
613 | 612 | } |
614 | 613 | } |
@@ -236,7 +236,7 @@ |
||
236 | 236 | const AUXATTRIB_SB_USERNAME = "ATTRIB-MANAGED-USERNAME"; |
237 | 237 | const AUXATTRIB_SB_USERID = "ATTRIB-MANAGED-USERID"; |
238 | 238 | const AUXATTRIB_SB_CERTSERIAL = "ATTRIB-MANAGED-CERTSERIAL"; |
239 | - const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN"; |
|
239 | + const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN"; |
|
240 | 240 | const AUXATTRIB_SB_CERTANNOTATION = "ATTRIB-MANAGED-CERTANNOTATION"; |
241 | 241 | const AUXATTRIB_SB_EXPIRY = "ATTRIB-MANAGED-EXPIRY"; /* MySQL timestamp format */ |
242 | 242 | const AUXATTRIB_TOKEN = "ATTRIB-TOKEN"; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | const ACTIONS = [ |
250 | 250 | // Inst-level actions. |
251 | 251 | API::ACTION_NEWINST_BY_REF => [ |
252 | - "REQ" => [API::AUXATTRIB_EXTERNALID,], |
|
252 | + "REQ" => [API::AUXATTRIB_EXTERNALID, ], |
|
253 | 253 | "OPT" => [ |
254 | 254 | 'general:geo_coordinates', |
255 | 255 | 'general:logo_file', |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | ], |
267 | 267 | ], |
268 | 268 | API::ACTION_NEWINST => [ |
269 | - "REQ" => [API::AUXATTRIB_INSTTYPE,], // "IdP", "SP" or "IdPSP" |
|
269 | + "REQ" => [API::AUXATTRIB_INSTTYPE, ], // "IdP", "SP" or "IdPSP" |
|
270 | 270 | "OPT" => [ |
271 | 271 | 'general:instname', |
272 | 272 | 'general:geo_coordinates', |
@@ -562,8 +562,8 @@ discard block |
||
562 | 562 | |
563 | 563 | case \core\Options::TYPECODE_COORDINATES: |
564 | 564 | $extension = \core\Options::TYPECODE_TEXT; |
565 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
566 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
565 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
566 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
567 | 567 | break; |
568 | 568 | case \core\Options::TYPECODE_TEXT: |
569 | 569 | // Fall-through: they all get the same treatment. |
@@ -573,18 +573,18 @@ discard block |
||
573 | 573 | // Fall-through: they all get the same treatment. |
574 | 574 | case \core\Options::TYPECODE_INTEGER: |
575 | 575 | $extension = $optionInfo['type']; |
576 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
577 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
576 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
577 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
578 | 578 | if ($optionInfo['flag'] == "ML") { |
579 | - $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG']; |
|
579 | + $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG']; |
|
580 | 580 | } |
581 | 581 | break; |
582 | 582 | case \core\Options::TYPECODE_FILE: |
583 | 583 | // Binary data is expected in base64 encoding. This is true also for PEM files! |
584 | 584 | $extension = $optionInfo['type']; |
585 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
586 | - file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE'])); |
|
587 | - $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension; |
|
585 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
586 | + file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE'])); |
|
587 | + $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension; |
|
588 | 588 | break; |
589 | 589 | default: |
590 | 590 | throw new Exception("We don't seem to know this type code!"); |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | public function returnSuccess($details) { |
614 | 614 | $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT); |
615 | 615 | if ($output === FALSE) { |
616 | - $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg()); |
|
616 | + $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ".json_last_error()." - ".json_last_error_msg()); |
|
617 | 617 | } |
618 | 618 | else { |
619 | 619 | echo $output; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . '/config/_config.php'; |
|
22 | +require_once dirname(dirname(__DIR__)).'/config/_config.php'; |
|
23 | 23 | |
24 | 24 | $uiElements = new web\lib\admin\UIElements(); |
25 | 25 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | // filesystem cleanup |
76 | 76 | case web\lib\common\FormElements::BUTTON_DELETE: |
77 | 77 | $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs(); |
78 | - echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>"; |
|
78 | + echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>"; |
|
79 | 79 | break; |
80 | 80 | default: |
81 | 81 | break; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'"); |
142 | 142 | // SELECT -> mysqli_result, not boolean |
143 | 143 | while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) { |
144 | - echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>"; |
|
144 | + echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>"; |
|
145 | 145 | $gross_admin = $gross_admin + $a->admin; |
146 | 146 | $gross_user = $gross_user + $a->user; |
147 | 147 | $gross_silverbullet = $gross_silverbullet + $a->silverbullet; |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | <td> |
151 | 151 | <?php |
152 | 152 | echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
153 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
154 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
153 | + "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
154 | + "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
155 | 155 | ?> |
156 | 156 | </td> |
157 | 157 | </tr> |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | <td> |
174 | 174 | <?php |
175 | 175 | echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
176 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
177 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
176 | + "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
177 | + "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
178 | 178 | ?> |
179 | 179 | </td> |
180 | 180 | </tr> |
@@ -26,7 +26,7 @@ discard block |
||
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 |
||
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)); |
@@ -99,21 +99,21 @@ discard block |
||
99 | 99 | <?php |
100 | 100 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
101 | 101 | echo "<tr> |
102 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"),$uiElements->nomenclatureInst) . "</td> |
|
102 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"), $uiElements->nomenclatureInst)."</td> |
|
103 | 103 | <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'> |
104 | 104 | <!--<input type='text' name='realm' id='realm'>--> |
105 | 105 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
106 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
106 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
107 | 107 | </form> |
108 | 108 | </td> |
109 | 109 | </tr>"; |
110 | 110 | } |
111 | 111 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED |
112 | 112 | echo "<tr> |
113 | - <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td> |
|
113 | + <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td> |
|
114 | 114 | <td> |
115 | 115 | <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'> |
116 | - <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
116 | + <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button> |
|
117 | 117 | </form> |
118 | 118 | </td> |
119 | 119 | </tr>"; |
@@ -124,10 +124,10 @@ discard block |
||
124 | 124 | <?php |
125 | 125 | $hotspotProfiles = $my_inst->listDeployments(); |
126 | 126 | if (count($hotspotProfiles) == 0) { // no profiles yet. |
127 | - echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
127 | + echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>"; |
|
128 | 128 | } |
129 | 129 | if (count($hotspotProfiles) > 0) { // no profiles yet. |
130 | - echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>"; |
|
130 | + echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>"; |
|
131 | 131 | // display an info box with the connection data |
132 | 132 | } |
133 | 133 | |
@@ -146,19 +146,19 @@ discard block |
||
146 | 146 | ?> |
147 | 147 | <div style='display: table-row; margin-bottom: 20px;'> |
148 | 148 | <div class='profilebox' style='display: table-cell;'> |
149 | - <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2> |
|
149 | + <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2> |
|
150 | 150 | <table> |
151 | 151 | <tr> |
152 | 152 | <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/> |
153 | 153 | <?php |
154 | 154 | if ($deploymentObject->host1_v4 !== NULL) { |
155 | - echo _("IPv4") . ": " . $deploymentObject->host1_v4; |
|
155 | + echo _("IPv4").": ".$deploymentObject->host1_v4; |
|
156 | 156 | } |
157 | 157 | if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) { |
158 | 158 | echo "<br/>"; |
159 | 159 | } |
160 | 160 | if ($deploymentObject->host1_v6 !== NULL) { |
161 | - echo _("IPv6") . ": " . $deploymentObject->host1_v6; |
|
161 | + echo _("IPv6").": ".$deploymentObject->host1_v6; |
|
162 | 162 | } |
163 | 163 | ?> |
164 | 164 | </td> |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | <td><?php echo $deploymentObject->port1; ?></td> |
167 | 167 | <td> |
168 | 168 | <?php |
169 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . |
|
170 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . |
|
171 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>"; |
|
169 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. |
|
170 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. |
|
171 | + "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>"; |
|
172 | 172 | ?> |
173 | 173 | </td> |
174 | 174 | </tr> |
@@ -176,22 +176,22 @@ discard block |
||
176 | 176 | <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong> |
177 | 177 | <?php |
178 | 178 | if ($deploymentObject->host2_v4 !== NULL) { |
179 | - echo _("IPv4") . ": " . $deploymentObject->host2_v4; |
|
179 | + echo _("IPv4").": ".$deploymentObject->host2_v4; |
|
180 | 180 | } |
181 | 181 | if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) { |
182 | 182 | echo "<br/>"; |
183 | 183 | } |
184 | 184 | if ($deploymentObject->host2_v6 !== NULL) { |
185 | - echo _("IPv6") . ": " . $deploymentObject->host2_v6; |
|
185 | + echo _("IPv6").": ".$deploymentObject->host2_v6; |
|
186 | 186 | } |
187 | 187 | ?></td> |
188 | 188 | <td><?php echo _("RADIUS port number: ") ?></td> |
189 | 189 | <td><?php echo $deploymentObject->port2; ?></td> |
190 | 190 | <td> |
191 | 191 | <?php |
192 | - echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] . |
|
193 | - "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . |
|
194 | - "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>"; |
|
192 | + echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon']. |
|
193 | + "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. |
|
194 | + "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>"; |
|
195 | 195 | ?> |
196 | 196 | </td> |
197 | 197 | </tr> |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | if (isset($res['FAILURE']) && $res['FAILURE'] > 0) { |
243 | 243 | echo '<br>'; |
244 | 244 | if ($res['FAILURE'] == 2) { |
245 | - echo ' <span style="color: red;">' . _("Activation failure.") . '</span>'; |
|
245 | + echo ' <span style="color: red;">'._("Activation failure.").'</span>'; |
|
246 | 246 | } else { |
247 | 247 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
248 | - echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>'; |
|
248 | + echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>'; |
|
249 | 249 | } else { |
250 | - echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>'; |
|
250 | + echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>'; |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | } |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | if ($res['FAILURE'] > 0) { |
268 | 268 | echo '<br>'; |
269 | 269 | if ($res['FAILURE'] == 2) { |
270 | - echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>'; |
|
270 | + echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>'; |
|
271 | 271 | } else { |
272 | 272 | if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') { |
273 | - echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>'; |
|
273 | + echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>'; |
|
274 | 274 | } else { |
275 | - echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>'; |
|
275 | + echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>'; |
|
276 | 276 | } |
277 | 277 | } |
278 | 278 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
3 | 3 | /** |
4 | - * check if URL responds with 200 |
|
5 | - * |
|
6 | - * @param string $srv server name |
|
7 | - * @return integer or NULL |
|
4 | + * check if URL responds with 200 |
|
5 | + * |
|
6 | + * @param string $srv server name |
|
7 | + * @return integer or NULL |
|
8 | 8 | */ |
9 | 9 | function checkConfigRADIUSDaemon ($srv) { |
10 | 10 | $ch = curl_init(); |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
2 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
3 | 3 | /** |
4 | 4 | * check if URL responds with 200 |
5 | 5 | * |
6 | 6 | * @param string $srv server name |
7 | 7 | * @return integer or NULL |
8 | 8 | */ |
9 | -function checkConfigRADIUSDaemon ($srv) { |
|
9 | +function checkConfigRADIUSDaemon($srv) { |
|
10 | 10 | $ch = curl_init(); |
11 | 11 | if ($ch === FALSE) { |
12 | 12 | return NULL; |
13 | 13 | } |
14 | 14 | $timeout = 10; |
15 | - curl_setopt ( $ch, CURLOPT_URL, $srv ); |
|
16 | - curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
17 | - curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout ); |
|
15 | + curl_setopt($ch, CURLOPT_URL, $srv); |
|
16 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
17 | + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); |
|
18 | 18 | curl_exec($ch); |
19 | - $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); |
|
19 | + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
|
20 | 20 | if ($http_code == 200) { |
21 | 21 | return 1; |
22 | 22 | } |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | } |
53 | 53 | $siteStatus = array(); |
54 | 54 | foreach (array_keys($brokenDeployments) as $server_id) { |
55 | - print "check $server_id " . $radiusSite[$server_id] . "\n"; |
|
56 | - $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://' . $radiusSite[$server_id]); |
|
55 | + print "check $server_id ".$radiusSite[$server_id]."\n"; |
|
56 | + $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://'.$radiusSite[$server_id]); |
|
57 | 57 | if ($siteStatus[$server_id]) { |
58 | 58 | echo "\ncheck radius\n"; |
59 | 59 | echo \config\Diagnostics::RADIUSSPTEST['port']."\n"; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * ****************************************************************************** |
10 | 10 | */ |
11 | 11 | |
12 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
12 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
13 | 13 | |
14 | 14 | $auth = new \web\lib\admin\Authentication(); |
15 | 15 | $auth->authenticate(); |
@@ -22,30 +22,30 @@ discard block |
||
22 | 22 | |
23 | 23 | ?> |
24 | 24 | |
25 | -<h1><?php echo _("User Authentication Records");?></h1> |
|
26 | -<p><?php echo _("Note that:");?></p> |
|
25 | +<h1><?php echo _("User Authentication Records"); ?></h1> |
|
26 | +<p><?php echo _("Note that:"); ?></p> |
|
27 | 27 | <ul> |
28 | - <li><?php echo _("Authentication records are deleted after six months retention time");?></li> |
|
29 | - <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots");?></li> |
|
30 | - <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems");?></li> |
|
28 | + <li><?php echo _("Authentication records are deleted after six months retention time"); ?></li> |
|
29 | + <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots"); ?></li> |
|
30 | + <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems"); ?></li> |
|
31 | 31 | </ul> |
32 | 32 | <table class='authrecord'> |
33 | 33 | <tr> |
34 | - <td><strong><?php echo _("Timestamp");?></strong></td> |
|
35 | - <td><strong><?php echo _("Credential");?></strong></td> |
|
36 | - <td><strong><?php echo _("MAC Address");?></strong></td> |
|
37 | - <td><strong><?php echo _("Result");?></strong></td> |
|
38 | - <td><strong><?php echo _("Operator Domain");?></strong></td> |
|
34 | + <td><strong><?php echo _("Timestamp"); ?></strong></td> |
|
35 | + <td><strong><?php echo _("Credential"); ?></strong></td> |
|
36 | + <td><strong><?php echo _("MAC Address"); ?></strong></td> |
|
37 | + <td><strong><?php echo _("Result"); ?></strong></td> |
|
38 | + <td><strong><?php echo _("Operator Domain"); ?></strong></td> |
|
39 | 39 | </tr> |
40 | 40 | <?php |
41 | 41 | $userAuthData = $profile->getUserAuthRecords($userInt); |
42 | 42 | foreach ($userAuthData as $oneRecord) { |
43 | - echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail" )."'>" |
|
43 | + echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail")."'>" |
|
44 | 44 | . "<td>".$oneRecord['TIMESTAMP']."</td>" |
45 | - . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'],"@"))."</td>" |
|
45 | + . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'], "@"))."</td>" |
|
46 | 46 | . "<td>".$oneRecord['MAC']."</td>" |
47 | 47 | . "<td>".($oneRecord['RESULT'] == "Access-Accept" ? _("Success") : _("Failure"))."</td>" |
48 | - . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)",1)."</td>" |
|
48 | + . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)", 1)."</td>" |
|
49 | 49 | . "</tr>"; |
50 | 50 | } |
51 | 51 | ?> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $this->installerPath = $cache['path']; |
84 | 84 | if ($this->installerPath !== NULL && $token === NULL && $password === NULL) { |
85 | 85 | $this->loggerInstance->debug(4, "Using cached installer for: $device\n"); |
86 | - $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor"; |
|
86 | + $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor"; |
|
87 | 87 | $installerProperties['mime'] = $cache['mime']; |
88 | 88 | } else { |
89 | 89 | $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $token, $password); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done"); |
172 | 172 | $installer = $dev->writeInstaller(); |
173 | 173 | $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete"); |
174 | - $iPath = $dev->FPATH . '/tmp/' . $installer; |
|
174 | + $iPath = $dev->FPATH.'/tmp/'.$installer; |
|
175 | 175 | if ($iPath && is_file($iPath)) { |
176 | 176 | if (isset($dev->options['mime'])) { |
177 | 177 | $out['mime'] = $dev->options['mime']; |
@@ -179,17 +179,17 @@ discard block |
||
179 | 179 | $info = new \finfo(); |
180 | 180 | $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE); |
181 | 181 | } |
182 | - $this->installerPath = $dev->FPATH . '/' . $installer; |
|
182 | + $this->installerPath = $dev->FPATH.'/'.$installer; |
|
183 | 183 | rename($iPath, $this->installerPath); |
184 | 184 | $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep(); |
185 | 185 | $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap); |
186 | 186 | if (\config\Master::DEBUG_LEVEL < 4) { |
187 | - \core\common\Entity::rrmdir($dev->FPATH . '/tmp'); |
|
187 | + \core\common\Entity::rrmdir($dev->FPATH.'/tmp'); |
|
188 | 188 | } |
189 | - $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . "\n"); |
|
190 | - $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor"; |
|
189 | + $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap."\n"); |
|
190 | + $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor"; |
|
191 | 191 | } else { |
192 | - $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "\n"); |
|
192 | + $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."\n"); |
|
193 | 193 | $out['link'] = 0; |
194 | 194 | } |
195 | 195 | } |
@@ -302,13 +302,13 @@ discard block |
||
302 | 302 | $file = $this->installerPath; |
303 | 303 | $filetype = $output['mime']; |
304 | 304 | $this->loggerInstance->debug(4, "installer MIME type:$filetype\n"); |
305 | - header("Content-type: " . $filetype); |
|
305 | + header("Content-type: ".$filetype); |
|
306 | 306 | if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set |
307 | - header('Content-Disposition: inline; filename="' . basename($file) . '"'); |
|
307 | + header('Content-Disposition: inline; filename="'.basename($file).'"'); |
|
308 | 308 | } else { |
309 | 309 | header('Content-Transfer-Encoding: base64'); |
310 | 310 | } |
311 | - header('Content-Length: ' . filesize($file)); |
|
311 | + header('Content-Length: '.filesize($file)); |
|
312 | 312 | ob_clean(); |
313 | 313 | flush(); |
314 | 314 | readfile($file); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); |
330 | 330 | $offset = 60 * 60 * 24 * 30; |
331 | 331 | // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it |
332 | - $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; |
|
332 | + $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT"; |
|
333 | 333 | $blob = $inputImage; |
334 | 334 | |
335 | 335 | if ($resize === TRUE) { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | $filetype = 'image/png'; // default, only one code path where it can become different |
385 | 385 | list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn); |
386 | 386 | if ($resize) { |
387 | - $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png'; |
|
387 | + $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png'; |
|
388 | 388 | } |
389 | 389 | if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE |
390 | 390 | $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n"); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | if (!isset($device['match'])) { |
478 | 478 | continue; |
479 | 479 | } |
480 | - if (preg_match('/' . $device['match'] . '/', $browser)) { |
|
480 | + if (preg_match('/'.$device['match'].'/', $browser)) { |
|
481 | 481 | return $this->returnDevice($devId, $device); |
482 | 482 | } |
483 | 483 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | ?> |
22 | 22 | <?php |
23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $languageInstance = new \core\common\Language(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $invitationObject = new core\SilverbulletInvitation($validator->token(filter_input(INPUT_POST, 'token'))); |
39 | 39 | header("Content-Type:text/html;charset=utf-8"); |
40 | 40 | ?> |
41 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
41 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
42 | 42 | <img style='float:none' src='data:image/png;base64,<?php |
43 | 43 | $size = 10; |
44 | 44 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
@@ -51,5 +51,5 @@ discard block |
||
51 | 51 | if (empty($rawQr)) { |
52 | 52 | throw new Exception("Something went seriously wrong during QR code generation!"); |
53 | 53 | } |
54 | -echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size));?>'/> |
|
55 | -<p>(<a href='<?php echo $invitationObject->link();?>'><?php echo $invitationObject->link();?>)</a></p> |
|
54 | +echo base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, $size)); ?>'/> |
|
55 | +<p>(<a href='<?php echo $invitationObject->link(); ?>'><?php echo $invitationObject->link(); ?>)</a></p> |
@@ -26,7 +26,7 @@ discard block |
||
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 |
||
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->nomenclatureInst)); |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | $readonly = \config\Master::DB['INST']['readonly']; |
85 | 85 | $profiles_for_this_idp = $my_inst->listProfiles(); |
86 | 86 | if (count($profiles_for_this_idp) == 0) { // no profiles yet. |
87 | - echo "<h2>" . sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
87 | + echo "<h2>".sprintf(_("There are not yet any profiles for your %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
88 | 88 | } |
89 | 89 | if (count($profiles_for_this_idp) > 0) { // no profiles yet. |
90 | - echo "<h2>" . sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst) . "</h2>"; |
|
90 | + echo "<h2>".sprintf(_("Profiles for this %s"), $uiElements->nomenclatureInst)."</h2>"; |
|
91 | 91 | } |
92 | 92 | // if there is one profile and it is of type Silver Bullet, display a very |
93 | 93 | // simple widget with just a "Manage" button |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | echo _("Information needed!"); |
114 | 114 | echo "<ul style='margin:1px'>"; |
115 | 115 | foreach ($completeness as $missing_attrib) { |
116 | - echo "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
116 | + echo "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
117 | 117 | } |
118 | 118 | echo "</ul>"; |
119 | 119 | echo "</div>"; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | if ($readonly === FALSE) { |
128 | 128 | ?> |
129 | 129 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
130 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
130 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
131 | 131 | </form> |
132 | 132 | <?php |
133 | 133 | } |
@@ -159,21 +159,21 @@ discard block |
||
159 | 159 | $has_overrides = TRUE; |
160 | 160 | } |
161 | 161 | } |
162 | - $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>" . _("<strong>EAP Types</strong> (in order of preference):") . "<br/>"; |
|
162 | + $buffer_eaptypediv = "<div style='margin-bottom:40px; float:left;'>"._("<strong>EAP Types</strong> (in order of preference):")."<br/>"; |
|
163 | 163 | $typelist = $profile_list->getEapMethodsinOrderOfPreference(); |
164 | 164 | $allcomplete = TRUE; |
165 | 165 | foreach ($typelist as $eaptype) { |
166 | 166 | $buffer_eaptypediv .= $eaptype->getPrintableRep(); |
167 | 167 | $completeness = $profile_list->isEapTypeDefinitionComplete($eaptype); |
168 | 168 | if ($completeness === true) { |
169 | - $buffer_eaptypediv .= " <div class='acceptable'>" . _("OK") . "</div>"; |
|
169 | + $buffer_eaptypediv .= " <div class='acceptable'>"._("OK")."</div>"; |
|
170 | 170 | } else { |
171 | 171 | $buffer_eaptypediv .= " <div class='notacceptable'>"; |
172 | 172 | $buffer_eaptypediv .= _("Information needed!"); |
173 | 173 | if (is_array($completeness)) { |
174 | 174 | $buffer_eaptypediv .= "<ul style='margin:1px'>"; |
175 | 175 | foreach ($completeness as $missing_attrib) { |
176 | - $buffer_eaptypediv .= "<li>" . $uiElements->displayName($missing_attrib) . "</li>"; |
|
176 | + $buffer_eaptypediv .= "<li>".$uiElements->displayName($missing_attrib)."</li>"; |
|
177 | 177 | } |
178 | 178 | $buffer_eaptypediv .= "</ul>"; |
179 | 179 | } |
@@ -185,12 +185,12 @@ discard block |
||
185 | 185 | foreach ($attribs as $attrib) { |
186 | 186 | if ($attrib['level'] == "Method" && !preg_match("/^internal:/", $attrib['name']) && !$justOnce) { |
187 | 187 | $justOnce = TRUE; |
188 | - $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='" . _("Options on EAP Method/Device level are in effect.") . "'>"; |
|
188 | + $buffer_eaptypediv .= "<img src='../resources/images/icons/Letter-E-blue-icon.png' alt='"._("Options on EAP Method/Device level are in effect.")."'>"; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | $buffer_eaptypediv .= "<br/>"; |
192 | 192 | } |
193 | - $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>" . sprintf(_("Profile: %s"), $profile_name) . "</h2>"; |
|
193 | + $buffer_headline = "<div style='padding-bottom:20px;'><h2 style='overflow:auto; display:inline; padding-bottom: 10px;'>".sprintf(_("Profile: %s"), $profile_name)."</h2>"; |
|
194 | 194 | |
195 | 195 | $buffer_headline .= "<span style='float:right;'>"; |
196 | 196 | $readiness = $profile_list->readinessLevel(); |
@@ -222,18 +222,18 @@ discard block |
||
222 | 222 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == "LOCAL") { |
223 | 223 | $diagUrl = "../diag/"; |
224 | 224 | } else { |
225 | - $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] . "/diag/"; |
|
225 | + $diagUrl = \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS']."/diag/"; |
|
226 | 226 | } |
227 | - echo "<form action='" . $diagUrl . "action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
227 | + echo "<form action='".$diagUrl."action_realmcheck.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
|
228 | 228 | <input type='hidden' name='comefrom' id='comefrom-$profilecount' value='$link'/> |
229 | - <button type='submit' name='profile_action' value='check' " . ($has_realm ? "" : "disabled='disabled' title='" . _("The realm can only be checked if you configure the realm!") . "'") . "> |
|
230 | - " . _("Check realm reachability") . " |
|
229 | + <button type='submit' name='profile_action' value='check' ".($has_realm ? "" : "disabled='disabled' title='"._("The realm can only be checked if you configure the realm!")."'")."> |
|
230 | + " . _("Check realm reachability")." |
|
231 | 231 | </button> |
232 | 232 | </form>"; |
233 | 233 | } |
234 | 234 | echo "<form action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
235 | - <button type='submit' name='profile_action' value='check' " . ($has_eaptypes ? "" : "disabled='disabled' title='" . _("You have not fully configured any supported EAP types!") . "'") . "> |
|
236 | - " . _("Installer Fine-Tuning and Download") . " |
|
235 | + <button type='submit' name='profile_action' value='check' ".($has_eaptypes ? "" : "disabled='disabled' title='"._("You have not fully configured any supported EAP types!")."'")."> |
|
236 | + " . _("Installer Fine-Tuning and Download")." |
|
237 | 237 | </button> |
238 | 238 | </form> |
239 | 239 | </div>"; |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | echo " <div class='buttongroupprofilebox' style='clear:both;'> |
243 | 243 | <form action='edit_profile.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
244 | 244 | <hr/> |
245 | - <button type='submit' name='profile_action' value='edit'>" . _("Edit") . "</button> |
|
245 | + <button type='submit' name='profile_action' value='edit'>"._("Edit")."</button> |
|
246 | 246 | </form> |
247 | 247 | <form action='edit_profile_result.php?inst_id=$my_inst->identifier&profile_id=$profile_list->identifier' method='post' accept-charset='UTF-8'> |
248 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "' onclick=\"return confirm('" . sprintf(_("Do you really want to delete the profile %s?"), $profile_name) . "')\"> |
|
249 | - " . _("Delete") . " |
|
248 | + <button class='delete' type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_DELETE."' onclick=\"return confirm('".sprintf(_("Do you really want to delete the profile %s?"), $profile_name)."')\"> |
|
249 | + " . _("Delete")." |
|
250 | 250 | </button> |
251 | 251 | </form> |
252 | 252 | </div>"; |
@@ -255,10 +255,10 @@ discard block |
||
255 | 255 | // dummy width to keep a little distance |
256 | 256 | echo "<div style='width:20px;'></div>"; |
257 | 257 | if ($readiness == core\AbstractProfile::READINESS_LEVEL_SHOWTIME) { |
258 | - $idpLevelUrl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
259 | - echo "<div style='display: table-cell; text-align:center;'><p><strong>" . _("User Download Link") . "</strong></p>"; |
|
260 | - $displayurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
261 | - $QRurl = $idpLevelUrl . "&profile=" . $profile_list->identifier; |
|
258 | + $idpLevelUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].dirname(dirname($_SERVER['SCRIPT_NAME']))."?idp=".$my_inst->identifier; |
|
259 | + echo "<div style='display: table-cell; text-align:center;'><p><strong>"._("User Download Link")."</strong></p>"; |
|
260 | + $displayurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
261 | + $QRurl = $idpLevelUrl."&profile=".$profile_list->identifier; |
|
262 | 262 | $qrCode = new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([ |
263 | 263 | 'outputType' => \chillerlan\QRCode\QRCode::OUTPUT_IMAGE_PNG, |
264 | 264 | 'eccLevel' => \chillerlan\QRCode\QRCode::ECC_H, |
@@ -270,16 +270,16 @@ discard block |
||
270 | 270 | if (empty($rawQr)) { |
271 | 271 | throw new Exception("Something went seriously wrong during QR code generation!"); |
272 | 272 | } |
273 | - $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
273 | + $uri = "data:image/png;base64,".base64_encode($uiElements->pngInjectConsortiumLogo($rawQr, web\lib\admin\UIElements::QRCODE_PIXELS_PER_SYMBOL)); |
|
274 | 274 | $size = getimagesize($uri); |
275 | - echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
|
275 | + echo "<img width='".($size[0] / 4)."' height='".($size[1] / 4)."' src='$uri' alt='QR-code'/>"; |
|
276 | 276 | |
277 | 277 | //echo "<nobr>$displayurl</nobr></a>"; |
278 | 278 | echo "<p>$displayurl</p></a>"; |
279 | 279 | echo "</div>"; |
280 | 280 | // dummy width to keep a little distance |
281 | 281 | echo "<div style='width:20px;'></div>"; |
282 | - echo "<div style='display: table-cell; min-width:200px;'><p><strong>" . _("User Downloads") . "</strong></p><table>"; |
|
282 | + echo "<div style='display: table-cell; min-width:200px;'><p><strong>"._("User Downloads")."</strong></p><table>"; |
|
283 | 283 | $stats = $profile_list->getUserDownloadStats(); |
284 | 284 | foreach ($stats as $dev => $count) { |
285 | 285 | echo "<tr><td><strong>$dev</strong></td><td>$count</td></tr>"; |
@@ -92,10 +92,10 @@ discard block |
||
92 | 92 | <NodeName>AAAServerTrustRoot</NodeName>'; |
93 | 93 | foreach ($this->attributes['internal:CAs'][0] as $oneCert) { |
94 | 94 | $retval .= '<Node> |
95 | - <NodeName>' . $oneCert['uuid'] . '</NodeName> |
|
95 | + <NodeName>' . $oneCert['uuid'].'</NodeName> |
|
96 | 96 | <Node> |
97 | 97 | <NodeName>CertSHA256Fingerprint</NodeName> |
98 | - <Value>' . $oneCert['sha256'] . '</Value> |
|
98 | + <Value>' . $oneCert['sha256'].'</Value> |
|
99 | 99 | </Node> |
100 | 100 | </Node> |
101 | 101 | '; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $now = new \DateTime(); |
115 | 115 | return '<Node> |
116 | 116 | <NodeName>CreationDate</NodeName> |
117 | - <Value>' . $now->format("Y-m-d") . "T" . $now->format("H:i:s") . "Z" . '</Value> |
|
117 | + <Value>' . $now->format("Y-m-d")."T".$now->format("H:i:s")."Z".'</Value> |
|
118 | 118 | </Node>'; |
119 | 119 | } |
120 | 120 | |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | <NodeName>HomeSP</NodeName> |
129 | 129 | <Node> |
130 | 130 | <NodeName>FriendlyName</NodeName> |
131 | - <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']) . '</Value> |
|
131 | + <Value>' . sprintf(_("%s via Passpoint"), \config\ConfAssistant::CONSORTIUM['display_name']).'</Value> |
|
132 | 132 | </Node> |
133 | 133 | <Node> |
134 | 134 | <NodeName>FQDN</NodeName> |
135 | - <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */ . '</Value> |
|
135 | + <Value>' . $this->attributes['eap:server_name'][0] /* what, only one FQDN allowed? */.'</Value> |
|
136 | 136 | </Node> |
137 | 137 | <Node> |
138 | 138 | <NodeName>RoamingConsortiumOI</NodeName> |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $oiList .= ","; |
149 | 149 | } |
150 | 150 | } |
151 | - $retval .= $oiList . '</Value> |
|
151 | + $retval .= $oiList.'</Value> |
|
152 | 152 | </Node> |
153 | 153 | </Node> |
154 | 154 | '; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | <NodeName>Credential</NodeName> |
166 | 166 | <Node> |
167 | 167 | <NodeName>Realm</NodeName> |
168 | - <Value>' . $this->attributes['internal:realm'][0] . '</Value> |
|
168 | + <Value>' . $this->attributes['internal:realm'][0].'</Value> |
|
169 | 169 | </Node>'; |
170 | 170 | /* the example file I got did not include CreationDate, so omit it |
171 | 171 | * |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | </Node> |
181 | 181 | <Node> |
182 | 182 | <NodeName>CertSHA256Fingerprint</NodeName> |
183 | - <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */ . '</Value> |
|
183 | + <Value>' . strtoupper($this->clientCert["sha256"]) /* the actual cert has to go... where? */.'</Value> |
|
184 | 184 | </Node> |
185 | 185 | </Node> |
186 | 186 | </Node> |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | // foresee signing. |
299 | 299 | // but if they ever change their mind, we are prepared |
300 | 300 | |
301 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
301 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
302 | 302 | if ($outputFromSigning === FALSE) { |
303 | 303 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
304 | 304 | } |