Passed
Push — master ( a7aa10...668d26 )
by Tomasz
07:06
created
web/skins/modern/Menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
         $langsArray = [];
41 41
         foreach (\config\Main::LANGUAGES as $lang => $value) {
42 42
             if ($lang == $selectedLang) {
43
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")', 'class'=>'selected-lang'];
43
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")', 'class'=>'selected-lang'];
44 44
             } else {
45
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")'];
45
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")'];
46 46
             }
47 47
         }
48 48
         $this->menu = [['id' => 'start',
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
                 $iD = $menuItem['id'] ?? $id;
102 102
                 $catInfo = NULL;
103 103
                 if (!empty($menuItem['catInfo'])) {
104
-                    $catInfo = 'javascript:infoCAT("' . $iD . '", "' . $menuItem['catInfo'][0] . '","' . $menuItem['catInfo'][1] . '")';
104
+                    $catInfo = 'javascript:infoCAT("'.$iD.'", "'.$menuItem['catInfo'][0].'","'.$menuItem['catInfo'][1].'")';
105 105
                 }
106 106
                 if (!empty($menuItem['link']) && substr($menuItem['link'], 0, 1) === '/') {
107
-                    $menuItem['link'] = \core\CAT::getRootUrlPath() . $menuItem['link'];
107
+                    $menuItem['link'] = \core\CAT::getRootUrlPath().$menuItem['link'];
108 108
                 }
109 109
                 $link = $catInfo ?? $menuItem['link'] ?? '';
110
-                $class = empty($menuItem['class']) ? '' : ' class="' . $menuItem['class'] . '"';
110
+                $class = empty($menuItem['class']) ? '' : ' class="'.$menuItem['class'].'"';
111 111
                 $submenu = $menuItem['submenu'] ?? [];
112 112
                 $out .= $this->printMenuItem($menuItem['text'], $link, $class);
113 113
                 $out .= $this->printMenu($submenu, $iD);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($itemLink === '') {
132 132
             return("<li><span>$itemText</span>");
133 133
         }
134
-        return "<li><a href='" . $itemLink . "'" . $itemClass . '>' . $itemText . "</a>";
134
+        return "<li><a href='".$itemLink."'".$itemClass.'>'.$itemText."</a>";
135 135
     }
136 136
     
137 137
     /**
Please login to merge, or discard this patch.
web/skins/modern/copyright.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 <head>
25 25
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
26 26
 <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
27
-<title><?php echo config\Main::APPEARANCE['productname'];?> Copyright and Licensing</title>
27
+<title><?php echo config\Main::APPEARANCE['productname']; ?> Copyright and Licensing</title>
28 28
 </head>
29 29
 <body>
30 30
 <div id="wrap">
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             <div id="user_page" style="display:block">
36 36
                 <?php echo $divs->divPagetitle(config\Main::APPEARANCE['productname']." Copyright and Licensing", ""); ?>
37 37
                 <div style="padding:20px">
38
-            <?php require dirname(dirname(__DIR__)) . "/copyright.inc.php"; ?>
38
+            <?php require dirname(dirname(__DIR__))."/copyright.inc.php"; ?>
39 39
                 </div>
40 40
             </div>
41 41
         </div>
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png");
61 61
         if ($location !== FALSE) {
62 62
             $retval .= "<div id='cat_logo'>
63
-            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
63
+            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
64 64
             <span>Configuration Assistant Tool</span>
65 65
             </div>";
66 66
         }
67
-        $retval .= "<div id='motd'>" . (isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp') . "</div>";
67
+        $retval .= "<div id='motd'>".(isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp')."</div>";
68 68
         $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png");
69 69
         if ($loc2 !== FALSE) {
70 70
             $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>";
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     public function divUserWelcome() {
88 88
         $retval = "
89 89
 <div id='user_welcome'> <!-- this information is shown just before the download -->
90
-    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong>
90
+    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong>
91 91
     <p>
92 92
     <span id='download_info'>
93 93
     <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime -->
94
-        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . "
94
+        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]."
95 95
     </span>
96
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . "
96
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]."
97 97
     <br/>
98 98
     <br/>";
99 99
         switch (\config\ConfAssistant::CONSORTIUM['name']) {
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         }
105 105
         $retval .= "
106 106
     </p>
107
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . "
108
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . "
107
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]."
108
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]."
109 109
     </p>
110 110
     <p>
111
-    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a>
111
+    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a>
112 112
     </p>
113 113
 </div> <!-- id='user_welcomer_page' -->
114 114
 ";
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function divSilverbullet() {
124 124
         $retval = "
125 125
 <div id='silverbullet'>"
126
-                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
126
+                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY].
127 127
                 "</div>
128 128
     ";
129 129
         return $retval;
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
     public function divTopWelcome() {
138 138
         $retval = '';
139 139
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
140
-            $retval = "<br><div id='top_invite_ad'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD] . "</div>";
140
+            $retval = "<br><div id='top_invite_ad'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD]."</div>";
141 141
         }
142 142
         return "
143 143
 <div id='welcome_top1'>
144
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . "
144
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]."
145 145
 </div>
146 146
 <div id='top_invite'>
147
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . "
147
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval."
148 148
 </div>";
149 149
     }
150 150
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $retval = "
158 158
 <div id='roller'>
159 159
     <div id='slides'>
160
-        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span>
160
+        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
161 161
         <span id='line2'></span>
162 162
         <span id='line3'></span>
163 163
         <span id='line4'>";
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
     public function divProfiles() {
220 220
         return "
221 221
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
222
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
222
+    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
223 223
     </div>" .
224
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
224
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
225 225
                 "</div>";
226 226
     }
227 227
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     public function divInstitution($selectButton = TRUE) {
250 250
         $retval = "<div id='institution_name'>
251 251
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
252
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") .
252
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
253 253
                 "</div>";
254 254
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
255 255
         return $retval;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     public function divOtherinstallers() {
274 274
         $retval = "
275 275
 <div class='sub_h'>
276
-    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
276
+    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
277 277
          <table id='device_list' style='padding:0px;'>";
278 278
 
279 279
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -281,18 +281,18 @@  discard block
 block discarded – undo
281 281
             $deviceIndex = 0;
282 282
 
283 283
             $imgTag = "";
284
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
284
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
285 285
             if ($imgLocation !== FALSE) {
286
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
286
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
287 287
             }
288
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
288
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
289 289
             foreach ($deviceGroup as $d => $D) {
290 290
                 if ($deviceIndex) {
291 291
                     $retval .= '<tr>';
292 292
                 }
293
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
294
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
295
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
293
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
294
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
295
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
296 296
                 $deviceIndex++;
297 297
             }
298 298
             $retval .= "</tbody>";
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
      * @return string
313 313
      */
314 314
     public function divGuessOs($operatingSystem) {
315
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
315
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
316 316
         $vendorstyle = "";
317 317
         if ($vendorlogo !== FALSE) {
318
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
318
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
319 319
         }
320 320
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
321 321
         $deleteImg = "";
322 322
         if ($deleteIcon !== FALSE) {
323
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
323
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
324 324
         }
325 325
         return "
326 326
 <div class='sub_h' id='guess_os'>
@@ -328,23 +328,23 @@  discard block
 block discarded – undo
328 328
     <table id='browser'>
329 329
         <tr>
330 330
             <td>
331
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
331
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
332 332
                     $deleteImg
333
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
333
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
334 334
                     </div>
335 335
                     <div class='download_button_text'>" .
336
-                $operatingSystem['display'] . "
336
+                $operatingSystem['display']."
337 337
                     </div>
338 338
                 </button>
339
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
339
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
340 340
           </td>
341 341
           <td style='vertical-align:top'>
342
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
342
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
343 343
           </td>
344 344
       </tr>
345 345
     </table> <!-- id='browser' -->
346 346
     <div class='sub_h'>
347
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
347
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
348 348
     </div>
349 349
 </div> <!-- id='guess_os' -->";
350 350
     }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             </td>";
366 366
 
367 367
         if (!empty(\config\Main::APPEARANCE['privacy_notice_url'])) {
368
-            $retval .= "<td><a href='" . \config\Main::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
368
+            $retval .= "<td><a href='".\config\Main::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
369 369
         }
370 370
         $retval .= "<td>";
371 371
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
web/admin/overview_sp.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Main::APPEARANCE['productname'], $uiElements->nomenclatureHotspot));
@@ -99,29 +99,29 @@  discard block
 block discarded – undo
99 99
     ?>
100 100
     <hr><h2><?php $tablecaption = _("Available Support actions"); echo $tablecaption; ?></h2>
101 101
     <table>
102
-        <caption><?php echo $tablecaption;?></caption>
102
+        <caption><?php echo $tablecaption; ?></caption>
103 103
         <tr>
104
-        <th class='wai-invisible' scope='col'><?php echo _("Action");?></th>
105
-        <th class='wai-invisible' scope='col'><?php echo _("Trigger");?></th>
104
+        <th class='wai-invisible' scope='col'><?php echo _("Action"); ?></th>
105
+        <th class='wai-invisible' scope='col'><?php echo _("Trigger"); ?></th>
106 106
         </tr>
107 107
             <?php
108 108
         if (\config\Main::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
109 109
             echo "<tr>
110
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"),$uiElements->nomenclatureInst) . "</td>
110
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of %ss"), $uiElements->nomenclatureInst)."</td>
111 111
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
112 112
                               <!--<input type='text' name='realm' id='realm'>-->
113 113
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
114
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
114
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
115 115
                             </form>
116 116
                         </td>
117 117
                     </tr>";
118 118
         }
119 119
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED
120 120
             echo "<tr>
121
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
121
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
122 122
                         <td>
123 123
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
124
-                              <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
124
+                              <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button>
125 125
                            </form>
126 126
                         </td>
127 127
                     </tr>";
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
     <?php
133 133
     $hotspotProfiles = $my_inst->listDeployments();
134 134
     if (count($hotspotProfiles) == 0) { // no profiles yet.
135
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
135
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
136 136
     }
137 137
     if (count($hotspotProfiles) > 0) { // no profiles yet.
138
-        echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>";
138
+        echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>";
139 139
         // display an info box with the connection data
140 140
     }
141 141
    
@@ -154,26 +154,26 @@  discard block
 block discarded – undo
154 154
         ?>
155 155
         <div style='display: table-row; margin-bottom: 20px;'>
156 156
             <div class='profilebox' style='display: table-cell;'>
157
-                <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
157
+                <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
158 158
                 <table>
159
-                    <caption><?php echo _("Deployment Details");?></caption>
159
+                    <caption><?php echo _("Deployment Details"); ?></caption>
160 160
                     <tr>
161
-                        <th class='wai-invisible' scope='col'><?php echo("Server IP addresses");?></th>
162
-                        <th class='wai-invisible' scope='col'><?php echo("Server Port label");?></th>
163
-                        <th class='wai-invisible' scope='col'><?php echo("Server Port value");?></th>
164
-                        <th class='wai-invisible' scope='col'><?php echo("Deployment Status");?></th>
161
+                        <th class='wai-invisible' scope='col'><?php echo("Server IP addresses"); ?></th>
162
+                        <th class='wai-invisible' scope='col'><?php echo("Server Port label"); ?></th>
163
+                        <th class='wai-invisible' scope='col'><?php echo("Server Port value"); ?></th>
164
+                        <th class='wai-invisible' scope='col'><?php echo("Deployment Status"); ?></th>
165 165
                     </tr>
166 166
                     <tr>
167 167
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
168 168
                         <?php
169 169
                             if ($deploymentObject->host1_v4 !== NULL) {
170
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
170
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
171 171
                             }
172 172
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
173 173
                                 echo "<br/>";
174 174
                             }
175 175
                             if ($deploymentObject->host1_v6 !== NULL) {
176
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
176
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
177 177
                             }
178 178
                             ?>
179 179
                         </td>
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
                         <td><?php echo $deploymentObject->port1; ?></td>
182 182
                         <td>
183 183
                             <?php
184
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
185
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
186
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
184
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. 
185
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. 
186
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
187 187
                             ?>
188 188
                         </td>
189 189
                     </tr>
@@ -191,22 +191,22 @@  discard block
 block discarded – undo
191 191
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
192 192
                             <?php
193 193
                             if ($deploymentObject->host2_v4 !== NULL) {
194
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
194
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
195 195
                             }
196 196
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
197 197
                                 echo "<br/>";
198 198
                             }
199 199
                             if ($deploymentObject->host2_v6 !== NULL) {
200
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
200
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
201 201
                             }
202 202
                             ?></td>
203 203
                         <td><?php echo _("RADIUS port number: ") ?></td>
204 204
                         <td><?php echo $deploymentObject->port2; ?></td>
205 205
                         <td>
206 206
                             <?php
207
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
208
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
209
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
207
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
208
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. 
209
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
210 210
                             ?>
211 211
                         </td>
212 212
                     </tr>
@@ -257,12 +257,12 @@  discard block
 block discarded – undo
257 257
                                     if (isset($res['FAILURE']) && $res['FAILURE'] > 0) {
258 258
                                         echo '<br>';
259 259
                                         if ($res['FAILURE'] == 2) {
260
-                                            echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
260
+                                            echo ' <span style="color: red;">'._("Activation failure.").'</span>';
261 261
                                         } else {
262 262
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
263
-                                                echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
263
+                                                echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
264 264
                                             } else {
265
-                                                echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
265
+                                                echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
266 266
                                             }
267 267
                                         }
268 268
                                     }
@@ -282,12 +282,12 @@  discard block
 block discarded – undo
282 282
                                     if ($res['FAILURE'] > 0) {
283 283
                                         echo '<br>';
284 284
                                         if ($res['FAILURE'] == 2) {
285
-                                            echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
285
+                                            echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
286 286
                                         } else {
287 287
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
288
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
288
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
289 289
                                             } else {
290
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
290
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
291 291
                                             }
292 292
                                         }
293 293
                                     }
Please login to merge, or discard this patch.
web/admin/edit_profile.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     <?php
128 128
     echo $uiElements->instLevelInfoBoxes($my_inst);
129 129
 
130
-    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&amp;profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'>
131
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Main::MAX_UPLOAD_SIZE . "'>";
130
+    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&amp;profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'>
131
+                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Main::MAX_UPLOAD_SIZE."'>";
132 132
     $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE);
133 133
     ?>
134 134
     <fieldset class="option_container">
@@ -137,29 +137,29 @@  discard block
 block discarded – undo
137 137
         </legend>
138 138
         <?php
139 139
         if ($wizardStyle) {
140
-            echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
140
+            echo "<p>"._("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>";
141 141
         }
142 142
         ?>
143 143
         <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3>
144 144
         <?php
145 145
         if ($wizardStyle) {
146
-            echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>";
147
-            echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>";
148
-            echo "<p>" . _("You can also tell us your RADIUS realm. ");
146
+            echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>";
147
+            echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>";
148
+            echo "<p>"._("You can also tell us your RADIUS realm. ");
149 149
             if (\config\Main::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
150 150
                 printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
151 151
             }
152
-            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
152
+            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
153 153
         }
154 154
 
155 155
         echo $optionDisplay->prefilledOptionTable("profile");
156 156
         ?>
157 157
         <button type='button' class='newoption' onclick='getXML("profile")'><?php echo _("Add new option"); ?></button>
158 158
         <table>
159
-            <caption><?php echo _("Basic Realm Information");?></caption>
159
+            <caption><?php echo _("Basic Realm Information"); ?></caption>
160 160
             <tr>
161
-                <th class="wai-invisible" scope="col"><?php echo _("Realm:");?></th>
162
-                <th class="wai-invisible" scope="col"><?php echo _("Realm input field");?></th>
161
+                <th class="wai-invisible" scope="col"><?php echo _("Realm:"); ?></th>
162
+                <th class="wai-invisible" scope="col"><?php echo _("Realm input field"); ?></th>
163 163
             </tr>
164 164
             <?php
165 165
             ?>
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 
205 205
         <?php
206 206
         if ($wizardStyle) {
207
-            echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>";
208
-            echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>";
209
-            echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>";
207
+            echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>";
208
+            echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>";
209
+            echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
210 210
         }
211 211
         ?>
212 212
         <p>
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 
215 215
             <!-- UI table to align elements-->
216 216
         <table>
217
-            <caption><?php echo _("Username Handling Options");?></caption>
217
+            <caption><?php echo _("Username Handling Options"); ?></caption>
218 218
             <tr>
219
-                <th class="wai-invisible" scope="col"><?php echo _("Option name");?></th>
220
-                <th class="wai-invisible" scope="col"><?php echo _("Option checkbox");?></th>
219
+                <th class="wai-invisible" scope="col"><?php echo _("Option name"); ?></th>
220
+                <th class="wai-invisible" scope="col"><?php echo _("Option checkbox"); ?></th>
221 221
             </tr>
222 222
 
223 223
             <tr>
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
                 </td>
230 230
                 <td>
231 231
                     <input type='checkbox' <?php
232
-                    echo ($verify != FALSE ? "checked" : "" );
232
+                    echo ($verify != FALSE ? "checked" : "");
233 233
                     ?> name='verify_support' onclick='
234 234
                             if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) {
235 235
                                 this.form.elements["hint_support"].setAttribute("disabled", "disabled");
@@ -237,48 +237,48 @@  discard block
 block discarded – undo
237 237
                                 this.form.elements["hint_support"].removeAttribute("disabled");
238 238
                             }
239 239
                             ;'/>
240
-                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
240
+                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
241 241
                         <?php echo _("Prefill user input with realm suffix:"); ?>
242 242
                     </span>
243
-                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> />
243
+                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> />
244 244
                 </td>
245 245
             </tr>
246 246
             <tr>
247 247
 
248 248
                 <!-- checkbox and input field for anonymity support, available only when realm is known-->
249 249
                 <td>
250
-                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
250
+                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
251 251
                         <?php echo _("Enable Anonymous Outer Identity:"); ?>
252 252
                     </span>
253 253
                 </td>
254 254
                 <td>
255
-                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick='
255
+                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick='
256 256
                             if (this.form.elements["anon_support"].checked !== true) {
257 257
                                 this.form.elements["anon_local"].setAttribute("disabled", "disabled");
258 258
                             } else {
259 259
                                 this.form.elements["anon_local"].removeAttribute("disabled");
260 260
                             }
261 261
                             ;'/>
262
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
262
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
263 263
                 </td>    
264 264
             </tr>
265 265
             <tr>
266 266
 
267 267
                 <!-- checkbox and input field for check realm outer id, available only when realm is known-->
268 268
                 <td>
269
-                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
269
+                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
270 270
                         <?php echo _("Use special Outer Identity for realm checks:"); ?>
271 271
                     </span>
272 272
                 </td>
273 273
                 <td>
274
-                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick='
274
+                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick='
275 275
                             if (this.form.elements["checkuser_support"].checked !== true) {
276 276
                                 this.form.elements["checkuser_local"].setAttribute("disabled", "disabled");
277 277
                             } else {
278 278
                                 this.form.elements["checkuser_local"].removeAttribute("disabled");
279 279
                             }
280 280
                             ;'/>
281
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
281
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
282 282
                 </td>
283 283
             </tr>
284 284
         </table>
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 
289 289
     <?php
290 290
     if ($wizardStyle) {
291
-        echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
291
+        echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>";
292 292
     }
293 293
     ?>
294 294
     <p>
295 295
 
296 296
         <?php
297
-        echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span>
298
-                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick='
297
+        echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span>
298
+                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick='
299 299
                               if (this.form.elements[\"redirect\"].checked != true) {
300 300
                                 this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\");
301 301
                               } else {
302 302
                                 this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\");
303 303
                               };'/>
304
-                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>";
304
+                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>";
305 305
         ?>
306 306
     </p>
307 307
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend>
311 311
     <?php
312 312
     if ($wizardStyle) {
313
-        echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>";
313
+        echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>";
314 314
     }
315 315
     ?>
316 316
     <?php
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     ?>
335 335
     <div>
336 336
         <table style="border:none">
337
-            <caption><?php echo _("EAP type support");?></caption>
337
+            <caption><?php echo _("EAP type support"); ?></caption>
338 338
             <tr>
339 339
                 <th scope="row" style="vertical-align:top; padding:1em">
340 340
                     <?php echo _('Supported EAP types for this profile'); ?>
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                         <?php
345 345
                         $D = [];
346 346
                         foreach ($prefill_methods as $prio => $value) {
347
-                            print '<li>' . $value->getPrintableRep() . "</li>\n";
347
+                            print '<li>'.$value->getPrintableRep()."</li>\n";
348 348
                             $D[$value->getPrintableRep()] = $prio;
349 349
                         }
350 350
                         ?>
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                             }
371 371
                             $display = $a->getPrintableRep();
372 372
                             if (!isset($D[$a->getPrintableRep()])) {
373
-                                print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n";
373
+                                print '<li class="eap1">'.$a->getPrintableRep()."</li>\n";
374 374
                             }
375 375
                         }
376 376
                         ?>
@@ -383,8 +383,8 @@  discard block
 block discarded – undo
383 383
     foreach ($methods as $a) {
384 384
         $display = $a->getPrintableRep();
385 385
         $v = isset($D[$display]) ? $D[$display] : '';
386
-        print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">';
387
-        print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">';
386
+        print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">';
387
+        print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">';
388 388
     }
389 389
     ?>
390 390
     <br style="clear:both;" />
@@ -404,11 +404,11 @@  discard block
 block discarded – undo
404 404
 foreach ($optionsAlreadySet as $optionNames) {
405 405
     if (preg_match("/^support:/", $optionNames)) {
406 406
         $has_support_options[$optionNames] = "SET";
407
-        $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
407
+        $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
408 408
     }
409 409
     if (preg_match("/^media:/", $optionNames)) {
410 410
         $has_media_options[$optionNames] = "SET";
411
-        $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
411
+        $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
412 412
     }
413 413
 }
414 414
 $fields = [
@@ -417,22 +417,22 @@  discard block
 block discarded – undo
417 417
     "media" => _("Media Properties for this profile")];
418 418
 
419 419
 foreach ($fields as $name => $description) {
420
-    echo "<fieldset class='option_container' id='" . $name . "_override'>
420
+    echo "<fieldset class='option_container' id='".$name."_override'>
421 421
     <legend><strong>$description</strong></legend>
422 422
     <p>";
423 423
 
424
-    if (count(${"has_" . $name . "_options"}) > 0) {
425
-        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>");
424
+    if (count(${"has_".$name."_options"}) > 0) {
425
+        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>");
426 426
     }
427 427
 
428 428
     echo "</p>";
429 429
     echo $optionDisplay->prefilledOptionTable($name);
430
-    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>";
430
+    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>";
431 431
     echo "</fieldset>";
432 432
 }
433 433
 
434 434
 if ($wizardStyle) {
435
-    echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>";
435
+    echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>";
436 436
 }
437
-echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
437
+echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
438 438
 echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +34 added lines, -34 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(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     <div class="infobox">
51 51
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
52 52
         <table>
53
-            <caption><?php echo $tablecaption;?></caption>
53
+            <caption><?php echo $tablecaption; ?></caption>
54 54
             <tr>
55
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
56
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
57
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
55
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
56
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
57
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
58 58
             </tr>            
59 59
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-                    <?php echo "" . _("Unique Identifier") ?>
62
+                    <?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $mgmt = new \core\UserManagement();
75 75
 
76 76
     if (!$user->isFederationAdmin()) {
77
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
77
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
78 78
         echo $deco->footer();
79 79
         exit(0);
80 80
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
89 89
             </h2>
90 90
             <table>
91
-            <caption><?php echo $tablecaption2;?></caption>
91
+            <caption><?php echo $tablecaption2; ?></caption>
92 92
             <tr>
93
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
94
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
95
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
93
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
94
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
95
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
96 96
             </tr>
97 97
                 <!-- fed properties -->
98 98
                 <tr>
99 99
                     <td>
100
-                        <?php echo "" . _("Country") ?>
100
+                        <?php echo ""._("Country") ?>
101 101
                     </td>
102 102
                     <td>
103 103
                     </td>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     default:
179 179
                         throw new Exception("Error: unknown encryption status of invitation!?!");
180 180
                 }
181
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
181
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
182 182
                 break;
183 183
             case "FAILURE":
184 184
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     default:
199 199
                         throw new Exception("Error: unknown encryption status of invitation!?!");
200 200
                 }
201
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
201
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
202 202
                 break;
203 203
             case "INVALIDSYNTAX":
204 204
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -214,27 +214,27 @@  discard block
 block discarded – undo
214 214
     } else {
215 215
         $link = 'http://';
216 216
     }
217
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
217
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
218 218
     $link = htmlspecialchars($link);
219 219
     if (\config\Main::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Main::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
220 220
         echo "<table><tr>
221
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
221
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
222 222
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
223 223
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
224
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
224
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
225 225
                             </form>
226 226
                         </td>
227 227
                     </tr>
228 228
                     </table>";
229 229
     }
230 230
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
231
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
231
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
232 232
     } else {
233 233
         $helptext = "";
234 234
     }
235 235
     ?>
236 236
     <table class='user_overview' style='border:0px;'>
237
-        <caption><?php echo _("Participant Details");?></caption>
237
+        <caption><?php echo _("Participant Details"); ?></caption>
238 238
         <tr>
239 239
             <th scope='col'><?php echo _("Deployment Status"); ?></th>
240 240
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $pending_invites = $mgmt->listPendingInvitations();
244 244
 
245 245
             if (\config\Main::DB['enforce-external-sync']) {
246
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
246
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
247 247
             }
248 248
             ?>
249 249
             <th scope='col'>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         foreach ($feds as $onefed) {
259 259
             $thefed = new \core\Federation(strtoupper($onefed['value']));
260 260
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
261
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
261
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
262 262
 
263 263
             // extract only pending invitations for *this* fed
264 264
             $display_pendings = FALSE;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 // deployment status; need to dive into profiles for this
284 284
                 // show happy eyeballs if at least one profile is configured/showtime                    
285 285
                 echo "<td>";
286
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
286
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
287 287
                 echo "</td>";
288 288
                 // name; and realm of silverbullet profiles if any
289 289
                 // instantiating all profiles is costly, so we only do this if
@@ -297,23 +297,23 @@  discard block
 block discarded – undo
297 297
                     }
298 298
                 }
299 299
                 echo "<td style='vertical-align:top;'>
300
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
300
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
301 301
                       </td>";
302 302
                 // external DB sync, if configured as being necessary
303 303
                 if (\config\Main::DB['enforce-external-sync']) {
304 304
                     echo "<td style='display: ruby;'>";
305 305
                     if ($readonly === FALSE) {
306
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
306
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
308 308
                     }
309 309
                     switch ($idp_instance->getExternalDBSyncState()) {
310 310
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
311 311
                             break;
312 312
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
313
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
313
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
314 314
                             break;
315 315
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
316
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
316
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
317 317
 
318 318
 
319 319
                             break;
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 echo "<td style='vertical-align: top;'>";
327 327
                 if ($readonly === FALSE) {
328 328
                     echo "<div style='white-space: nowrap;'>
329
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
329
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330 330
                                       <button type='submit'>" .
331
-                    _("Add/Remove Administrators") . "
331
+                    _("Add/Remove Administrators")."
332 332
                                       </button>
333 333
                                   </form>
334 334
                                 </div>";
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 echo "<tr>
342 342
                             <td colspan='2'>
343 343
                                <strong>" .
344
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
344
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
345 345
                                </strong>
346 346
                             </td>
347 347
                          </tr>";
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
350 350
                         echo "<tr>
351 351
                                     <td>" .
352
-                        $oneinvite['name'] . "
352
+                        $oneinvite['name']."
353 353
                                     </td>
354 354
                                     <td>" .
355
-                        $oneinvite['mail'] . "
355
+                        $oneinvite['mail']."
356 356
                                     </td>
357 357
                                     <td colspan=2>";
358 358
                         if ($readonly === FALSE) {
359 359
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
360
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
361
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
360
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
361
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
362 362
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
363 363
                             . "</form>";
364 364
                         }
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +25 added lines, -25 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(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Main::APPEARANCE['productname']), "ADMIN-IDP");
53 53
         } else {
54 54
             $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
55
-            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created");
55
+            $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
56 56
             echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Main::APPEARANCE['productname']), "ADMIN-IDP");
57 57
         }
58 58
         if (!$profile instanceof \core\ProfileRADIUS) {
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
         ?>
110 110
         <h1><?php $tablecaption = _("Submitted attributes for this profile"); echo $tablecaption; ?></h1>
111 111
         <table>
112
-            <caption><?php echo $tablecaption;?></caption>
112
+            <caption><?php echo $tablecaption; ?></caption>
113 113
             <tr>
114
-                <th class="wai-invisible" scope="col"><?php echo _("Overall Result");?></th>
115
-                <th class="wai-invisible" scope="col"><?php echo _("Details");?></th>
114
+                <th class="wai-invisible" scope="col"><?php echo _("Overall Result"); ?></th>
115
+                <th class="wai-invisible" scope="col"><?php echo _("Details"); ?></th>
116 116
             </tr>
117 117
             <?php
118 118
             $uiElements = new web\lib\admin\UIElements();
119 119
             // set realm info, if submitted
120 120
             if ($realm !== FALSE) {
121
-                $profile->setRealm($anonLocal . "@" . $realm);
121
+                $profile->setRealm($anonLocal."@".$realm);
122 122
                 echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm));
123 123
             } else {
124 124
                 $profile->setRealm("");
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!"));
142 142
                 } else {
143 143
                     $profile->setRealmcheckUser(true, $checkuser_name);
144
-                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm));
144
+                    echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm));
145 145
                 }
146 146
             } else {
147 147
                 $profile->setRealmCheckUser(false);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 } else {
155 155
                     $profile->setInputVerificationPreference($verify, $hint);
156 156
                     if ($hint !== FALSE) {
157
-                        $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
157
+                        $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm);
158 158
                     } else {
159 159
                         $extratext = ".";
160 160
                     }
@@ -191,17 +191,17 @@  discard block
 block discarded – undo
191 191
                 echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>"));
192 192
             }
193 193
 
194
-            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed");
194
+            $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed");
195 195
 
196 196
             foreach (\core\common\EAP::listKnownEAPTypes() as $a) {
197 197
                 if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor
198 198
                     continue;
199 199
                 }
200
-                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) {
201
-                    $priority = (int) $_POST[$a->getPrintableRep() . "-priority"];
200
+                if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) {
201
+                    $priority = (int) $_POST[$a->getPrintableRep()."-priority"];
202 202
                     // add EAP type to profile as requested, but ...
203 203
                     $profile->addSupportedEapMethod($a, $priority);
204
-                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed");
204
+                    $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed");
205 205
                 }
206 206
             }
207 207
             // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete()
@@ -210,23 +210,23 @@  discard block
 block discarded – undo
210 210
             if (count($significantChanges) > 0) {
211 211
                 $myInstOriginal = new \core\IdP($profile->institution);
212 212
                 // send a notification/alert mail to someone we know is in charge
213
-                $text = _("To whom it may concern,") . "\n\n";
213
+                $text = _("To whom it may concern,")."\n\n";
214 214
                 /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name
215
-                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n";
215
+                $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n";
216 216
                 if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) {
217
-                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n";
218
-                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n";
217
+                    $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n";
218
+                    $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n";
219 219
                 }
220 220
                 if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) {
221 221
                     $text .= _("A new trusted root CA was added. The details are below:\n\n");
222
-                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n";
222
+                    $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n";
223 223
                 }
224 224
                 if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) {
225
-                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n";
226
-                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n";
225
+                    $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n";
226
+                    $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n";
227 227
                 }
228
-                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n";
229
-                $text .= _("Greetings, ") . "\n\n" . \config\Main::APPEARANCE['productname_long'];
228
+                $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n";
229
+                $text .= _("Greetings, ")."\n\n".\config\Main::APPEARANCE['productname_long'];
230 230
                 // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly)
231 231
                 $fed = new core\Federation($myInstOriginal->federation);
232 232
                 foreach ($fed->listFederationAdmins() as $id) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 // see if we can enable the EAP type, or if info is missing
239 239
                     $eapcompleteness = $reloadedProfile->isEapTypeDefinitionComplete($oneEap);
240 240
                     if ($eapcompleteness === true) {
241
-                        echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $oneEap->getPrintableRep() . "</strong>");
241
+                        echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$oneEap->getPrintableRep()."</strong>");
242 242
                     } else {
243 243
                         
244 244
                         if (is_array($eapcompleteness)) {
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
                             $warntext = "<strong>";
248 248
                             foreach ($eapcompleteness as $item) {
249 249
                                 $iterator = $iterator + 1;
250
-                                $warntext .= $uiElements->displayName($item) . "</strong>".($iterator < $number ? ", " : "")."<strong>";
250
+                                $warntext .= $uiElements->displayName($item)."</strong>".($iterator < $number ? ", " : "")."<strong>";
251 251
                             }
252 252
                             $warntext .= "</strong>";
253 253
                         }
254
-                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
254
+                        echo $uiElements->boxWarning(sprintf(_("Supported EAP Type <strong>%s</strong> is missing required information: %s !"), $oneEap->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you."));
255 255
                     }
256 256
             }
257 257
             $reloadedProfile->prepShowtime();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         <?php
265 265
         if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) {
266 266
             echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'>
267
-        <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button>
267
+        <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button>
268 268
     </form>";
269 269
         }
270 270
         echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/edit_hotspot.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (!isset($_GET['deployment_id'])) {
38 38
     $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED);
39
-    header("Location: overview_sp.php?inst_id=" . $my_inst->identifier);
39
+    header("Location: overview_sp.php?inst_id=".$my_inst->identifier);
40 40
     exit(0);
41 41
 }
42 42
 // if we have come this far, we are editing an existing deployment
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         if (in_array('OK', $response)) {
49 49
             $deployment->deactivate();
50 50
         }
51
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
51
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
52 52
         exit(0);
53 53
     }
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if (in_array('OK', $response)) {
58 58
             $deployment->activate();
59 59
         }
60
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
60
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
61 61
         exit(0);
62 62
     }
63 63
     
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $deployment->status = core\DeploymentManaged::INACTIVE;
79 79
             $response = $deployment->setRADIUSconfig();
80 80
         }
81
-        header("Location: overview_sp.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response)));
81
+        header("Location: overview_sp.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response)));
82 82
         exit(0);
83 83
     }
84 84
 }
@@ -106,21 +106,21 @@  discard block
 block discarded – undo
106 106
     echo $uiElements->instLevelInfoBoxes($my_inst);
107 107
     $deploymentOptions = $deployment->getAttributes();
108 108
     echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&amp;deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'>
109
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Main::MAX_UPLOAD_SIZE . "'>";
109
+                <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Main::MAX_UPLOAD_SIZE."'>";
110 110
     $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE);
111 111
     ?>
112 112
     <fieldset class='option_container' id='managedsp_override'>
113 113
     <legend>
114 114
         <strong>
115
-    <?php $tablecaption = _("Options for this deployment"); echo $tablecaption;?>
115
+    <?php $tablecaption = _("Options for this deployment"); echo $tablecaption; ?>
116 116
         </strong>
117 117
     </legend>
118 118
     <table>
119
-            <caption><?php echo $tablecaption;?></caption>
119
+            <caption><?php echo $tablecaption; ?></caption>
120 120
             <tr>
121
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
122
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
123
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
121
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
122
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
123
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
124 124
             </tr>
125 125
         <tr>
126 126
             <!-- input for Operator-Name override-->
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             <!-- input for VLAN identifier for home users-->
138 138
             <td>
139 139
                 <span id='vlan_label'>
140
-                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?>
140
+                    <?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?>
141 141
                 </span>
142 142
             </td>
143 143
             <td>
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
     <?php
154 154
     echo $optionDisplay->prefilledOptionTable("managedsp");
155 155
     ?>
156
-    <button type='button' class='newoption' onclick='getXML("managedsp")'><?php echo _("Add new option");?></button>
156
+    <button type='button' class='newoption' onclick='getXML("managedsp")'><?php echo _("Add new option"); ?></button>
157 157
     </fieldset>
158 158
 
159 159
 <?php
160
-    echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
160
+    echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_sp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
161 161
     echo $deco->footer();
162 162
     
Please login to merge, or discard this patch.
web/admin/logout_check.php 1 patch
Spacing   +3 added lines, -3 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(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 require_once \config\Main::AUTHENTICATION['ssp-path-to-autoloader'];
24 24
 
25 25
 $deco = new \web\lib\admin\PageDecoration();
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
     if ($cutoff !== FALSE) {    
39 39
         $substring = substr($_SERVER['PHP_SELF'], 0, $cutoff);
40 40
         if ($substring !== FALSE) {
41
-            $url = "//" . htmlspecialchars($_SERVER['SERVER_NAME']) . $substring;
41
+            $url = "//".htmlspecialchars($_SERVER['SERVER_NAME']).$substring;
42 42
         }
43 43
     }
44 44
     header("Location: $url");
45 45
 } else {
46 46
     /* Logout failed. Tell the user to close the browser. */
47 47
     echo $deco->pageheader(_("Incomplete Logout"), "ADMIN", FALSE);
48
-    echo "<p>" . _("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.") . "</p>";
48
+    echo "<p>"._("We were unable to log you out of all your sessions. To be completely sure that you are logged out, you need to close your web browser.")."</p>";
49 49
     echo $deco->footer();
50 50
 }
Please login to merge, or discard this patch.