Passed
Push — release_2_0 ( 46c9ba...b90bc6 )
by Tomasz
07:37
created
web/lib/user/TextTemplates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 const DOWNLOAD_REDIRECT_CONTINUE = 1054;
49 49
 const SB_GO_AWAY = 1060;
50 50
 const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061;
51
-const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062;
51
+const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062;
52 52
 
53 53
 /**
54 54
  * some of the texts we write are consortium-specific.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
87 87
         $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
88 88
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']);
89
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
89
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
90 90
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
91 91
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
92 92
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
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/user/Gui.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@
 block discarded – undo
53 53
         $ourlocale = $this->langObject->getLang();
54 54
         header("Content-Type:text/html;charset=utf-8");
55 55
         echo "<!DOCTYPE html>
56
-          <html xmlns='http://www.w3.org/1999/xhtml' lang='" . $ourlocale . "'>
57
-          <head lang='" . $ourlocale . "'>
56
+          <html xmlns='http://www.w3.org/1999/xhtml' lang='" . $ourlocale."'>
57
+          <head lang='" . $ourlocale."'>
58 58
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
59
-        echo "<title>" . htmlspecialchars($pagetitle) . "</title>";
59
+        echo "<title>".htmlspecialchars($pagetitle)."</title>";
60 60
         echo '<script type="text/javascript">ie_version = 0;</script>
61 61
 <!--[if IE]>
62 62
 <script type="text/javascript">ie_version=1;</script>
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $find = array_keys($displayNames, $input, TRUE);
146 146
 
147 147
         if (count($find) == 0) { // this is an error! throw an Exception
148
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
148
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
149 149
         }
150 150
         \core\common\Entity::outOfThePotatoes();
151 151
         return $find[0];
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         foreach ($optionlist as $option) {
168 168
             $type = $optioninfo->optionType($option['name']);
169
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
169
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
170 170
                 // all non-multilang attribs get this assignment ...
171 171
                 $language = "";
172 172
                 $content = $option['value'];
@@ -184,19 +184,19 @@  discard block
 block discarded – undo
184 184
                         $locationMarkers[] = $coords;
185 185
                         break;
186 186
                     case "file":
187
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
187
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
188 188
                         switch ($option['name']) {
189 189
                             case "general:logo_file":
190 190
                             case "fed:logo_file":
191
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
191
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']);
192 192
                                 break;
193 193
                             case "eap:ca_file":
194 194
                             // fall-through intended: display both the same way
195 195
                             case "fed:minted_ca_file":
196
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
196
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']);
197 197
                                 break;
198 198
                             case "support:info_file":
199
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
199
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']);
200 200
                                 break;
201 201
                             default:
202 202
                         }
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
207 207
                             break;
208 208
                         }
209
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
209
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
210 210
                         break;
211 211
                     default:
212
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
212
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
213 213
                 }
214 214
             }
215 215
         }
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
             $locationCount = 0;
219 219
             foreach ($locationMarkers as $g) {
220 220
                 $locationCount++;
221
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
221
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
222 222
             }
223 223
             $marker .= '<\/markers>'; // some validator says this should be escaped
224 224
             $jMarker = json_encode($locationMarkers);
225
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
225
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
226 226
         }
227 227
         \core\common\Entity::outOfThePotatoes();
228 228
         return $retval;
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
         \core\common\Entity::intoThePotatoes();
239 239
         $idpoptions = $myInst->getAttributes();
240 240
         $retval = "<div class='infobox'>
241
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2>
241
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2>
242 242
         <table>
243 243
             <tr>
244 244
                 <td>
245
-                    " . _("Country:") . "
245
+                    " . _("Country:")."
246 246
                 </td>
247 247
                 <td>
248 248
                 </td>
@@ -252,16 +252,16 @@  discard block
 block discarded – undo
252 252
         $retval .= $myFed->name;
253 253
         $retval .= "</strong>
254 254
                 </td>
255
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
255
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
256 256
         </table>
257 257
     </div>";
258 258
 
259 259
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
260 260
         foreach ($blocks as $block) {
261 261
             $retval .= "<div class='infobox'>
262
-            <h2>" . $block[1] . "</h2>
262
+            <h2>" . $block[1]."</h2>
263 263
             <table>" .
264
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
264
+                    $this->infoblock($idpoptions, $block[0], "IdP").
265 265
                     "</table>
266 266
         </div>";
267 267
         }
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
      */
277 277
     private function displaySize(int $number) {
278 278
         if ($number > 1024 * 1024) {
279
-            return round($number / 1024 / 1024, 2) . " MiB";
279
+            return round($number / 1024 / 1024, 2)." MiB";
280 280
         }
281 281
         if ($number > 1024) {
282
-            return round($number / 1024, 2) . " KiB";
282
+            return round($number / 1024, 2)." KiB";
283 283
         }
284
-        return $number . " B";
284
+        return $number." B";
285 285
     }
286 286
 
287 287
     /**
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $this->checkROWIDpresence($cAReference);
354 354
         $rawResult = UIElements::getBlobFromDB($cAReference, FALSE);
355 355
         if (is_bool($rawResult)) { // we didn't actually get a CA!
356
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
356
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
357 357
             \core\common\Entity::outOfThePotatoes();
358 358
             return $retval;
359 359
         }
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
 
370 370
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
371 371
         $details['name'] = preg_replace('/\//', "", $details['name']);
372
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
372
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
373 373
         if ($details['ca'] == 0 && $details['root'] != 1) {
374
-            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
374
+            $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>";
375 375
             \core\common\Entity::outOfThePotatoes();
376 376
             return $retval;
377 377
         }
378
-        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>";
378
+        $retval = "<div class='ca-summary'                                ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>";
379 379
         \core\common\Entity::outOfThePotatoes();
380 380
         return $retval;
381 381
     }
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
     public function previewImageinHTML($imageReference) {
390 390
         \core\common\Entity::intoThePotatoes();
391 391
         $this->checkROWIDpresence($imageReference);
392
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
392
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
393 393
         \core\common\Entity::outOfThePotatoes();
394 394
         return $retval;
395 395
     }
@@ -405,13 +405,13 @@  discard block
 block discarded – undo
405 405
         $this->checkROWIDpresence($fileReference);
406 406
         $fileBlob = UIElements::getBlobFromDB($fileReference, FALSE);
407 407
         if (is_bool($fileBlob)) { // we didn't actually get a file!
408
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
408
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
409 409
             \core\common\Entity::outOfThePotatoes();
410 410
             return $retval;
411 411
         }
412 412
         $decodedFileBlob = base64_decode($fileBlob);
413 413
         $fileinfo = new \finfo();
414
-        $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>";
414
+        $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>";
415 415
         \core\common\Entity::outOfThePotatoes();
416 416
         return $retval;
417 417
     }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
             $retval .= "<tr><td>";
440 440
         }
441 441
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
442
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
442
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
443 443
         if (!$omittabletags) {
444 444
             $retval .= "</td><td>";
445 445
         }
@@ -516,8 +516,8 @@  discard block
 block discarded – undo
516 516
         $loggerInstance = new \core\common\Logging();
517 517
         $inputgd = imagecreatefromstring($inputpngstring);
518 518
 
519
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
520
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
519
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
520
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
521 521
 
522 522
         $sizeinput = [imagesx($inputgd), imagesy($inputgd)];
523 523
         $sizelogo = [imagesx($logogd), imagesy($logogd)];
@@ -530,15 +530,15 @@  discard block
 block discarded – undo
530 530
         $scale = sqrt($maxoccupy / $totallogopixels);
531 531
         $loggerInstance->debug(4, "Scaling info: $scale, $maxoccupy, $totallogopixels\n");
532 532
         // determine final pixel size - round to multitude of $symbolsize to match exact symbol boundary
533
-        $targetwidth = (int)($symbolsize * round($sizelogo[0] * $scale / $symbolsize));
534
-        $targetheight = (int)($symbolsize * round($sizelogo[1] * $scale / $symbolsize));
533
+        $targetwidth = (int) ($symbolsize * round($sizelogo[0] * $scale / $symbolsize));
534
+        $targetheight = (int) ($symbolsize * round($sizelogo[1] * $scale / $symbolsize));
535 535
         // paint white below the logo, in case it has transparencies (looks bad)
536 536
         // have one symbol in each direction extra white space
537 537
         $whiteimage = imagecreate($targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
538 538
         imagecolorallocate($whiteimage, 255, 255, 255);
539 539
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
540
-        $targetplacementx = (int)($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize));
541
-        $targetplacementy = (int)($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize));
540
+        $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize));
541
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize));
542 542
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
543 543
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
544 544
         ob_start();
Please login to merge, or discard this patch.
web/lib/admin/PageDecoration.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
         $retval = "<div class='sidebar'><p>";
50 50
 
51 51
         if ($advancedControls) {
52
-            $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name']
52
+            $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name']
53 53
             ."<br/>
54 54
               <br/>
55
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> 
56
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> ";
55
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> 
56
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> ";
57 57
         }
58
-        $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a>
58
+        $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a>
59 59
             </p>
60 60
         </div> <!-- sidebar -->";
61 61
         \core\common\Entity::outOfThePotatoes();
@@ -79,22 +79,22 @@  discard block
 block discarded – undo
79 79
                     <h1>$cap1</h1>
80 80
                 </div><!--header_captions-->
81 81
                 <div id='langselection' style='padding-top:20px; padding-left:10px;'>
82
-                    <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . "&nbsp;
82
+                    <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")."&nbsp;
83 83
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
84 84
 
85 85
         foreach (CONFIG['LANGUAGES'] as $lang => $value) {
86
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $value['display'] . "</option> ";
86
+            $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$value['display']."</option> ";
87 87
         }
88 88
         $retval .= "</select>";
89 89
 
90 90
         foreach ($_GET as $var => $value) {
91 91
             if ($var != "lang" && $value != "") {
92
-                $retval .= "<input type='hidden' name='" . htmlspecialchars($var) . "' value='" . htmlspecialchars($value) . "'>";
92
+                $retval .= "<input type='hidden' name='".htmlspecialchars($var)."' value='".htmlspecialchars($value)."'>";
93 93
             }
94 94
         }
95 95
         $retval .= "</form>
96 96
                 </div><!--langselection-->";
97
-        $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png";
97
+        $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png";
98 98
         $retval .= "<div class='consortium_logo'>
99 99
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
100 100
                 </div> <!-- consortium_logo -->
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         if (isset(CONFIG['APPEARANCE']['MOTD']) && CONFIG['APPEARANCE']['MOTD'] != "") {
189 189
             $retval .= "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'>
190
-              <p class='MOTD'>" . CONFIG['APPEARANCE']['MOTD'] . "</p>
190
+              <p class='MOTD'>" . CONFIG['APPEARANCE']['MOTD']."</p>
191 191
               </div><!--header_MOTD-->";
192 192
         }
193 193
         $retval .= $this->sidebar($advancedControls);
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
           <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'>
214 214
           <head lang='$ourlocale'>
215 215
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
216
-        $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php";
216
+        $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php";
217 217
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
218
-        $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
218
+        $retval .= "<title>".htmlspecialchars($pagetitle)."</title>";
219 219
         return $retval;
220 220
     }
221 221
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             // we may need to jump up one dir if we are either in admin/ or accountstatus/
230 230
             // (accountstatus courtesy of my good mood. It's userspace not admin space so
231 231
             // it shouldn't be using this function any more.)
232
-            $logoBase = \core\CAT::getRootUrlPath() . "/resources/images";
232
+            $logoBase = \core\CAT::getRootUrlPath()."/resources/images";
233 233
             return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
234 234
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
235 235
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
             <table style='width:100%'>
252 252
                 <tr>
253 253
                     <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'>
254
-                        " . $cat->CAT_COPYRIGHT . "</td>";
254
+                        " . $cat->CAT_COPYRIGHT."</td>";
255 255
         if (!empty(CONFIG['APPEARANCE']['privacy_notice_url'])) {
256
-            $retval .= "<td><a href='".CONFIG['APPEARANCE']['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</a></td>";
256
+            $retval .= "<td><a href='".CONFIG['APPEARANCE']['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</a></td>";
257 257
         }
258 258
         $retval .= "            <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>";
259 259
 
Please login to merge, or discard this patch.
web/lib/admin/Authentication.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 use Exception;
25 25
 
26
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
26
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
27 27
 require_once CONFIG['AUTHENTICATION']['ssp-path-to-autoloader'];
28 28
 
29 29
 /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         if ($trailerPosition !== FALSE) {
123 123
             $base = substr($scriptself, 0, $trailerPosition);
124 124
             if ($base !== FALSE) {
125
-                $url = "//$servername" . $base . "/logout_check.php";
125
+                $url = "//$servername".$base."/logout_check.php";
126 126
             }
127 127
         }
128 128
 
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 namespace web\lib\admin;
23 23
 
24
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
24
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
25 25
 
26 26
 /**
27 27
  * This class provides map display functionality
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function htmlShowtime($wizard = FALSE, $additional = FALSE) {
85 85
         if (!$this->readOnly) {
86 86
  //           return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE);
87
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . $this->htmlPostEdit(TRUE);
87
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml().$this->htmlPostEdit(TRUE);
88 88
         }
89 89
     }
90 90
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         // quiesce warnings about unused parameter
109 109
         sprintf("%d", $number);
110 110
         $pair = json_decode($coords, true);
111
-        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>";
111
+        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>";
112 112
     }
113 113
     
114 114
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     private function findLocationHtml() {
120 120
         \core\common\Entity::intoThePotatoes();
121
-        $retval = "<button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
121
+        $retval = "<button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
122 122
         \core\common\Entity::outOfThePotatoes();
123 123
         return $retval;
124 124
     }
Please login to merge, or discard this patch.
web/lib/admin/MapOpenLayers.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 namespace web\lib\admin;
24 24
 
25
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
25
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
26 26
 
27 27
 /**
28 28
  * This class provides map display functionality
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         
86 86
 // use HTML5 geolocation
87 87
         function locateMe() {
88
-            $('#address').val(\"" . _("locating") . "\");
88
+            $('#address').val(\"" . _("locating")."\");
89 89
             navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000});
90 90
         }
91 91
         
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 view.fit(extent, {padding: [10, 0, 10, 0]});
208 208
             } else {
209 209
                 view.setCenter([0,0]);
210
-                locate_country('" . $cat->knownFederations[strtoupper($this->fedName)] . "'); // use the federation code to locate the country
210
+                locate_country('" . $cat->knownFederations[strtoupper($this->fedName)]."'); // use the federation code to locate the country
211 211
                 map.setView(view);
212 212
             }
213 213
             view.setMaxZoom(20);
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
         function getAddressLocation() {
230 230
             var city = $('#address').val();
231 231
             if(city == '') {
232
-                alert(\"" . _("nothing entered in the address field") . "\");
232
+                alert(\"" . _("nothing entered in the address field")."\");
233 233
                 return false;
234 234
             }
235 235
             city = city.replace(/\s*,\s*/g,',+');
236 236
             city = city.replace(/ +/,'+');
237 237
             $.get(addressService+'?format=json&addressdetails=0&q='+city, '',  function(data) {
238 238
                 if (data[0] === undefined) {
239
-                    alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.") . "');
239
+                    alert('" . _("Address not found, perhaps try another form, like putting the street number to the front.")."');
240 240
                     return;
241 241
                 }
242 242
                 showTmpPointer(data[0].lon, data[0].lat);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         if ($this->readOnly) {
288 288
             return "<div id='map' class='locationmap'></div><script>generateMap('map')</script>";
289 289
         } else {
290
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>" . $this->htmlPostEdit(FALSE);
290
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<span id='location-prompt'>You can drag the pointer to the final location before you save the results.</span><div id='map' class='locationmap'></div><script>generateMap('map')</script>".$this->htmlPostEdit(FALSE);
291 291
         }
292 292
     }
293 293
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public static function optionListDisplayCode($coords, $number) {
312 312
         \core\common\Entity::intoThePotatoes();
313
-        $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>";
313
+        $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>";
314 314
         \core\common\Entity::outOfThePotatoes();
315 315
         return $retval;
316 316
     }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      */
323 323
     private function findLocationHtml() {
324 324
         \core\common\Entity::intoThePotatoes();
325
-        $retval = "<p>" . _("Address:") . " <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>" . _("Find address") . "</button> <button type='button' onclick='locateMe()'>" . _("Locate Me!") . "</button></p>";
325
+        $retval = "<p>"._("Address:")." <input name='address' id='address' /><button type='button' onclick='getAddressLocation()'>"._("Find address")."</button> <button type='button' onclick='locateMe()'>"._("Locate Me!")."</button></p>";
326 326
         \core\common\Entity::outOfThePotatoes();
327 327
         return $retval;
328 328
     }
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.