Passed
Push — master ( c57d81...3d7ab7 )
by Maja
06:49
created
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
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                     // filesystem cleanup
73 73
                     case web\lib\common\FormElements::BUTTON_DELETE:
74 74
                         $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs();
75
-                        echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>";
75
+                        echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>";
76 76
                         break;
77 77
                     default:
78 78
                         break;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     $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'");
139 139
                     // SELECT -> mysqli_result, not boolean
140 140
                     while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) {
141
-                        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>";
141
+                        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>";
142 142
                         $gross_admin = $gross_admin + $a->admin;
143 143
                         $gross_user = $gross_user + $a->user;
144 144
                         $gross_silverbullet = $gross_silverbullet + $a->silverbullet;
Please login to merge, or discard this patch.
web/diag/testTelepath.php 1 patch
Spacing   +2 added lines, -2 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
 $therealm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING);
25 25
 $thevisited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     $validator = new \web\lib\common\InputValidation();
36 36
     
37 37
     echo "<pre>";
38
-    echo "Testing " . $validatedRealm . " in " . $validator->string($thevisited);
38
+    echo "Testing ".$validatedRealm." in ".$validator->string($thevisited);
39 39
     print_r($telepath->magic());
40 40
     echo "</pre>";
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
web/diag/testSociopath.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 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
 $sociopath = new \core\diag\Sociopath();
25 25
 
Please login to merge, or discard this patch.
web/diag/adminQuery.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * License: see the web/copyright.inc.php file in the file structure or
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 $languageInstance = new \core\common\Language();
24 24
 $languageInstance->setTextDomain("diagnostics");
25 25
 
@@ -56,119 +56,119 @@  discard block
 block discarded – undo
56 56
     $select = "<div id='sp_abuse_problem'>
57 57
 <select style='margin-left: 0px;' id='select_sp_problem'>";
58 58
     foreach ($sp_problem as $pname => $pdesc) {
59
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
59
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
60 60
     }
61
-    $select = $select . "</select></div>";
61
+    $select = $select."</select></div>";
62 62
     $res = "
63 63
 <table id='sp_questions'>
64 64
     <tr>
65
-        <td>" . _("Select your problem") . "</td>
65
+        <td>" . _("Select your problem")."</td>
66 66
         <td>$select</td>
67 67
     </tr>
68 68
     <tr>
69
-        <td>" . _("What is the realm of the IdP in question?") . "</td>
69
+        <td>"._("What is the realm of the IdP in question?")."</td>
70 70
         <td>
71 71
                 <input type='text' name='admin_realm' id='admin_realm' value=''>
72 72
                 <button id='realm_in_db_admin' accesskey='R' type='button'>" .
73
-            _("Check if this value is registered") .
73
+            _("Check if this value is registered").
74 74
             "</button>
75 75
         </td>
76 76
     </tr>
77 77
     <tr class='hidden_row'>
78
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
78
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
79 79
         <td><input type='text' id='timestamp' name='timestamp'>
80 80
             <div id='datepicker'></div>
81 81
         </td>
82 82
     </tr>
83 83
     <tr class='hidden_row'>
84
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
84
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
85 85
         <td><input type='text' id='mac' name='mac'></td>
86 86
     </tr>
87 87
     <tr class='hidden_row'>
88
-        <td>" . _("Additional comments") . "</td>
88
+        <td>" . _("Additional comments")."</td>
89 89
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
90 90
     </tr>
91 91
     <tr class='hidden_row'>
92
-        <td>" . _("Please specify an email address on which the IdP can contact you") . "</td>
92
+        <td>" . _("Please specify an email address on which the IdP can contact you")."</td>
93 93
         <td><input type='text' id='email' name='email'></td>
94 94
     </tr>
95 95
     <tr class='hidden_row' id='send_query_to_idp'>
96
-        <td>" . _("Now you can send your query") . "</td>
97
-        <td><button type='submit' id='submit_idp_query' name='go'>" . _("Send") . "</button></td>
96
+        <td>" . _("Now you can send your query")."</td>
97
+        <td><button type='submit' id='submit_idp_query' name='go'>" . _("Send")."</button></td>
98 98
     </tr>
99 99
  </table>";
100
-    $res = $res . $javascript;
100
+    $res = $res.$javascript;
101 101
 }
102 102
 if ($queryType == 'idp') {
103 103
     $select = "<div id='idp_reported_problem' style='display:;'>
104 104
 <select style='margin-left:0px;' id='select_idp_problem'>";
105 105
     foreach ($idp_problem as $pname => $pdesc) {
106
-        $select = $select . "<option value='$pname'>$pdesc</option>\n";
106
+        $select = $select."<option value='$pname'>$pdesc</option>\n";
107 107
     }
108
-    $select = $select . "</select></div>";
108
+    $select = $select."</select></div>";
109 109
     $res = "
110 110
 <table id='idp_questions'>
111 111
     <tr>
112
-        <td>" . _("Select your problem") . "</td>
112
+        <td>" . _("Select your problem")."</td>
113 113
         <td>$select</td>
114 114
     </tr>
115 115
     <tr>
116
-        <td>" . _("Identify the SP by one of following means") . "</td>
116
+        <td>"._("Identify the SP by one of following means")."</td>
117 117
         <td></td>
118 118
     </tr>
119 119
     <tr id='by_opname'>
120
-        <td>" . _("SP Operator-Name attribute") . "</td>
120
+        <td>" . _("SP Operator-Name attribute")."</td>
121 121
         <td><input type='text' id='opname' name='opname' value=''></td>
122 122
     </tr>
123 123
     <tr id='spmanually'>
124
-        <td>" . _("Select the SP manually:") . "</td>
124
+        <td>" . _("Select the SP manually:")."</td>
125 125
         <td>
126 126
             <div id='select_asp_country'><a href='' id='asp_countries_list'>
127
-            <span id='opnameselect'>" . _("click to select country and organisation") . "</a></span>
127
+            <span id='opnameselect'>" . _("click to select country and organisation")."</a></span>
128 128
             </div>
129 129
             <div id='select_asp_area'></div>
130 130
         </td>
131 131
     </tr>
132 132
     <tr id='asp_desc' style='display: none;'>
133
-        <td>" . _("or") . ' ' . _("at least describe the SP location") . "</td>
133
+        <td>" . _("or").' '._("at least describe the SP location")."</td>
134 134
         <td><input type='text' id='asp_location' name='asp_location' value=''></td>
135 135
     </tr>
136 136
     <tr>
137
-        <td>" . _("What is the outer ID of the user session in question?") . "</td>
137
+        <td>" . _("What is the outer ID of the user session in question?")."</td>
138 138
         <td><input type='text' id='outer_id' name='outer_id' value=''></td>
139 139
     </tr>
140 140
     <tr>
141
-        <td>" . _("What is the authentication timestamp of the user session in question?") . "</td>
141
+        <td>" . _("What is the authentication timestamp of the user session in question?")."</td>
142 142
         <td>
143 143
             <input type='text' id='timestamp' name='timestamp'>
144 144
             <div id='datepicker'></div>
145 145
         </td>
146 146
     </tr>
147 147
     <tr>
148
-        <td>" . _("What is the MAC address of the user session in question?") . "</td>
148
+        <td>" . _("What is the MAC address of the user session in question?")."</td>
149 149
         <td><input type='text' id='mac' name='mac'></td>
150 150
     </tr>
151 151
     <tr>
152
-        <td>" . _("Additional comments about the problem") . "</td>
152
+        <td>" . _("Additional comments about the problem")."</td>
153 153
         <td><textarea id='freetext' name='freetext' cols='60' rows='5'></textarea></td>
154 154
     </tr>
155 155
     <tr>
156
-        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?") . "</td>
156
+        <td>" . _("Do you have any contact details by which the user wishes to be contacted by the SP?")."</td>
157 157
         <td><textarea id='c_details' name='c_details' cols='60' rows='5'></textarea></td>
158 158
     </tr>
159 159
     <tr>
160
-        <td>" . _("Please specify an email address on which the SP can contact you") . "</td>
160
+        <td>" . _("Please specify an email address on which the SP can contact you")."</td>
161 161
         <td><input type='text' id='email' name='email'></td>
162 162
     </tr>
163 163
     <tr class='hidden_row' id='send_query_to_sp'>
164
-        <td>" . _("Now you can send your query") . "</td>
165
-        <td><button type='submit' id='submit_sp_query' name='go'>" . _("Send") . "</button></td>
164
+        <td>" . _("Now you can send your query")."</td>
165
+        <td><button type='submit' id='submit_sp_query' name='go'>" . _("Send")."</button></td>
166 166
     </tr>
167 167
 </table>";
168
-    $res = $res . $javascript;
168
+    $res = $res.$javascript;
169 169
 }
170 170
 if ($queryType == 'idp_send' || $queryType == 'sp_send') {
171
-    include_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
171
+    include_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
172 172
     $cat = new \core\CAT();
173 173
     $returnArray = array();
174 174
     if (count((array) $o) > 0) {
Please login to merge, or discard this patch.
web/lib/user/Skinjob.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,17 +95,17 @@
 block discarded – undo
95 95
         }
96 96
 
97 97
         // does the file exist in the current skin's directory? Has precedence
98
-        if ($submodule !== '' && file_exists(__DIR__ . "/../../skins/" . $this->skin . "/" . $submodule . $path . $filename)) {
99
-            $extrapath = "/skins/" . $this->skin . "/" . $submodule;
98
+        if ($submodule !== '' && file_exists(__DIR__."/../../skins/".$this->skin."/".$submodule.$path.$filename)) {
99
+            $extrapath = "/skins/".$this->skin."/".$submodule;
100 100
         }
101
-        elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) {
102
-            $extrapath = "/skins/" . $this->skin;
103
-        } elseif (file_exists(__DIR__ . "/../../" . $path . $filename)) {
101
+        elseif (file_exists(__DIR__."/../../skins/".$this->skin.$path.$filename)) {
102
+            $extrapath = "/skins/".$this->skin;
103
+        } elseif (file_exists(__DIR__."/../../".$path.$filename)) {
104 104
             $extrapath = "";
105 105
         } else {
106 106
             return FALSE;
107 107
         }       
108
-        return htmlspecialchars(\core\CAT::getRootUrlPath() . $extrapath . $path . $filename, ENT_QUOTES);
108
+        return htmlspecialchars(\core\CAT::getRootUrlPath().$extrapath.$path.$filename, ENT_QUOTES);
109 109
     }
110 110
 
111 111
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
         // does the file exist in the current skin's directory? Has precedence
98 98
         if ($submodule !== '' && file_exists(__DIR__ . "/../../skins/" . $this->skin . "/" . $submodule . $path . $filename)) {
99 99
             $extrapath = "/skins/" . $this->skin . "/" . $submodule;
100
-        }
101
-        elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) {
100
+        } elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) {
102 101
             $extrapath = "/skins/" . $this->skin;
103 102
         } elseif (file_exists(__DIR__ . "/../../" . $path . $filename)) {
104 103
             $extrapath = "";
Please login to merge, or discard this patch.
web/lib/admin/MapNone.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      */
84 84
     public function htmlShowtime($wizard = FALSE, $additional = FALSE) {
85 85
         if (!$this->readOnly) {
86
- //           return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE);
86
+    //           return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE);
87 87
             return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . $this->htmlPostEdit(TRUE);
88 88
         }
89 89
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function htmlShowtime($wizard = FALSE, $additional = FALSE) {
83 83
         if (!$this->readOnly) {
84 84
  //           return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE);
85
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . $this->htmlPostEdit(TRUE);
85
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml().$this->htmlPostEdit(TRUE);
86 86
         }
87 87
     }
88 88
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         // quiesce warnings about unused parameter
107 107
         sprintf("%d", $number);
108 108
         $pair = json_decode($coords, true);
109
-        return "<table><tr><td>Latitude</td><td><strong>" . $pair['lat'] . "</strong></td></tr><tr><td>Longitude</td><td><strong>" . $pair['lon'] . "</strong></td></tr></table>";
109
+        return "<table><tr><td>Latitude</td><td><strong>".$pair['lat']."</strong></td></tr><tr><td>Longitude</td><td><strong>".$pair['lon']."</strong></td></tr></table>";
110 110
     }
111 111
     
112 112
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     private function findLocationHtml() {
118 118
         \core\common\Entity::intoThePotatoes();
119
-        $retval = "<button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
119
+        $retval = "<button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
120 120
         \core\common\Entity::outOfThePotatoes();
121 121
         return $retval;
122 122
     }
Please login to merge, or discard this patch.
web/lib/admin/Maintenance.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public static function deleteObsoleteTempDirs() {
36 36
         $downloadsDirs = [
37
-            'site_installers' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/installer_cache",
38
-            'silverbullet' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/silverbullet"
37
+            'site_installers' => dirname(dirname(dirname(dirname(__FILE__))))."/var/installer_cache",
38
+            'silverbullet' => dirname(dirname(dirname(dirname(__FILE__))))."/var/silverbullet"
39 39
         ];
40 40
         $tm = time();
41 41
         $i = 0;
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
                     if ($entry === '.' || $entry === '..' || $entry === '.gitignore') {
55 55
                         continue;
56 56
                     }
57
-                    $ftime = $tm - filemtime($downloads . '/' . $entry);
57
+                    $ftime = $tm - filemtime($downloads.'/'.$entry);
58 58
                     if ($ftime < 3600) {
59 59
                         continue;
60 60
                     }
61 61
                     if (isset($Cache[$entry])) {
62 62
                         continue;
63 63
                     }
64
-                    \core\common\Entity::rrmdir($downloads . '/' . $entry);
64
+                    \core\common\Entity::rrmdir($downloads.'/'.$entry);
65 65
                     $i = $i + 1;
66 66
                     print "$entry\n";
67 67
                 }
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
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * @author Stefan Winter <[email protected]>
26 26
  * @package Core
27 27
  */
28
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
28
+require_once dirname(dirname(__FILE__))."/config/_config.php";
29 29
 
30 30
 $Gui = new \web\lib\user\Gui();
31 31
 // ... unless overwritten by direct GET/POST parameter in the request or a SESSION setting
Please login to merge, or discard this patch.
web/skins/example/accountstatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
  * License: see the web/copyright.inc.php file in the file structure or
17 17
  *          <base_url>/copyright.php after deploying the software
18 18
  */?>
19
-<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>)</h1>
20
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
19
+<h1>Example Skin (Pick-Up and Status page for <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>)</h1>
20
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
21 21
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
22 22
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
23
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
24
-<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME;?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p>
23
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
24
+<p>For <?php echo \core\ProfileSilverbullet::PRODUCTNAME; ?>, this page can make use of the request status info we have collected prior to invocation of the skinned page:</p>
25 25
 <pre>
26
-    <?php print_r($statusInfo);?>
26
+    <?php print_r($statusInfo); ?>
27 27
 </pre>
Please login to merge, or discard this patch.