Completed
Branch master (03ec64)
by Brook
14:43
created
web/user/cat_back.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,23 +10,23 @@  discard block
 block discarded – undo
10 10
  *
11 11
  * @package UserAPI
12 12
  */
13
-include(dirname(dirname(dirname(__FILE__)))."/config/_config.php");
13
+include(dirname(dirname(dirname(__FILE__))) . "/config/_config.php");
14 14
 include_once("UserAPI.php");
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
 $action  = $_REQUEST['action'];
22
-$id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
23
-$lang    = ( isset($_REQUEST['lang'])    ? $_REQUEST['lang']    : FALSE );
24
-$profile = ( isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE );
25
-$disco   = ( isset($_REQUEST['disco'])   ? $_REQUEST['disco']   : FALSE );
26
-$sort    = ( isset($_REQUEST['sort'])    ? $_REQUEST['sort']    : 0 );
27
-$generatedfor      = ( isset($_REQUEST['generatedfor'])      ? $_REQUEST['generatedfor']      : 'user' );
22
+$id      = (isset($_REQUEST['id']) ? $_REQUEST['id'] : FALSE);
23
+$lang    = (isset($_REQUEST['lang']) ? $_REQUEST['lang'] : FALSE);
24
+$profile = (isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE);
25
+$disco   = (isset($_REQUEST['disco']) ? $_REQUEST['disco'] : FALSE);
26
+$sort    = (isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 0);
27
+$generatedfor = (isset($_REQUEST['generatedfor']) ? $_REQUEST['generatedfor'] : 'user');
28 28
     
29
-debug(4,"cat_back action: ".$action.':'.$id.':'.$lang.':'.$profile.':'.$disco."\n");
29
+debug(4, "cat_back action: " . $action . ':' . $id . ':' . $lang . ':' . $profile . ':' . $disco . "\n");
30 30
 
31 31
 switch ($action) {
32 32
     case 'listLanguages':
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         break;
44 44
     case 'listProfiles': // needs $id set - abort if not
45 45
         if ($id === FALSE) exit;
46
-        $API->JSON_listProfiles($id,$sort);
46
+        $API->JSON_listProfiles($id, $sort);
47 47
         break;
48 48
     case 'listDevices':
49 49
         $API->JSON_listDevices($id);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         break;
55 55
     case 'downloadInstaller': // needs $id and $profile set optional $generatedfor
56 56
         if ($id === FALSE || $profile === FALSE) exit;
57
-        $API->downloadInstaller($id, $profile,$generatedfor);
57
+        $API->downloadInstaller($id, $profile, $generatedfor);
58 58
         break;
59 59
     case 'profileAttributes': // needs $id set
60 60
         if ($id === FALSE) exit;
Please login to merge, or discard this patch.
web/user/faq.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,18 +10,18 @@  discard block
 block discarded – undo
10 10
 array_push($FAQ,
11 11
       [
12 12
         'title'=>sprintf(_("What can I do to get my institution listed?")),
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'])
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
-        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),Config::$CONSORTIUM['name']),
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'])
18
+        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), Config::$CONSORTIUM['name']),
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
-        'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),Config::$CONSORTIUM['name']),
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
 
@@ -35,29 +35,29 @@  discard block
 block discarded – undo
35 35
 
36 36
 array_push($FAQ,
37 37
       [
38
-        'title'=>sprintf(_("Is it safe to use %s installers?"),Config::$APPEARANCE['productname']),
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']):""),
38
+        'title'=>sprintf(_("Is it safe to use %s installers?"), Config::$APPEARANCE['productname']),
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
-        '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>")
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
-        '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[
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[
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
-        'text'=>sprintf(_("You should send a mail to %s."),Config::$APPEARANCE['support-contact']['display'])
60
+        'text'=>sprintf(_("You should send a mail to %s."), Config::$APPEARANCE['support-contact']['display'])
61 61
       ]);
62 62
 
63 63
 
@@ -84,18 +84,18 @@  discard block
 block discarded – undo
84 84
     </h1>
85 85
     <div class="faq_toc" style="background:white; padding:5px;">
86 86
     <?php
87
-    $i =0;
87
+    $i = 0;
88 88
     foreach ($FAQ as $faq) {
89
-       print '<a href="#toc'.$i.'">'.$faq['title']."</a><br>\n";
89
+       print '<a href="#toc' . $i . '">' . $faq['title'] . "</a><br>\n";
90 90
        $i++;
91 91
     }
92 92
     ?>
93 93
     </div>
94 94
     <dl>
95 95
     <?php
96
-    $i =0;
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";
98
+      print "<dt><a name=toc$i>" . $faq['title'] . "</a></dt>\n<dd>" . $faq['text'] . "</dd>\n";
99 99
       $i++;
100 100
     }
101 101
     ?>
Please login to merge, or discard this patch.
web/user/API.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -10,28 +10,28 @@  discard block
 block discarded – undo
10 10
  *
11 11
  * @package UserAPI
12 12
  */
13
-include(dirname(dirname(dirname(__FILE__)))."/config/_config.php");
13
+include(dirname(dirname(dirname(__FILE__))) . "/config/_config.php");
14 14
 include_once("UserAPI.php");
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
 $action  = $_REQUEST['action'];
22
-$id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
23
-$device  = ( isset($_REQUEST['device'])  ? $_REQUEST['device']  : FALSE );
24
-$lang    = ( isset($_REQUEST['lang'])    ? $_REQUEST['lang']    : FALSE );
25
-$idp     = ( isset($_REQUEST['idp'])     ? $_REQUEST['idp']     : FALSE );
26
-$profile = ( isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE );
27
-$federation = ( isset($_REQUEST['federation']) ? $_REQUEST['federation'] : FALSE );
28
-$disco   = ( isset($_REQUEST['disco'])   ? $_REQUEST['disco']   : FALSE );
29
-$width   = ( isset($_REQUEST['width'])   ? $_REQUEST['width']   : 0 );
30
-$height   = ( isset($_REQUEST['height'])   ? $_REQUEST['height']   : 0 );
31
-$sort    = ( isset($_REQUEST['sort'])    ? $_REQUEST['sort']    : 0 );
32
-$location    = ( isset($_REQUEST['location'])    ? $_REQUEST['location']    : 0 );
33
-$api_version = ( isset($_REQUEST['api_version']) ? $_REQUEST['api_version'] : 1 );
34
-$generatedfor = ( isset($_REQUEST['generatedfor']) ? $_REQUEST['generatedfor'] : 'user' );
22
+$id      = (isset($_REQUEST['id']) ? $_REQUEST['id'] : FALSE);
23
+$device  = (isset($_REQUEST['device']) ? $_REQUEST['device'] : FALSE);
24
+$lang    = (isset($_REQUEST['lang']) ? $_REQUEST['lang'] : FALSE);
25
+$idp     = (isset($_REQUEST['idp']) ? $_REQUEST['idp'] : FALSE);
26
+$profile = (isset($_REQUEST['profile']) ? $_REQUEST['profile'] : FALSE);
27
+$federation = (isset($_REQUEST['federation']) ? $_REQUEST['federation'] : FALSE);
28
+$disco   = (isset($_REQUEST['disco']) ? $_REQUEST['disco'] : FALSE);
29
+$width   = (isset($_REQUEST['width']) ? $_REQUEST['width'] : 0);
30
+$height = (isset($_REQUEST['height']) ? $_REQUEST['height'] : 0);
31
+$sort    = (isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 0);
32
+$location    = (isset($_REQUEST['location']) ? $_REQUEST['location'] : 0);
33
+$api_version = (isset($_REQUEST['api_version']) ? $_REQUEST['api_version'] : 1);
34
+$generatedfor = (isset($_REQUEST['generatedfor']) ? $_REQUEST['generatedfor'] : 'user');
35 35
 
36 36
 /* in order to provide bacwards compatibility, both $id and new named arguments are supported.
37 37
    Support for $id will be removed in the futute
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $API->JSON_listCountries();
48 48
         break;
49 49
     case 'listIdentityProviders':
50
-        if(! $federation)
50
+        if (!$federation)
51 51
            $federation = $id;
52 52
         $API->JSON_listIdentityProviders($federation);
53 53
         break;
@@ -55,42 +55,42 @@  discard block
 block discarded – undo
55 55
         $API->JSON_listIdentityProvidersForDisco();
56 56
         break;
57 57
     case 'listProfiles': // needs $idp set - abort if not
58
-        if(! $idp) 
58
+        if (!$idp) 
59 59
            $idp = $id;
60 60
         if ($idp === FALSE) exit;
61
-        $API->JSON_listProfiles($idp,$sort);
61
+        $API->JSON_listProfiles($idp, $sort);
62 62
         break;
63 63
     case 'listDevices':
64
-        if(! $profile)
64
+        if (!$profile)
65 65
            $profile = $id;
66 66
         $API->JSON_listDevices($profile);
67 67
         break;
68 68
     case 'generateInstaller': // needs $id and $profile set
69
-        if(! $device)
69
+        if (!$device)
70 70
             $device = $id;
71 71
         if ($device === FALSE || $profile === FALSE) exit;
72 72
         $API->JSON_generateInstaller($device, $profile);
73 73
         break;
74 74
     case 'downloadInstaller': // needs $id and $profile set optional $generatedfor
75
-        if(! $device)
75
+        if (!$device)
76 76
             $device = $id;
77 77
         if ($device === FALSE || $profile === FALSE) exit;
78
-        $API->downloadInstaller($device, $profile,$generatedfor);
78
+        $API->downloadInstaller($device, $profile, $generatedfor);
79 79
         break;
80 80
     case 'profileAttributes': // needs $id set
81
-        if(! $profile)
81
+        if (!$profile)
82 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
-        if(! $idp)
87
+        if (!$idp)
88 88
            $idp = $id;
89 89
         if ($idp === FALSE) exit;
90
-        $API->sendLogo($idp, $disco,$width,$height);
90
+        $API->sendLogo($idp, $disco, $width, $height);
91 91
         break;
92 92
     case 'deviceInfo': // needs $id and profile set
93
-        if(! $device)
93
+        if (!$device)
94 94
             $device = $id;
95 95
         if ($id === FALSE || $profile === FALSE) exit;
96 96
         $API->deviceInfo($device, $profile);
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
         $API->JSON_detectOS();
103 103
         break;
104 104
     case 'orderIdentityProviders':
105
-        if(! $federation)
105
+        if (!$federation)
106 106
            $federation = $id;
107
-         if($location)  {
108
-            $A=explode(':',$location);
109
-            $L = ['lat'=>$A[0],'lon'=>$A[1]];
107
+         if ($location) {
108
+            $A = explode(':', $location);
109
+            $L = ['lat'=>$A[0], 'lon'=>$A[1]];
110 110
          } else
111 111
             $L = NULL;
112
-        $API->JSON_orderIdentityProviders($federation,$L);
112
+        $API->JSON_orderIdentityProviders($federation, $L);
113 113
         break;
114 114
 }
115
-debug(4,"UserAPI action: ".$action.':'.$id.':'.$lang.':'.$profile.':'.$disco."\n");
115
+debug(4, "UserAPI action: " . $action . ':' . $id . ':' . $lang . ':' . $profile . ':' . $disco . "\n");
116 116
 
117 117
 ?>
Please login to merge, or discard this patch.
web/index.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
   $this->menu = $menu_array;
38 38
 }
39 39
 
40
-private function printMenuLine($index,$title="",$style="") {
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 48
   foreach ($this->menu as $index => $title)
49
-  if(is_array($title))
50
-     $this->printMenuLine($index,$title[0],$title[1]); 
49
+  if (is_array($title))
50
+     $this->printMenuLine($index, $title[0], $title[1]); 
51 51
   else
52
-     $this->printMenuLine($index,$title); 
52
+     $this->printMenuLine($index, $title); 
53 53
 }
54 54
 
55 55
 private $menu;
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
         var download_message;
93 93
 <?php
94 94
 $OS = $Gui->detectOS();
95
-debug(4,$OS);
96
-if($OS)
97
-   print "recognised_os = '".$OS['device']."';\n";
98
-$download_message = sprintf(_("Download your %s installer"),Config::$CONSORTIUM['name']);
99
-print 'download_message = "'.$download_message.'";';
95
+debug(4, $OS);
96
+if ($OS)
97
+   print "recognised_os = '" . $OS['device'] . "';\n";
98
+$download_message = sprintf(_("Download your %s installer"), Config::$CONSORTIUM['name']);
99
+print 'download_message = "' . $download_message . '";';
100 100
 //TODO modify this based on OS detection
101 101
 if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT']))
102 102
     $profile_list_size = 1;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         <div id="heading">
121 121
             <?php
122 122
             print '<img src="resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
123
-            print '<div id="motd">'.( isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp' ).'</div>';
123
+            print '<div id="motd">' . (isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp') . '</div>';
124 124
             print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), Config::$APPEARANCE['productname']) . '</h1>
125 125
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . Config::$APPEARANCE['productname_long'] . '</h2>';
126 126
             echo '<table id="lang_select"><tr><td>';
@@ -142,20 +142,20 @@  discard block
 block discarded – undo
142 142
         </div>
143 143
         <form id="cat_form" name="cat_form" method="POST"  accept-charset="UTF-8" action="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'); ?>/">
144 144
         <div id="main_body">
145
-<?php if(! isset($_REQUEST['idp']) || ! $_REQUEST['idp']) { ?>
145
+<?php if (!isset($_REQUEST['idp']) || !$_REQUEST['idp']) { ?>
146 146
                 <table id="front_page">
147 147
                     <tr>
148 148
                         <td rowspan=2 id="menu_column">
149 149
                             <table id="left_menu">
150 150
 <?php
151
-                                $menu = new Menu( [
152
-                                   "about_consortium"=>[sprintf(_("About %s"), Config::$CONSORTIUM['name']),'padding-bottom:20px;font-weight: bold; '],
151
+                                $menu = new Menu([
152
+                                   "about_consortium"=>[sprintf(_("About %s"), Config::$CONSORTIUM['name']), 'padding-bottom:20px;font-weight: bold; '],
153 153
                                    "about"=>sprintf(_("About %s"), Config::$APPEARANCE['productname']),
154 154
                                    "tou"=>sprintf(_("Terms of use")),
155 155
                                    "faq"=>sprintf(_("FAQ")),
156 156
                                    "report"=>sprintf(_("Report a problem")),
157 157
                                    "develop"=>sprintf(_("Become a CAT developer")),
158
-                                   "admin"=>[sprintf(_("%s admin:<br>manage your IdP"), Config::$CONSORTIUM['name']),'padding-top:30px;'],
158
+                                   "admin"=>[sprintf(_("%s admin:<br>manage your IdP"), Config::$CONSORTIUM['name']), 'padding-top:30px;'],
159 159
                                 ]);
160 160
 
161 161
                                 $menu->printMenu(); ?>
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                                             <span id="line5">
178 178
                                             <?php
179 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']);
180
+                                                echo sprintf(_("Digitally signed by the organisation that coordinates %s: %s"), Config::$CONSORTIUM['name'], Config::$CONSORTIUM['signer_name']);
181 181
                                             ?>
182 182
                                             </span>
183 183
                                         </div>
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                        echo _("Your download will start shortly. In case of problems with the automatic download please use this direct <a href=''>link</a>.");
229 229
                        ?></span>
230 230
                        <p>
231
-                       <?php printf(_("Dear user from %s,"),"<span class='inst_name'></span>") ?>
231
+                       <?php printf(_("Dear user from %s,"), "<span class='inst_name'></span>") ?>
232 232
                        <br/>
233 233
                        <br/>
234 234
                        <?php echo _("we would like to warmly welcome you among the several million users of eduroam®! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!") ?>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                        <p>
237 237
                        <?php echo _("Now that you have downloaded and installed a client configurator, all you need to do is find an eduroam® hotspot in your vicinity and enter your user credentials (this is our fancy name for 'username and password' or 'personal certificate') - and be online!") ?>
238 238
                        <p>
239
-                       <?php printf(_("Should you have any problems using this service, please always contact the helpdesk of %s. They will diagnose the problem and help you out. You can reach them via the means shown above."),"<span class='inst_name'></span>") ?>
239
+                       <?php printf(_("Should you have any problems using this service, please always contact the helpdesk of %s. They will diagnose the problem and help you out. You can reach them via the means shown above."), "<span class='inst_name'></span>") ?>
240 240
                        </p>
241 241
                        <p>
242 242
                        <a href="javascript:back_to_downloads()"><strong><?php echo _("Back to downloads") ?></strong></a>
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                             </span>
253 253
                     </div> <!-- id="profile_redirect" -->
254 254
                     <div id="devices" class="device_list">
255
-<?php if($OS) { ?>  <!-- this part is shown when we have guessed the OS -->
255
+<?php if ($OS) { ?>  <!-- this part is shown when we have guessed the OS -->
256 256
                         
257 257
                         <div class="sub_h" id="guess_os"> 
258 258
                               <table id='browser'>
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
                                     foreach ($Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $G) {
303 303
                                         $ct = count($G);
304 304
                                         $i = 0;
305
-                                        print '<tbody><tr><td class="vendor" rowspan="' . $ct . '"><img src="resources/images/vendorlogo/' . $group . '.png" alt="'.$group.' Device"></td>';
305
+                                        print '<tbody><tr><td class="vendor" rowspan="' . $ct . '"><img src="resources/images/vendorlogo/' . $group . '.png" alt="' . $group . ' Device"></td>';
306 306
                                         foreach ($G as $d => $D) {
307 307
                                             if ($i)
308 308
                                                 print '<tr>';
309
-                                            $j = ($i+1)*20;
309
+                                            $j = ($i + 1) * 20;
310 310
                                             print "<td><button id='" . $d . "'>" . $D['display'] . "</button>";
311 311
                                             print "<div class='device_info' id='info_" . $d . "'></div></td>";
312 312
                                             print "<td><button class='more_info_b' id='info_b_" . $d . "'></button></td></tr>\n";
Please login to merge, or discard this patch.
web/download.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * @package UserGUI
14 14
  */
15 15
 
16
-include(dirname(dirname(__FILE__))."/config/_config.php");
16
+include(dirname(dirname(__FILE__)) . "/config/_config.php");
17 17
 require_once("UserAPI.php");
18 18
 $Gui = new UserAPI();
19 19
 
@@ -28,26 +28,26 @@  discard block
 block discarded – undo
28 28
 
29 29
 
30 30
 if ($generated_for != "admin" && $generated_for != "user") {
31
-    debug(2,"Invalid downloads triggered (neither for admin nor user???)");
31
+    debug(2, "Invalid downloads triggered (neither for admin nor user???)");
32 32
     print("Invalid downloads triggered (neither for admin nor user???)");
33 33
     exit(1);
34 34
 }
35 35
 
36 36
 //print_r($_REQUEST);
37 37
 
38
-debug(4,"download: profile:$profile_id; inst:$inst_id; device:$device\n");
38
+debug(4, "download: profile:$profile_id; inst:$inst_id; device:$device\n");
39 39
 
40 40
 // first block will test if the user input was valid.
41 41
 
42 42
 $p = new Profile($profile_id);
43 43
 
44
-if(!$p->institution || $p->institution !== $inst_id) {
44
+if (!$p->institution || $p->institution !== $inst_id) {
45 45
   header("HTTP/1.0 404 Not Found");
46 46
   return;
47 47
 }
48 48
 
49 49
 // now we generate the installer
50 50
 
51
-$Gui->downloadInstaller($device,$profile_id, $generated_for);
51
+$Gui->downloadInstaller($device, $profile_id, $generated_for);
52 52
 
53 53
 ?>
Please login to merge, or discard this patch.
web/copyright.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         <div id="heading">
24 24
             <?php
25 25
             print '<img src="resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
26
-            print '<div id="motd">'.( isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp' ).'</div>';
26
+            print '<div id="motd">' . (isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp') . '</div>';
27 27
             print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("%s Copyright and Licensing"), Config::$APPEARANCE['productname']) . '</h1>
28 28
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . Config::$APPEARANCE['productname_long'] . '</h2>';
29 29
             echo '<table id="lang_select"><tr><td>';
Please login to merge, or discard this patch.
web/404.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 <body>
27 27
     <div id="heading">
28 28
         <?php
29
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
30
-        print '<div id="motd">' . ( isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp' ) . '</div>';
29
+        print '<img src="' . dirname($_SERVER['SCRIPT_NAME']) . '/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
30
+        print '<div id="motd">' . (isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp') . '</div>';
31 31
         print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), Config::$APPEARANCE['productname']) . '</h1>
32 32
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . Config::$APPEARANCE['productname_long'] . '</h2>';
33 33
         echo '<table id="lang_select"><tr><td>';
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         ?>
42 42
     </div> <!-- id="heading" -->
43 43
     <div id="main_body" style='padding:20px;'>
44
-        <h1><?php echo _("This is not the CAT you are looking for.");?></h1>
45
-        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number");?></p>
44
+        <h1><?php echo _("This is not the CAT you are looking for."); ?></h1>
45
+        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number"); ?></p>
46 46
         <h2>404</h2>
47 47
         <p><?php echo sprintf(_("staring at you. Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . CAT::get_lang())?></p>
48 48
     </div> <!-- id="main_body" -->
Please login to merge, or discard this patch.
web/4013.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 <body>
27 27
     <div id="heading">
28 28
         <?php
29
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
30
-        print '<div id="motd">' . ( isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp' ) . '</div>';
29
+        print '<img src="' . dirname($_SERVER['SCRIPT_NAME']) . '/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
30
+        print '<div id="motd">' . (isset(Config::$APPEARANCE['MOTD']) ? Config::$APPEARANCE['MOTD'] : '&nbsp') . '</div>';
31 31
         print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), Config::$APPEARANCE['productname']) . '</h1>
32 32
 <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . Config::$APPEARANCE['productname_long'] . '</h2>';
33 33
         echo '<table id="lang_select"><tr><td>';
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         ?>
42 42
     </div> <!-- id="heading" -->
43 43
     <div id="main_body" style='padding:20px;'>
44
-        <h1><?php echo _("Maybe this is the CAT you are looking for...");?></h1>
45
-        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as");?></p>
44
+        <h1><?php echo _("Maybe this is the CAT you are looking for..."); ?></h1>
45
+        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as"); ?></p>
46 46
         <h2>401/403</h2>
47 47
         <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . CAT::get_lang())?></p>
48 48
     </div> <!-- id="main_body" -->
Please login to merge, or discard this patch.
web/resources/css/cat.css.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 }
10 10
 
11 11
 body {
12
-    background: <?php echo $colour1;?>;
12
+    background: <?php echo $colour1; ?>;
13 13
     font-family:Verdana, Arial, Helvetica, sans-serif;
14 14
     font-size:11px;
15 15
     height: 100%;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 }
24 24
 
25 25
 button {
26
-    background: <?php echo $colour2;?>; 
26
+    background: <?php echo $colour2; ?>; 
27 27
     color: #FFFFFF; 
28 28
     min-height: 23px;
29 29
     border-left-style: outset; 
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
     border-bottom-style:solid;
206 206
     border-top-width:5px; 
207 207
     border-bottom-width:5px; 
208
-    border-color: <?php echo $colour1;?>;
208
+    border-color: <?php echo $colour1; ?>;
209 209
     padding-left:30px;
210
-    color: <?php echo $colour2;?>;
210
+    color: <?php echo $colour2; ?>;
211 211
 }
212 212
 
213 213
 div.pagecontent {
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
 span.edu_cat {
402 402
     font-weight: bold;
403
-    color: <?php echo $colour2;?>;
403
+    color: <?php echo $colour2; ?>;
404 404
 }
405 405
 
406 406
 span.tooltip {
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
     border-bottom-style:solid;
514 514
     border-top-width:5px; 
515 515
     border-bottom-width:5px; 
516
-    border-color: <?php echo $colour1;?>; 
516
+    border-color: <?php echo $colour1; ?>; 
517 517
     padding-left:30px;
518 518
 }
519 519
 
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 }
568 568
 
569 569
 span.redirect_link {
570
-    background: <?php echo $colour2;?>; color: #FFFFFF; height: 23px;
570
+    background: <?php echo $colour2; ?>; color: #FFFFFF; height: 23px;
571 571
     border-left-style: inset; border-left-width: 1px; border-left-color: #8bbacb;
572 572
     border-top-style: inset; border-top-width: 1px; border-top-color: #8bbacb;
573 573
     border-right-style: outset; border-right-width: 2px; border-right-color: #043d52;
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 }
615 615
 
616 616
 #close_button {
617
-    background: <?php echo $colour2;?>; 
617
+    background: <?php echo $colour2; ?>; 
618 618
     color: #FFFFFF; 
619 619
     height: 23px;
620 620
     border-left-style: inset; 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
     width: 30em; 
696 696
     padding-left: 10px; 
697 697
     padding-right: 0px; 
698
-    background: <?php echo $colour2;?>; 
698
+    background: <?php echo $colour2; ?>; 
699 699
     color: white; 
700 700
     box-shadow: 10px 10px 5px #888888;
701 701
 }
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
     width: 30em; 
705 705
     padding-left: 10px; 
706 706
     padding-right: 00px; 
707
-    background: <?php echo $colour2;?>; 
707
+    background: <?php echo $colour2; ?>; 
708 708
     color: #FFFFFF; 
709 709
     box-shadow: 10px 10px 5px #888888;
710 710
 }
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
     padding-top: 4px; 
760 760
     padding-bottom: 12px; 
761 761
     padding-left: 30px; 
762
-    background: <?php echo $colour1;?>; 
762
+    background: <?php echo $colour1; ?>; 
763 763
     text-align: left; 
764 764
     text-shadow: 10px 10px 5px #888888;
765 765
 }
@@ -769,9 +769,9 @@  discard block
 block discarded – undo
769 769
     border-bottom-style:solid;
770 770
     border-top-width:5px;
771 771
     border-bottom-width:5px;
772
-    border-color: <?php echo $colour1;?>;
772
+    border-color: <?php echo $colour1; ?>;
773 773
     padding-left:30px;
774
-    color: <?php echo $colour2;?>;
774
+    color: <?php echo $colour2; ?>;
775 775
 }
776 776
 
777 777
 #heading h1 { 
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
     text-align: justify;
791 791
     border-bottom-style:solid;
792 792
     border-bottom-width:5px;
793
-    border-color: <?php echo $colour1;?>;
793
+    border-color: <?php echo $colour1; ?>;
794 794
     font-size: 11px;
795 795
     font-weight: normal;
796 796
 }
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 
839 839
 #faq {
840 840
     padding: 20px;
841
-    color: <?php echo $colour2;?>;
841
+    color: <?php echo $colour2; ?>;
842 842
     background: #ffffff;
843 843
 }
844 844
 
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
 
892 892
 #line1 {
893 893
     top:145px;
894
-    color: <?php echo $colour2;?>;
894
+    color: <?php echo $colour2; ?>;
895 895
     font-size:20px;
896 896
 }
897 897
 
@@ -946,7 +946,7 @@  discard block
 block discarded – undo
946 946
 
947 947
 #menu_column {
948 948
     border-right:solid;
949
-    border-color: <?php echo $colour1;?>;
949
+    border-color: <?php echo $colour1; ?>;
950 950
     border-width:5px;
951 951
     min-height:400px;
952 952
     padding-left: 10px;
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
 
958 958
 #front_page_leftmenu {
959 959
     border-right:solid; 
960
-    border-color: <?php echo $colour1;?>; 
960
+    border-color: <?php echo $colour1; ?>; 
961 961
     border-width:5px; 
962 962
     min-height:400px; 
963 963
     padding-left: 10px; 
@@ -986,11 +986,11 @@  discard block
 block discarded – undo
986 986
 }
987 987
 
988 988
 a:link {
989
-    color:<?php echo $colour2;?>;
989
+    color:<?php echo $colour2; ?>;
990 990
 }
991 991
 
992 992
 a:visited {
993
-    color:<?php echo $colour2;?>;
993
+    color:<?php echo $colour2; ?>;
994 994
 }
995 995
 
996 996
 a:hover {
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 }
999 999
 
1000 1000
 a:active {
1001
-    color:<?php echo $colour2;?>;
1001
+    color:<?php echo $colour2; ?>;
1002 1002
 }
1003 1003
 
1004 1004
 .comment {
Please login to merge, or discard this patch.