Passed
Push — master ( b56199...1b89e6 )
by Tomasz
14:34
created
web/admin/inc/toggleRedirect.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $loggerInstance = new \core\common\Logging();
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $remaining_attribs = $my_profile->beginFlushMethodLevelAttributes($eaptype->getIntegerRep(), NULL);
91 91
         $optionParser->processSubmittedFields($my_profile, $_POST, $_FILES, $eaptype->getIntegerRep(), NULL);
92 92
     }
93
-    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $my_profile->identifier . " - device/EAP-Type settings changed");
93
+    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$my_profile->identifier." - device/EAP-Type settings changed");
94 94
     header("Location: ../overview_installers.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier");
95 95
     exit;
96 96
 }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     }
105 105
     $captiontext = sprintf(_("device <strong>%s</strong>"), $device['display']);
106 106
     $keyword = "device-specific";
107
-    $extrainput = "<input type='hidden' name='device' value='" . $device_key . "'/>";
107
+    $extrainput = "<input type='hidden' name='device' value='".$device_key."'/>";
108 108
     $dev = $device_key;
109 109
 } elseif ($eaptype !== NULL) {
110 110
     foreach ($my_profile->getAttributes() as $attrib) {
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
 
116 116
     $captiontext = sprintf(_("EAP-Type <strong>%s</strong>"), $eaptype->getPrintableRep());
117 117
     $keyword = "eap-specific";
118
-    $extrainput = "<input type='hidden' name='eaptype' value='" . $eaptype->getIntegerRep() . "'>";
118
+    $extrainput = "<input type='hidden' name='eaptype' value='".$eaptype->getIntegerRep()."'>";
119 119
     $dev = '';
120 120
 } else {
121 121
     throw new Exception("previous type checks make it impossible to reach this code path.");
122 122
 }
123 123
 ?>
124
-<p><?php echo _("Fine-tuning options for ") . $captiontext; ?></p>
124
+<p><?php echo _("Fine-tuning options for ").$captiontext; ?></p>
125 125
 <hr/>
126 126
 
127 127
 <form action='inc/toggleRedirect.inc.php?inst_id=<?php echo $my_inst->identifier; ?>&amp;profile_id=<?php echo $my_profile->identifier; ?>' method='post' accept-charset='UTF-8'><?php echo $extrainput; ?>
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 // see if we already have any attributes; if so, display these
130 130
     $interesting_attribs = [];
131 131
     foreach ($attribs as $attrib) {
132
-        if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^' . $keyword . ':/', $attrib['name'])) {
132
+        if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^'.$keyword.':/', $attrib['name'])) {
133 133
             $interesting_attribs[] = $attrib;
134 134
         }
135 135
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     if (\config\Master::DB['INST']['readonly'] === FALSE) {
139 139
         if ($editMode == 'fullaccess') {
140 140
         ?>
141
-        <button type='button' class='newoption' onclick='getXML("<?php echo $keyword;?>", "<?php echo $my_inst->federation;?>")'><?php echo _("Add new option"); ?></button>
141
+        <button type='button' class='newoption' onclick='getXML("<?php echo $keyword; ?>", "<?php echo $my_inst->federation; ?>")'><?php echo _("Add new option"); ?></button>
142 142
         <br/>
143 143
         <hr/>
144 144
         <button type='submit' name='submitbutton' id='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_SAVE; ?>'><?php echo _("Save data"); ?></button>
Please login to merge, or discard this patch.
web/admin/inc/sendZip.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 ?>
29 29
 <?php
30 30
 
31
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
31
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
32 32
 $auth = new \web\lib\admin\Authentication();
33 33
 $auth->authenticate();
34 34
 $validator = new \web\lib\common\InputValidation();
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
     if (count($hotspotProfiles) > 0) { // no profiles yet.
39 39
        foreach ($hotspotProfiles as $counter => $deploymentObject) {
40 40
            if ($deploymentObject->institution == $_GET['inst_id'] && $deploymentObject->identifier == $_GET['dep_id']) {
41
-               $cacert = file_get_contents(ROOT .  "/config/ManagedSPCerts/eduroamSP-CA.pem");
41
+               $cacert = file_get_contents(ROOT."/config/ManagedSPCerts/eduroamSP-CA.pem");
42 42
                $zip = new ZipArchive;
43
-               $zip->open(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip', ZipArchive::CREATE);
43
+               $zip->open(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip', ZipArchive::CREATE);
44 44
                if ($deploymentObject->radsec_priv != '') {
45 45
                     $zip->addFromString('priv.key', $deploymentObject->radsec_priv);
46 46
                }
47 47
                $zip->addFromString('cert.pem', $deploymentObject->radsec_cert);
48 48
                $zip->addFromString('ca.pem', $cacert);
49 49
                $zip->close();
50
-               $data = file_get_contents(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip');
51
-               unlink(ROOT . '/var/tmp/' . $deploymentObject->identifier.'.zip');
50
+               $data = file_get_contents(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip');
51
+               unlink(ROOT.'/var/tmp/'.$deploymentObject->identifier.'.zip');
52 52
                if ($data !== FALSE) {
53 53
                     header('Content-Type: application/zip');
54 54
                     header("Content-Disposition: attachment; filename=\"full_".$deploymentObject->identifier.".zip\"");
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 $uiElements = new \web\lib\admin\UIElements();
@@ -57,30 +57,30 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
 echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant);
59 59
 if (\config\Master::DB['enforce-external-sync']) {
60
-    echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . "</p>";
61
-    echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";    
60
+    echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)."</p>";
61
+    echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";    
62 62
 }
63 63
 ?>
64 64
 <hr/>
65 65
 <img alt='Loading ...' src='../resources/images/icons/loading51.gif' id='spin' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none;'>
66 66
 <form name='sendinvite' action='inc/sendinvite.inc.php' method='post' accept-charset='UTF-8'>
67 67
     <table>
68
-            <caption><?php echo _("Invitation Details");?></caption>
68
+            <caption><?php echo _("Invitation Details"); ?></caption>
69 69
             <tr>
70
-                <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?");?></th>
71
-                <th class="wai-invisible" scope="col"><?php echo _("Name");?></th>
72
-                <th class="wai-invisible" scope="col"><?php echo _("Type");?></th>
73
-                <th class="wai-invisible" scope="col"><?php echo _("Country");?></th>
70
+                <th class="wai-invisible" scope="col"><?php echo _("From database or ad-hoc?"); ?></th>
71
+                <th class="wai-invisible" scope="col"><?php echo _("Name"); ?></th>
72
+                <th class="wai-invisible" scope="col"><?php echo _("Type"); ?></th>
73
+                <th class="wai-invisible" scope="col"><?php echo _("Country"); ?></th>
74 74
             </tr>
75 75
         <?php
76 76
         if (\config\Master::DB['enforce-external-sync']) {
77 77
             echo "<tr><td>
78
-                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant) . "</input>
78
+                <input type='radio' name='creation' value='existing'>" . sprintf(_("Existing %s:"), $uiElements->nomenclatureParticipant)."</input>
79 79
                      </td>";
80 80
 
81 81
             echo "<td colspan='3'>
82 82
                 <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'>
83
-                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"),$uiElements->nomenclatureParticipant) . "</option>";
83
+                    <option value='FREETEXT'>" . sprintf(_("--- select %s here ---"), $uiElements->nomenclatureParticipant)."</option>";
84 84
 
85 85
             foreach ($feds as $fed_value) {
86 86
                 $thefed = new \core\Federation(strtoupper($fed_value['value']));
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 $entities = $thefed->listExternalEntities(TRUE, NULL);
90 90
 
91 91
                 foreach ($entities as $v) {
92
-                    echo "<option id='" . $v['contactlist'] . "' value='" . $fed_value['value']. '-' . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
92
+                    echo "<option id='".$v['contactlist']."' value='".$fed_value['value'].'-'.$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>";
93 93
                 }
94 94
             }
95 95
 
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
         ?>
99 99
         <tr>
100 100
             <td>
101
-                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"),$uiElements->nomenclatureParticipant); ?></input>
101
+                <input type='radio' name='creation' value='new'><?php echo sprintf(_("New %s"), $uiElements->nomenclatureParticipant); ?></input>
102 102
             </td>
103 103
             <td>
104 104
                 <?php echo _("Name"); ?> <input type='text' size='30' id='name' name='name' onchange='document.sendinvite.creation[1].checked = true'/>
105 105
             </td>
106 106
             <td>
107
-                <?php if(\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { ?>
107
+                <?php if (\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { ?>
108 108
                 &nbsp; <input type='hidden' name='participant_type' value='SP'>
109 109
                 <?php } else { ?>
110 110
                 <select name="participant_type">
111
-                    <option value="IdPSP" selected><?php printf(_("%s and %s"),$uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option>
112
-                    <option value="IdP"><?php printf(_("%s"),$uiElements->nomenclatureIdP)?></option>
113
-                    <option value="SP"><?php printf(_("%s"),$uiElements->nomenclatureHotspot)?></option>
111
+                    <option value="IdPSP" selected><?php printf(_("%s and %s"), $uiElements->nomenclatureIdP, $uiElements->nomenclatureHotspot)?></option>
112
+                    <option value="IdP"><?php printf(_("%s"), $uiElements->nomenclatureIdP)?></option>
113
+                    <option value="SP"><?php printf(_("%s"), $uiElements->nomenclatureHotspot)?></option>
114 114
                 </select>
115 115
                 <?php } ?>
116 116
             </td>
Please login to merge, or discard this patch.
web/admin/inc/manageAdmins.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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();
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 default:
121 121
                     throw new Exception("Error: unknown encryption status of invitation!?!");
122 122
             }
123
-            echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
123
+            echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
124 124
             break;
125 125
         case "FAILURE":
126 126
             echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 default:
141 141
                     throw new Exception("Error: unknown encryption status of invitation!?!");
142 142
             }
143
-            echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
143
+            echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
144 144
             break;
145 145
         case "INVALIDSYNTAX":
146 146
             echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                 <?php echo $invite; ?>
193 193
             </td>
194 194
             <td>
195
-                <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ); ?> accept-charset='UTF-8'>
195
+                <form action='inc/manageAdmins.inc.php?inst_id=<?php echo $my_inst->identifier ?>' method='post' <?php echo ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : ""); ?> accept-charset='UTF-8'>
196 196
                     <input type='hidden' name='admin_id' value='<?php echo $oneowner['ID']; ?>'></input>
197 197
                     <button type='submit' name='submitbutton' class='delete' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>'><?php echo _("Delete Administrator") ?></button>
198 198
                 </form>
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
 $pending_invites = $mgmt->listPendingInvitations($my_inst->identifier);
217 217
 $loggerInstance->debug(4, "Displaying pending invitations for $my_inst->identifier.\n");
218 218
 if (count($pending_invites) > 0) {
219
-    echo "<strong>" . _("Pending invitations for this IdP") . "</strong>";
219
+    echo "<strong>"._("Pending invitations for this IdP")."</strong>";
220 220
     echo "<table>";
221 221
     foreach ($pending_invites as $invitee) {
222
-        echo "<tr><td>" . $invitee['mail'] . "</td><td>" . sprintf(_("(expires %s)"), $invitee['expiry']) . "</td></tr>";
222
+        echo "<tr><td>".$invitee['mail']."</td><td>".sprintf(_("(expires %s)"), $invitee['expiry'])."</td></tr>";
223 223
     }
224 224
     echo "</table>";
225 225
 }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
     if (!$is_admin_himself) {
243 243
         echo "<form action='inc/manageAdmins.inc.php?inst_id=$my_inst->identifier' method='post' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
244
-    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_TAKECONTROL . "'>" . sprintf(_("Take control of this %s"), $uiElements->nomenclatureParticipant) . "</button>
244
+    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_TAKECONTROL."'>".sprintf(_("Take control of this %s"), $uiElements->nomenclatureParticipant)."</button>
245 245
 </form>";
246 246
     }
247 247
 }
Please login to merge, or discard this patch.
web/admin/inc/deploymentStats.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 $auth = new \web\lib\admin\Authentication();
14 14
 $auth->authenticate();
15 15
 $languageInstance = new \core\common\Language();
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 if ($editMode == 'fullaccess') {
20 20
     $deployment = $validator->existingDeploymentManaged($_GET['deployment_id'], $inst);
21 21
     $format = '';
22
-    if (isset($_GET['as']) && $_GET['as']=='csv') {
22
+    if (isset($_GET['as']) && $_GET['as'] == 'csv') {
23 23
     	$format = 'csv';
24 24
     }
25 25
     if (!isset($_POST['stats'])) {
@@ -67,19 +67,19 @@  discard block
 block discarded – undo
67 67
              echo _("Protocol is a protocol used between a client and RADIUS server, for TLS it is a / separated tuple TLS/TLS-Client-Cert-Serial");
68 68
        ?></p>
69 69
     <table class='authrecord'>
70
-        <caption><?php echo $tablecaption;?></caption>
70
+        <caption><?php echo $tablecaption; ?></caption>
71 71
         <tr>
72
-            <th scope="col"><strong><?php echo _("Timestamp (UTC)");?></strong></th>
73
-            <th scope="col"><strong><?php echo _("Outer-Identity");?></strong></th>
74
-            <th scope="col"><strong><?php echo _("Result");?></strong></th>
75
-            <th scope="col"><strong><?php echo _("MAC Address");?></strong></th>
76
-            <th scope="col"><strong><?php echo _("Chargeable-User-Identity");?></strong></th>    
77
-            <th scope="col"><strong><?php echo _("AP Identifier");?></strong></th>
78
-            <th scope="col"><strong><?php echo _("Protocol");?></strong></th>
72
+            <th scope="col"><strong><?php echo _("Timestamp (UTC)"); ?></strong></th>
73
+            <th scope="col"><strong><?php echo _("Outer-Identity"); ?></strong></th>
74
+            <th scope="col"><strong><?php echo _("Result"); ?></strong></th>
75
+            <th scope="col"><strong><?php echo _("MAC Address"); ?></strong></th>
76
+            <th scope="col"><strong><?php echo _("Chargeable-User-Identity"); ?></strong></th>    
77
+            <th scope="col"><strong><?php echo _("AP Identifier"); ?></strong></th>
78
+            <th scope="col"><strong><?php echo _("Protocol"); ?></strong></th>
79 79
         </tr>
80 80
         <?php
81 81
         foreach ($userAuthData as $oneRecord) {    
82
-            echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail" )."'>"
82
+            echo "<tr class='".($oneRecord['result'] == "OK" ? "auth-success" : "auth-fail")."'>"
83 83
                     . "<td>".$oneRecord['activity_time']."</td>"
84 84
                     // $oneRecord['CN'] is a simple string, not an array, so disable Scrutinizer type check here
85 85
                     . "<td>".$oneRecord['outer_user']."</td>"
Please login to merge, or discard this patch.
web/admin/inc/option_xhr.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
23 23
 
24 24
 \core\CAT::sessionStart();
25 25
 $validator = new \web\lib\common\InputValidation();
26 26
 
27
-if (!isset($_GET["class"] )) {
27
+if (!isset($_GET["class"])) {
28 28
     throw new Exception("Unknown type of option!");
29 29
 }
30 30
 
@@ -42,6 +42,6 @@  discard block
 block discarded – undo
42 42
 
43 43
 // add one option of the specified class
44 44
 
45
-$list = \web\lib\admin\OptionDisplay::enumerateOptionsToDisplay($_GET["class"], $_GET['fedid'], (isset($_GET["device"])?$_GET["device"]:NULL));
45
+$list = \web\lib\admin\OptionDisplay::enumerateOptionsToDisplay($_GET["class"], $_GET['fedid'], (isset($_GET["device"]) ? $_GET["device"] : NULL));
46 46
 $optionDisplay = new \web\lib\admin\OptionDisplay($list);
47 47
 echo $optionDisplay->optiontext(array_values($list));
Please login to merge, or discard this patch.
web/admin/action_req_certificate.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  */
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -96,29 +96,29 @@  discard block
 block discarded – undo
96 96
     'HINT' =>  _("See CSR generation rules below."),
97 97
     ];
98 98
     $settings = array();
99
-    if  (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
100
-        print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']];
99
+    if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] != '') {
100
+        print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']];
101 101
         if ($_SESSION['CSR_ERRORS'] == 'SOAP_ERROR' && isset($_SESSION['csr_faultcode'])) {
102
-            print '<br>'. _('Reason') . ': '. $_SESSION['csr_faultcode'];
102
+            print '<br>'._('Reason').': '.$_SESSION['csr_faultcode'];
103 103
             unset($_SESSION['csr_faultcode']);
104 104
         } else {
105 105
             if ($_SESSION['CSR_ERRORS'] == 'WRONG_SUBJECT' && isset($_SESSION['csr_subject'])) {
106
-                print '<br>'. _('Your subject is:') . ' '. $_SESSION['csr_subject'];
106
+                print '<br>'._('Your subject is:').' '.$_SESSION['csr_subject'];
107 107
                 unset($_SESSION['csr_subject']);
108 108
             }
109
-            print '<br>' . $messages['HINT'];
109
+            print '<br>'.$messages['HINT'];
110 110
         }
111 111
         print '</font></h3>';
112 112
         unset($_SESSION['CSR_ERRORS']);
113 113
     }
114
-    if  (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
114
+    if (isset($_SESSION['FORM_SETTINGS']) && $_SESSION['FORM_SETTINGS'] != '') {
115 115
         $settings = $_SESSION['FORM_SETTINGS'];
116 116
         unset($_SESSION['FORM_SETTINGS']);
117 117
     }
118 118
     if (empty($settings) && isset($_POST['LEVEL'])) {
119 119
         $settings = array('LEVEL' => $_POST['LEVEL'], 'NRO-list' => $_POST['NRO-list'], 'INST-list' => $_POST['INST-list']);
120 120
     }
121
-    if  ( isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
121
+    if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
122 122
         // basic sanity checks before we hand this over to openssl
123 123
         $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE);
124 124
         
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
                     $dn .= ', ';
140 140
                 }
141 141
                 if (is_array($subject[$sk])) {
142
-                    $dn .= $sk . '=' . implode(', ' . $sk . '=', $subject[$sk]);
142
+                    $dn .= $sk.'='.implode(', '.$sk.'=', $subject[$sk]);
143 143
                 } else {
144
-                    $dn .= $sk . '=' . $subject[$sk];
144
+                    $dn .= $sk.'='.$subject[$sk];
145 145
                 }
146 146
             }
147 147
             if ($subject_keys[0] == 'DC' && $subject['DC']) {
148 148
                 foreach ($subject['DC'] as $v) {
149
-                    $dc[] = 'DC=' . $v;
149
+                    $dc[] = 'DC='.$v;
150 150
                 }
151 151
                 if ($DN !== array_reverse($dc)) {
152 152
                    $dc = array();
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
                 }
175 175
                 $fed = $validator->existingFederation($_POST['NRO-list']);
176 176
                 $country = strtoupper($fed->tld);
177
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
177
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
178 178
                 $DN[] = "C=$code";
179
-                $DN[] = "O=NRO of " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
179
+                $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[$country]['name']);
180 180
                 $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld);
181
-                $DN[] = "CN=" . $serverList[0];
181
+                $DN[] = "CN=".$serverList[0];
182 182
                 $policies[] = "eduroam IdP";
183 183
                 $policies[] = "eduroam SP";
184 184
                 $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"];
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                     throw new Exception(sprintf("Sorry: you are not %s admin for the %s requested in the form.", $uiElements->nomenclatureFed, $uiElements->nomenclatureFed));
194 194
                 }
195 195
                 $country = strtoupper($matches[1]);
196
-                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country ;
196
+                $code = isset($cat->knownFederations[$country]['code']) ? $cat->knownFederations[$country]['code'] : $country;
197 197
                 $DN[] = "C=$code";
198 198
                 $serverInfo = $extInsts[$_POST['INST-list']];
199 199
                 if (isset($serverInfo["names"]["en"])) {
@@ -205,14 +205,14 @@  discard block
 block discarded – undo
205 205
 		    $modou = 1;
206 206
 		    $ou = str_replace(",", "/,", $ou);
207 207
 		}
208
-		$ou = preg_replace('/\s+/', ' ',  $ou);
208
+		$ou = preg_replace('/\s+/', ' ', $ou);
209 209
 		if (strlen($ou) >= 64) {
210 210
 			$ou = substr($ou, 0, 64);
211 211
 			$modou += 2;
212 212
 		}
213 213
                 $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou);
214 214
                 $serverList = explode(",", $serverInfo["servers"]);
215
-                $DN[] = "CN=" . $serverList[0];
215
+                $DN[] = "CN=".$serverList[0];
216 216
                 switch ($serverInfo["type"]) {
217 217
                     case core\IdP::TYPE_IDPSP:
218 218
                         $policies[] = "eduroam IdP";
@@ -231,13 +231,13 @@  discard block
 block discarded – undo
231 231
             default:
232 232
                 throw new Exception("Sorry: Unknown level of issuance requested.");
233 233
         }
234
-        echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties");
234
+        echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties");
235 235
         echo "<ul>";
236
-        echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
237
-	echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN);
236
+        echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>";
237
+	echo "<li>"._("Distinguished Name: ").implode(", ", $DN);
238 238
 	if ($modou > 0) {
239 239
 	    echo " (";
240
-            echo _("Organization field adjusted"). ': ';
240
+            echo _("Organization field adjusted").': ';
241 241
 	    $desc = array();
242 242
 	    if ($modou >= 2) {
243 243
 		$desc[] = _("truncated to 64 chars");
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
 	    echo ")";
250 250
 	}
251 251
         echo "</li>";
252
-        echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>";
253
-        echo "<li>" . _("Requester Contact Details: ") . $firstName . " &lt;" . $firstMail . "&gt;" . "</li>";
252
+        echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>";
253
+        echo "<li>"._("Requester Contact Details: ").$firstName." &lt;".$firstMail."&gt;"."</li>";
254 254
         echo "</ul></p>";
255 255
         $vettedCsr = $validator->string($_POST['CSR'], true);
256 256
         $newCsrWithMeta = [
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
         $loggerInstance->debug(2, $DN, "CERT DN: ", "\n");
266 266
         // our certs can be good for max 5 years
267 267
         $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays);
268
-        echo "<p>" . _("The certificate was requested.") . "</p>";
268
+        echo "<p>"._("The certificate was requested.")."</p>";
269 269
         if (isset($_SESSION['CSR_ERRORS']) && $_SESSION['CSR_ERRORS'] == 'SOAP_ERROR') {
270
-            print '<h3 id="errorbox"><font color="red">'. $messages[$_SESSION['CSR_ERRORS']];
270
+            print '<h3 id="errorbox"><font color="red">'.$messages[$_SESSION['CSR_ERRORS']];
271 271
             if (isset($_SESSION['csr_faultcode'])) {
272
-                print '<br>'. _('Reason') . ': '. $_SESSION['csr_faultcode'];
272
+                print '<br>'._('Reason').': '.$_SESSION['csr_faultcode'];
273 273
                 unset($_SESSION['csr_faultcode']);
274 274
             }
275 275
             unset($_SESSION['CSR_ERRORS']);
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         switch (count($feds)) {
294 294
             case 0:
295 295
                 echo "<div>";
296
-                echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required."));
296
+                echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required."));
297 297
                 echo "</div>";
298 298
                 break;
299 299
             case 1:
@@ -301,22 +301,22 @@  discard block
 block discarded – undo
301 301
                 if (empty($settings) || (isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO')) {
302 302
                     echo ' checked';
303 303
                 }
304
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
305
-                echo " <strong>" . $cat->knownFederations[$feds[0]->tld]['name'] . "</strong>";
306
-                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>';
304
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
305
+                echo " <strong>".$cat->knownFederations[$feds[0]->tld]['name']."</strong>";
306
+                echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>';
307 307
                 break;
308 308
             default:
309 309
                 echo '<input type="radio" name="LEVEL" id="NRO" value="NRO"';
310 310
                 if (empty($settings) || isset($settings['LEVEL']) && $settings['LEVEL'] == 'NRO') {
311 311
                     echo ' checked';
312 312
                 }
313
-                echo '>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>';
313
+                echo '>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>';
314 314
                 ?>
315 315
                 <select name="NRO-list" id="NRO-list">
316 316
                     <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
317 317
                     <?php
318 318
                     foreach ($feds as $oneFed) {
319
-                        echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld]['name'] . "</option>";
319
+                        echo '<option value="'.strtoupper($oneFed->tld).'">'.$cat->knownFederations[$oneFed->tld]['name']."</option>";
320 320
                         #echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>";
321 321
                         
322 322
                     }
@@ -329,21 +329,21 @@  discard block
 block discarded – undo
329 329
         <script>
330 330
             var instservers = [];
331 331
             var instpolicies = [];
332
-            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>';
332
+            var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>';
333 333
         <?php 
334 334
         $allIdPs = [];
335 335
         foreach ($allAuthorizedFeds as $oneFed) {
336 336
             foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) {
337
-                if (count($oneIdP['contacts']) ==0) {
337
+                if (count($oneIdP['contacts']) == 0) {
338 338
                     continue;
339 339
                 }
340
-                $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["name"];            
341
-                echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n";
342
-                echo "instpolicies['" . $id . "']='";
340
+                $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["name"];            
341
+                echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n";
342
+                echo "instpolicies['".$id."']='";
343 343
                 if ($oneIdP["type"] == 'IdPSP') {
344 344
                     echo "eduroam IdP/SP";
345 345
                 } else {
346
-                    echo "eduroam " . $oneIdP["type"];
346
+                    echo "eduroam ".$oneIdP["type"];
347 347
                 }
348 348
                 echo "';\n";
349 349
             }
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
             <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option>
392 392
 <?php
393 393
 foreach ($allIdPs as $id => $name) {
394
-    echo '<option value="' . $id . '"';
394
+    echo '<option value="'.$id.'"';
395 395
     if (isset($settings['INST-list']) && $settings['INST-list'] == $id) { echo ' selected'; }
396
-    echo '>' . $name . "</option>";
396
+    echo '>'.$name."</option>";
397 397
 }
398 398
 ?>
399 399
         </select>
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
             <?php
408 408
             echo _('According to the above settings you will receive')
409 409
             ?>
410
-            <span id='certlevel'><?php echo _('NRO level certificate');?></span>
410
+            <span id='certlevel'><?php echo _('NRO level certificate'); ?></span>
411 411
             
412 412
         for server names:
413 413
         <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span>
@@ -424,12 +424,12 @@  discard block
 block discarded – undo
424 424
         <?php
425 425
         } else {
426 426
             echo "<div>";
427
-            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true);
427
+            echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true);
428 428
             echo "</div>";
429 429
         }
430 430
         ?>
431 431
         <?php
432
-        echo '<div id="ondb"><h4 style="margin: 0">' . _("Can't you find an institution on the select list above?") . '</h4>';
432
+        echo '<div id="ondb"><h4 style="margin: 0">'._("Can't you find an institution on the select list above?").'</h4>';
433 433
         echo _("Most likely we do not have required data on this institution in the eduroam database.");
434 434
         echo '<br/>';
435 435
         ?>
@@ -437,16 +437,16 @@  discard block
 block discarded – undo
437 437
         <?php
438 438
         echo _('On this page');
439 439
         echo '</a> ';
440
-        echo _('you can check what information is in the datatabase') . '.';
440
+        echo _('you can check what information is in the datatabase').'.';
441 441
         echo '</div>';
442 442
         if (count($feds) > 0 || count($allIdPs) > 0) {?>
443 443
         <h2><?php echo _("2. CSR generation"); ?></h2>
444 444
         <p>
445 445
         <?php 
446
-        echo _("The CSR subject field has to start with ") .'<b>' . $subject_prefix . '</b> and follow the pattern given in the example.<br>';
446
+        echo _("The CSR subject field has to start with ").'<b>'.$subject_prefix.'</b> and follow the pattern given in the example.<br>';
447 447
         echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p>
448 448
         <?php 
449
-        echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>";
449
+        echo "<b>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced</b>";
450 450
         ?>
451 451
         <h2><?php echo _("3. Submission"); ?></h2>
452 452
 <?php echo _("Please paste your CSR here:"); ?><br><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/>
Please login to merge, or discard this patch.
web/admin/action_enrollment.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 ?>
31 31
 <?php
32 32
 
33
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
33
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
34 34
 
35 35
 $auth = new \web\lib\admin\Authentication();
36 36
 $deco = new \web\lib\admin\PageDecoration();
@@ -44,24 +44,24 @@  discard block
 block discarded – undo
44 44
 
45 45
 
46 46
 if (!isset($_GET['token'])) {
47
-    $elements->errorPage(_("Error creating new IdP binding!"),_("This page needs to be called with a valid invitation token!"));
47
+    $elements->errorPage(_("Error creating new IdP binding!"), _("This page needs to be called with a valid invitation token!"));
48 48
 }
49 49
 
50 50
 if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL && $_GET['token'] == "SELF-REGISTER") {
51
-    $elements->errorPage(_("Error creating new IdP binding!"),_("You tried to register in self-service, but this deployment does not allow self-service!"));
51
+    $elements->errorPage(_("Error creating new IdP binding!"), _("You tried to register in self-service, but this deployment does not allow self-service!"));
52 52
 }
53 53
 
54 54
 switch ($_GET['token']) {
55 55
     case "EDUGAIN-SELF-REGISTER":
56 56
         $token = "EDUGAIN-SELF-REGISTER";
57
-        $extIdUnfiltered = filter_input(INPUT_GET,'extid');
57
+        $extIdUnfiltered = filter_input(INPUT_GET, 'extid');
58 58
         $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2);
59 59
         $ROid = $extIdArray[0];
60 60
         $extId = $extIdArray[1];
61
-        $fed = new \core\Federation(strtoupper(substr($ROid,0,2)));
61
+        $fed = new \core\Federation(strtoupper(substr($ROid, 0, 2)));
62 62
         $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst');
63 63
         if ($newInstFlag === []) {
64
-            $elements->errorPage(_("Error creating new IdP!"),_("You tried to register in self-service, but this federation does not allow self-service!"));
64
+            $elements->errorPage(_("Error creating new IdP!"), _("You tried to register in self-service, but this federation does not allow self-service!"));
65 65
         }
66 66
         // we must be sure that this person admins the ext institution and that it falls into the current federation
67 67
         if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         // and check that this institution does not match anuthing in CAT.
71 71
         $usermgmt = new \core\UserManagement();
72 72
         if ($usermgmt->checkForCatMatch($extId, $ROid) === 1) {
73
-            $elements->errorPage(_("Error creating new IdP!"),_("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!"));            
73
+            $elements->errorPage(_("Error creating new IdP!"), _("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!"));            
74 74
         }
75 75
         break;
76 76
     case "SELF-REGISTER":
@@ -79,23 +79,23 @@  discard block
 block discarded – undo
79 79
         $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration'];
80 80
         break;
81 81
     default:
82
-        $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token'));
82
+        $tokenUnfiltered = $validator->token(filter_input(INPUT_GET, 'token'));
83 83
         $token = htmlspecialchars(strip_tags($tokenUnfiltered));
84 84
         $checkval = $usermgmt->checkTokenValidity($token);
85 85
 }
86 86
 
87 87
 if ($checkval < 0) {
88 88
     echo $deco->pageheader(_("Error creating new IdP binding!"), "ADMIN-IDP");
89
-    echo "<h1>" . _("Error creating new IdP binding!") . "</h1>";
89
+    echo "<h1>"._("Error creating new IdP binding!")."</h1>";
90 90
     switch ($checkval) {
91 91
         case \core\UserManagement::TOKENSTATUS_FAIL_ALREADYCONSUMED:
92
-            echo "<p>" . sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant) . "</p>";
92
+            echo "<p>".sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureParticipant)."</p>";
93 93
             break;
94 94
         case \core\UserManagement::TOKENSTATUS_FAIL_EXPIRED:
95
-            echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed) . "</p>";
95
+            echo "<p>".sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed)."</p>";
96 96
             break;
97 97
         default:
98
-            echo "<p>" . _("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.") . "</p>";
98
+            echo "<p>"._("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.")."</p>";
99 99
     }
100 100
     echo $deco->footer();
101 101
     throw new Exception("Terminating because something is wrong with the token we received.");
@@ -109,17 +109,17 @@  discard block
 block discarded – undo
109 109
 switch ($token) {
110 110
     case "EDUGAIN-SELF-REGISTER":
111 111
         $newidp = $usermgmt->createIdPFromExternal($extId, $fed, $user);
112
-        $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice eduGAIN registration");
112
+        $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice eduGAIN registration");
113 113
         break;    
114 114
     case "SELF-REGISTER":
115 115
         $fed = new \core\Federation($federation);
116 116
         $newidp = new \core\IdP($fed->newIdP('SELF', core\IdP::TYPE_IDPSP, $user, "FED", "SELFSERVICE"));
117
-        $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice registration");
117
+        $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice registration");
118 118
         break;
119 119
     default:
120 120
         $newidp = $usermgmt->createIdPFromToken($token, $user);
121 121
         $usermgmt->invalidateToken($token);
122
-        $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - Token used and invalidated");
122
+        $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - Token used and invalidated");
123 123
         break;
124 124
 }
125 125
 
Please login to merge, or discard this patch.
web/lib/admin/PageDecoration.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -73,17 +73,17 @@  discard block
 block discarded – undo
73 73
         $retval = "<div class='sidebar'><p>";
74 74
         $user = new \core\User($_SESSION['user']);
75 75
         if ($advancedControls) {
76
-            $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name']
76
+            $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name']
77 77
             ."<br/>
78 78
               <br/>";
79 79
             if ($user->isFederationAdmin()) {
80
-                $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_federation.php'>" . _("The NRO page") . "</a> ";
80
+                $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_federation.php'>"._("The NRO page")."</a> ";
81 81
 
82 82
             }
83
-            $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> 
84
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> ";
83
+            $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> 
84
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> ";
85 85
         }
86
-        $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a>
86
+        $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a>
87 87
             </p>
88 88
         </div> <!-- sidebar -->";
89 89
         \core\common\Entity::outOfThePotatoes();
@@ -107,23 +107,23 @@  discard block
 block discarded – undo
107 107
                     <h1>$cap1</h1>
108 108
                 </div><!--header_captions-->
109 109
                 <div id='langselection' style='padding-top:20px; padding-".$this->start.":10px;'>
110
-                    <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . "&nbsp;
110
+                    <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")."&nbsp;
111 111
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
112 112
 
113 113
         foreach (\config\Master::LANGUAGES as $lang => $getValue) {
114
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> ";
114
+            $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> ";
115 115
         }
116 116
         $retval .= "</select>";
117 117
 
118 118
         foreach ($_GET as $getVar => $getValue) {
119 119
             $filterValue = htmlspecialchars(strip_tags(filter_input(INPUT_GET, $getVar)));
120 120
             if ($getVar != "lang" && $getValue != "") {
121
-                $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>";
121
+                $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>";
122 122
             }
123 123
         }
124 124
         $retval .= "</form>
125 125
                 </div><!--langselection-->";
126
-        $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png";
126
+        $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png";
127 127
         $retval .= "<div class='consortium_logo'>
128 128
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
129 129
                 </div> <!-- consortium_logo -->
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") {
218 218
             $retval .= "<div id='header_MOTD' style='display:inline-block; padding-".$this->start.":20px;vertical-align:top;'>
219
-              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p>
219
+              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p>
220 220
               </div><!--header_MOTD-->";
221 221
         }
222 222
         $retval .= $this->sidebar($advancedControls);
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
           <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'".($this->langObject->rtl ? "dir='rtl'" : "").">
243 243
           <head lang='$ourlocale'>
244 244
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
245
-        $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php";
245
+        $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php";
246 246
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
247 247
         $retval .= "<script src='".\core\CAT::getRootUrlPath()."/external/jquery/jquery.js'></script>";
248 248
         $retval .= "<script src='".\core\CAT::getRootUrlPath()."/admin/js/click_button.js'></script>";
249
-        $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
249
+        $retval .= "<title>".htmlspecialchars($pagetitle)."</title>";
250 250
         return $retval;
251 251
     }
252 252
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             // we may need to jump up one dir if we are either in admin/ or accountstatus/
261 261
             // (accountstatus courtesy of my good mood. It's userspace not admin space so
262 262
             // it shouldn't be using this function any more.)
263
-            $logoBase = \core\CAT::getRootUrlPath() . "/resources/images";
263
+            $logoBase = \core\CAT::getRootUrlPath()."/resources/images";
264 264
             return "<span id='logos'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
265 265
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
266 266
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
Please login to merge, or discard this patch.