Test Failed
Pull Request — master (#329)
by Dimitri
28:05 queued 08:51
created
utils/test_openroaming.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * License: see the web/copyright.php file in the file structure
9 9
  * ******************************************************************************
10 10
  */
11
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
11
+require_once dirname(dirname(__FILE__))."/config/_config.php";
12 12
 
13 13
 /**
14 14
  * The sctipt will be called from crontab
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-while ( $row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) {
31
+while ($row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) {
32 32
     $profileId = $row->profile_id;
33 33
     $profile = \core\ProfileFactory::instantiate($profileId);
34 34
     $res = $profile->openroamingReadinessTest();
Please login to merge, or discard this patch.
web/admin/overview_radsec_readiness.php 1 patch
Spacing   +22 added lines, -22 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
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
         echo '<br/>';
83 83
         echo _("In the 'Timestamp' column we show last update time.");
84 84
         echo '<p/>';
85
-        echo _('To check eduroam database specification see') . 
86
-                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">' .
87
-                _('this document') . '</a>.<p/>';
85
+        echo _('To check eduroam database specification see'). 
86
+                ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">'.
87
+                _('this document').'</a>.<p/>';
88 88
         echo _('If you cannot find your institution on this list it means that this institution is not present in your upstream data.');        
89 89
         echo '<p/>';
90 90
         $allAuthorizedFeds = $user->getAttributes("user:fedadmin");
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         ?>
94 94
         
95 95
     <select name="INST-list" id="INST-list">
96
-        <option value=""><?php echo _('---PLEASE CHOOSE---');?></option>
96
+        <option value=""><?php echo _('---PLEASE CHOOSE---'); ?></option>
97 97
         <?php 
98 98
         $instdata = array();
99 99
         foreach ($extInsts as $iid => $oneInst) {
100
-            print '<option value="' . $iid . '">' . $oneInst['name'] . '</option>';
100
+            print '<option value="'.$iid.'">'.$oneInst['name'].'</option>';
101 101
             $instdata[$iid] = array();
102 102
             $instdata[$iid]['name'] = $oneInst['name'];   
103 103
             $instdata[$iid]['type'] = _('no data');
@@ -111,22 +111,22 @@  discard block
 block discarded – undo
111 111
             $contactdata = '';
112 112
             foreach ($oneInst['contacts'] as $oneContact) {
113 113
                 if ($contactdata != '') {
114
-                    $contactdata = $contactdata . '<br>';
114
+                    $contactdata = $contactdata.'<br>';
115 115
                 }
116 116
                 if ($oneContact['name']) {
117
-                    $contactdata = $contactdata . $oneContact['name'];
117
+                    $contactdata = $contactdata.$oneContact['name'];
118 118
                 }
119 119
                 if ($contactdata != '') {
120
-                    $contactdata = $contactdata . '<br>';
120
+                    $contactdata = $contactdata.'<br>';
121 121
                 }
122 122
                 if ($oneContact['mail']) {
123
-                    $contactdata = $contactdata . $oneContact['mail'];
123
+                    $contactdata = $contactdata.$oneContact['mail'];
124 124
                 }
125 125
                 if ($contactdata != '') {
126
-                    $contactdata = $contactdata . '<br>';
126
+                    $contactdata = $contactdata.'<br>';
127 127
                 }
128 128
                 if ($oneContact['phone']) {
129
-                    $contactdata = $contactdata . $oneContact['phone'];
129
+                    $contactdata = $contactdata.$oneContact['phone'];
130 130
                 }        
131 131
             }
132 132
             if ($contactdata == '') {
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
             var instts = [];
146 146
             <?php
147 147
             foreach (array_keys($instdata) as $iid) {
148
-                echo "instservers['" . $iid . "']='" . $instdata[$iid]['servers']. "';\n";
149
-                echo "instname['" . $iid . "']='" . $instdata[$iid]['name']. "';\n";
150
-                echo "insttype['" . $iid . "']='" . $instdata[$iid]['type']. "';\n";
151
-                echo "instcontact['" . $iid . "']='" . $instdata[$iid]['contacts']. "';\n";
152
-                echo "instts['" . $iid . "']='" . $instdata[$iid]['ts']. "';\n";
148
+                echo "instservers['".$iid."']='".$instdata[$iid]['servers']."';\n";
149
+                echo "instname['".$iid."']='".$instdata[$iid]['name']."';\n";
150
+                echo "insttype['".$iid."']='".$instdata[$iid]['type']."';\n";
151
+                echo "instcontact['".$iid."']='".$instdata[$iid]['contacts']."';\n";
152
+                echo "instts['".$iid."']='".$instdata[$iid]['ts']."';\n";
153 153
             }
154 154
             ?>
155 155
             $(document).ready(function(){
@@ -171,18 +171,18 @@  discard block
 block discarded – undo
171 171
     <div id="instdata_area">
172 172
         <table>
173 173
             <tr><th align="left" width="350">
174
-                    <?php echo _('Name');?>
174
+                    <?php echo _('Name'); ?>
175 175
                 </th><th align="left" width="100">
176
-                    <?php echo _('Type');?>
176
+                    <?php echo _('Type'); ?>
177 177
                 </th>
178 178
                 <th align="left" width="200">
179
-                    <?php echo _('Servers');?>
179
+                    <?php echo _('Servers'); ?>
180 180
                 </th>
181 181
                 <th align="left" width="200">
182
-                    <?php echo _('Contact data');?>
182
+                    <?php echo _('Contact data'); ?>
183 183
                 </th>
184 184
                 <th align="left" width="100">
185
-                    <?php echo _('Timestamp');?>
185
+                    <?php echo _('Timestamp'); ?>
186 186
                 </th>
187 187
             </tr>
188 188
             <tr id="toshow"></tr>
Please login to merge, or discard this patch.
web/lib/admin/MapGoogle.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function htmlHeadCode() {
48 48
         $cat = new \core\CAT();
49 49
         \core\common\Entity::intoThePotatoes();
50
-        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script>
50
+        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script>
51 51
     <script type='text/javascript'>
52 52
         // some global variables;
53 53
         var center_lat=49.6114885608729;
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
          *
104 104
          */
105 105
         function locator_magic() {
106
-            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"},
106
+            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"},
107 107
             function(r,status) {
108 108
                 if(status != google.maps.GeocoderStatus.OK) {
109
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "\");
109
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name']."\");
110 110
                 } else {
111 111
                     var i;
112 112
                     for(i = 0; i < r.length; i++) {
113 113
                         Addr = getAddressElements(r[i].address_components);
114
-                        if(Addr.country == \"" . strtoupper($this->fedName) . "\")
114
+                        if(Addr.country == \"" . strtoupper($this->fedName)."\")
115 115
                         break;
116 116
                     }
117
-                    if(Addr.country != \"" . strtoupper($this->fedName) . "\")
118
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "\");
117
+                    if(Addr.country != \"" . strtoupper($this->fedName)."\")
118
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]['name']."\");
119 119
                     else {
120 120
                         addMarker(r[i].geometry.location,15,null);
121 121
                     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         function markerClicked(m) {
130 130
             info_window.close();
131
-            var t = \"" . _("This is location ") . "\"+m.info;
131
+            var t = \"" . _("This is location ")."\"+m.info;
132 132
             info_window.setContent(t);
133 133
             info_window.setPosition(m.getPosition());
134 134
             info_window.open(map,m);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         function getAddressLocation() {
208 208
             var city = $('#address').val();
209 209
             if(city == '') {
210
-                alert(\"" . _("nothing entered in the address field") . "\");
210
+                alert(\"" . _("nothing entered in the address field")."\");
211 211
                 return false;
212 212
             }
213 213
             geocoder.geocode( { 'address': city}, function(results, status) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
          * trigger geolocation
228 228
          */
229 229
         function locateMe() {
230
-            $('#address').val(\"" . _("locating") . "\");
230
+            $('#address').val(\"" . _("locating")."\");
231 231
             navigator.geolocation.getCurrentPosition(locate_success,locate_fail,{maximumAge:3600000, timeout:5000});
232 232
         }
233 233
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         if ($this->readOnly) {
346 346
             return "<div id='map' class='googlemap'></div>";
347 347
         } else {
348
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE);
348
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE);
349 349
         }
350 350
     }
351 351
 
@@ -358,11 +358,11 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public static function optionListDisplayCode($coords, $number) {
360 360
         // quiesce warnings about unused variable
361
-        if (strlen(sprintf("%s", $coords)) <0) {
361
+        if (strlen(sprintf("%s", $coords)) < 0) {
362 362
             throw new \Exception("A miracle! A string with negative length!");
363 363
         };
364 364
         \core\common\Entity::intoThePotatoes();
365
-        $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>";
365
+        $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>";
366 366
         \core\common\Entity::outOfThePotatoes();
367 367
         return $retval;
368 368
     }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      * @return string
374 374
      */
375 375
     public function bodyTagCode() {
376
-        return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'";
376
+        return "onload='load(".($this->readOnly ? "0" : "1").")'";
377 377
     }
378 378
 
379 379
     /**
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
      */
384 384
     private function findLocationHtml() {
385 385
         \core\common\Entity::intoThePotatoes();
386
-        $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
386
+        $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
387 387
         \core\common\Entity::outOfThePotatoes();
388 388
         return $retval;
389 389
     }
Please login to merge, or discard this patch.
web/lib/admin/Wizard.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -107,83 +107,83 @@  discard block
 block discarded – undo
107 107
         foreach ($optionsList as $option) {
108 108
             $this->optionsHelp[$option] = $this->displayName($option, true);
109 109
         }
110
-        array_multisort(array_column($this->optionsHelp,'display'), SORT_ASC, $this->optionsHelp);
110
+        array_multisort(array_column($this->optionsHelp, 'display'), SORT_ASC, $this->optionsHelp);
111 111
     }
112 112
     
113 113
     public function setMessages() {
114 114
         // FED general
115
-        $h = "<p><h3>" . _("Here you set federation-level options.") . "</h3><p>";
116
-        $h .= "<i>" . _("The following options are available:") . "</i><p>";
115
+        $h = "<p><h3>"._("Here you set federation-level options.")."</h3><p>";
116
+        $h .= "<i>"._("The following options are available:")."</i><p>";
117 117
         $h .= "<dl>";
118 118
         foreach ($this->optionsHelp as $o) {
119
-            $h .= "<dt>". $o['display'] . "</dt>";
120
-            $h .= "<dd>" . $o['help'] . "</dd>";
119
+            $h .= "<dt>".$o['display']."</dt>";
120
+            $h .= "<dd>".$o['help']."</dd>";
121 121
         }
122 122
         $h .= "</dl>";
123 123
         $this->helpMessage['fed_general'] = $h;
124 124
         // SUPPORT
125
-        $h = "<p>" . _("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.") . "</p>";
125
+        $h = "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>";
126 126
         if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") {
127
-            $h .= "<p>" .
128
-            sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant) . "</p>" .
129
-            "<p>" .
130
-            _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>";
127
+            $h .= "<p>".
128
+            sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $this->nomenclatureParticipant)."</p>".
129
+            "<p>".
130
+            _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>";
131 131
             if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
132
-                $h .= "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name']) . " " . _("This is the contact point for your organisation. It may be displayed publicly.") . "</p>";
132
+                $h .= "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), \config\ConfAssistant::SILVERBULLET['product_name'])." "._("This is the contact point for your organisation. It may be displayed publicly.")."</p>";
133 133
             }
134 134
         } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") {
135
-            $h .= "<p>" . _("Providing at least a local support e-mail contact is required.") . " " . _("This is the contact point for your end users' level 1 support.") . "</p>";
135
+            $h .= "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>";
136 136
         }
137 137
         $this->helpMessage['support'] = $h;
138 138
 
139 139
         // MEDIA
140
-        $h = "<p>" .
141
-            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p><ul>";
140
+        $h = "<p>".
141
+            sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p><ul>";
142 142
         $h .= "<li>";
143
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>";
143
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>";
144 144
         if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) {
145 145
             $ssidlist = "";
146 146
             foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) {
147
-                $ssidlist .= ", '<strong>" . $ssid . "</strong>'";
147
+                $ssidlist .= ", '<strong>".$ssid."</strong>'";
148 148
             }
149 149
             $ssidlist = substr($ssidlist, 2);
150 150
              $h .= sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist);
151
-             $h .= "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
151
+             $h .= "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $this->displayName("media:SSID"));
152 152
         } else {
153
-             $h .=  _("Please configure which SSIDs should be configured in the installers.");
153
+             $h .= _("Please configure which SSIDs should be configured in the installers.");
154 154
         }
155
-         $h .= " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
155
+         $h .= " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible.");
156 156
          $h .= "</li>";
157 157
 
158 158
         $h .= "<li>";
159
-        $h .= "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>";
159
+        $h .= "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>";
160 160
         if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) {
161 161
             $consortiumlist = "";
162 162
             foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) {
163
-                $consortiumlist .= ", '<strong>" . $oi . "</strong>'";
163
+                $consortiumlist .= ", '<strong>".$oi."</strong>'";
164 164
             }
165 165
             $consortiumlist = substr($consortiumlist, 2);
166 166
             $h .= sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist);
167 167
 
168
-            $h .= "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
168
+            $h .= "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $this->displayName("media:consortium_OI"));
169 169
         } else {
170 170
             $h .= _("Please configure which Consortium OIs should be configured in the installers.");
171 171
         }
172 172
         $h .= "</li>";
173
-        $h .= "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>"
174
-        . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") .
173
+        $h .= "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>"
174
+        . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).").
175 175
         "</li>";
176
-        $h .= "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>"
176
+        $h .= "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>"
177 177
         . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.")
178 178
         . "</li>";
179 179
         $h .= "</ul>";
180 180
         $this->helpMessage['media'] = $h;
181 181
         
182 182
         // IDP GENERAL
183
-        $h = "<p>" .
184
-        _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p>".
183
+        $h = "<p>".
184
+        _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p>".
185 185
             "<ul>".
186
-                "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li>".
186
+                "<li>"._("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li>".
187 187
                 "<li>".sprintf(_("<strong>%s</strong>: The organisation may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $this->displayName("general:instname"))."</li>".
188 188
                 "<li>".sprintf(_("<strong>%s</strong>: This acronym will be used as an element of the installer file name instead of one automatically created from first letters of every word in the institution name. You may add acronyms for multiple languages (but only one per language). The acronym will also be used as a keyword for the organisation search on the user's downloads page."), $this->displayName("general:instshortname"))."</li>".
189 189
                 "<li>".sprintf(_("<strong>%s</strong>: You may add several versions of the organisation name or acronyms which will be used as additional keywords exclusively for the organisation search on the user's downloads page."), $this->displayName("general:instaltname"))."</li>".
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
         $this->helpMessage['idp_general'] = $h;
192 192
         
193 193
         // PROFILE GENERAL
194
-        $h = "<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>".
195
-            "<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>".
196
-            "<p>" . _("You can also tell us your RADIUS realm. ");
194
+        $h = "<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>".
195
+            "<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>".
196
+            "<p>"._("You can also tell us your RADIUS realm. ");
197 197
             if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
198 198
                $h .= sprintf(_("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']);
199 199
             }
200
-        $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
200
+        $h .= _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
201 201
         $this->helpMessage['profile'] = $h;
202 202
         
203 203
         // REALM
@@ -207,24 +207,24 @@  discard block
 block discarded – undo
207 207
         $this->helpMessage['realm'] = $h;
208 208
         
209 209
         // REDIRECT
210
-         $h ="<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>";
210
+         $h = "<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>";
211 211
         $this->helpMessage['redirect'] = $h;
212 212
         
213 213
         // EAP
214
-        $h = "<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>";
214
+        $h = "<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>";
215 215
         $this->helpMessage['eap_support'] = $h;
216 216
         
217 217
         // LOCATIOM
218
-        $h = "<p>" .
219
-                    _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.") .
218
+        $h = "<p>".
219
+                    _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.").
220 220
                     "</p>
221 221
                      <ul>" .
222 222
                     _("<li>Drag the marker in the map to your place, or</li>
223 223
 <li>enter your street address in the field below for lookup, or</li>
224
-<li>use the 'Locate Me!' button</li>") .
224
+<li>use the 'Locate Me!' button</li>").
225 225
                     "</ul>
226 226
                      <strong>" .
227
-                    _("We will use the coordinates as indicated by the marker for geolocation.") .
227
+                    _("We will use the coordinates as indicated by the marker for geolocation.").
228 228
                     "</strong>";
229 229
         $this->helpMessage['location'] = $h;
230 230
     }
Please login to merge, or discard this patch.
web/lib/admin/MapOpenLayers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         
84 84
 // use HTML5 geolocation
85 85
         function locateMe() {
86
-            $('#address').val(\"" . _("locating") . "\");
86
+            $('#address').val(\"" . _("locating")."\");
87 87
             navigator.geolocation.getCurrentPosition(locate_success,locate_fail,{maximumAge:3600000, timeout:5000});
88 88
         }
89 89
         
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 view.fit(extent, {padding: [10, 0, 10, 0]});
206 206
             } else {
207 207
                 view.setCenter([0,0]);
208
-                locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name'] . "'); // use the federation code to locate the country
208
+                locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]['name']."'); // use the federation code to locate the country
209 209
                 map.setView(view);
210 210
             }
211 211
             view.setMaxZoom(20);
@@ -227,14 +227,14 @@  discard block
 block discarded – undo
227 227
         function getAddressLocation() {
228 228
             var city = $('#address').val();
229 229
             if(city == '') {
230
-                alert(\"" . _("nothing entered in the address field") . "\");
230
+                alert(\"" . _("nothing entered in the address field")."\");
231 231
                 return false;
232 232
             }
233 233
             city = city.replace(/\s*,\s*/g,',+');
234 234
             city = city.replace(/ +/,'+');
235 235
             $.get(addressService+'?format=json&addressdetails=0&q='+city, '',  function(data) {
236 236
                 if (data[0] === undefined) {
237
-                    alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.") . "');
237
+                    alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.")."');
238 238
                     return;
239 239
                 }
240 240
                 showTmpPointer(data[0].lon, data[0].lat);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         if ($this->readOnly) {
286 286
             return "<div id='map' class='locationmap'></div><script>generateMap('map')</script>";
287 287
         } else {
288
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>" . $this->htmlPostEdit(FALSE);
288
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>".$this->htmlPostEdit(FALSE);
289 289
         }
290 290
     }
291 291
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         // we don't need this parameter in this subclass
311 311
         unset($coords);
312 312
         \core\common\Entity::intoThePotatoes();
313
-        $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>";
313
+        $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>";
314 314
         \core\common\Entity::outOfThePotatoes();
315 315
         return $retval;
316 316
     }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      */
323 323
     private function findLocationHtml() {
324 324
         \core\common\Entity::intoThePotatoes();
325
-        $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
325
+        $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
326 326
         \core\common\Entity::outOfThePotatoes();
327 327
         return $retval;
328 328
     }
Please login to merge, or discard this patch.
web/skins/modern/accountstatus/accountstatus.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 $Gui->loggerInstance->debug(4, $operatingSystem);
48 48
 $uiElements = new web\lib\admin\UIElements();
49 49
 if ($operatingSystem) {
50
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
50
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
51 51
 }
52
-require dirname(__DIR__) . '/user/js/cat_js.php';
52
+require dirname(__DIR__).'/user/js/cat_js.php';
53 53
 ?>
54 54
     var lang = "<?php echo($Gui->languageInstance->getLang()) ?>";
55 55
 </script>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                         <?php
80 80
                         switch ($statusInfo['errorcode']) {
81 81
                             case "GENERATOR_CONSUMED":
82
-                                echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to reuse download link"), TRUE) . "<p>";
82
+                                echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to reuse download link"), TRUE)."<p>";
83 83
                                 break;
84 84
                             case NULL:
85 85
                             default:
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                                     echo " ";
103 103
                                     echo sprintf(ngettext("<strong>%d</strong> of your credentials is not valid any more.", "<strong>%d</strong> of your credentials are not valid any more.", $noGoodCerts), $noGoodCerts);
104 104
                                 }
105
-                                echo " <span id='detailtext'>" . _("I want to see the details.") . "</span>";
105
+                                echo " <span id='detailtext'>"._("I want to see the details.")."</span>";
106 106
                                 echo "<table id='cert_details'></table>";
107 107
                             }
108 108
                         }
@@ -111,60 +111,60 @@  discard block
 block discarded – undo
111 111
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_VALID: // treat both cases as equal
112 112
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED:
113 113
                                 if ($statusInfo['invitation_object']->activationsTotal > 1) { // only show this extra info in the non-trivial case.
114
-                                    echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining) . "</h3>";
114
+                                    echo "<h3>".sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining)."</h3>";
115 115
                                 }
116 116
                                 if (!$statusInfo["OS"]) {
117
-                                    echo "<p>" . _("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
117
+                                    echo "<p>"._("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.")."</p>";
118 118
                                     break;
119 119
                                 }
120 120
 
121 121
                                 $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
122 122
                                 $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
123 123
                                 if ($dev->device->selectedEap == []) {
124
-                                    echo "<p>" . sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
124
+                                    echo "<p>".sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display'])."</p>";
125 125
                                     break;
126 126
                                 }
127
-                                $message = $dev->device->options['message'] ?? '' ;
127
+                                $message = $dev->device->options['message'] ?? '';
128 128
 
129 129
                                 $sbMessage = $dev->device->options['sb_message'] ?? '';
130 130
                                 if ($message != '' && $sbMessage != '') {
131
-                                    $message = $message . "<p>" . $sbMessage;
131
+                                    $message = $message."<p>".$sbMessage;
132 132
                                 } else {
133
-                                    $message = $message . $sbMessage;
133
+                                    $message = $message.$sbMessage;
134 134
                                 }
135 135
                          
136
-                                echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
136
+                                echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
137 137
 //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
138 138
                                 echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
139
-                                echo "<p style='color:red;'>" . sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";
140
-                                echo "<p>" . _("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.") . "</p></div>";
139
+                                echo "<p style='color:red;'>".sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";
140
+                                echo "<p>"._("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.")."</p></div>";
141 141
 
142 142
                                 $importPassword = \core\common\Entity::randomString(4, "0123456789");
143 143
                                 $profile = new \core\ProfileSilverbullet($statusInfo['profile']->identifier, NULL);
144 144
                                 
145
-                                echo "<h2>" . sprintf(_("Import PIN: %s"), $importPassword) . "</h2>";
145
+                                echo "<h2>".sprintf(_("Import PIN: %s"), $importPassword)."</h2>";
146 146
                                 $_SESSION['individualtoken'] = $cleanToken;
147 147
                                 $_SESSION['importpassword'] = $importPassword;
148
-                                echo "<input type='hidden' name='device' value='" . $statusInfo['OS']['device'] . "'/>";
148
+                                echo "<input type='hidden' name='device' value='".$statusInfo['OS']['device']."'/>";
149 149
                                 echo "<input type='hidden' name='generatedfor' value='silverbullet'/>";
150
-                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>" . sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</span></button>";
150
+                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>".sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name'])."</span></button>";
151 151
                                 echo "<div class='device_info' id='info_g_sb'></div>";
152 152
                                 break;
153 153
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
154 154
                                 echo "<h2>Invitation link expired</h2>";
155
-                                echo "<p>" . sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry) . "</p>";
155
+                                echo "<p>".sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry)."</p>";
156 156
                                 echo "<p>Below is all the information about your account's other login details, if any.</p>";
157 157
 // do NOT break, display full account info instead (this was a previously valid token after all)
158 158
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_REDEEMED:
159 159
                                 // nothing to say really. User got the breakdown of certs above, and this link doesn't give him any new ones.
160 160
                                 break;
161 161
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID:
162
-                                echo "<h2>" . _("Account information not found") . "</h2>";
163
-                                echo "<p>" . sprintf(_("The invitation link you followed does not map to any invitation we have on file.") . "</p><p>" . _("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."),\config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
162
+                                echo "<h2>"._("Account information not found")."</h2>";
163
+                                echo "<p>".sprintf(_("The invitation link you followed does not map to any invitation we have on file.")."</p><p>"._("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
164 164
                         }
165 165
                         if (isset($statusInfo['profile_id']) && isset($statusInfo['idp_id'])) {
166
-                            echo "<input type='hidden' name='profile' id='profile_id' value='" . $statusInfo['profile_id'] . "'/>";
167
-                            echo "<input type='hidden' id='inst_id' name='idp' value='" . $statusInfo['idp_id'] . "'/>";
166
+                            echo "<input type='hidden' name='profile' id='profile_id' value='".$statusInfo['profile_id']."'/>";
167
+                            echo "<input type='hidden' id='inst_id' name='idp' value='".$statusInfo['idp_id']."'/>";
168 168
                         }
169 169
                         ?>
170 170
                     </div>
@@ -184,18 +184,18 @@  discard block
 block discarded – undo
184 184
     $attributes = $statusInfo['attributes'];
185 185
     $supportInfo = '';
186 186
     if (!empty($attributes['local_url'])) {
187
-        $supportInfo .= '<tr><td>' . ("WWW:") . '</td><td><a href="' . $attributes['local_url'] . '" target="_blank">' . $attributes['local_url'] . '</a></td></tr>';
187
+        $supportInfo .= '<tr><td>'.("WWW:").'</td><td><a href="'.$attributes['local_url'].'" target="_blank">'.$attributes['local_url'].'</a></td></tr>';
188 188
     }
189 189
     if (!empty($attributes['local_email'])) {
190
-        $supportInfo .= '<tr><td>' . ("email:") . '</td><td><a href="' . $attributes['local_email'] . '" target="_blank">' . $attributes['local_email'] . '</a></td></tr>';
190
+        $supportInfo .= '<tr><td>'.("email:").'</td><td><a href="'.$attributes['local_email'].'" target="_blank">'.$attributes['local_email'].'</a></td></tr>';
191 191
     }
192 192
     if (!empty($attributes['local_phone'])) {
193
-        $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
193
+        $supportInfo .= '<tr><td>'.("tel:").'</td><td><a href="'.$attributes['local_phone'].'" target="_blank">'.$attributes['local_phone'].'</a></td></tr>';
194 194
     }
195 195
     if ($supportInfo != '') {
196
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems, then you can obtain direct assistance from your organisation at:") . "</th></tr>$supportInfo</table>";
196
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems, then you can obtain direct assistance from your organisation at:")."</th></tr>$supportInfo</table>";
197 197
     } else {
198
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems you should ask those who gave you your account for help.") . "</th></tr></table>";
198
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems you should ask those who gave you your account for help.")."</th></tr></table>";
199 199
     }
200 200
     ?>
201 201
     <script>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             var logo = <?php echo $statusInfo['idp_logo']; ?>;
205 205
             var idpId = <?php echo $statusInfo['idp_id']; ?>;
206 206
             <?php
207
-                if($message != '') {
207
+                if ($message != '') {
208 208
                     echo "message = \"$message\";\n";
209 209
                 }
210 210
             ?>
Please login to merge, or discard this patch.