@@ -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; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | namespace core; |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | $instMgmt = new \core\UserManagement(); |
27 | 27 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
52 | 52 | <tr> |
53 | 53 | <td> |
54 | -<?php echo "" . _("Unique Identifier") ?> |
|
54 | +<?php echo ""._("Unique Identifier") ?> |
|
55 | 55 | </td> |
56 | 56 | <td> |
57 | 57 | </td> |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | <div> |
65 | 65 | <?php |
66 | 66 | if (CONFIG['DB']['USER']['readonly'] === FALSE) { |
67 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
67 | + echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if ($user->isFederationAdmin()) { |
71 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; |
|
71 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; |
|
72 | 72 | } |
73 | 73 | if ($user->isSuperadmin()) { |
74 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
74 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; |
|
75 | 75 | } |
76 | 76 | ?> |
77 | 77 | </div> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
84 | 84 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual |
85 | 85 | } |
86 | - $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>"; |
|
86 | + $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>"; |
|
87 | 87 | } else { |
88 | 88 | $helptext = ""; |
89 | 89 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // we need to run the Federation constructor |
93 | 93 | $cat = new \core\CAT; |
94 | 94 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) |
95 | - echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst) . "</h2>"; |
|
95 | + echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst)."</h2>"; |
|
96 | 96 | $instlist = []; |
97 | 97 | $my_idps = []; |
98 | 98 | $myFeds = []; |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | $country[$key] = $row['country']; |
115 | 115 | $name[$key] = $row['name']; |
116 | 116 | } |
117 | - echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureInst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
117 | + echo "<tr><th>".sprintf(_("%s Name"), $uiElements->nomenclatureInst)."</th><th>".sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst)."</th><th>".(CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "")."</th></tr>"; |
|
118 | 118 | foreach ($myFeds as $fed_id => $fed_name) { |
119 | 119 | /// nomenclature 'fed', fed name, nomenclature 'inst' |
120 | - echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst) . "</strong></td></tr>"; |
|
120 | + echo "<tr><td colspan='3'><strong>".sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst)."</strong></td></tr>"; |
|
121 | 121 | |
122 | 122 | $fed_idps = $my_idps[$fed_id]; |
123 | 123 | asort($fed_idps); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $oneinst = $instlist[$index]; |
126 | 126 | $the_inst = $oneinst['object']; |
127 | 127 | |
128 | - echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>" . $oneinst['name'] . "</a></td><td>"; |
|
128 | + echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>".$oneinst['name']."</a></td><td>"; |
|
129 | 129 | echo "<input type='hidden' name='inst' value='$the_inst->identifier'>"; |
130 | 130 | $admins = $the_inst->listOwners(); |
131 | 131 | $blessedUser = FALSE; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $coadmin = new \core\User($username['ID']); |
135 | 135 | $coadmin_name = $coadmin->getAttributes('user:realname'); |
136 | 136 | if (count($coadmin_name) > 0) { |
137 | - echo $coadmin_name[0]['value'] . "<br/>"; |
|
137 | + echo $coadmin_name[0]['value']."<br/>"; |
|
138 | 138 | unset($admins[$number]); |
139 | 139 | } |
140 | 140 | } else { // don't list self |
@@ -150,25 +150,25 @@ discard block |
||
150 | 150 | } |
151 | 151 | echo "</td><td>"; |
152 | 152 | if ($blessedUser && CONFIG['DB']['INST']['readonly'] === FALSE) { |
153 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
153 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>"; |
|
154 | 154 | } |
155 | 155 | echo "</td></tr>"; |
156 | 156 | } |
157 | 157 | } |
158 | 158 | echo "</table>"; |
159 | 159 | } else { |
160 | - echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
160 | + echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
161 | 161 | } |
162 | 162 | if (CONFIG['DB']['INST']['readonly'] === FALSE) { |
163 | 163 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL) { |
164 | - echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
164 | + echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst)."</p>"; |
|
165 | 165 | echo "<hr/> |
166 | 166 | <div style='white-space: nowrap;'> |
167 | 167 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . |
168 | - sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst) . |
|
168 | + sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst). |
|
169 | 169 | " <input type='text' id='token' name='token'/> |
170 | 170 | <button type='submit'>" . |
171 | - _("Go!") . " |
|
171 | + _("Go!")." |
|
172 | 172 | </button> |
173 | 173 | </form> |
174 | 174 | </div>"; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | <div style='white-space: nowrap;'> |
178 | 178 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
179 | 179 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
180 | - sprintf(_("New %s Registration"), $uiElements->nomenclatureInst) . " |
|
180 | + sprintf(_("New %s Registration"), $uiElements->nomenclatureInst)." |
|
181 | 181 | </button> |
182 | 182 | </form> |
183 | 183 | </div>"; |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | /* |
21 | 21 | * Class autoloader invocation, should be included prior to any other code at the entry points to the application |
22 | 22 | */ |
23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/core/phpqrcode.php"; |
|
23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/core/phpqrcode.php"; |
|
25 | 25 | const QRCODE_PIXELS_PER_SYMBOL = 12; |
26 | 26 | |
27 | 27 | $auth = new \web\lib\admin\Authentication(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $fed = new \core\Federation($inst->federation); |
56 | 56 | $allowSb = $fed->getAttributes("fed:silverbullet"); |
57 | 57 | if (count($allowSb) == 0) { |
58 | - throw new Exception("We were told to create a new SB profile, but this " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " does not allow SB at all!"); |
|
58 | + throw new Exception("We were told to create a new SB profile, but this ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." does not allow SB at all!"); |
|
59 | 59 | } |
60 | 60 | // okay, new SB profiles are allowed. |
61 | 61 | // but is there a support:email attribute on inst level? |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // Create one. |
67 | 67 | $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET); |
68 | 68 | // and modify the REQUEST_URI to add the new profile ID |
69 | - $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier; |
|
69 | + $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier; |
|
70 | 70 | $_GET['profile_id'] = $newProfile->identifier; |
71 | 71 | $profile = $newProfile; |
72 | 72 | } else { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | if (isset($_POST['command'])) { |
92 | 92 | switch ($_POST['command']) { |
93 | 93 | case \web\lib\common\FormElements::BUTTON_CLOSE: |
94 | - header("Location: overview_idp.php?inst_id=" . $inst->identifier); |
|
94 | + header("Location: overview_idp.php?inst_id=".$inst->identifier); |
|
95 | 95 | break; |
96 | 96 | case \web\lib\common\FormElements::BUTTON_TERMSOFUSE: |
97 | 97 | if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | break; |
135 | 135 | } |
136 | 136 | $properName = $validator->User($elements[0]); |
137 | - $properDate = new DateTime($elements[1] . " 00:00:00"); |
|
137 | + $properDate = new DateTime($elements[1]." 00:00:00"); |
|
138 | 138 | $numberOfActivations = $elements[2] ?? 1; |
139 | 139 | $number = $validator->integer($numberOfActivations); |
140 | 140 | if ($number === FALSE) { // invalid input received, default to sane |
@@ -227,18 +227,18 @@ discard block |
||
227 | 227 | // warn and ask for confirmation unless already confirmed |
228 | 228 | if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") { |
229 | 229 | echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS"); |
230 | - echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>"; |
|
231 | - echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>"; |
|
232 | - echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>"; |
|
230 | + echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>"; |
|
231 | + echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>"; |
|
232 | + echo "<p>"._("Do you want the system to send this mail anyway?")."</p>"; |
|
233 | 233 | echo $formtext; |
234 | - echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>"; |
|
234 | + echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>"; |
|
235 | 235 | echo "</form>"; |
236 | 236 | echo $formtext; |
237 | - echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>"; |
|
237 | + echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>"; |
|
238 | 238 | echo "<input type='hidden' name='address' value='$properEmail'</>"; |
239 | - echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>"; |
|
239 | + echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>"; |
|
240 | 240 | echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>"; |
241 | - echo "<button type='submit'>" . _("Send anyway.") . "</button>"; |
|
241 | + echo "<button type='submit'>"._("Send anyway.")."</button>"; |
|
242 | 242 | echo "</form>"; |
243 | 243 | echo $deco->footer(); |
244 | 244 | exit; |
@@ -348,19 +348,19 @@ discard block |
||
348 | 348 | case "NOSTIPULATION": |
349 | 349 | break; |
350 | 350 | case "EMAIL-SENT": |
351 | - echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost; |
|
351 | + echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost; |
|
352 | 352 | break; |
353 | 353 | case "EMAIL-NOTSENT": |
354 | - echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost; |
|
354 | + echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost; |
|
355 | 355 | break; |
356 | 356 | case "SMS-SENT": |
357 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost; |
|
357 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost; |
|
358 | 358 | break; |
359 | 359 | case "SMS-NOTSENT": |
360 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost; |
|
360 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost; |
|
361 | 361 | break; |
362 | 362 | case "SMS-FRAGMENT": |
363 | - echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost; |
|
363 | + echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost; |
|
364 | 364 | break; |
365 | 365 | } |
366 | 366 | ?> |
@@ -428,23 +428,23 @@ discard block |
||
428 | 428 | $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display']; |
429 | 429 | |
430 | 430 | $bufferText = "<div class='sb-certificate-summary ca-summary' $style> |
431 | - <div class='sb-certificate-details'>" . _("Device:") . " " . $display . |
|
432 | - "<br>" . _("Serial Number:") . " " . dechex($oneCert->serial) . |
|
433 | - "<br>" . _("CN:") . " " . explode('@', $oneCert->username)[0] . "@…" . |
|
434 | - "<br>" . _("Expiry:") . " " . $oneCert->expiry . |
|
435 | - "<br>" . _("Issued:") . " " . $oneCert->issued . |
|
436 | - "</div>" . |
|
431 | + <div class='sb-certificate-details'>"._("Device:")." ".$display. |
|
432 | + "<br>"._("Serial Number:")." ".dechex($oneCert->serial). |
|
433 | + "<br>"._("CN:")." ".explode('@', $oneCert->username)[0]."@…". |
|
434 | + "<br>"._("Expiry:")." ".$oneCert->expiry. |
|
435 | + "<br>"._("Issued:")." ".$oneCert->issued. |
|
436 | + "</div>". |
|
437 | 437 | "<div style='text-align:right;padding-top: 5px; $buttonStyle'>"; |
438 | 438 | |
439 | 439 | if ($buttonText == "") { |
440 | 440 | $bufferText .= $formtext |
441 | - . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>" |
|
442 | - . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>" |
|
441 | + . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>" |
|
442 | + . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>" |
|
443 | 443 | . "<button type='submit' " |
444 | 444 | . "name='command' " |
445 | - . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' " |
|
445 | + . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' " |
|
446 | 446 | . "class='delete' " |
447 | - . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "\")'>" |
|
447 | + . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."\")'>" |
|
448 | 448 | . _("Revoke") |
449 | 449 | . "</button>" |
450 | 450 | . "</form>"; |
@@ -469,13 +469,13 @@ discard block |
||
469 | 469 | } |
470 | 470 | // wrap the revoked and expired certs in a div that is hidden by default |
471 | 471 | if ($textRevokedCerts !== "") { |
472 | - $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked) . "</span><div id='$oneUserId-revoked-certs' style='display:none;'>" . $textRevokedCerts . "</div>"; |
|
472 | + $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked)."</span><div id='$oneUserId-revoked-certs' style='display:none;'>".$textRevokedCerts."</div>"; |
|
473 | 473 | } |
474 | 474 | if ($textExpiredCerts !== "") { |
475 | - $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired) . "</span><div id='$oneUserId-expired-certs' style='display:none;'>" . $textExpiredCerts . "</div>"; |
|
475 | + $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired)."</span><div id='$oneUserId-expired-certs' style='display:none;'>".$textExpiredCerts."</div>"; |
|
476 | 476 | } |
477 | 477 | // and push out the HTML |
478 | - echo $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts; |
|
478 | + echo $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts; |
|
479 | 479 | ?> |
480 | 480 | </td> |
481 | 481 | |
@@ -490,38 +490,38 @@ discard block |
||
490 | 490 | $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>"; |
491 | 491 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody()))); |
492 | 492 | $tokenHtmlBuffer .= "<td>"; |
493 | - $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>"); |
|
493 | + $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>"); |
|
494 | 494 | $tokenHtmlBuffer .= "<table> |
495 | - <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td> |
|
495 | + <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td> |
|
496 | 496 | $formtext |
497 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
497 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
498 | 498 | <input type='text' name='address' id='address-$invitationObject->identifier'/> |
499 | - <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button> |
|
500 | - <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button> |
|
499 | + <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button> |
|
500 | + <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button> |
|
501 | 501 | </form> |
502 | 502 | </td></tr> |
503 | - <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td> |
|
503 | + <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td> |
|
504 | 504 | $formtext |
505 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
505 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
506 | 506 | <input type='text' name='smsnumber' /> |
507 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button> |
|
507 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button> |
|
508 | 508 | </form> |
509 | 509 | </td></tr> |
510 | - <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td> |
|
511 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button> |
|
510 | + <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td> |
|
511 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button> |
|
512 | 512 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'> |
513 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
514 | - <button type='submit'>" . _("Display QR code") . "</button> |
|
513 | + <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/> |
|
514 | + <button type='submit'>" . _("Display QR code")."</button> |
|
515 | 515 | </form> |
516 | 516 | </td></tr> |
517 | 517 | |
518 | 518 | </table> |
519 | 519 | </td>"; |
520 | - $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>"; |
|
520 | + $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>"; |
|
521 | 521 | $tokenHtmlBuffer .= "<td>" |
522 | 522 | . $formtext |
523 | - . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>" |
|
524 | - . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>" |
|
523 | + . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>" |
|
524 | + . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>" |
|
525 | 525 | . "</td></tr>"; |
526 | 526 | break; |
527 | 527 | case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
@@ -551,13 +551,13 @@ discard block |
||
551 | 551 | <?php |
552 | 552 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
553 | 553 | $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
554 | - echo $formtext . " |
|
554 | + echo $formtext." |
|
555 | 555 | <input type='hidden' name='userid' value='$oneUserId'/> |
556 | 556 | <button type='submit' " |
557 | 557 | . "name='command' " |
558 | - . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' " |
|
558 | + . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' " |
|
559 | 559 | . "class='delete' " |
560 | - . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" ) |
|
560 | + . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "") |
|
561 | 561 | . ">" |
562 | 562 | . _("Deactivate User") |
563 | 563 | . "</button> |
@@ -596,13 +596,13 @@ discard block |
||
596 | 596 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
597 | 597 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), CONFIG_CONFASSISTANT['SILVERBULLET']['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
598 | 598 | |
599 | - echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
599 | + echo $formtext."<div style='padding-bottom: 20px;'>" |
|
600 | 600 | . " |
601 | 601 | <p>$acknowledgeText</p> |
602 | 602 | <input type='checkbox' name='acknowledge' value='true'> |
603 | - <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</label> |
|
603 | + <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</label> |
|
604 | 604 | </div> |
605 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>"; |
|
605 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>"; |
|
606 | 606 | } |
607 | 607 | ?> |
608 | 608 | </div> |
@@ -93,15 +93,15 @@ discard block |
||
93 | 93 | <key>PayloadDescription</key> |
94 | 94 | <string>$tagline</string> |
95 | 95 | <key>PayloadDisplayName</key> |
96 | - <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</string> |
|
96 | + <string>".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']."</string> |
|
97 | 97 | <key>PayloadIdentifier</key> |
98 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
98 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
99 | 99 | <key>PayloadOrganization</key> |
100 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
100 | + <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string> |
|
101 | 101 | <key>PayloadType</key> |
102 | 102 | <string>Configuration</string> |
103 | 103 | <key>PayloadUUID</key> |
104 | - <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
104 | + <string>" . \core\common\Entity::uuid('', self::$iPhonePayloadPrefix.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
105 | 105 | <key>PayloadVersion</key> |
106 | 106 | <integer>1</integer>"; |
107 | 107 | \core\common\Entity::outOfThePotatoes(); |
@@ -132,15 +132,15 @@ discard block |
||
132 | 132 | protected function consentBlock() { |
133 | 133 | \core\common\Entity::intoThePotatoes(); |
134 | 134 | if (isset($this->attributes['support:info_file'])) { |
135 | - return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
135 | + return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
136 | 136 | } |
137 | 137 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
138 | 138 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
139 | - $retval =MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
139 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s!"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
140 | 140 | \core\common\Entity::outOfThePotatoes(); |
141 | 141 | return $retval; |
142 | 142 | } |
143 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
143 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
144 | 144 | \core\common\Entity::outOfThePotatoes(); |
145 | 145 | return $retval; |
146 | 146 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // also escape htmlspecialchars |
164 | 164 | // not all names and profiles have a name, so be prepared |
165 | 165 | |
166 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
166 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
167 | 167 | |
168 | 168 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
169 | 169 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | file_put_contents('installer_profile', $outputXml); |
207 | 207 | |
208 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
208 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
209 | 209 | |
210 | 210 | if (!$this->sign) { |
211 | 211 | rename("installer_profile", $fileName); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return $fileName; |
214 | 214 | } |
215 | 215 | // still here? Then we are signing. |
216 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
216 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
217 | 217 | if ($signing === FALSE) { |
218 | 218 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
219 | 219 | } |
@@ -231,19 +231,19 @@ discard block |
||
231 | 231 | \core\common\Entity::intoThePotatoes(); |
232 | 232 | $ssidCount = count($this->attributes['internal:SSID']); |
233 | 233 | $certCount = count($this->attributes['internal:CAs'][0]); |
234 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
234 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
235 | 235 | $out .= "<p>"; |
236 | 236 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
237 | 237 | $out .= "<ul>"; |
238 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
239 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
238 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
239 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
240 | 240 | if ($certCount > 1) { |
241 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
241 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
242 | 242 | } |
243 | 243 | $out .= "</li>"; |
244 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
244 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
245 | 245 | if ($ssidCount > 1) { |
246 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount); |
|
246 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $ssidCount); |
|
247 | 247 | } |
248 | 248 | $out .= "</li>"; |
249 | 249 | $out .= "</ul>"; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | <key>ServiceProviderRoamingEnabled</key> |
281 | 281 | <true/> |
282 | 282 | <key>DisplayedOperatorName</key> |
283 | - <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " via Passpoint</string>"; |
|
283 | + <string>" . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']." via Passpoint</string>"; |
|
284 | 284 | // if we don't know the realm, omit the entire DomainName key |
285 | 285 | if (isset($this->attributes['internal:realm'])) { |
286 | 286 | $retval .= "<key>DomainName</key> |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | <dict> |
333 | 333 | <key>AcceptEAPTypes</key> |
334 | 334 | <array> |
335 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
335 | + <integer>" . $eapType['OUTER']."</integer> |
|
336 | 336 | </array> |
337 | 337 | <key>EAPFASTProvisionPAC</key> |
338 | 338 | <true /> |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | "; |
346 | 346 | if ($realm !== NULL) { |
347 | 347 | $retval .= "<key>OuterIdentity</key> |
348 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
348 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
349 | 349 | "; |
350 | 350 | } |
351 | 351 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -369,11 +369,11 @@ discard block |
||
369 | 369 | $retval .= " |
370 | 370 | </array>"; |
371 | 371 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
372 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
372 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
373 | 373 | } |
374 | 374 | $retval .= " |
375 | 375 | <key>TTLSInnerAuthentication</key> |
376 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string> |
|
376 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2")."</string> |
|
377 | 377 | </dict>"; |
378 | 378 | return $retval; |
379 | 379 | } |
@@ -392,9 +392,9 @@ discard block |
||
392 | 392 | // characters are still reversed, invert on use! |
393 | 393 | $buffer .= "<string>Manual</string> |
394 | 394 | <key>ProxyServer</key> |
395 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
395 | + <string>" . strrev($serverAndPort[1])."</string> |
|
396 | 396 | <key>ProxyServerPort</key> |
397 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
397 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
398 | 398 | <key>ProxyPACFallbackAllowed</key> |
399 | 399 | <false/>"; |
400 | 400 | } else { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | throw new Exception("SSID must be a string!"); |
423 | 423 | } |
424 | 424 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
425 | - $payloadIdentifier = "wifi." . $this->serial; |
|
425 | + $payloadIdentifier = "wifi.".$this->serial; |
|
426 | 426 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
427 | 427 | $payloadName = sprintf(_("%s configuration for network name %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $escapedSSID); |
428 | 428 | $encryptionTypeString = "WPA"; |
@@ -470,11 +470,11 @@ discard block |
||
470 | 470 | <key>PayloadDisplayName</key> |
471 | 471 | <string>$payloadShortName</string> |
472 | 472 | <key>PayloadIdentifier</key> |
473 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
473 | + <string>".self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
474 | 474 | <key>PayloadOrganization</key> |
475 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
475 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
476 | 476 | <key>PayloadType</key> |
477 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
477 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
478 | 478 | $retval .= $this->proxySettings(); |
479 | 479 | $retval .= $setupModesString; |
480 | 480 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | } |
487 | 487 | $retval .= " |
488 | 488 | <key>PayloadUUID</key> |
489 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
489 | + <string>" . \core\common\Entity::uuid()."</string> |
|
490 | 490 | <key>PayloadVersion</key> |
491 | 491 | <integer>1</integer> |
492 | 492 | $wifiNetworkIdentification</dict>"; |
@@ -515,15 +515,15 @@ discard block |
||
515 | 515 | <key>IsHotspot</key> |
516 | 516 | <false/> |
517 | 517 | <key>PayloadDescription</key> |
518 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</string> |
|
518 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</string> |
|
519 | 519 | <key>PayloadDisplayName</key> |
520 | - <string>" . _("Disabled WiFi network") . "</string> |
|
520 | + <string>" . _("Disabled WiFi network")."</string> |
|
521 | 521 | <key>PayloadIdentifier</key> |
522 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
522 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
523 | 523 | <key>PayloadType</key> |
524 | 524 | <string>com.apple.wifi.managed</string> |
525 | 525 | <key>PayloadUUID</key> |
526 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
526 | + <string>".\core\common\Entity::uuid()."</string> |
|
527 | 527 | <key>PayloadVersion</key> |
528 | 528 | <real>1</real>"; |
529 | 529 | $retval .= $this->proxySettings(); |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | $mimeBlob = base64_encode($binaryBlob); |
598 | 598 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
599 | 599 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
600 | - $retArray = ["block" => "<dict>" . |
|
600 | + $retArray = ["block" => "<dict>". |
|
601 | 601 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
602 | 602 | // <key>Password</key> |
603 | 603 | // <string>" . $this->clientCert['password'] . "</string> |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | <key>PayloadDescription</key> |
611 | 611 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
612 | 612 | <key>PayloadDisplayName</key> |
613 | - <string>" . _("eduroam user certificate") . "</string> |
|
613 | + <string>"._("eduroam user certificate")."</string> |
|
614 | 614 | <key>PayloadIdentifier</key> |
615 | 615 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
616 | 616 | <key>PayloadType</key> |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | <key>PayloadVersion</key> |
621 | 621 | <integer>1</integer> |
622 | 622 | </dict>", |
623 | - "UUID" => $payloadUUID,]; |
|
623 | + "UUID" => $payloadUUID, ]; |
|
624 | 624 | \core\common\Entity::outOfThePotatoes(); |
625 | 625 | return $retArray; |
626 | 626 | } |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | } |
639 | 639 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
640 | 640 | return "<key>RemovalDate</key> |
641 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
641 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
642 | 642 | } |
643 | 643 | |
644 | 644 | private $CAsAccountedFor = []; |
@@ -661,21 +661,21 @@ discard block |
||
661 | 661 | $stream = " |
662 | 662 | <dict> |
663 | 663 | <key>PayloadCertificateFileName</key> |
664 | - <string>" . $ca['uuid'] . ".der</string> |
|
664 | + <string>" . $ca['uuid'].".der</string> |
|
665 | 665 | <key>PayloadContent</key> |
666 | 666 | <data> |
667 | -" . $trimmedPem . "</data> |
|
667 | +" . $trimmedPem."</data> |
|
668 | 668 | <key>PayloadDescription</key> |
669 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
669 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
670 | 670 | <key>PayloadDisplayName</key> |
671 | - <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
671 | + <string>" . sprintf(_("%s CA"), \core\common\Entity::$nomenclature_inst)."</string> |
|
672 | 672 | <key>PayloadIdentifier</key> |
673 | - <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
673 | + <string>" . self::$iPhonePayloadPrefix.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
674 | 674 | <key>PayloadOrganization</key> |
675 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
675 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
676 | 676 | <key>PayloadType</key> |
677 | 677 | <string>com.apple.security.root</string> |
678 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
678 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
679 | 679 | <key>PayloadVersion</key> |
680 | 680 | <integer>1</integer> |
681 | 681 | </dict>"; |
@@ -130,21 +130,21 @@ |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * Transcode a string adding double quotes escaping |
|
134 | - * |
|
135 | - * Transcoding is only required for Windows installers, and no Unicode support |
|
136 | - * in NSIS (NSIS version below 3) |
|
137 | - * Trancoding is only applied if the third optional parameter is set and nonzero |
|
138 | - * If CONFIG['NSIS']_VERSION is set to 3 or more, no transcoding will be applied |
|
139 | - * regardless of the second parameter value. |
|
140 | - * The second optional parameter, if nonzero, should be the character set understood by iconv |
|
141 | - * This is required by the Windows installer and is expected to go away in the future. |
|
142 | - * |
|
143 | - * @param string $source_string The source string |
|
144 | - * @param int $encoding Set Windows charset if non-zero |
|
145 | - * @return string |
|
146 | - * @final not to be redefined |
|
147 | - */ |
|
133 | + * Transcode a string adding double quotes escaping |
|
134 | + * |
|
135 | + * Transcoding is only required for Windows installers, and no Unicode support |
|
136 | + * in NSIS (NSIS version below 3) |
|
137 | + * Trancoding is only applied if the third optional parameter is set and nonzero |
|
138 | + * If CONFIG['NSIS']_VERSION is set to 3 or more, no transcoding will be applied |
|
139 | + * regardless of the second parameter value. |
|
140 | + * The second optional parameter, if nonzero, should be the character set understood by iconv |
|
141 | + * This is required by the Windows installer and is expected to go away in the future. |
|
142 | + * |
|
143 | + * @param string $source_string The source string |
|
144 | + * @param int $encoding Set Windows charset if non-zero |
|
145 | + * @return string |
|
146 | + * @final not to be redefined |
|
147 | + */ |
|
148 | 148 | final protected function translateString($source_string, $encoding = 0) { |
149 | 149 | $this->loggerInstance->debug(5, "translateString input: \"$source_string\"\n"); |
150 | 150 | if (empty($source_string)) { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | $this->loggerInstance->debug(5, "translateFile($source_name, $output_name, $encoding)\n"); |
105 | 105 | ob_start(); |
106 | - $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n"); |
|
106 | + $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n"); |
|
107 | 107 | $source = $this->findSourceFile($source_name); |
108 | 108 | |
109 | 109 | if ($source !== FALSE) { // if there is no file found, don't attempt to include an uninitialised variable |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | $output = ob_get_clean(); |
113 | 113 | if ($encoding) { |
114 | - $outputClean = iconv('UTF-8', $encoding . '//TRANSLIT', $output); |
|
114 | + $outputClean = iconv('UTF-8', $encoding.'//TRANSLIT', $output); |
|
115 | 115 | if ($outputClean) { |
116 | 116 | $output = $outputClean; |
117 | 117 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $encoding = 0; |
155 | 155 | } |
156 | 156 | if ($encoding) { |
157 | - $output_c = iconv('UTF-8', $encoding . '//TRANSLIT', $source_string); |
|
157 | + $output_c = iconv('UTF-8', $encoding.'//TRANSLIT', $source_string); |
|
158 | 158 | } else { |
159 | 159 | $output_c = $source_string; |
160 | 160 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | if (isset($this->LANGS[$this->languageInstance->getLang()])) { |
237 | 237 | $language = $this->LANGS[$this->languageInstance->getLang()]; |
238 | 238 | $this->lang = $language['nsis']; |
239 | - $this->codePage = 'cp' . $language['cp']; |
|
239 | + $this->codePage = 'cp'.$language['cp']; |
|
240 | 240 | } else { |
241 | 241 | $this->lang = 'English'; |
242 | 242 | $this->codePage = 'cp1252'; |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
258 | 258 | $out .= "<p>"; |
259 | 259 | if ($ssidCount > $configCount) { |
260 | - $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList)) . " "; |
|
261 | - $out .= '<strong>' . join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)) . '</strong>'; |
|
260 | + $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $ssidCount - $configCount), implode(', ', $configList))." "; |
|
261 | + $out .= '<strong>'.join('</strong>, <strong>', array_diff(array_keys($ssids), $configList)).'</strong>'; |
|
262 | 262 | $out .= "<p>"; |
263 | 263 | } |
264 | 264 | // TODO - change this below |
@@ -274,8 +274,8 @@ discard block |
||
274 | 274 | $out .= _("When you are connecting to the network for the first time, Windows will pop up a login box, where you should enter your user name and password. This information will be saved so that you will reconnect to the network automatically each time you are in the range."); |
275 | 275 | if ($ssidCount > 1) { |
276 | 276 | $out .= "<p>"; |
277 | - $out .= _("You will be required to enter the same credentials for each of the configured networks:") . " "; |
|
278 | - $out .= '<strong>' . join('</strong>, <strong>', array_keys($ssids)) . '</strong>'; |
|
277 | + $out .= _("You will be required to enter the same credentials for each of the configured networks:")." "; |
|
278 | + $out .= '<strong>'.join('</strong>, <strong>', array_keys($ssids)).'</strong>'; |
|
279 | 279 | } |
280 | 280 | } |
281 | 281 | return $out; |
@@ -364,13 +364,13 @@ discard block |
||
364 | 364 | * @return string path to signed installer |
365 | 365 | */ |
366 | 366 | protected function signInstaller() { |
367 | - $fileName = $this->installerBasename . '.exe'; |
|
367 | + $fileName = $this->installerBasename.'.exe'; |
|
368 | 368 | if (!$this->sign) { |
369 | 369 | rename("installer.exe", $fileName); |
370 | 370 | return $fileName; |
371 | 371 | } |
372 | 372 | // are actually signing |
373 | - $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null"); |
|
373 | + $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null"); |
|
374 | 374 | if ($outputFromSigning === FALSE) { |
375 | 375 | $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n"); |
376 | 376 | } |
@@ -384,15 +384,15 @@ discard block |
||
384 | 384 | */ |
385 | 385 | protected function compileNSIS() { |
386 | 386 | if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { |
387 | - $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis'] . " -INPUTCHARSET UTF8"; |
|
387 | + $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis']." -INPUTCHARSET UTF8"; |
|
388 | 388 | } else { |
389 | 389 | $makensis = CONFIG_CONFASSISTANT['PATHS']['makensis']; |
390 | 390 | } |
391 | 391 | $lcAll = getenv("LC_ALL"); |
392 | 392 | putenv("LC_ALL=en_US.UTF-8"); |
393 | - $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1'; |
|
393 | + $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1'; |
|
394 | 394 | system($command); |
395 | - putenv("LC_ALL=" . $lcAll); |
|
395 | + putenv("LC_ALL=".$lcAll); |
|
396 | 396 | $this->loggerInstance->debug(4, "compileNSIS:$command\n"); |
397 | 397 | } |
398 | 398 | |
@@ -408,10 +408,10 @@ discard block |
||
408 | 408 | 'email' => 'SUPPORT', |
409 | 409 | 'url' => 'URL', |
410 | 410 | ]; |
411 | - $s = "support_" . $type . "_substitute"; |
|
411 | + $s = "support_".$type."_substitute"; |
|
412 | 412 | $substitute = $this->translateString($this->$s, $this->codePage); |
413 | - $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute; |
|
414 | - return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n"; |
|
413 | + $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute; |
|
414 | + return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n"; |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | /** |
@@ -421,20 +421,20 @@ discard block |
||
421 | 421 | * @return string |
422 | 422 | */ |
423 | 423 | protected function writeNsisDefines($attr) { |
424 | - $fcontents = "\n" . '!define NSIS_MAJOR_VERSION ' . CONFIG_CONFASSISTANT['NSIS_VERSION']; |
|
424 | + $fcontents = "\n".'!define NSIS_MAJOR_VERSION '.CONFIG_CONFASSISTANT['NSIS_VERSION']; |
|
425 | 425 | if ($attr['internal:profile_count'][0] > 1) { |
426 | - $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
|
426 | + $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage).'" |
|
427 | 427 | '; |
428 | 428 | } |
429 | 429 | $fcontents .= ' |
430 | -Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
|
431 | -!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
|
432 | -!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
|
430 | +Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage).'" |
|
431 | +!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage).'" |
|
432 | +!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'" |
|
433 | 433 | !define INSTALLER_NAME "installer.exe" |
434 | -!define LANG "' . $this->lang . '" |
|
435 | -!define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '" |
|
434 | +!define LANG "' . $this->lang.'" |
|
435 | +!define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']).'" |
|
436 | 436 | ;-------------------------------- |
437 | -!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
|
437 | +!define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage).'" |
|
438 | 438 | '; |
439 | 439 | $fcontents .= $this->getSupport($attr, 'email'); |
440 | 440 | $fcontents .= $this->getSupport($attr, 'url'); |
@@ -442,18 +442,18 @@ discard block |
||
442 | 442 | $fcontents .= '!define WIRED |
443 | 443 | '; |
444 | 444 | } |
445 | - $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '" |
|
445 | + $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'" |
|
446 | 446 | '; |
447 | 447 | if (!empty($attr['internal:realm'][0])) { |
448 | - $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
|
448 | + $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'" |
|
449 | 449 | '; |
450 | 450 | } |
451 | 451 | if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
452 | - $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
|
452 | + $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'" |
|
453 | 453 | '; |
454 | 454 | } |
455 | 455 | if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
456 | - $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
|
456 | + $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'" |
|
457 | 457 | '; |
458 | 458 | } |
459 | 459 | $fcontents .= $this->msInfoFile($attr); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $out .= '!define EXTERNAL_INFO "'; |
474 | 474 | // $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n"); |
475 | 475 | if ($attr['internal:info_file'][0]['mime'] == 'rtf') { |
476 | - $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name']; |
|
476 | + $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name']; |
|
477 | 477 | } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') { |
478 | 478 | $infoFile = file_get_contents($attr['internal:info_file'][0]['name']); |
479 | 479 | if ($infoFile === FALSE) { |
@@ -482,14 +482,14 @@ discard block |
||
482 | 482 | if (CONFIG_CONFASSISTANT['NSIS_VERSION'] >= 3) { |
483 | 483 | $infoFileConverted = $infoFile; |
484 | 484 | } else { |
485 | - $infoFileConverted = iconv('UTF-8', $this->codePage . '//TRANSLIT', $infoFile); |
|
485 | + $infoFileConverted = iconv('UTF-8', $this->codePage.'//TRANSLIT', $infoFile); |
|
486 | 486 | } |
487 | 487 | if ($infoFileConverted !== FALSE && strlen($infoFileConverted) > 0) { |
488 | 488 | file_put_contents('info_f.txt', $infoFileConverted); |
489 | 489 | $out = '!define LICENSE_FILE " info_f.txt'; |
490 | 490 | } |
491 | 491 | } else { |
492 | - $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name']; |
|
492 | + $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name']; |
|
493 | 493 | } |
494 | 494 | |
495 | 495 | $out .= "\"\n"; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function __construct() { |
96 | 96 | $this->loggerInstance = new Logging(); |
97 | - $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n"); |
|
97 | + $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n"); |
|
98 | 98 | $this->languageInstance = new Language(); |
99 | 99 | Entity::intoThePotatoes("core"); |
100 | 100 | // some config elements are displayable. We need some dummies to |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $dummy_inst2 = _("organisation"); |
107 | 107 | $dummy_inst3 = _("Identity Provider"); |
108 | 108 | // and do something useless with the strings so that there's no "unused" complaint |
109 | - if (strlen($dummy_NRO . $dummy_inst1 . $dummy_inst2 . $dummy_inst3) < 0) { |
|
109 | + if (strlen($dummy_NRO.$dummy_inst1.$dummy_inst2.$dummy_inst3) < 0) { |
|
110 | 110 | throw new \Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole."); |
111 | 111 | } |
112 | 112 | Entity::$nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * Logs the end of lifetime of the entity to the debug log on level 5. |
122 | 122 | */ |
123 | 123 | public function __destruct() { |
124 | - (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n"); |
|
124 | + (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n"); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1) { |
153 | 153 | $loggerInstance = new Logging(); |
154 | - $name = md5(time() . rand()); |
|
154 | + $name = md5(time().rand()); |
|
155 | 155 | $path = ROOT; |
156 | 156 | switch ($purpose) { |
157 | 157 | case 'silverbullet': |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | default: |
170 | 170 | throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n"); |
171 | 171 | } |
172 | - $tmpDir = $path . '/' . $name; |
|
172 | + $tmpDir = $path.'/'.$name; |
|
173 | 173 | $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n"); |
174 | 174 | if (!mkdir($tmpDir, 0700, true)) { |
175 | 175 | if ($failIsFatal) { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @return void |
190 | 190 | */ |
191 | 191 | public static function rrmdir($dir) { |
192 | - foreach (glob($dir . '/*') as $file) { |
|
192 | + foreach (glob($dir.'/*') as $file) { |
|
193 | 193 | if (is_dir($file)) { |
194 | 194 | Entity::rrmdir($file); |
195 | 195 | } else { |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | } |
215 | 215 | // these substr() are guaranteed to yield actual string data, as the |
216 | 216 | // base string is an MD5 hash - has sufficient length |
217 | - $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-'; |
|
218 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-'; |
|
219 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-'; |
|
220 | - $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-'; |
|
217 | + $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-'; |
|
218 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-'; |
|
219 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-'; |
|
220 | + $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-'; |
|
221 | 221 | $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12); |
222 | - return $prefix . $uuid; |
|
222 | + return $prefix.$uuid; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | for ($i = count($trace); $i--; $i > 0) { |
258 | 258 | if (preg_match('/Entity/', $trace[$i - 1]['class'])) { |
259 | 259 | if ($showTrace) { |
260 | - echo "FOUND caller: ".print_r($trace[$i],true). " - class is ".$trace[$i]['class']; |
|
260 | + echo "FOUND caller: ".print_r($trace[$i], true)." - class is ".$trace[$i]['class']; |
|
261 | 261 | } |
262 | 262 | $caller = $trace[$i]; |
263 | 263 | break; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT)); |
269 | 269 | if ($showTrace === TRUE) { |
270 | 270 | echo "<pre>".print_r($trace, true)."</pre>"; |
271 | - echo "CLASS = " . $myName ."<br/>"; |
|
271 | + echo "CLASS = ".$myName."<br/>"; |
|
272 | 272 | } |
273 | 273 | if (preg_match("/diag/", $myName) == 1) { |
274 | 274 | $ret = "diagnostics"; |
@@ -300,10 +300,10 @@ discard block |
||
300 | 300 | if ($catalogue === NULL) { |
301 | 301 | $theCatalogue = Entity::determineOwnCatalogue($trace); |
302 | 302 | textdomain($theCatalogue); |
303 | - bindtextdomain($theCatalogue, ROOT . "/translation/"); |
|
303 | + bindtextdomain($theCatalogue, ROOT."/translation/"); |
|
304 | 304 | } else { |
305 | 305 | textdomain($catalogue); |
306 | - bindtextdomain($catalogue, ROOT . "/translation/"); |
|
306 | + bindtextdomain($catalogue, ROOT."/translation/"); |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 |