Completed
Branch master (03ec64)
by Brook
14:43
created
web/user/cat_back.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // extract request parameters; action is mandatory
18 18
 if(!isset($_REQUEST['action']))
19
-   exit;
19
+    exit;
20 20
 
21 21
 $action  = $_REQUEST['action'];
22 22
 $id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
Please login to merge, or discard this patch.
web/user/faq.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,63 +2,63 @@  discard block
 block discarded – undo
2 2
 $FAQ = [];
3 3
 
4 4
 array_push($FAQ,
5
-      [
5
+        [
6 6
         'title'=>sprintf(_("My institution is not listed. Can't I just use any of the other ones?")),
7 7
         'text'=>sprintf(_("No! The installers contain security settings which are specific to the institution. If you are not from that institution, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different institution installer is <i>guaranteed to not work</i>!"))
8
-         ]);
8
+            ]);
9 9
 
10 10
 array_push($FAQ,
11
-      [
11
+        [
12 12
         'title'=>sprintf(_("What can I do to get my institution listed?")),
13 13
         'text'=>sprintf(_("Contact %s administrators at your home institution and complain. It will take at most one hour of their time to get things done."),Config::$CONSORTIUM['name'])
14 14
 ]);
15 15
 
16 16
 array_push($FAQ,
17
-      [
17
+        [
18 18
         'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),Config::$CONSORTIUM['name']),
19 19
         'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your %s Identity Provider to get help in setting up such a device."),Config::$CONSORTIUM['name'],Config::$CONSORTIUM['name'])
20
-      ]);
20
+        ]);
21 21
 
22 22
 array_push($FAQ,
23
-      [
23
+        [
24 24
         'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),Config::$CONSORTIUM['name']),
25 25
         'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one."))
26 26
 ]);
27 27
 
28 28
 if (Config::$CONSORTIUM['name'] == "eduroam") {
29
-   array_push($FAQ,
30
-         [
31
-           'title'=>sprintf(_("What is this eduroam thing anyway?")),
32
-           'text'=>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."))
33
-         ]);
29
+    array_push($FAQ,
30
+            [
31
+            'title'=>sprintf(_("What is this eduroam thing anyway?")),
32
+            'text'=>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."))
33
+            ]);
34 34
 }
35 35
 
36 36
 array_push($FAQ,
37
-      [
37
+        [
38 38
         'title'=>sprintf(_("Is it safe to use %s installers?"),Config::$APPEARANCE['productname']),
39 39
         'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),Config::$APPEARANCE['productname']).' '.( isset(Config::$CONSORTIUM['signer_name']) && Config::$CONSORTIUM['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),Config::$APPEARANCE['productname'],Config::$CONSORTIUM['signer_name']):""),
40 40
         
41 41
 ]);
42 42
 
43 43
 array_push($FAQ,
44
-      [
44
+        [
45 45
         'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"),
46 46
         'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(Config::$CONSORTIUM['signer_name']) && Config::$CONSORTIUM['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),Config::$CONSORTIUM['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>")
47 47
         
48 48
 ]);
49 49
 
50 50
 array_push($FAQ,
51
-      [
51
+        [
52 52
         'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),Config::$CONSORTIUM['name']),
53
-      'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your home institution and report the problem, the administrators should be able to trace your connections."),Config::$CONSORTIUM[
53
+        'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your home institution and report the problem, the administrators should be able to trace your connections."),Config::$CONSORTIUM[
54 54
 'name'])
55 55
 ]);
56 56
 
57 57
 array_push($FAQ,
58
-      [
58
+        [
59 59
         'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")),
60 60
         'text'=>sprintf(_("You should send a mail to %s."),Config::$APPEARANCE['support-contact']['display'])
61
-      ]);
61
+        ]);
62 62
 
63 63
 
64 64
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
     <?php
87 87
     $i =0;
88 88
     foreach ($FAQ as $faq) {
89
-       print '<a href="#toc'.$i.'">'.$faq['title']."</a><br>\n";
90
-       $i++;
89
+        print '<a href="#toc'.$i.'">'.$faq['title']."</a><br>\n";
90
+        $i++;
91 91
     }
92 92
     ?>
93 93
     </div>
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
     <?php
96 96
     $i =0;
97 97
     foreach ($FAQ as $faq) {
98
-      print "<dt><a name=toc$i>".$faq['title']."</a></dt>\n<dd>".$faq['text']."</dd>\n";
99
-      $i++;
98
+        print "<dt><a name=toc$i>".$faq['title']."</a></dt>\n<dd>".$faq['text']."</dd>\n";
99
+        $i++;
100 100
     }
101 101
     ?>
102 102
 </dl>
Please login to merge, or discard this patch.
web/user/API.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 // extract request parameters; action is mandatory
18 18
 if(!isset($_REQUEST['action']))
19
-   exit;
19
+    exit;
20 20
 
21 21
 $action  = $_REQUEST['action'];
22 22
 $id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         break;
49 49
     case 'listIdentityProviders':
50 50
         if(! $federation)
51
-           $federation = $id;
51
+            $federation = $id;
52 52
         $API->JSON_listIdentityProviders($federation);
53 53
         break;
54 54
     case 'listAllIdentityProviders':
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
         break;
57 57
     case 'listProfiles': // needs $idp set - abort if not
58 58
         if(! $idp) 
59
-           $idp = $id;
59
+            $idp = $id;
60 60
         if ($idp === FALSE) exit;
61 61
         $API->JSON_listProfiles($idp,$sort);
62 62
         break;
63 63
     case 'listDevices':
64 64
         if(! $profile)
65
-           $profile = $id;
65
+            $profile = $id;
66 66
         $API->JSON_listDevices($profile);
67 67
         break;
68 68
     case 'generateInstaller': // needs $id and $profile set
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
         break;
80 80
     case 'profileAttributes': // needs $id set
81 81
         if(! $profile)
82
-           $profile = $id;
82
+            $profile = $id;
83 83
         if ($profile === FALSE) exit;
84 84
         $API->JSON_profileAttributes($profile);
85 85
         break;
86 86
     case 'sendLogo': // needs $id and $disco set
87 87
         if(! $idp)
88
-           $idp = $id;
88
+            $idp = $id;
89 89
         if ($idp === FALSE) exit;
90 90
         $API->sendLogo($idp, $disco,$width,$height);
91 91
         break;
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
         break;
104 104
     case 'orderIdentityProviders':
105 105
         if(! $federation)
106
-           $federation = $id;
107
-         if($location)  {
106
+            $federation = $id;
107
+            if($location)  {
108 108
             $A=explode(':',$location);
109 109
             $L = ['lat'=>$A[0],'lon'=>$A[1]];
110
-         } else
110
+            } else
111 111
             $L = NULL;
112 112
         $API->JSON_orderIdentityProviders($federation,$L);
113 113
         break;
Please login to merge, or discard this patch.
web/index.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -23,33 +23,33 @@  discard block
 block discarded – undo
23 23
 //debug(4,$_REQUEST);
24 24
 
25 25
 /**
26
-  * Menu class helps to define the menu on the main page
27
-  */
26
+ * Menu class helps to define the menu on the main page
27
+ */
28 28
 class Menu {
29 29
 /**
30
-  * the constructor takes an array argument defining menu items.
31
-  * the array must be indexed by strings which will be passed to user/cat_info.php a the page argument
32
-  * the values of the array can be either a simple string which is passed to user/cat_info.php
33
-  * as the title argument or an two element array - the first element of this array will be
34
-  * the title and the second is a style specification applied to the given menu item
30
+ * the constructor takes an array argument defining menu items.
31
+ * the array must be indexed by strings which will be passed to user/cat_info.php a the page argument
32
+ * the values of the array can be either a simple string which is passed to user/cat_info.php
33
+ * as the title argument or an two element array - the first element of this array will be
34
+ * the title and the second is a style specification applied to the given menu item
35 35
  */
36 36
 public function __construct($menu_array) {
37
-  $this->menu = $menu_array;
37
+    $this->menu = $menu_array;
38 38
 }
39 39
 
40 40
 private function printMenuLine($index,$title="",$style="") {
41 41
 if ($style !== "")
42
-   print  "<tr><td style='$style'><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
42
+    print  "<tr><td style='$style'><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
43 43
 else
44
-   print  "<tr><td><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
44
+    print  "<tr><td><a href='javascript:infoCAT(\"$index\",\"".rawurlencode($title)."\")'>$title</a></td></tr>\n";
45 45
 }
46 46
 
47 47
 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); 
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 53
 }
54 54
 
55 55
 private $menu;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 $OS = $Gui->detectOS();
95 95
 debug(4,$OS);
96 96
 if($OS)
97
-   print "recognised_os = '".$OS['device']."';\n";
97
+    print "recognised_os = '".$OS['device']."';\n";
98 98
 $download_message = sprintf(_("Download your %s installer"),Config::$CONSORTIUM['name']);
99 99
 print 'download_message = "'.$download_message.'";';
100 100
 //TODO modify this based on OS detection
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
                             <table id="left_menu">
150 150
 <?php
151 151
                                 $menu = new Menu( [
152
-                                   "about_consortium"=>[sprintf(_("About %s"), Config::$CONSORTIUM['name']),'padding-bottom:20px;font-weight: bold; '],
153
-                                   "about"=>sprintf(_("About %s"), Config::$APPEARANCE['productname']),
154
-                                   "tou"=>sprintf(_("Terms of use")),
155
-                                   "faq"=>sprintf(_("FAQ")),
156
-                                   "report"=>sprintf(_("Report a problem")),
157
-                                   "develop"=>sprintf(_("Become a CAT developer")),
158
-                                   "admin"=>[sprintf(_("%s admin:<br>manage your IdP"), Config::$CONSORTIUM['name']),'padding-top:30px;'],
152
+                                    "about_consortium"=>[sprintf(_("About %s"), Config::$CONSORTIUM['name']),'padding-bottom:20px;font-weight: bold; '],
153
+                                    "about"=>sprintf(_("About %s"), Config::$APPEARANCE['productname']),
154
+                                    "tou"=>sprintf(_("Terms of use")),
155
+                                    "faq"=>sprintf(_("FAQ")),
156
+                                    "report"=>sprintf(_("Report a problem")),
157
+                                    "develop"=>sprintf(_("Become a CAT developer")),
158
+                                    "admin"=>[sprintf(_("%s admin:<br>manage your IdP"), Config::$CONSORTIUM['name']),'padding-top:30px;'],
159 159
                                 ]);
160 160
 
161 161
                                 $menu->printMenu(); ?>
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
                        <strong><?php echo _("Welcome aboard the eduroam® user community!")?></strong>
225 225
                        <p>
226 226
                        <span id="download_info"><?php 
227
-                       /// the empty href is dynamically exchanged with the actual path by jQuery at runtime
228
-                       echo _("Your download will start shortly. In case of problems with the automatic download please use this direct <a href=''>link</a>.");
229
-                       ?></span>
227
+                        /// the empty href is dynamically exchanged with the actual path by jQuery at runtime
228
+                        echo _("Your download will start shortly. In case of problems with the automatic download please use this direct <a href=''>link</a>.");
229
+                        ?></span>
230 230
                        <p>
231 231
                        <?php printf(_("Dear user from %s,"),"<span class='inst_name'></span>") ?>
232 232
                        <br/>
@@ -338,14 +338,14 @@  discard block
 block discarded – undo
338 338
                  </td>
339 339
                  <td style="padding-left:80px; text-align:right;">
340 340
                  <?php
341
-                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
342
-                         echo "
341
+                        if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
342
+                            echo "
343 343
                   <span id='logos' style='position:fixed; left:50%;'><img src='resources/images/dante.png' alt='DANTE' style='height:23px;width:47px'/>
344 344
                   <img src='resources/images/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
345 345
                   <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;";
348
-                 ?>
346
+                        else
347
+                            echo "&nbsp;";
348
+                    ?>
349 349
                 </td>
350 350
             </tr>
351 351
         </table>
Please login to merge, or discard this patch.
web/download.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 $p = new Profile($profile_id);
43 43
 
44 44
 if(!$p->institution || $p->institution !== $inst_id) {
45
-  header("HTTP/1.0 404 Not Found");
46
-  return;
45
+    header("HTTP/1.0 404 Not Found");
46
+    return;
47 47
 }
48 48
 
49 49
 // now we generate the installer
Please login to merge, or discard this patch.
web/copyright.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -205,14 +205,14 @@
 block discarded – undo
205 205
                  </td>
206 206
                  <td style="padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;">
207 207
                  <?php
208
-                     if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
209
-                         echo "
208
+                        if (Config::$CONSORTIUM['name'] == "eduroam" && isset(Config::$CONSORTIUM['deployment-voodoo']) && Config::$CONSORTIUM['deployment-voodoo'] == "Operations Team") // SW: APPROVED
209
+                            echo "
210 210
                   <span id='logos' style='position:fixed; left:50%;'><img src='resources/images/dante.png' alt='DANTE' style='height:23px;width:47px'/>
211 211
                   <img src='resources/images/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
212 212
                   <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
-                 ?>
213
+                        else
214
+                            echo "&nbsp;";
215
+                    ?>
216 216
                 </td>
217 217
             </tr>
218 218
         </table>
Please login to merge, or discard this patch.
web/basic.php 1 patch
Indentation   +268 added lines, -268 removed lines patch added patch discarded remove patch
@@ -23,23 +23,23 @@  discard block
 block discarded – undo
23 23
 debug(4,$_POST);
24 24
 
25 25
 /**
26
-  * SimpleGUI defines extensions of the GUI class used only in the simple interface
27
-  * this class does not define its own constructor.
28
-  */
26
+ * SimpleGUI defines extensions of the GUI class used only in the simple interface
27
+ * this class does not define its own constructor.
28
+ */
29 29
 class SimpleGUI extends UserAPI {
30 30
 
31 31
 /**
32
-  *  create the SimpleGUI object calling CAT constructor first
33
-  *
34
-  *  sets up all public prperties of the object
35
-  */
32
+ *  create the SimpleGUI object calling CAT constructor first
33
+ *
34
+ *  sets up all public prperties of the object
35
+ */
36 36
 public function __construct() {
37
-  parent::__construct();
38
-  $this->Args = [];
39
-  $this->page =  0;
40
-  $this->set_locale('core');
41
-  $this->version = 2;
42
-  $this->Args['lang'] = CAT::get_lang();
37
+    parent::__construct();
38
+    $this->Args = [];
39
+    $this->page =  0;
40
+    $this->set_locale('core');
41
+    $this->version = 2;
42
+    $this->Args['lang'] = CAT::get_lang();
43 43
 //print "<pre>"; print_r($_REQUEST); print "</pre>";
44 44
 
45 45
 /*
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
     if(isset($_REQUEST['reset_dev']) && $_REQUEST['reset_dev'] == 1)
53
-      unset($_REQUEST['device']);
53
+        unset($_REQUEST['device']);
54 54
 
55 55
 /* Start with checking if we have the country code if not then use geolocation..
56 56
 */
57 57
     $F = array_keys($this->printCountryList(1));
58 58
     if(isset($_REQUEST['country']) && $_REQUEST['country']) {
59
-       $c = strtoupper($_REQUEST['country']);
59
+        $c = strtoupper($_REQUEST['country']);
60 60
     } else {
61
-       $L = $this->locateUser();
62
-       if( $L['status'] == 'ok' ) {
63
-         $c = strtoupper($L['country']);
64
-       } else {
65
-         debug(2, "No coutry provided and unable to locate the address\n");
66
-         $c='NONE';
67
-       }
61
+        $L = $this->locateUser();
62
+        if( $L['status'] == 'ok' ) {
63
+            $c = strtoupper($L['country']);
64
+        } else {
65
+            debug(2, "No coutry provided and unable to locate the address\n");
66
+            $c='NONE';
67
+        }
68 68
     }
69 69
     if(!in_array($c,$F))
70
-      $c= array_shift($F);
70
+        $c= array_shift($F);
71 71
     $this->Country = new Federation($c);
72 72
     $this->Args['country'] = $this->Country->identifier;
73 73
     $this->page =  1;
@@ -79,287 +79,287 @@  discard block
 block discarded – undo
79 79
 // and they do not match then drop the profile code and just leave the IdP
80 80
 
81 81
     if(isset($_REQUEST['idp']) && $_REQUEST['idp']) {
82
-       $this->page =  2;
83
-       try {
84
-         $this->Idp = new IdP($_REQUEST['idp']);
85
-       }
86
-       catch (Exception $fail) {
87
-         $this->page =  1;
88
-         $this->set_locale("web_user");
89
-         return;
90
-       }
91
-       $country_tmp = new Federation($this->Idp->federation);
92
-       if(strtoupper($this->Country->identifier) !== strtoupper($country_tmp->identifier)) {
93
-         unset($this->Idp);
94
-         $this->page = 1;
95
-         $this->set_locale("web_user");
96
-         return;
97
-       } 
98
-       $this->Args['idp'] = $_REQUEST['idp'];
99
-       $this->profile_count = $this->Idp->profileCount();
100
-       if(!isset($_REQUEST['profile'])) {
101
-         $this->set_locale("web_user");
102
-         return;
103
-       }
104
-       $this->page =  3;
105
-       try {
106
-         $this->Profile = new Profile($_REQUEST['profile']);
107
-       }
108
-       catch (Exception $fail) {
109
-         $this->page =  2;
110
-         $this->set_locale("web_user");
111
-         return;
112
-       }
113
-       if($this->Profile->institution != $this->Idp->identifier)  {
114
-          unset($this->Profile);
115
-          $this->page = 2;
116
-          $this->set_locale("web_user");
117
-          return;
118
-       }
119
-       $this->Args['profile'] = $_REQUEST['profile'];
120
-       if(isset($_REQUEST['device'])) {
121
-             $this->Args['device'] = $_REQUEST['device'];
122
-       }
82
+        $this->page =  2;
83
+        try {
84
+            $this->Idp = new IdP($_REQUEST['idp']);
85
+        }
86
+        catch (Exception $fail) {
87
+            $this->page =  1;
88
+            $this->set_locale("web_user");
89
+            return;
90
+        }
91
+        $country_tmp = new Federation($this->Idp->federation);
92
+        if(strtoupper($this->Country->identifier) !== strtoupper($country_tmp->identifier)) {
93
+            unset($this->Idp);
94
+            $this->page = 1;
95
+            $this->set_locale("web_user");
96
+            return;
97
+        } 
98
+        $this->Args['idp'] = $_REQUEST['idp'];
99
+        $this->profile_count = $this->Idp->profileCount();
100
+        if(!isset($_REQUEST['profile'])) {
101
+            $this->set_locale("web_user");
102
+            return;
103
+        }
104
+        $this->page =  3;
105
+        try {
106
+            $this->Profile = new Profile($_REQUEST['profile']);
107
+        }
108
+        catch (Exception $fail) {
109
+            $this->page =  2;
110
+            $this->set_locale("web_user");
111
+            return;
112
+        }
113
+        if($this->Profile->institution != $this->Idp->identifier)  {
114
+            unset($this->Profile);
115
+            $this->page = 2;
116
+            $this->set_locale("web_user");
117
+            return;
118
+        }
119
+        $this->Args['profile'] = $_REQUEST['profile'];
120
+        if(isset($_REQUEST['device'])) {
121
+                $this->Args['device'] = $_REQUEST['device'];
122
+        }
123 123
 
124 124
     }
125 125
 //print "<pre>"; print_r($_REQUEST); print "</pre>";
126
-   $this->set_locale("web_user");
126
+    $this->set_locale("web_user");
127 127
 }
128 128
 
129 129
 // print coutry selection
130 130
 public function listCountries() {
131
-   $out = '';
132
-   $FED = $this->printCountryList(1);
133
-   $out .= _('Select your country').'<br>';
134
-   $out .= '<select name="country" onchange="submit_form(this)">'."\n";
135
-   foreach ($FED as $f => $F) {
136
-     $out .= '<option value="'.$f.'"';
137
-     if($f === $this->Country->identifier)
138
-         $out .= ' selected';
139
-     $out .= '>'.$F.'</option>'."\n";
140
-   }
141
-   $out .= '</select>';
142
-   return $out;
131
+    $out = '';
132
+    $FED = $this->printCountryList(1);
133
+    $out .= _('Select your country').'<br>';
134
+    $out .= '<select name="country" onchange="submit_form(this)">'."\n";
135
+    foreach ($FED as $f => $F) {
136
+        $out .= '<option value="'.$f.'"';
137
+        if($f === $this->Country->identifier)
138
+            $out .= ' selected';
139
+        $out .= '>'.$F.'</option>'."\n";
140
+    }
141
+    $out .= '</select>';
142
+    return $out;
143 143
 }
144 144
 
145 145
 public function listIdPs() {
146
-   $Inst = $this->orderIdentityProviders($this->Country->identifier);
147
-   if(! isset($this->Idp))
148
-     $this->Idp = new Idp ($Inst[0]['idp']);
149
-   $i_id = $this->Idp->identifier;
150
-   $out = '';
151
-   $out .= _("Select your institution");
152
-   $out .= '<select name="idp" onchange="submit_form(this)">';
153
-   foreach ($Inst as $I) {
154
-      $out .= '<option value="'.$I['idp'].'"';
155
-      if($I['idp'] == $i_id)
156
-         $out .= ' selected';
157
-      $out .= '>'.$I['title'].'</option>';
158
-   }
159
-   $out .= '</select>'; 
160
-   return $out;
146
+    $Inst = $this->orderIdentityProviders($this->Country->identifier);
147
+    if(! isset($this->Idp))
148
+        $this->Idp = new Idp ($Inst[0]['idp']);
149
+    $i_id = $this->Idp->identifier;
150
+    $out = '';
151
+    $out .= _("Select your institution");
152
+    $out .= '<select name="idp" onchange="submit_form(this)">';
153
+    foreach ($Inst as $I) {
154
+        $out .= '<option value="'.$I['idp'].'"';
155
+        if($I['idp'] == $i_id)
156
+            $out .= ' selected';
157
+        $out .= '>'.$I['title'].'</option>';
158
+    }
159
+    $out .= '</select>'; 
160
+    return $out;
161 161
 }
162 162
 
163 163
 public function listProfiles() {
164
-   $Prof = $this->Idp->listProfiles(1);
165
-   if(! isset($this->Profile))
166
-     $this->Profile = $Prof[0];
167
-   $p_id = $this->Profile->identifier;
168
-   $this->Args['profile'] = $p_id;
169
-   $out = '';
170
-   if (count($Prof) > 1) {
171
-     $out .=  _("Select the user group").'<br>';
172
-     $out .= '<select name="profile" onchange="submit_form(this)">';
173
-     foreach ($Prof as $P) {
174
-       $out .= '<option value="'.$P->identifier.'"';
175
-       if($P->identifier == $p_id)
176
-         $out .= ' selected';
177
-       $out .= '>'.$P->name.'</option>';
178
-     }
179
-     $out .= '</select>';
180
-   } else {
181
-     $out .= $this->passArgument('profile');
182
-   }
183
-   return $out;
164
+    $Prof = $this->Idp->listProfiles(1);
165
+    if(! isset($this->Profile))
166
+        $this->Profile = $Prof[0];
167
+    $p_id = $this->Profile->identifier;
168
+    $this->Args['profile'] = $p_id;
169
+    $out = '';
170
+    if (count($Prof) > 1) {
171
+        $out .=  _("Select the user group").'<br>';
172
+        $out .= '<select name="profile" onchange="submit_form(this)">';
173
+        foreach ($Prof as $P) {
174
+        $out .= '<option value="'.$P->identifier.'"';
175
+        if($P->identifier == $p_id)
176
+            $out .= ' selected';
177
+        $out .= '>'.$P->name.'</option>';
178
+        }
179
+        $out .= '</select>';
180
+    } else {
181
+        $out .= $this->passArgument('profile');
182
+    }
183
+    return $out;
184 184
 }
185 185
 
186 186
 
187 187
 
188 188
 public function listDevices() {
189
-   if(! isset($this->Profile))
190
-      return '';
191
-   $OS = $this->detectOS();
192
-   $os = $OS['device'];
193
-   $this->Args['device'] = $os;
194
-   $profile_redirect = 0;
195
-   $redirect_target = '';
196
-   $device_redirects = '';
197
-   $selected_os = 0;
198
-   $unsupported_message = '<div id="unsupported_os">'._("Your operating system was not properly detected, is not supported yet or cannot be configured with settings provided by your institution")."</div><br>";
189
+    if(! isset($this->Profile))
190
+        return '';
191
+    $OS = $this->detectOS();
192
+    $os = $OS['device'];
193
+    $this->Args['device'] = $os;
194
+    $profile_redirect = 0;
195
+    $redirect_target = '';
196
+    $device_redirects = '';
197
+    $selected_os = 0;
198
+    $unsupported_message = '<div id="unsupported_os">'._("Your operating system was not properly detected, is not supported yet or cannot be configured with settings provided by your institution")."</div><br>";
199 199
    
200
-   $a = $this->profileAttributes($this->Profile->identifier);
201
-   $thedevices = $a['devices'];
202
-   $message = '';
203
-   if(! $os)
204
-     $message = $unsupported_message;
205
-   $out = _("Choose an installer to download").'<br>';
206
-   $out .= '<select name="device" onchange="set_device(this)">';
207
-   $i= 0;
208
-   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'];
213
-      $disp = $D['display'];
214
-      if($D['id'] === '0') {
200
+    $a = $this->profileAttributes($this->Profile->identifier);
201
+    $thedevices = $a['devices'];
202
+    $message = '';
203
+    if(! $os)
204
+        $message = $unsupported_message;
205
+    $out = _("Choose an installer to download").'<br>';
206
+    $out .= '<select name="device" onchange="set_device(this)">';
207
+    $i= 0;
208
+    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'];
213
+        $disp = $D['display'];
214
+        if($D['id'] === '0') {
215 215
         $profile_redirect = 1;
216 216
         $redirect_target = $D['redirect'];
217
-      }
218
-      $out .= '<option value="'.$D['id'].'"';
219
-      if($D['id'] == $os) {
217
+        }
218
+        $out .= '<option value="'.$D['id'].'"';
219
+        if($D['id'] == $os) {
220 220
         $out .= ' selected';
221 221
         $selected_os = 1;
222 222
         if($D['redirect']) {
223
-           $redirect_target = $D['redirect'];
223
+            $redirect_target = $D['redirect'];
224
+        }
224 225
         }
225
-      }
226
-      $out .= '>'.$disp.'</option>';
227
-      $device_redirects .= 'redirects['.$i.'] = '.( $D['redirect'] ? 1 : 0 ).';';
228
-      $i++;
229
-   }
230
-   $out .= '</select>';
231
-   if( $selected_os == 0)
232
-      $message = $unsupported_message;
233
-   $out = $message . $out;
234
-   if($profile_redirect)
235
-      $out = '';
236
-   if($redirect_target) {
237
-      $device_redirects .= 'is_redirected = 1;';
238
-      $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.");
239
-      $action = 'window.location.href=\''.$redirect_target.'\'; return(false);';
240
-   $out .= "<p><button id='devices' name='devices' style='width:100%;' onclick=\"".$action.'">'._("CONTINUE to local support page")."</button>";
241
-   } else {
242
-      $device_redirects .= 'is_redirected = 0;';
243
-      $action = 'submit_form(this)';
244
-   $out .= "<p><button id='devices' name='devices' style='width:100%;' onclick=\"".$action.'">'._("Do you have an account at this institution?").'<br>'._("If so and if the other settings above are OK then click here to download...")."</button>";
245
-   }
246
-   $out .= '<script type="text/javascript">'.$device_redirects.'</script>';
247
-   return $out;
226
+        $out .= '>'.$disp.'</option>';
227
+        $device_redirects .= 'redirects['.$i.'] = '.( $D['redirect'] ? 1 : 0 ).';';
228
+        $i++;
229
+    }
230
+    $out .= '</select>';
231
+    if( $selected_os == 0)
232
+        $message = $unsupported_message;
233
+    $out = $message . $out;
234
+    if($profile_redirect)
235
+        $out = '';
236
+    if($redirect_target) {
237
+        $device_redirects .= 'is_redirected = 1;';
238
+        $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.");
239
+        $action = 'window.location.href=\''.$redirect_target.'\'; return(false);';
240
+    $out .= "<p><button id='devices' name='devices' style='width:100%;' onclick=\"".$action.'">'._("CONTINUE to local support page")."</button>";
241
+    } else {
242
+        $device_redirects .= 'is_redirected = 0;';
243
+        $action = 'submit_form(this)';
244
+    $out .= "<p><button id='devices' name='devices' style='width:100%;' onclick=\"".$action.'">'._("Do you have an account at this institution?").'<br>'._("If so and if the other settings above are OK then click here to download...")."</button>";
245
+    }
246
+    $out .= '<script type="text/javascript">'.$device_redirects.'</script>';
247
+    return $out;
248 248
 }
249 249
 
250 250
 public function displayDeviceDownload() {
251
-   $this->set_locale('devices');
252
-   $a = $this->profileAttributes($this->Profile->identifier);
253
-   $thedevices = $a['devices'];
254
-   $this->set_locale("web_user");
255
-   $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>';
264
-   if( $out !== '') {
265
-     print '<div class="user_info">';
266
-     print _("If you encounter problems you should ask for help at your home institution");
267
-     print $out;
268
-     print "</div>\n";
269
-   }
251
+    $this->set_locale('devices');
252
+    $a = $this->profileAttributes($this->Profile->identifier);
253
+    $thedevices = $a['devices'];
254
+    $this->set_locale("web_user");
255
+    $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>';
264
+    if( $out !== '') {
265
+        print '<div class="user_info">';
266
+        print _("If you encounter problems you should ask for help at your home institution");
267
+        print $out;
268
+        print "</div>\n";
269
+    }
270 270
                    
271
-   foreach ($thedevices as $D) {
272
-      if(isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden'])
273
-          continue; 
274
-      $disp = $D['display'];
275
-      if($D['id'] === '0') {
276
-          print _("Your local administrator has specified a redirect to a local support page.").' '. _("Click on the link below to continue.");
277
-          print '<div style="width:100%; text-align:center"><a href ="'.$D['redirect'].'">'.$D['redirect'].'</a></div>';
278
-          exit;
279
-      }
280
-      if($D['id'] === $this->Args['device']) 
281
-          break;
282
-   }
283
-   $this->set_locale("web_user");
284
-
285
-   $o = $this->generateInstaller($this->Args['device'], $this->Profile->identifier);
286
-   if (!$o['link']) {
287
-      print _("This is embarrassing. Generation of your installer failed. System admins have been notified. We will try to take care of the problem as soon as possible.");
288
-      return;
289
-   }
290
-   $extra_text = '';
291
-   if(isset($D['message']) && $D['message']) 
292
-      $extra_text = $D['message']; 
293
-   if(isset($D['device_customtext']) && $D['device_customtext']) {
294
-      if($extra_text)
295
-           $extra_text .= '<p>';
296
-      $extra_text = $D['device_customtext']; 
271
+    foreach ($thedevices as $D) {
272
+        if(isset($D['options']) && isset($D['options']['hidden']) &&  $D['options']['hidden'])
273
+            continue; 
274
+        $disp = $D['display'];
275
+        if($D['id'] === '0') {
276
+            print _("Your local administrator has specified a redirect to a local support page.").' '. _("Click on the link below to continue.");
277
+            print '<div style="width:100%; text-align:center"><a href ="'.$D['redirect'].'">'.$D['redirect'].'</a></div>';
278
+            exit;
279
+        }
280
+        if($D['id'] === $this->Args['device']) 
281
+            break;
282
+    }
283
+    $this->set_locale("web_user");
284
+
285
+    $o = $this->generateInstaller($this->Args['device'], $this->Profile->identifier);
286
+    if (!$o['link']) {
287
+        print _("This is embarrassing. Generation of your installer failed. System admins have been notified. We will try to take care of the problem as soon as possible.");
288
+        return;
297 289
     }
298
-   if(isset($D['eap_customtext']) && $D['eap_customtext']) {
299
-      if($extra_text)
300
-          $extra_text .= '<p>';
301
-      $extra_text .= $D['eap_customtext']; 
290
+    $extra_text = '';
291
+    if(isset($D['message']) && $D['message']) 
292
+        $extra_text = $D['message']; 
293
+    if(isset($D['device_customtext']) && $D['device_customtext']) {
294
+        if($extra_text)
295
+            $extra_text .= '<p>';
296
+        $extra_text = $D['device_customtext']; 
302 297
     }
303
-   if($extra_text)
304
-      $extra_text .= '<p>';
305
-      print $extra_text;
298
+    if(isset($D['eap_customtext']) && $D['eap_customtext']) {
299
+        if($extra_text)
300
+            $extra_text .= '<p>';
301
+        $extra_text .= $D['eap_customtext']; 
302
+    }
303
+    if($extra_text)
304
+        $extra_text .= '<p>';
305
+        print $extra_text;
306 306
 
307
-      $download_link = 'user/API.php?action=downloadInstaller&api_version=2&generatedfor=user&lang='.CAT::get_lang().'&device='.$o['device'].'&profile='.$o['profile'];
307
+        $download_link = 'user/API.php?action=downloadInstaller&api_version=2&generatedfor=user&lang='.CAT::get_lang().'&device='.$o['device'].'&profile='.$o['profile'];
308 308
 
309
-      print '<p><button id="download_button" onclick="window.location.href=\'' . rtrim(dirname($_SERVER['SCRIPT_NAME']),'/'). '/' . $download_link . '\'; return(false)"><div>' . _("Download installer for") . '<br><span style="color:yellow; font-weight: bold">' . $D['display']. '</span></div></button>';
309
+        print '<p><button id="download_button" onclick="window.location.href=\'' . rtrim(dirname($_SERVER['SCRIPT_NAME']),'/'). '/' . $download_link . '\'; return(false)"><div>' . _("Download installer for") . '<br><span style="color:yellow; font-weight: bold">' . $D['display']. '</span></div></button>';
310 310
 
311
-      print '<p><button id="start_over" name="start_over" onclick="submit_form(this)">'._("Start over").'</button>';
312
-   print $this->passArgument('country');
313
-   print $this->passArgument('idp');
314
-   print $this->passArgument('profile');
315
-   print $this->passArgument('device');
311
+        print '<p><button id="start_over" name="start_over" onclick="submit_form(this)">'._("Start over").'</button>';
312
+    print $this->passArgument('country');
313
+    print $this->passArgument('idp');
314
+    print $this->passArgument('profile');
315
+    print $this->passArgument('device');
316 316
 }
317 317
 
318 318
 
319 319
 
320 320
 public function langSelection() {
321
-   $out = _("View this page in")." ";
322
-   $out .= '<select onchange="submit_form(this)" name="lang">';
323
-   foreach (Config::$LANGUAGES as $lng => $value) {
324
-       $out .= '<option value="'.$lng.'"';
325
-       if ($lng === CAT::get_lang())
326
-          $out .= ' selected';
327
-       $out .= '>'. $value['display'] . '</option>';
328
-   }
329
-   $out .= '</select>';
330
-   return $out;
321
+    $out = _("View this page in")." ";
322
+    $out .= '<select onchange="submit_form(this)" name="lang">';
323
+    foreach (Config::$LANGUAGES as $lng => $value) {
324
+        $out .= '<option value="'.$lng.'"';
325
+        if ($lng === CAT::get_lang())
326
+            $out .= ' selected';
327
+        $out .= '>'. $value['display'] . '</option>';
328
+    }
329
+    $out .= '</select>';
330
+    return $out;
331 331
 }
332 332
 
333 333
 /**
334
-  * displays the navigation bar showing the current location of the page
335
-  */
334
+ * displays the navigation bar showing the current location of the page
335
+ */
336 336
 
337 337
 public function yourChoice() {
338
-  $out = '';
339
-   $c = strtoupper($this->Country->identifier);
340
-   $name = isset(Federation::$FederationList[$c]) ? Federation::$FederationList[$c] : $c;
341
-   $name = preg_replace('/ +/','&nbsp;',$name);
342
-   $out .= "$name; ";
343
-   $name = $this->Idp->name;
344
-   $name = preg_replace('/ +/','&nbsp;',$name);
345
-   $out .= "$name";
346
-   if($this->profile_count > 1) {
347
-     $name = '; '.$this->Profile->name;
348
-     $name = preg_replace('/ +/','&nbsp;',$name);
349
-     $out .= "$name";
350
-   }
351
-  return $out;
338
+    $out = '';
339
+    $c = strtoupper($this->Country->identifier);
340
+    $name = isset(Federation::$FederationList[$c]) ? Federation::$FederationList[$c] : $c;
341
+    $name = preg_replace('/ +/','&nbsp;',$name);
342
+    $out .= "$name; ";
343
+    $name = $this->Idp->name;
344
+    $name = preg_replace('/ +/','&nbsp;',$name);
345
+    $out .= "$name";
346
+    if($this->profile_count > 1) {
347
+        $name = '; '.$this->Profile->name;
348
+        $name = preg_replace('/ +/','&nbsp;',$name);
349
+        $out .= "$name";
350
+    }
351
+    return $out;
352 352
 }
353 353
 
354 354
 /**
355
-  * returns the navigation link to a given GUI page
356
-  * @param int $new_page new page number
357
-  * @param string $text link text
358
-  * @return string
359
-  */
355
+ * returns the navigation link to a given GUI page
356
+ * @param int $new_page new page number
357
+ * @param string $text link text
358
+ * @return string
359
+ */
360 360
 
361 361
 public function passArgument($arg_name) {
362
-   return '<input type="hidden" name="'.$arg_name.'" value="'.$this->Args[$arg_name].'">';
362
+    return '<input type="hidden" name="'.$arg_name.'" value="'.$this->Args[$arg_name].'">';
363 363
 }
364 364
 
365 365
 public $Country;
@@ -422,24 +422,24 @@  discard block
 block discarded – undo
422 422
         print $Gui->langSelection();
423 423
         if(! isset($_REQUEST['devices_h']) || $_REQUEST['devices_h'] == 0 || isset($_REQUEST['start_over'])) {
424 424
         print "<p>\n";
425
-          print $Gui->listCountries();
426
-          if($Gui->page == 2 && ! isset($FED[strtoupper($Gui->Country->identifier)]))
427
-             $Gui->page = 1;
428
-          print "<p>".$Gui->listIdPs();
429
-          print "<p>".$Gui->listProfiles();
430
-          print "<p>".$Gui->listDevices();
431
-          print '<input type="hidden" name="devices_h" id="devices_h" value="0">';
425
+            print $Gui->listCountries();
426
+            if($Gui->page == 2 && ! isset($FED[strtoupper($Gui->Country->identifier)]))
427
+                $Gui->page = 1;
428
+            print "<p>".$Gui->listIdPs();
429
+            print "<p>".$Gui->listProfiles();
430
+            print "<p>".$Gui->listDevices();
431
+            print '<input type="hidden" name="devices_h" id="devices_h" value="0">';
432 432
 
433 433
         } else {
434
-          if($Gui->page != 3) {
435
-             print "Arguments missmatch error.";
436
-             exit;
437
-          }
434
+            if($Gui->page != 3) {
435
+                print "Arguments missmatch error.";
436
+                exit;
437
+            }
438 438
         print '<div id="user_choice">'.$Gui->yourChoice().'</div><p>';
439
-          $Gui->displayDeviceDownload();
439
+            $Gui->displayDeviceDownload();
440 440
         print '<input type="hidden" name="devices_h" id="devices_h" value="1">';
441 441
         }
442
-     ?>
442
+        ?>
443 443
       <input type="hidden" name="reset_dev" id="reset_dev" value="0">
444 444
         </form>
445 445
         <div class='footer'><hr />
Please login to merge, or discard this patch.
core/Federation.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -678,10 +678,10 @@
 block discarded – undo
678 678
     }
679 679
     
680 680
         /**
681
-     * deletes all attributes in this federation except the _file ones, these are reported as array
682
-     *
683
-     * @return array list of row id's of file-based attributes which weren't deleted
684
-     */
681
+         * deletes all attributes in this federation except the _file ones, these are reported as array
682
+         *
683
+         * @return array list of row id's of file-based attributes which weren't deleted
684
+         */
685 685
     public function beginFlushAttributes() {
686 686
         DBConnection::exec(Federation::$DB_TYPE, "DELETE FROM federation_option WHERE federation_id = '$this->identifier' AND option_name NOT LIKE '%_file'");
687 687
         $exec_q = DBConnection::exec(Federation::$DB_TYPE, "SELECT row FROM federation_option WHERE federation_id = '$this->identifier'");
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,9 +191,9 @@
 block discarded – undo
191 191
      * gets the language setting in CAT
192 192
      */
193 193
     static public function get_lang() {
194
-       if(self::$LANG === '')
195
-         list(self::$LANG, $xx) = self::set_lang();
196
-       return self::$LANG;
194
+        if(self::$LANG === '')
195
+            list(self::$LANG, $xx) = self::set_lang();
196
+        return self::$LANG;
197 197
     }
198 198
 
199 199
     /**
Please login to merge, or discard this patch.