Passed
Push — master ( 56c883...f703ed )
by Maja
04:39
created
core/common/Language.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
             $langConverted[] = $hardSetLang;
85 85
         }
86 86
         if (!empty($_REQUEST['lang'])) {
87
-            $recoverLang = filter_input(INPUT_GET,'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
87
+            $recoverLang = filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
88 88
             $langConverted[] = $recoverLang;
89 89
         }
90 90
         if (!empty($_SESSION['language'])) {
91 91
             $langConverted[] = $_SESSION['language'];
92 92
         }
93 93
         if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
94
-            $langs = explode(",", filter_input(INPUT_SERVER,"HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
94
+            $langs = explode(",", filter_input(INPUT_SERVER, "HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
95 95
             foreach ($langs as $lang) {
96 96
                 $result = [];
97 97
                 preg_match("/(.*);+.*/", $lang, $result);
Please login to merge, or discard this patch.
web/accountstatus/accountstatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 $cleanToken = FALSE;
23 23
 $tokenStatus = ["status" => \core\ProfileSilverbullet::SB_TOKENSTATUS_INVALID,
24
-    "cert_status" => [],];
24
+    "cert_status" => [], ];
25 25
 $profile = NULL;
26 26
 $idp = NULL;
27 27
 $fed = NULL;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // it can be VALID (exists and not redeemed, EXPIRED, REDEEMED or INVALID (non existent)
39 39
         $tokenStatus = \core\ProfileSilverbullet::tokenStatus($cleanToken);
40 40
     }
41
-} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0']) ) {
41
+} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0'])) {
42 42
     // maybe the user authenticated with his client cert? Then pick any of his
43 43
     // tokens to go on
44 44
     $certname = $_SERVER['SSL_CLIENT_SAN_Email'] ?? $_SERVER['SSL_CLIENT_SAN_Email_0'];
Please login to merge, or discard this patch.
web/user/faq.inc.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -12,52 +12,52 @@
 block discarded – undo
12 12
     this is just an include file for Gui class definition
13 13
 */
14 14
     $Faq = [
15
-      [
15
+        [
16 16
         'id'=>'idp_not_listed',
17 17
         'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"),$Gui->nomenclature_inst),
18 18
         'text'=>sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, 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 %s installer is <i>guaranteed to not work</i>!"), $Gui->nomenclature_inst, $Gui->nomenclature_inst, $Gui->nomenclature_inst)
19
-         ],
20
-      [
19
+            ],
20
+        [
21 21
         'id'=>'idp_not_listed',
22 22
         'title'=>sprintf(_("What can I do to get my %s listed?"), $Gui->nomenclature_inst),
23 23
         'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
24 24
 ],
25
-      [
25
+        [
26 26
         'id'=>'device_not_listed',
27 27
         'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
28 28
         '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_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
29
-      ],
29
+        ],
30 30
 
31
-      [
31
+        [
32 32
         'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
33 33
         '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."))
34 34
 ],
35
-      [
35
+        [
36 36
         'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']),
37 37
         '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['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_CONFASSISTANT['CONSORTIUM']['signer_name']):""),
38 38
         
39 39
 ],
40
-      [
40
+        [
41 41
         'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"),
42 42
         '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['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>")
43 43
         
44 44
 ],
45
-      [
45
+        [
46 46
         'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
47
-      '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
47
+        '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
48 48
 ],
49
-      [
49
+        [
50 50
         'id'=>'contact',
51 51
         'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")),
52 52
         'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display'])
53
-      ],
53
+        ],
54 54
 ];
55 55
 
56 56
     if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") {
57
-       array_push($Faq,
58
-         [
59
-           'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'],
60
-           'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
61
-           'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
62
-         ]);
57
+        array_push($Faq,
58
+            [
59
+            'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'],
60
+            'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
61
+            'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
62
+            ]);
63 63
     }
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,50 +14,50 @@
 block discarded – undo
14 14
     $Faq = [
15 15
       [
16 16
         'id'=>'idp_not_listed',
17
-        'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"),$Gui->nomenclature_inst),
17
+        'title'=>sprintf(_("My %s is not listed. Can't I just use any of the other ones?"), $Gui->nomenclature_inst),
18 18
         'text'=>sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, 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 %s installer is <i>guaranteed to not work</i>!"), $Gui->nomenclature_inst, $Gui->nomenclature_inst, $Gui->nomenclature_inst)
19 19
          ],
20 20
       [
21 21
         'id'=>'idp_not_listed',
22 22
         'title'=>sprintf(_("What can I do to get my %s listed?"), $Gui->nomenclature_inst),
23
-        'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
23
+        'text'=>sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
24 24
 ],
25 25
       [
26 26
         'id'=>'device_not_listed',
27
-        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
28
-        '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_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
27
+        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
28
+        '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_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
29 29
       ],
30 30
 
31 31
       [
32
-        'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
32
+        'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
33 33
         '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."))
34 34
 ],
35 35
       [
36
-        'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']),
37
-        '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['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_CONFASSISTANT['CONSORTIUM']['signer_name']):""),
36
+        'title'=>sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']),
37
+        '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['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_CONFASSISTANT['CONSORTIUM']['signer_name']) : ""),
38 38
         
39 39
 ],
40 40
       [
41 41
         'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"),
42
-        '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG_CONFASSISTANT['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>")
42
+        '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_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."), CONFIG_CONFASSISTANT['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>")
43 43
         
44 44
 ],
45 45
       [
46
-        'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
47
-      '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 %s and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
46
+        'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
47
+      '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 %s and report the problem, the administrators should be able to trace your connections."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $Gui->nomenclature_inst)
48 48
 ],
49 49
       [
50 50
         'id'=>'contact',
51 51
         'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")),
52
-        'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display'])
52
+        'text'=>sprintf(_("You should send a mail to %s."), CONFIG['APPEARANCE']['support-contact']['display'])
53 53
       ],
54 54
 ];
55 55
 
56 56
     if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") {
57 57
        array_push($Faq,
58 58
          [
59
-           'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'],
59
+           'id'=>'what_is_' . CONFIG_CONFASSISTANT['CONSORTIUM']['name'],
60 60
            'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
61
-           'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
61
+           'text'=>sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
62 62
          ]);
63 63
     }
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
web/admin/inc/toggleRedirect.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         throw new Exception("POSTed EAP type value is not an integer!");
52 52
     }
53 53
     // conversion routine throws an exception if the EAP type id is not known
54
-    $eaptype = new \core\common\EAP((int)$posted_eaptype);
54
+    $eaptype = new \core\common\EAP((int) $posted_eaptype);
55 55
 }
56 56
 
57 57
 // there is either one or the other. If both are set, something's fishy.
Please login to merge, or discard this patch.
web/skins/classic/user/cat_info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         }
44 44
         break;
45 45
     case 'about':
46
-        $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 %s will not work for users of another one, therefore if your %s is not on the list, you cannot use this system. Please contact your local administrators and try to influence them to add your %s configuration to <span class='edu_cat'>%s</span>."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG['APPEARANCE']['productname'],$skinObject->nomenclature_inst, $skinObject->nomenclature_inst, $skinObject->nomenclature_inst, CONFIG['APPEARANCE']['productname']);
46
+        $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 %s will not work for users of another one, therefore if your %s is not on the list, you cannot use this system. Please contact your local administrators and try to influence them to add your %s configuration to <span class='edu_cat'>%s</span>."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG['APPEARANCE']['productname'], $skinObject->nomenclature_inst, $skinObject->nomenclature_inst, $skinObject->nomenclature_inst, CONFIG['APPEARANCE']['productname']);
47 47
         $out .= "<p>" . sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), CONFIG['APPEARANCE']['productname']) . "</p>";
48 48
         $out .= "<table><tr><th>" . _("Device Group") . "</th><th>" . _("Device") . "</th>";
49 49
 foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) {
Please login to merge, or discard this patch.
web/admin/API.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
40 40
         $leftNum = (int) preg_replace($pat, $rep, $left);
41 41
         $rightNum = (int) preg_replace($pat, $rep, $right);
42 42
         return ($left != $leftNum && $right != $rightNum) ?
43
-                $leftNum - $rightNum :
44
-                strcmp($left, $right);
43
+                $leftNum - $rightNum : strcmp($left, $right);
45 44
     }
46 45
 
47 46
     
@@ -118,8 +117,8 @@  discard block
 block discarded – undo
118 117
             $therealm = "";
119 118
             $theanonid = "anonymous";
120 119
             $useAnon = FALSE;
121
-            $stringValuesFiltered = filter_input(INPUT_POST,'value', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
122
-            $intValuesFiltered = filter_input(INPUT_POST,'value', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY);
120
+            $stringValuesFiltered = filter_input(INPUT_POST, 'value', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
121
+            $intValuesFiltered = filter_input(INPUT_POST, 'value', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY);
123 122
             $pref = 0;
124 123
             foreach ($_POST['option'] as $optindex => $optname) {
125 124
                 switch ($optname) {
@@ -145,7 +144,7 @@  discard block
 block discarded – undo
145 144
                         
146 145
                         if (isset($intValuesFiltered[$optindex . "-0"])) {
147 146
                             $filteredType = $intValuesFiltered[$optindex . "-0"];
148
-                            if ($filteredType <0 || $filteredType >8) {
147
+                            if ($filteredType < 0 || $filteredType > 8) {
149 148
                                 break;
150 149
                             }
151 150
                             $newprofile->addSupportedEapMethod(new \core\common\EAP($filteredType), $pref);
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
      * @param int $rowid the HTML field base name of the option to be displayed
206 206
      * @param string $optionName the name of the option to display
207 207
      * @param string $optionValue the value of the option to display
208
-     * @param mixed $optionLang the language of the option to display
208
+     * @param null|string $optionLang the language of the option to display
209 209
      * @return string HTML code
210 210
      * @throws Exception
211 211
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $optioninfo = \core\Options::instance();
104 104
 
105
-        if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
105
+        if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
106 106
             foreach ($prepopulate as $option) {
107 107
                 if (preg_match("/$class:/", $option['name']) && !preg_match("/(user:fedadmin)/", $option['name'])) {
108 108
                     $optiontypearray = $optioninfo->optionType($option['name']);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $retval .= "
340 340
 
341 341
        <td>
342
-          <button type='button' class='delete' onclick='deleteOption(" . ( $prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0 ) . ",\"option-S" . $rowid . "\")'>-</button>
342
+          <button type='button' class='delete' onclick='deleteOption(" . ($prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0) . ",\"option-S" . $rowid . "\")'>-</button>
343 343
        </td>
344 344
     </tr>";
345 345
         return $retval;
Please login to merge, or discard this patch.
web/admin/edit_federation_result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 echo $deco->pageheader(sprintf(_("%s: %s Customisation (submission completed)"), CONFIG['APPEARANCE']['productname'], $uiElements->nomenclature_fed), "FEDERATION");
29 29
 $my_fed = $validator->Federation($_GET['fed_id'], $_SESSION['user']);
30 30
 if (isset($_POST['submitbutton'])) {
31
-    if (( $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_SAVE) && isset($_POST['option']) && isset($_POST['value'])) { // here we go
31
+    if (($_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_SAVE) && isset($_POST['option']) && isset($_POST['value'])) { // here we go
32 32
         $fed_name = $my_fed->name;
33 33
         echo "<h1>" . sprintf(_("Submitted attributes for %s '%s'"), $uiElements->nomenclature_fed, $fed_name) . "</h1>";
34 34
         echo "<table>";
Please login to merge, or discard this patch.
web/admin/inc/manageDBLink.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 // if we have a pushed close button, submit attributes and send user back to the overview page
26 26
 // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately.
27
-if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || CONFIG['DB']['enforce-external-sync'] == FALSE) {
27
+if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || CONFIG['DB']['enforce-external-sync'] == FALSE) {
28 28
     header("Location: ../overview_federation.php");
29 29
     exit;
30 30
 }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         // right-hand side: external DB
107 107
         $externalid = $my_inst->getExternalDBId();
108 108
         if (!$externalid) { // we are in SYNCED state so this cannot happen
109
-            throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']."!");
109
+            throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . "!");
110 110
         }
111 111
 
112 112
         $extinfo = $cat->getExternalDBEntityDetails($externalid);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         }
168 168
         // issue a big red warning if there are no link candidates at all in the federation
169 169
         if (empty($buffer) && empty($candidates)) {
170
-            echo "<tr><td style='color:#ff0000' colspan='2'>". sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclature_inst, $uiElements->nomenclature_fed)."</td></tr>";
170
+            echo "<tr><td style='color:#ff0000' colspan='2'>" . sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclature_inst, $uiElements->nomenclature_fed) . "</td></tr>";
171 171
         }
172 172
         echo "</table><button type='submit' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_SAVE . "' disabled >" . _("Create Link") . "</button></form>";
173 173
     }
Please login to merge, or discard this patch.