Passed
Push — release_2_0 ( c174a1...0e4618 )
by Stefan
07:01
created
web/diag/findRealm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
  * @return boolean
37 37
  */
38 38
 
39
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
39
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
40 40
 
41 41
 // we are referring to $_SESSION later in the file
42 42
 CAT_session_start();
Please login to merge, or discard this patch.
web/user/faq.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,36 +31,36 @@  discard block
 block discarded – undo
31 31
       [
32 32
         'id'=>'idp_not_listed',
33 33
         'title'=>_("What can I do to get my organisation listed?"),
34
-        'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
34
+        'text'=>sprintf(_("Contact %s administrators within your organisation and request that they add their organisation to the system. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
35 35
 ],
36 36
       [
37 37
         'id'=>'device_not_listed',
38
-        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
39
-        '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 organisation to get help in setting up such a device."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
38
+        'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
39
+        '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 organisation to get help in setting up such a device."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
40 40
       ],
41 41
 
42 42
       [
43
-        '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']),
43
+        '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']),
44 44
         '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."))
45 45
 ],
46 46
       [
47
-        'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']),
48
-        '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']):""),
47
+        'title'=>sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']),
48
+        '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']) : ""),
49 49
         
50 50
 ],
51 51
       [
52 52
         'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"),
53
-        '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>")
53
+        '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>")
54 54
         
55 55
 ],
56 56
       [
57
-        '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']),
58
-      '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 organisation and report the problem, the administrators should be able to trace your connections."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
57
+        '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']),
58
+      '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 organisation and report the problem, the administrators should be able to trace your connections."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
59 59
 ],
60 60
       [
61 61
         'id'=>'contact',
62 62
         'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")),
63
-        'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display'])
63
+        'text'=>sprintf(_("You should send a mail to %s."), CONFIG['APPEARANCE']['support-contact']['display'])
64 64
       ],
65 65
 ];
66 66
 
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
          [
72 72
            'id'=>'what_is_'.CONFIG_CONFASSISTANT['CONSORTIUM']['name'],
73 73
            'title'=>sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']),
74
-           '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 %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
74
+           '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 %d hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> or <a href='http://monitor.eduroam.org/map_service_loc.php'>the %s location map</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $SPs, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])
75 75
          ]);
76 76
     }
Please login to merge, or discard this patch.
core/ExternalEduroamDBData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             return $this->counter;
105 105
         }
106 106
 
107
-        $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised");
107
+        $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised");
108 108
         if ($cachedNumber !== FALSE) {
109 109
             $numberData = unserialize($cachedNumber);
110 110
             $now = new \DateTime();
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             while ($iterator = mysqli_fetch_object(/** @scrutinizer ignore-type */ $query)) {
120 120
                 $this->counter = $iterator->total;
121 121
             }
122
-            file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
122
+            file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
123 123
         }
124 124
     }
125 125
 
Please login to merge, or discard this patch.
web/lib/admin/API.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 use Exception;
31 31
 
32
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
32
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
33 33
 
34 34
 /**
35 35
  * This class defines the various actions doable with the admin API, the
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     const ACTIONS = [
245 245
         // Inst-level actions.
246 246
         API::ACTION_NEWINST_BY_REF => [
247
-            "REQ" => [API::AUXATTRIB_EXTERNALID,],
247
+            "REQ" => [API::AUXATTRIB_EXTERNALID, ],
248 248
             "OPT" => [
249 249
                 'general:geo_coordinates',
250 250
                 'general:logo_file',
@@ -555,8 +555,8 @@  discard block
 block discarded – undo
555 555
 
556 556
                 case \core\Options::TYPECODE_COORDINATES:
557 557
                     $extension = \core\Options::TYPECODE_TEXT;
558
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
559
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
558
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
559
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
560 560
                     break;
561 561
                 case \core\Options::TYPECODE_TEXT:
562 562
                 // Fall-through: they all get the same treatment.
@@ -566,18 +566,18 @@  discard block
 block discarded – undo
566 566
                 // Fall-through: they all get the same treatment.
567 567
                 case \core\Options::TYPECODE_INTEGER:
568 568
                     $extension = $optionInfo['type'];
569
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
570
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
569
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
570
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
571 571
                     if ($optionInfo['flag'] == "ML") {
572
-                        $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG'];
572
+                        $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG'];
573 573
                     }
574 574
                     break;
575 575
                 case \core\Options::TYPECODE_FILE:
576 576
                     // Binary data is expected in base64 encoding. This is true also for PEM files!
577 577
                     $extension = $optionInfo['type'];
578
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
579
-                    file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE']));
580
-                    $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension;
578
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
579
+                    file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE']));
580
+                    $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension;
581 581
                     break;
582 582
                 default:
583 583
                     throw new Exception("We don't seem to know this type code!");
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     public function returnSuccess($details) {
607 607
         $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT);
608 608
         if ($output === FALSE) {
609
-            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg());
609
+            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ".json_last_error()." - ".json_last_error_msg());
610 610
         }
611 611
         else {
612 612
             echo $output;
Please login to merge, or discard this patch.
web/admin/112365365321.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . '/config/_config.php';
22
+require_once dirname(dirname(__DIR__)).'/config/_config.php';
23 23
 
24 24
 $uiElements = new web\lib\admin\UIElements();
25 25
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                         // filesystem cleanup
76 76
                     case web\lib\common\FormElements::BUTTON_DELETE:
77 77
                         $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs();
78
-                        echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>";
78
+                        echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>";
79 79
                         break;
80 80
                     default:
81 81
                         break;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'");
142 142
                     // SELECT -> mysqli_result, not boolean
143 143
                     while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) {
144
-                        echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>";
144
+                        echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>";
145 145
                         $gross_admin = $gross_admin + $a->admin;
146 146
                         $gross_user = $gross_user + $a->user;
147 147
                         $gross_silverbullet = $gross_silverbullet + $a->silverbullet;
Please login to merge, or discard this patch.
config/config-confassistant-template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,13 +134,13 @@
 block discarded – undo
134 134
             'db' => 'radacct',
135 135
             'user' => 'someuser',
136 136
             'pass' => 'somepass',
137
-            'readonly' => TRUE,],
137
+            'readonly' => TRUE, ],
138 138
         'RADIUS_2' => [
139 139
             'host' => 'auth-2.hosted.eduroam.org',
140 140
             'db' => 'radacct',
141 141
             'user' => 'someuser',
142 142
             'pass' => 'somepass',
143
-            'readonly' => TRUE,],
143
+            'readonly' => TRUE, ],
144 144
     ],
145 145
 
146 146
     /**
Please login to merge, or discard this patch.
web/admin/inc/userStats.inc.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * ******************************************************************************
10 10
  */
11 11
 
12
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
12
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
13 13
 
14 14
 $auth = new \web\lib\admin\Authentication();
15 15
 $auth->authenticate();
@@ -22,30 +22,30 @@  discard block
 block discarded – undo
22 22
 
23 23
 ?>
24 24
 
25
-<h1><?php echo _("User Authentication Records");?></h1>
26
-<p><?php echo _("Note that:");?></p>
25
+<h1><?php echo _("User Authentication Records"); ?></h1>
26
+<p><?php echo _("Note that:"); ?></p>
27 27
 <ul>
28
-    <li><?php echo _("Authentication records are deleted after six months retention time");?></li>
29
-    <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots");?></li>
30
-    <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems");?></li>
28
+    <li><?php echo _("Authentication records are deleted after six months retention time"); ?></li>
29
+    <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots"); ?></li>
30
+    <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems"); ?></li>
31 31
 </ul>
32 32
 <table class='authrecord'>
33 33
     <tr>
34
-        <td><strong><?php echo _("Timestamp");?></strong></td>
35
-        <td><strong><?php echo _("Credential");?></strong></td>
36
-        <td><strong><?php echo _("MAC Address");?></strong></td>
37
-        <td><strong><?php echo _("Result");?></strong></td>
38
-        <td><strong><?php echo _("Operator Domain");?></strong></td>
34
+        <td><strong><?php echo _("Timestamp"); ?></strong></td>
35
+        <td><strong><?php echo _("Credential"); ?></strong></td>
36
+        <td><strong><?php echo _("MAC Address"); ?></strong></td>
37
+        <td><strong><?php echo _("Result"); ?></strong></td>
38
+        <td><strong><?php echo _("Operator Domain"); ?></strong></td>
39 39
     </tr>
40 40
     <?php
41 41
     $userAuthData = $profile->getUserAuthRecords($userInt);
42 42
     foreach ($userAuthData as $oneRecord) {
43
-        echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail" )."'>"
43
+        echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail")."'>"
44 44
                 . "<td>".$oneRecord['TIMESTAMP']."</td>"
45
-                . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'],"@"))."</td>"
45
+                . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'], "@"))."</td>"
46 46
                 . "<td>".$oneRecord['MAC']."</td>"
47 47
                 . "<td>".($oneRecord['RESULT'] == "Access-Accept" ? _("Success") : _("Failure"))."</td>"
48
-                . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)",1)."</td>"
48
+                . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)", 1)."</td>"
49 49
                 . "</tr>";
50 50
     }
51 51
     ?>
Please login to merge, or discard this patch.
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 use \Exception;
34 34
 
35
-require_once dirname(__DIR__) . "/config/_config.php";
35
+require_once dirname(__DIR__)."/config/_config.php";
36 36
 
37 37
 /**
38 38
  * This class is a singleton for establishing a connection to the database
@@ -60,24 +60,24 @@  discard block
 block discarded – undo
60 60
             case "EXTERNAL":
61 61
             case "FRONTEND":
62 62
             case "DIAGNOSTICS":
63
-                if (!isset(self::${"instance" . $theDb})) {
63
+                if (!isset(self::${"instance".$theDb})) {
64 64
                     $class = __CLASS__;
65
-                    self::${"instance" . $theDb} = new $class($database);
66
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
65
+                    self::${"instance".$theDb} = new $class($database);
66
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
67 67
                 }
68
-                return self::${"instance" . $theDb};
68
+                return self::${"instance".$theDb};
69 69
             case "RADIUS":
70
-                if (!isset(self::${"instance" . $theDb})) {
70
+                if (!isset(self::${"instance".$theDb})) {
71 71
                     $class = __CLASS__;
72 72
                     foreach (CONFIG_CONFASSISTANT['DB'] as $name => $oneRadiusAuthDb) {
73 73
                         $theInstance = new $class($name);
74
-                        self::${"instance" . $theDb}[] = $theInstance;
74
+                        self::${"instance".$theDb}[] = $theInstance;
75 75
                         $theInstance->databaseInstance = $theDb;
76 76
                     }
77 77
                 }
78
-                return self::${"instance" . $theDb};
78
+                return self::${"instance".$theDb};
79 79
             default:
80
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
80
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
81 81
         }
82 82
     }
83 83
 
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
             }
117 117
         }
118 118
         // log exact query to debug log, if log level is at 5
119
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
119
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
120 120
         if ($types !== NULL) {
121
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true));
121
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true));
122 122
         }
123 123
 
124 124
         if ($this->connection->connect_error) {
125
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
125
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
126 126
         }
127 127
         if ($types === NULL) {
128 128
             $result = $this->connection->query($querystring);
129 129
             if ($result === FALSE) {
130
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
130
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
131 131
             }
132 132
         } else {
133 133
             // fancy! prepared statement with dedicated argument list
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             }
141 141
             $prepResult = $statementObject->prepare($querystring);
142 142
             if ($prepResult === FALSE) {
143
-                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
143
+                throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
144 144
             }
145 145
 
146 146
             // we have a variable number of arguments packed into the ... array
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
             array_unshift($localArray, $types);
153 153
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
154 154
             if ($retval === FALSE) {
155
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
155
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
156 156
             }
157 157
             $result = $statementObject->execute();
158 158
             if ($result === FALSE) {
159
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
159
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
160 160
             }
161 161
             $selectResult = $statementObject->get_result();
162 162
             if ($selectResult !== FALSE) {
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 
169 169
         // all cases where $result could be FALSE have been caught earlier
170 170
         if ($this->connection->errno) {
171
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
171
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
172 172
         }
173 173
 
174 174
 
175 175
         if ($isMoreThanSelect) {
176
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
176
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
177 177
             if ($types !== NULL) {
178
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true));
178
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true));
179 179
             }
180 180
         }
181 181
         return $result;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             $this->readOnly = CONFIG_CONFASSISTANT['DB'][$databaseCapitalised]['readonly'];
271 271
         }
272 272
         if ($this->connection->connect_error) {
273
-            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
273
+            throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
274 274
         }
275 275
 
276 276
         if ($databaseCapitalised == "EXTERNAL" && CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
48 48
             <tr>
49 49
                 <td>
50
-                    <?php echo "" . _("Unique Identifier") ?>
50
+                    <?php echo ""._("Unique Identifier") ?>
51 51
                 </td>
52 52
                 <td>
53 53
                 </td>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     $mgmt = new \core\UserManagement();
63 63
 
64 64
     if (!$user->isFederationAdmin()) {
65
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
65
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
66 66
         echo $deco->footer();
67 67
         exit(0);
68 68
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 <!-- fed properties -->
80 80
                 <tr>
81 81
                     <td>
82
-                        <?php echo "" . _("Country") ?>
82
+                        <?php echo ""._("Country") ?>
83 83
                     </td>
84 84
                     <td>
85 85
                     </td>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     default:
161 161
                         throw new Exception("Error: unknown encryption status of invitation!?!");
162 162
                 }
163
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
163
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
164 164
                 break;
165 165
             case "FAILURE":
166 166
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                     default:
181 181
                         throw new Exception("Error: unknown encryption status of invitation!?!");
182 182
                 }
183
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
183
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
184 184
                 break;
185 185
             case "INVALIDSYNTAX":
186 186
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         echo "</table></div>";
192 192
     }
193 193
     if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == 'eduroam') {
194
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
194
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
195 195
     } else {
196 196
         $helptext = "";
197 197
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $pending_invites = $mgmt->listPendingInvitations();
206 206
 
207 207
             if (CONFIG['DB']['enforce-external-sync']) {
208
-                echo "<th>" . sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</th>";
208
+                echo "<th>".sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</th>";
209 209
             }
210 210
             ?>
211 211
             <th>
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         foreach ($feds as $onefed) {
221 221
             $thefed = new \core\Federation(strtoupper($onefed['value']));
222 222
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
223
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
223
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
224 224
 
225 225
             // extract only pending invitations for *this* fed
226 226
             $display_pendings = FALSE;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 // deployment status; need to dive into profiles for this
246 246
                 // show happy eyeballs if at least one profile is configured/showtime                    
247 247
                 echo "<td>";
248
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
248
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
249 249
                 echo "</td>";
250 250
                 // name; and realm of silverbullet profiles if any
251 251
                 // instantiating all profiles is costly, so we only do this if
@@ -259,23 +259,23 @@  discard block
 block discarded – undo
259 259
                     }
260 260
                 }
261 261
                 echo "<td style='vertical-align:top;'>
262
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>",$listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
262
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
263 263
                       </td>";
264 264
                 // external DB sync, if configured as being necessary
265 265
                 if (CONFIG['DB']['enforce-external-sync']) {
266 266
                     echo "<td style='display: ruby;'>";
267 267
                     if ($readonly === FALSE) {
268
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
269
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
268
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
269
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
270 270
                     }
271 271
                     switch ($idp_instance->getExternalDBSyncState()) {
272 272
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
273 273
                             break;
274 274
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
275
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
275
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
276 276
                             break;
277 277
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
278
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
278
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
279 279
 
280 280
 
281 281
                             break;
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
                 echo "<td style='vertical-align: top;'>";
289 289
                 if ($readonly === FALSE) {
290 290
                     echo "<div style='white-space: nowrap;'>
291
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
291
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
292 292
                                       <button type='submit'>" .
293
-                    _("Add/Remove Administrators") . "
293
+                    _("Add/Remove Administrators")."
294 294
                                       </button>
295 295
                                   </form>
296 296
                                 </div>";
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 echo "<tr>
304 304
                             <td colspan='2'>
305 305
                                <strong>" .
306
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
306
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
307 307
                                </strong>
308 308
                             </td>
309 309
                          </tr>";
@@ -311,17 +311,17 @@  discard block
 block discarded – undo
311 311
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
312 312
                         echo "<tr>
313 313
                                     <td>" .
314
-                        $oneinvite['name'] . "
314
+                        $oneinvite['name']."
315 315
                                     </td>
316 316
                                     <td>" .
317
-                        $oneinvite['mail'] . "
317
+                        $oneinvite['mail']."
318 318
                                     </td>
319 319
                                     <td colspan=2>";
320 320
                         if ($readonly === FALSE) {
321 321
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
322
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
323
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
324
-                              . sprintf(_("(expires %s)"),$oneinvite['expiry'])
322
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
323
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
324
+                              . sprintf(_("(expires %s)"), $oneinvite['expiry'])
325 325
                               .     "</form>";
326 326
                         }
327 327
                         echo "      </td>
Please login to merge, or discard this patch.