Completed
Branch master (03ec64)
by Brook
14:43
created
web/user/cat_info.php 1 patch
Braces   +27 added lines, -21 removed lines patch added patch discarded remove patch
@@ -35,10 +35,11 @@  discard block
 block discarded – undo
35 35
         $out = '<script type="text/javascript">document.location.href="' . Config::$CONSORTIUM['homepage'] . '"</script>';
36 36
         break;
37 37
     case 'about_consortium':
38
-        if (Config::$CONSORTIUM['name'] == "eduroam")
39
-            $out = sprintf(_("eduroam is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all eduroam hotspots on the planet. There are several million eduroam users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the eduroam homepage</a> for more details."));
40
-        else
41
-            $out = "";
38
+        if (Config::$CONSORTIUM['name'] == "eduroam") {
39
+                    $out = sprintf(_("eduroam is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all eduroam hotspots on the planet. There are several million eduroam users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the eduroam homepage</a> for more details."));
40
+        } else {
41
+                    $out = "";
42
+        }
42 43
         break;
43 44
     case 'about':
44 45
         $out = sprintf(_("<span class='edu_cat'>%s</span> is built as a cooperation platform.<p>Local %s administrators enter their %s configuration details and based on them, <span class='edu_cat'>%s</span> builds customised installers for a number of popular platforms. An installer prepared for one institution will not work for users of another one, therefore if your institution is not on the list, you cannot use this system. Please contact your local administrators and try to influence them to add your institution configuration to <span class='edu_cat'>%s</span>."), Config::$APPEARANCE['productname'], Config::$CONSORTIUM['name'], Config::$CONSORTIUM['name'], Config::$APPEARANCE['productname'], Config::$APPEARANCE['productname']);
@@ -49,16 +50,18 @@  discard block
 block discarded – undo
49 50
         }
50 51
         $out .= "</tr>";
51 52
         foreach (Devices::listDevices() as $index => $onedevice) {
52
-            if (isset ($onedevice['options']) && (($onedevice['options']['hidden'] == 1) || ($onedevice['options']['redirect'] == 1)))
53
-                continue;
53
+            if (isset ($onedevice['options']) && (($onedevice['options']['hidden'] == 1) || ($onedevice['options']['redirect'] == 1))) {
54
+                            continue;
55
+            }
54 56
             $out .= "<tr><td class='vendor'><img src='resources/images/vendorlogo/" . $onedevice['group'] . ".png' alt='logo'></td><td>" . $onedevice['display'] . "</td>";
55 57
             $device_instance = new DeviceFactory($index);
56 58
             foreach (EAP::listKnownEAPTypes() as $oneeap) {
57 59
                 $out .= "<td>";
58
-                if (in_array($oneeap, $device_instance->device->supportedEapMethods))
59
-                    $out .= "<img src='resources/images/icons/Quetto/check-icon.png' alt='SUPPORTED'>";
60
-                else
61
-                    $out .= "<img src='resources/images/icons/Quetto/no-icon.png' alt='UNSUPPOERTED'>";
60
+                if (in_array($oneeap, $device_instance->device->supportedEapMethods)) {
61
+                                    $out .= "<img src='resources/images/icons/Quetto/check-icon.png' alt='SUPPORTED'>";
62
+                } else {
63
+                                    $out .= "<img src='resources/images/icons/Quetto/no-icon.png' alt='UNSUPPOERTED'>";
64
+                }
62 65
                 $out .= "</td>";
63 66
             }
64 67
             $out .= "</tr>";
@@ -69,10 +72,12 @@  discard block
 block discarded – undo
69 72
                                 . "<b><u>REQUIRED</u></b>"
70 73
                                 . "<ul>"
71 74
                                 . "<li><b>%s</b> (the service itself)</li>"), Config::$APPEARANCE['productname'], valid_host($_SERVER['HTTP_HOST']));
72
-        if (!empty(Config::$APPEARANCE['webcert_CRLDP']))
73
-            $out .= sprintf(ngettext("<li><b>%s</b> (the CRL Distribution Point for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the CRL Distribution Points for the site certificate), also TCP/80</li>", count(Config::$APPEARANCE['webcert_CRLDP'])), implode(", ", Config::$APPEARANCE['webcert_CRLDP']));
74
-        if (!empty(Config::$APPEARANCE['webcert_OCSP']))
75
-            $out .= sprintf(ngettext("<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", count(Config::$APPEARANCE['webcert_OCSP'])), implode(", ", Config::$APPEARANCE['webcert_OCSP']));
75
+        if (!empty(Config::$APPEARANCE['webcert_CRLDP'])) {
76
+                    $out .= sprintf(ngettext("<li><b>%s</b> (the CRL Distribution Point for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the CRL Distribution Points for the site certificate), also TCP/80</li>", count(Config::$APPEARANCE['webcert_CRLDP'])), implode(", ", Config::$APPEARANCE['webcert_CRLDP']));
77
+        }
78
+        if (!empty(Config::$APPEARANCE['webcert_OCSP'])) {
79
+                    $out .= sprintf(ngettext("<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", "<li><b>%s</b> (the OCSP Responder for the site certificate), also TCP/80</li>", count(Config::$APPEARANCE['webcert_OCSP'])), implode(", ", Config::$APPEARANCE['webcert_OCSP']));
80
+        }
76 81
         $out .= sprintf(_("<li><b>android.l.google.com</b> (Google Play access for Android App)</li>"
77 82
                         . "<li><b>android.clients.google.com</b> (Google Play access for Android App)</li>"
78 83
                         . "<li><b>play.google.com</b> (Google Play access for Android App)</li>"
@@ -116,13 +121,14 @@  discard block
 block discarded – undo
116 121
         require_once(Config::$AUTHENTICATION['ssp-path-to-autoloader']);
117 122
 
118 123
         $as = new SimpleSAML_Auth_Simple(Config::$AUTHENTICATION['ssp-authsource']);
119
-        if ($as->isAuthenticated())
120
-            $out.='<script type="text/javascript">goAdmin()</script>';
121
-        else {
122
-            if (Config::$CONSORTIUM['selfservice_registration'] === NULL)
123
-                $out .= sprintf(_("You must have received an invitation from your national %s operator before being able to manage your institution. If that is the case, please continue and log in."), Config::$CONSORTIUM['name']);
124
-            else
125
-                $out .= _("Please authenticate yourself and login");
124
+        if ($as->isAuthenticated()) {
125
+                    $out.='<script type="text/javascript">goAdmin()</script>';
126
+        } else {
127
+            if (Config::$CONSORTIUM['selfservice_registration'] === NULL) {
128
+                            $out .= sprintf(_("You must have received an invitation from your national %s operator before being able to manage your institution. If that is the case, please continue and log in."), Config::$CONSORTIUM['name']);
129
+            } else {
130
+                            $out .= _("Please authenticate yourself and login");
131
+            }
126 132
             $out .= "<p><button onclick='goAdmin(); return(false);'>" . _("Login") . "</button>";
127 133
         }
128 134
         break;
Please login to merge, or discard this patch.
web/user/cat_back.php 1 patch
Braces   +20 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 $API = new UserAPI();
16 16
 
17 17
 // extract request parameters; action is mandatory
18
-if(!isset($_REQUEST['action']))
18
+if(!isset($_REQUEST['action'])) {
19 19
    exit;
20
+}
20 21
 
21 22
 $action  = $_REQUEST['action'];
22 23
 $id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
@@ -42,29 +43,41 @@  discard block
 block discarded – undo
42 43
         $API->JSON_listIdentityProvidersForDisco();
43 44
         break;
44 45
     case 'listProfiles': // needs $id set - abort if not
45
-        if ($id === FALSE) exit;
46
+        if ($id === FALSE) {
47
+            exit;
48
+        }
46 49
         $API->JSON_listProfiles($id,$sort);
47 50
         break;
48 51
     case 'listDevices':
49 52
         $API->JSON_listDevices($id);
50 53
         break;
51 54
     case 'generateInstaller': // needs $id and $profile set
52
-        if ($id === FALSE || $profile === FALSE) exit;
55
+        if ($id === FALSE || $profile === FALSE) {
56
+            exit;
57
+        }
53 58
         $API->JSON_generateInstaller($id, $profile);
54 59
         break;
55 60
     case 'downloadInstaller': // needs $id and $profile set optional $generatedfor
56
-        if ($id === FALSE || $profile === FALSE) exit;
61
+        if ($id === FALSE || $profile === FALSE) {
62
+            exit;
63
+        }
57 64
         $API->downloadInstaller($id, $profile,$generatedfor);
58 65
         break;
59 66
     case 'profileAttributes': // needs $id set
60
-        if ($id === FALSE) exit;
67
+        if ($id === FALSE) {
68
+            exit;
69
+        }
61 70
         $API->JSON_profileAttributes($id);
62 71
         break;
63 72
     case 'sendLogo': // needs $id and $disco set
64
-        if ($id === FALSE) exit;
73
+        if ($id === FALSE) {
74
+            exit;
75
+        }
65 76
         $API->sendLogo($id, $disco);
66 77
     case 'deviceInfo': // needs $id and profile set
67
-        if ($id === FALSE || $profile === FALSE) exit;
78
+        if ($id === FALSE || $profile === FALSE) {
79
+            exit;
80
+        }
68 81
         $API->deviceInfo($id, $profile);
69 82
         break;
70 83
     case 'locateUser':
Please login to merge, or discard this patch.
web/user/API.php 1 patch
Braces   +50 added lines, -27 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
 $API = new UserAPI();
16 16
 
17 17
 // extract request parameters; action is mandatory
18
-if(!isset($_REQUEST['action']))
18
+if(!isset($_REQUEST['action'])) {
19 19
    exit;
20
+}
20 21
 
21 22
 $action  = $_REQUEST['action'];
22 23
 $id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
@@ -47,52 +48,72 @@  discard block
 block discarded – undo
47 48
         $API->JSON_listCountries();
48 49
         break;
49 50
     case 'listIdentityProviders':
50
-        if(! $federation)
51
-           $federation = $id;
51
+        if(! $federation) {
52
+                   $federation = $id;
53
+        }
52 54
         $API->JSON_listIdentityProviders($federation);
53 55
         break;
54 56
     case 'listAllIdentityProviders':
55 57
         $API->JSON_listIdentityProvidersForDisco();
56 58
         break;
57 59
     case 'listProfiles': // needs $idp set - abort if not
58
-        if(! $idp) 
59
-           $idp = $id;
60
-        if ($idp === FALSE) exit;
60
+        if(! $idp) {
61
+                   $idp = $id;
62
+        }
63
+        if ($idp === FALSE) {
64
+            exit;
65
+        }
61 66
         $API->JSON_listProfiles($idp,$sort);
62 67
         break;
63 68
     case 'listDevices':
64
-        if(! $profile)
65
-           $profile = $id;
69
+        if(! $profile) {
70
+                   $profile = $id;
71
+        }
66 72
         $API->JSON_listDevices($profile);
67 73
         break;
68 74
     case 'generateInstaller': // needs $id and $profile set
69
-        if(! $device)
70
-            $device = $id;
71
-        if ($device === FALSE || $profile === FALSE) exit;
75
+        if(! $device) {
76
+                    $device = $id;
77
+        }
78
+        if ($device === FALSE || $profile === FALSE) {
79
+            exit;
80
+        }
72 81
         $API->JSON_generateInstaller($device, $profile);
73 82
         break;
74 83
     case 'downloadInstaller': // needs $id and $profile set optional $generatedfor
75
-        if(! $device)
76
-            $device = $id;
77
-        if ($device === FALSE || $profile === FALSE) exit;
84
+        if(! $device) {
85
+                    $device = $id;
86
+        }
87
+        if ($device === FALSE || $profile === FALSE) {
88
+            exit;
89
+        }
78 90
         $API->downloadInstaller($device, $profile,$generatedfor);
79 91
         break;
80 92
     case 'profileAttributes': // needs $id set
81
-        if(! $profile)
82
-           $profile = $id;
83
-        if ($profile === FALSE) exit;
93
+        if(! $profile) {
94
+                   $profile = $id;
95
+        }
96
+        if ($profile === FALSE) {
97
+            exit;
98
+        }
84 99
         $API->JSON_profileAttributes($profile);
85 100
         break;
86 101
     case 'sendLogo': // needs $id and $disco set
87
-        if(! $idp)
88
-           $idp = $id;
89
-        if ($idp === FALSE) exit;
102
+        if(! $idp) {
103
+                   $idp = $id;
104
+        }
105
+        if ($idp === FALSE) {
106
+            exit;
107
+        }
90 108
         $API->sendLogo($idp, $disco,$width,$height);
91 109
         break;
92 110
     case 'deviceInfo': // needs $id and profile set
93
-        if(! $device)
94
-            $device = $id;
95
-        if ($id === FALSE || $profile === FALSE) exit;
111
+        if(! $device) {
112
+                    $device = $id;
113
+        }
114
+        if ($id === FALSE || $profile === FALSE) {
115
+            exit;
116
+        }
96 117
         $API->deviceInfo($device, $profile);
97 118
         break;
98 119
     case 'locateUser':
@@ -102,13 +123,15 @@  discard block
 block discarded – undo
102 123
         $API->JSON_detectOS();
103 124
         break;
104 125
     case 'orderIdentityProviders':
105
-        if(! $federation)
106
-           $federation = $id;
126
+        if(! $federation) {
127
+                   $federation = $id;
128
+        }
107 129
          if($location)  {
108 130
             $A=explode(':',$location);
109 131
             $L = ['lat'=>$A[0],'lon'=>$A[1]];
110
-         } else
111
-            $L = NULL;
132
+         } else {
133
+                     $L = NULL;
134
+         }
112 135
         $API->JSON_orderIdentityProviders($federation,$L);
113 136
         break;
114 137
 }
Please login to merge, or discard this patch.
web/index.php 1 patch
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -38,19 +38,22 @@  discard block
 block discarded – undo
38 38
 }
39 39
 
40 40
 private function printMenuLine($index,$title="",$style="") {
41
-if ($style !== "")
41
+if ($style !== "") {
42 42
    print  "<tr><td style='$style'><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
43
-else
43
+} else {
44 44
    print  "<tr><td><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
45 45
 }
46
+}
46 47
 
47 48
 public function printMenu() {
48
-  foreach ($this->menu as $index => $title)
49
-  if(is_array($title))
50
-     $this->printMenuLine($index,$title[0],$title[1]); 
51
-  else
52
-     $this->printMenuLine($index,$title); 
53
-}
49
+  foreach ($this->menu as $index => $title) {
50
+    if(is_array($title))
51
+     $this->printMenuLine($index,$title[0],$title[1]);
52
+  }
53
+  else {
54
+       $this->printMenuLine($index,$title);
55
+  }
56
+  }
54 57
 
55 58
 private $menu;
56 59
 }
@@ -93,15 +96,17 @@  discard block
 block discarded – undo
93 96
 <?php
94 97
 $OS = $Gui->detectOS();
95 98
 debug(4,$OS);
96
-if($OS)
99
+if($OS) {
97 100
    print "recognised_os = '".$OS['device']."';\n";
101
+}
98 102
 $download_message = sprintf(_("Download your %s installer"),Config::$CONSORTIUM['name']);
99 103
 print 'download_message = "'.$download_message.'";';
100 104
 //TODO modify this based on OS detection
101
-if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT']))
105
+if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT'])) {
102 106
     $profile_list_size = 1;
103
-else
107
+} else {
104 108
     $profile_list_size = 4;
109
+}
105 110
 include("user/js/roll.php");
106 111
 include("user/js/cat_js.php");
107 112
 ?>
@@ -176,8 +181,9 @@  discard block
 block discarded – undo
176 181
                                             <span id="line4"><?php echo _("Custom built for your home institution") ?></span>
177 182
                                             <span id="line5">
178 183
                                             <?php
179
-                                            if (isset(Config::$CONSORTIUM['signer_name']) && Config::$CONSORTIUM['signer_name'] != "")
180
-                                                echo sprintf(_("Digitally signed by the organisation that coordinates %s: %s"),Config::$CONSORTIUM['name'],Config::$CONSORTIUM['signer_name']);
184
+                                            if (isset(Config::$CONSORTIUM['signer_name']) && Config::$CONSORTIUM['signer_name'] != "") {
185
+                                                                                            echo sprintf(_("Digitally signed by the organisation that coordinates %s: %s"),Config::$CONSORTIUM['name'],Config::$CONSORTIUM['signer_name']);
186
+                                            }
181 187
                                             ?>
182 188
                                             </span>
183 189
                                         </div>
@@ -304,8 +310,9 @@  discard block
 block discarded – undo
304 310
                                         $i = 0;
305 311
                                         print '<tbody><tr><td class="vendor" rowspan="' . $ct . '"><img src="resources/images/vendorlogo/' . $group . '.png" alt="'.$group.' Device"></td>';
306 312
                                         foreach ($G as $d => $D) {
307
-                                            if ($i)
308
-                                                print '<tr>';
313
+                                            if ($i) {
314
+                                                                                            print '<tr>';
315
+                                            }
309 316
                                             $j = ($i+1)*20;
310 317
                                             print "<td><button id='" . $d . "'>" . $D['display'] . "</button>";
311 318
                                             print "<div class='device_info' id='info_" . $d . "'></div></td>";
@@ -338,13 +345,15 @@  discard block
 block discarded – undo
338 345
                  </td>
339 346
                  <td style="padding-left:80px; text-align:right;">
340 347
                  <?php
341
-                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
348
+                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") {
349
+                         // SW: APPROVED
342 350
                          echo "
343 351
                   <span id='logos' style='position:fixed; left:50%;'><img src='resources/images/dante.png' alt='DANTE' style='height:23px;width:47px'/>
344 352
                   <img src='resources/images/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
345 353
                   <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
346
-                     else
347
-                         echo "&nbsp;";
354
+                     } else {
355
+                                              echo "&nbsp;";
356
+                     }
348 357
                  ?>
349 358
                 </td>
350 359
             </tr>
Please login to merge, or discard this patch.
web/copyright.php 1 patch
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -196,22 +196,25 @@
 block discarded – undo
196 196
 // this variable gets set during "make distribution" only
197 197
                     $RELEASE = "THERELEASE";
198 198
                     echo Config::$APPEARANCE['productname'] . " - ";
199
-                    if ($RELEASE != "THERELEASE")
200
-                        echo sprintf(_("Release %s"), $RELEASE);
201
-                    else
202
-                        echo _("Unreleased SVN Revision");
199
+                    if ($RELEASE != "THERELEASE") {
200
+                                            echo sprintf(_("Release %s"), $RELEASE);
201
+                    } else {
202
+                                            echo _("Unreleased SVN Revision");
203
+                    }
203 204
                     echo " &copy; 2011-15 G&Eacute;ANT Ltd. on behalf of the GN3 and GN3plus consortia and others <a href='copyright.php'>Full Copyright and Licenses</a>";
204 205
                 ?>
205 206
                  </td>
206 207
                  <td style="padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;">
207 208
                  <?php
208
-                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
209
+                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") {
210
+                         // SW: APPROVED
209 211
                          echo "
210 212
                   <span id='logos' style='position:fixed; left:50%;'><img src='resources/images/dante.png' alt='DANTE' style='height:23px;width:47px'/>
211 213
                   <img src='resources/images/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
212 214
                   <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
213
-                     else
214
-                         echo "&nbsp;";
215
+                     } else {
216
+                                              echo "&nbsp;";
217
+                     }
215 218
                  ?>
216 219
                 </td>
217 220
             </tr>
Please login to merge, or discard this patch.
web/diag/action_userdiag.php 1 patch
Braces   +23 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,10 +67,11 @@  discard block
 block discarded – undo
67 67
 
68 68
 function mainpage_url() {
69 69
     $main_url = valid_host($_SERVER['HTTP_HOST']);
70
-    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
71
-        $main_url = "https://" . $main_url;
72
-    else
73
-        $main_url = "http://" . $main_url;
70
+    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
71
+            $main_url = "https://" . $main_url;
72
+    } else {
73
+            $main_url = "http://" . $main_url;
74
+    }
74 75
     $main_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/diag/"));
75 76
     return $main_url;
76 77
 }
@@ -135,8 +136,9 @@  discard block
 block discarded – undo
135 136
                     array_multisort($name, SORT_ASC, SORT_LOCALE_STRING, $displaylist);
136 137
                     setlocale(LC_ALL, $current_locale);
137 138
 
138
-                    foreach ($displaylist as $id => $oneinst)
139
-                        echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
139
+                    foreach ($displaylist as $id => $oneinst) {
140
+                                            echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
141
+                    }
140 142
                     ?>
141 143
                 </select>
142 144
                 <button type='submit' class='submit'><?php echo _("Submit Information"); ?></button>
@@ -197,10 +199,12 @@  discard block
 block discarded – undo
197 199
                 $checkresult[$number] = $check['instance']->UDP_reachability($number, FALSE, FALSE);
198 200
                 if ($checkresult[$number] == RETVAL_CONVERSATION_REJECT) { // so now things work?!
199 201
                     // either a packet size or Operator-Name problem!
200
-                    if ($check['instance']->UDP_reachability($number, TRUE, FALSE) != RETVAL_CONVERSATION_REJECT)
201
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
202
-                    if ($check['instance']->UDP_reachability($number, FALSE, TRUE) != RETVAL_CONVERSATION_REJECT)
203
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
202
+                    if ($check['instance']->UDP_reachability($number, TRUE, FALSE) != RETVAL_CONVERSATION_REJECT) {
203
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
204
+                    }
205
+                    if ($check['instance']->UDP_reachability($number, FALSE, TRUE) != RETVAL_CONVERSATION_REJECT) {
206
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
207
+                    }
204 208
                 } else { // still no response or immediate reject
205 209
                     // if this is a CAT realm with anon ID set, we can't be seeing an NPS ignorance problem
206 210
                     // and consequently, the realm has actual issues
@@ -234,12 +238,13 @@  discard block
 block discarded – undo
234 238
 // re-write check history with that extra knowledge
235 239
     $copycat = $realmproblems;
236 240
 
237
-    foreach ($realmproblems as &$problem)
238
-        if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
241
+    foreach ($realmproblems as &$problem) {
242
+            if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
239 243
             foreach ($copycat as $otherproblem)
240 244
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] != "REALM_POSSIBLY_NPS")
241 245
                     if ($otherproblem['STATUS'] == "REACHABLE") { // worked elsewhere, but not on this probe:
242 246
                         $problem['STATUS'] = "REALM_DOWN";
247
+    }
243 248
                     } else { // inherit other problem; in any case not an NPS problem
244 249
                         $problem['STATUS'] = $otherproblem['STATUS'];
245 250
                     }
@@ -249,11 +254,12 @@  discard block
 block discarded – undo
249 254
 
250 255
     $copycat = $realmproblems;
251 256
 
252
-    foreach ($realmproblems as &$problem)
253
-        if ($problem['STATUS'] == "REALM_DOWN")
257
+    foreach ($realmproblems as &$problem) {
258
+            if ($problem['STATUS'] == "REALM_DOWN")
254 259
             foreach ($copycat as $otherproblem)
255 260
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] == "REACHABLE")
256 261
                     $problem['STATUS'] = "INFRASTRUCTURE";
262
+    }
257 263
     unset($problem);
258 264
 
259 265
 // finally, extract all certprobs we got from the reachability checks; merge from all
@@ -264,8 +270,9 @@  discard block
 block discarded – undo
264 270
     foreach ($checks as $check) {
265 271
         $instance = $check['instance'];
266 272
         $resultset = $instance->UDP_reachability_result;
267
-        foreach ($resultset as $result)
268
-            $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
273
+        foreach ($resultset as $result) {
274
+                    $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
275
+        }
269 276
     }
270 277
     echo "<pre>";
271 278
     print_r($realmproblems);
Please login to merge, or discard this patch.
web/resources/inc/footer.php 1 patch
Braces   +14 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,22 +26,24 @@
 block discarded – undo
26 26
           <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>";
27 27
     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
28 28
         $logo_base = valid_host($_SERVER['HTTP_HOST']);
29
-        if ($logo_base === FALSE)
30
-            exit(1);
31
-        if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE)
32
-            $logo_base .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/resources/images";
33
-        else
34
-            $logo_base .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/admin/")) . "/resources/images";
35
-        if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
36
-            $logo_base = "https://" . $logo_base;
37
-        else
38
-            $logo_base = "http://" . $logo_base;
29
+        if ($logo_base === FALSE) {
30
+                    exit(1);
31
+        }
32
+        if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE) {
33
+                    $logo_base .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/resources/images";
34
+        } else {
35
+                    $logo_base .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/admin/")) . "/resources/images";
36
+        }
37
+        if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
38
+                    $logo_base = "https://" . $logo_base;
39
+        } else {
40
+                    $logo_base = "http://" . $logo_base;
41
+        }
39 42
 
40 43
         echo "<span id='logos' style='position:fixed; left:50%;'><img src='$logo_base/dante.png' alt='DANTE' style='height:23px;width:47px'/>
41 44
               <img src='$logo_base/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
42 45
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
43
-    }
44
-    else {
46
+    } else {
45 47
         echo "&nbsp;";
46 48
     }
47 49
     echo "</td>
Please login to merge, or discard this patch.
web/resources/inc/header.php 1 patch
Braces   +32 added lines, -24 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@  discard block
 block discarded – undo
44 44
           <head lang='$ourlocale'>
45 45
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
46 46
     $css_url = valid_host($_SERVER['HTTP_HOST']);
47
-    if ($css_url === FALSE)
48
-        exit(1);
47
+    if ($css_url === FALSE) {
48
+            exit(1);
49
+    }
49 50
     // we need to construct the right path to the consortium logo; we are either
50 51
     // in the admin area or on the main index.php ...
51 52
     if (strpos($_SERVER['PHP_SELF'], "admin/") !== FALSE) {
@@ -56,10 +57,11 @@  discard block
 block discarded – undo
56 57
         $css_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/resources/css/cat.css.php";
57 58
     }
58 59
     
59
-    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
60
-        $css_url = "https://" . $css_url;
61
-    else
62
-        $css_url = "http://" . $css_url;
60
+    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
61
+            $css_url = "https://" . $css_url;
62
+    } else {
63
+            $css_url = "http://" . $css_url;
64
+    }
63 65
     echo "<link rel='stylesheet' type='text/css' href='$css_url' />";
64 66
     echo "<title>".htmlspecialchars($pagetitle)."</title>";
65 67
 
@@ -136,24 +138,28 @@  discard block
 block discarded – undo
136 138
     }
137 139
     echo "</select>";
138 140
     foreach ($_GET as $var => $value) {
139
-        if ($var != "lang" && $value != "")
140
-            echo "<input type='hidden' name='".htmlspecialchars($var)."' value='".htmlspecialchars($value)."'>";
141
+        if ($var != "lang" && $value != "") {
142
+                    echo "<input type='hidden' name='".htmlspecialchars($var)."' value='".htmlspecialchars($value)."'>";
143
+        }
141 144
     }
142 145
     echo "</form>";
143 146
     echo "</div><!--langselection-->";
144 147
     $logo_url = valid_host($_SERVER['HTTP_HOST']);
145
-    if ($logo_url === FALSE)
146
-        exit(1);
148
+    if ($logo_url === FALSE) {
149
+            exit(1);
150
+    }
147 151
     // we need to construct the right path to the consortium logo; we are either
148 152
     // in the admin area or on the main index.php ...
149
-    if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE)
150
-        $logo_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/resources/images/consortium_logo.png";
151
-    else
152
-        $logo_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/admin/")) . "/resources/images/consortium_logo.png";
153
-    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
154
-        $logo_url = "https://" . $logo_url;
155
-    else
156
-        $logo_url = "http://" . $logo_url;
153
+    if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE) {
154
+            $logo_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/")) . "/resources/images/consortium_logo.png";
155
+    } else {
156
+            $logo_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/admin/")) . "/resources/images/consortium_logo.png";
157
+    }
158
+    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
159
+            $logo_url = "https://" . $logo_url;
160
+    } else {
161
+            $logo_url = "http://" . $logo_url;
162
+    }
157 163
     echo "<div class='consortium_logo'>
158 164
     <img id='test_locate' src='$logo_url' alt='Consortium Logo'>
159 165
 </div> <!-- consortium_logo -->";
@@ -168,10 +174,11 @@  discard block
 block discarded – undo
168 174
     echo "<h2>$cap2</h2>";
169 175
     echo "</div><!--secondarycaptions-->";
170 176
 
171
-    if (isset(Config::$APPEARANCE['MOTD']) && Config::$APPEARANCE['MOTD'] != "") 
172
-        echo "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'>
177
+    if (isset(Config::$APPEARANCE['MOTD']) && Config::$APPEARANCE['MOTD'] != "") {
178
+            echo "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'>
173 179
               <p class='MOTD'>" . Config::$APPEARANCE['MOTD'] . "</p>
174 180
               </div><!--header_MOTD-->";
181
+    }
175 182
 
176 183
     // echo $_SERVER['PHP_SELF'];
177 184
     echo "<div class='sidebar'><p>";
@@ -183,10 +190,11 @@  discard block
 block discarded – undo
183 190
               <a href='overview_user.php'>" . _("Go to your Profile page") . "</a> 
184 191
               <a href='inc/logout.php'>" . _("Logout") . "</a> ";
185 192
     }
186
-    if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE)
187
-        echo "<a href='" . dirname($_SERVER['SCRIPT_NAME']) . "/'>" . _("Start page") . "</a>";
188
-    else
189
-        echo "<a href='../'>" . _("Start page") . "</a>";
193
+    if (strpos($_SERVER['PHP_SELF'], "admin/") === FALSE) {
194
+            echo "<a href='" . dirname($_SERVER['SCRIPT_NAME']) . "/'>" . _("Start page") . "</a>";
195
+    } else {
196
+            echo "<a href='../'>" . _("Start page") . "</a>";
197
+    }
190 198
     echo "</p>
191 199
 </div> <!-- sidebar --></div><!--secondrow-->";
192 200
 }
Please login to merge, or discard this patch.
web/basic.php 1 patch
Braces   +77 added lines, -54 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@  discard block
 block discarded – undo
49 49
 */
50 50
 
51 51
 
52
-    if(isset($_REQUEST['reset_dev']) && $_REQUEST['reset_dev'] == 1)
53
-      unset($_REQUEST['device']);
52
+    if(isset($_REQUEST['reset_dev']) && $_REQUEST['reset_dev'] == 1) {
53
+          unset($_REQUEST['device']);
54
+    }
54 55
 
55 56
 /* Start with checking if we have the country code if not then use geolocation..
56 57
 */
@@ -66,8 +67,9 @@  discard block
 block discarded – undo
66 67
          $c='NONE';
67 68
        }
68 69
     }
69
-    if(!in_array($c,$F))
70
-      $c= array_shift($F);
70
+    if(!in_array($c,$F)) {
71
+          $c= array_shift($F);
72
+    }
71 73
     $this->Country = new Federation($c);
72 74
     $this->Args['country'] = $this->Country->identifier;
73 75
     $this->page =  1;
@@ -82,8 +84,7 @@  discard block
 block discarded – undo
82 84
        $this->page =  2;
83 85
        try {
84 86
          $this->Idp = new IdP($_REQUEST['idp']);
85
-       }
86
-       catch (Exception $fail) {
87
+       } catch (Exception $fail) {
87 88
          $this->page =  1;
88 89
          $this->set_locale("web_user");
89 90
          return;
@@ -104,8 +105,7 @@  discard block
 block discarded – undo
104 105
        $this->page =  3;
105 106
        try {
106 107
          $this->Profile = new Profile($_REQUEST['profile']);
107
-       }
108
-       catch (Exception $fail) {
108
+       } catch (Exception $fail) {
109 109
          $this->page =  2;
110 110
          $this->set_locale("web_user");
111 111
          return;
@@ -134,8 +134,9 @@  discard block
 block discarded – undo
134 134
    $out .= '<select name="country" onchange="submit_form(this)">'."\n";
135 135
    foreach ($FED as $f => $F) {
136 136
      $out .= '<option value="'.$f.'"';
137
-     if($f === $this->Country->identifier)
138
-         $out .= ' selected';
137
+     if($f === $this->Country->identifier) {
138
+              $out .= ' selected';
139
+     }
139 140
      $out .= '>'.$F.'</option>'."\n";
140 141
    }
141 142
    $out .= '</select>';
@@ -144,16 +145,18 @@  discard block
 block discarded – undo
144 145
 
145 146
 public function listIdPs() {
146 147
    $Inst = $this->orderIdentityProviders($this->Country->identifier);
147
-   if(! isset($this->Idp))
148
-     $this->Idp = new Idp ($Inst[0]['idp']);
148
+   if(! isset($this->Idp)) {
149
+        $this->Idp = new Idp ($Inst[0]['idp']);
150
+   }
149 151
    $i_id = $this->Idp->identifier;
150 152
    $out = '';
151 153
    $out .= _("Select your institution");
152 154
    $out .= '<select name="idp" onchange="submit_form(this)">';
153 155
    foreach ($Inst as $I) {
154 156
       $out .= '<option value="'.$I['idp'].'"';
155
-      if($I['idp'] == $i_id)
156
-         $out .= ' selected';
157
+      if($I['idp'] == $i_id) {
158
+               $out .= ' selected';
159
+      }
157 160
       $out .= '>'.$I['title'].'</option>';
158 161
    }
159 162
    $out .= '</select>'; 
@@ -162,8 +165,9 @@  discard block
 block discarded – undo
162 165
 
163 166
 public function listProfiles() {
164 167
    $Prof = $this->Idp->listProfiles(1);
165
-   if(! isset($this->Profile))
166
-     $this->Profile = $Prof[0];
168
+   if(! isset($this->Profile)) {
169
+        $this->Profile = $Prof[0];
170
+   }
167 171
    $p_id = $this->Profile->identifier;
168 172
    $this->Args['profile'] = $p_id;
169 173
    $out = '';
@@ -172,8 +176,9 @@  discard block
 block discarded – undo
172 176
      $out .= '<select name="profile" onchange="submit_form(this)">';
173 177
      foreach ($Prof as $P) {
174 178
        $out .= '<option value="'.$P->identifier.'"';
175
-       if($P->identifier == $p_id)
176
-         $out .= ' selected';
179
+       if($P->identifier == $p_id) {
180
+                $out .= ' selected';
181
+       }
177 182
        $out .= '>'.$P->name.'</option>';
178 183
      }
179 184
      $out .= '</select>';
@@ -186,8 +191,9 @@  discard block
 block discarded – undo
186 191
 
187 192
 
188 193
 public function listDevices() {
189
-   if(! isset($this->Profile))
190
-      return '';
194
+   if(! isset($this->Profile)) {
195
+         return '';
196
+   }
191 197
    $OS = $this->detectOS();
192 198
    $os = $OS['device'];
193 199
    $this->Args['device'] = $os;
@@ -200,16 +206,19 @@  discard block
 block discarded – undo
200 206
    $a = $this->profileAttributes($this->Profile->identifier);
201 207
    $thedevices = $a['devices'];
202 208
    $message = '';
203
-   if(! $os)
204
-     $message = $unsupported_message;
209
+   if(! $os) {
210
+        $message = $unsupported_message;
211
+   }
205 212
    $out = _("Choose an installer to download").'<br>';
206 213
    $out .= '<select name="device" onchange="set_device(this)">';
207 214
    $i= 0;
208 215
    foreach ($thedevices as $D) {
209
-      if((isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden']) || $D['status'] )
210
-         continue; 
211
-      if(! $os)
212
-         $os = $D['id'];
216
+      if((isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden']) || $D['status'] ) {
217
+               continue;
218
+      }
219
+      if(! $os) {
220
+               $os = $D['id'];
221
+      }
213 222
       $disp = $D['display'];
214 223
       if($D['id'] === '0') {
215 224
         $profile_redirect = 1;
@@ -228,11 +237,13 @@  discard block
 block discarded – undo
228 237
       $i++;
229 238
    }
230 239
    $out .= '</select>';
231
-   if( $selected_os == 0)
232
-      $message = $unsupported_message;
240
+   if( $selected_os == 0) {
241
+         $message = $unsupported_message;
242
+   }
233 243
    $out = $message . $out;
234
-   if($profile_redirect)
235
-      $out = '';
244
+   if($profile_redirect) {
245
+         $out = '';
246
+   }
236 247
    if($redirect_target) {
237 248
       $device_redirects .= 'is_redirected = 1;';
238 249
       $out .= _("Your local administrator has specified a redirect to a local support page.").'<br>'. _("When you click <b>CONTINUE</b> this support page will be opened.");
@@ -253,14 +264,18 @@  discard block
 block discarded – undo
253 264
    $thedevices = $a['devices'];
254 265
    $this->set_locale("web_user");
255 266
    $out = '';
256
-   if(isset($a['description']) && $a['description'])
257
-     print '<div>'.$a['description'] . '</div>';
258
-   if (isset($a['local_email']) && $a['local_email'])
259
-     $out .= '<p>Email: <a href="mailto:' . $a['local_email'] . '">' . $a['local_email'] . '</a>';
260
-   if (isset($a['local_url']) && $a['local_url'])
261
-     $out .= '<p>WWW: <a href="' . $a['local_url'] . '">' . $a['local_url'] . '</a>';
262
-   if (isset($a['local_phone']) && $a['local_phone'])
263
-     $out .= '<p>Tel: <a href="' . $a['local_phone'] . '">' . $a['local_phone'] . '</a>';
267
+   if(isset($a['description']) && $a['description']) {
268
+        print '<div>'.$a['description'] . '</div>';
269
+   }
270
+   if (isset($a['local_email']) && $a['local_email']) {
271
+        $out .= '<p>Email: <a href="mailto:' . $a['local_email'] . '">' . $a['local_email'] . '</a>';
272
+   }
273
+   if (isset($a['local_url']) && $a['local_url']) {
274
+        $out .= '<p>WWW: <a href="' . $a['local_url'] . '">' . $a['local_url'] . '</a>';
275
+   }
276
+   if (isset($a['local_phone']) && $a['local_phone']) {
277
+        $out .= '<p>Tel: <a href="' . $a['local_phone'] . '">' . $a['local_phone'] . '</a>';
278
+   }
264 279
    if( $out !== '') {
265 280
      print '<div class="user_info">';
266 281
      print _("If you encounter problems you should ask for help at your home institution");
@@ -269,16 +284,18 @@  discard block
 block discarded – undo
269 284
    }
270 285
                    
271 286
    foreach ($thedevices as $D) {
272
-      if(isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden'])
273
-          continue; 
287
+      if(isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden']) {
288
+                continue;
289
+      }
274 290
       $disp = $D['display'];
275 291
       if($D['id'] === '0') {
276 292
           print _("Your local administrator has specified a redirect to a local support page.").' '. _("Click on the link below to continue.");
277 293
           print '<div style="width:100%; text-align:center"><a href ="'.$D['redirect'].'">'.$D['redirect'].'</a></div>';
278 294
           exit;
279 295
       }
280
-      if($D['id'] === $this->Args['device']) 
281
-          break;
296
+      if($D['id'] === $this->Args['device']) {
297
+                break;
298
+      }
282 299
    }
283 300
    $this->set_locale("web_user");
284 301
 
@@ -288,20 +305,24 @@  discard block
 block discarded – undo
288 305
       return;
289 306
    }
290 307
    $extra_text = '';
291
-   if(isset($D['message']) && $D['message']) 
292
-      $extra_text = $D['message']; 
308
+   if(isset($D['message']) && $D['message']) {
309
+         $extra_text = $D['message'];
310
+   }
293 311
    if(isset($D['device_customtext']) && $D['device_customtext']) {
294
-      if($extra_text)
295
-           $extra_text .= '<p>';
312
+      if($extra_text) {
313
+                 $extra_text .= '<p>';
314
+      }
296 315
       $extra_text = $D['device_customtext']; 
297 316
     }
298 317
    if(isset($D['eap_customtext']) && $D['eap_customtext']) {
299
-      if($extra_text)
300
-          $extra_text .= '<p>';
318
+      if($extra_text) {
319
+                $extra_text .= '<p>';
320
+      }
301 321
       $extra_text .= $D['eap_customtext']; 
302 322
     }
303
-   if($extra_text)
304
-      $extra_text .= '<p>';
323
+   if($extra_text) {
324
+         $extra_text .= '<p>';
325
+   }
305 326
       print $extra_text;
306 327
 
307 328
       $download_link = 'user/API.php?action=downloadInstaller&api_version=2&generatedfor=user&lang='.CAT::get_lang().'&device='.$o['device'].'&profile='.$o['profile'];
@@ -322,8 +343,9 @@  discard block
 block discarded – undo
322 343
    $out .= '<select onchange="submit_form(this)" name="lang">';
323 344
    foreach (Config::$LANGUAGES as $lng => $value) {
324 345
        $out .= '<option value="'.$lng.'"';
325
-       if ($lng === CAT::get_lang())
326
-          $out .= ' selected';
346
+       if ($lng === CAT::get_lang()) {
347
+                 $out .= ' selected';
348
+       }
327 349
        $out .= '>'. $value['display'] . '</option>';
328 350
    }
329 351
    $out .= '</select>';
@@ -423,8 +445,9 @@  discard block
 block discarded – undo
423 445
         if(! isset($_REQUEST['devices_h']) || $_REQUEST['devices_h'] == 0 || isset($_REQUEST['start_over'])) {
424 446
         print "<p>\n";
425 447
           print $Gui->listCountries();
426
-          if($Gui->page == 2 && ! isset($FED[strtoupper($Gui->Country->identifier)]))
427
-             $Gui->page = 1;
448
+          if($Gui->page == 2 && ! isset($FED[strtoupper($Gui->Country->identifier)])) {
449
+                       $Gui->page = 1;
450
+          }
428 451
           print "<p>".$Gui->listIdPs();
429 452
           print "<p>".$Gui->listProfiles();
430 453
           print "<p>".$Gui->listDevices();
Please login to merge, or discard this patch.