Passed
Push — master ( c57d81...3d7ab7 )
by Maja
06:49
created
web/accountstatus/accountstatus.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @author Stefan Winter <[email protected]>
27 27
  * @package Core
28 28
  */
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $cleanToken = FALSE;
32 32
 $invitationObject = new core\SilverbulletInvitation("INVALID");
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 $statusInfo = ["token" => $cleanToken,
75 75
     "invitation_object" => $invitationObject,
76
-    "OS" => $Gui->operatingSystem,];
76
+    "OS" => $Gui->operatingSystem, ];
77 77
 
78 78
 if ($profile !== NULL) {
79 79
     $attributes = $Gui->profileAttributes($profile->identifier);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $caAndSerial = filter_input(INPUT_GET, 'serial', FILTER_SANITIZE_STRING);
87 87
 
88 88
 if ($action !== NULL && $action !== FALSE && $action === \web\lib\common\FormElements::BUTTON_DELETE && $caAndSerial !== NULL && $caAndSerial !== FALSE) {
89
-    $tuple = explode(':',$caAndSerial);
89
+    $tuple = explode(':', $caAndSerial);
90 90
     $ca_type = $tuple[0];
91 91
     $serial = $tuple[1];
92 92
     if ($statusInfo['invitation_object']->invitationTokenStatus != \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID) {
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
                 print "//REVOKING\n";
102 102
                 $certObject = new \core\SilverbulletCertificate($serial, $ca_type);
103 103
                 $certObject->revokeCertificate();
104
-                header("Location: accountstatus.php?token=" . $statusInfo['token']);
104
+                header("Location: accountstatus.php?token=".$statusInfo['token']);
105 105
                 exit;
106 106
             }
107 107
         }
108 108
     }
109
-    header("Location: accountstatus.php?token=" . $statusInfo['token']);
109
+    header("Location: accountstatus.php?token=".$statusInfo['token']);
110 110
     exit;
111 111
 }
112 112
 
@@ -131,4 +131,4 @@  discard block
 block discarded – undo
131 131
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]);
132 132
 
133 133
 // and now, serve actual data
134
-require "../skins/" . $skinObject->skin . "/accountstatus/accountstatus.php";
134
+require "../skins/".$skinObject->skin."/accountstatus/accountstatus.php";
Please login to merge, or discard this patch.
web/tou.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * @package UserGUI
28 28
  * 
29 29
  */
30
-require dirname(dirname(__FILE__)) . "/config/_config.php";
30
+require dirname(dirname(__FILE__))."/config/_config.php";
31 31
 $loggerInstance = new \core\common\Logging();
32 32
 $langObject = new \core\common\Language();
33 33
 $cat = new \core\CAT();
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
52 52
         <img src="<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') ?>/resources/images/consortium_logo.png" style="padding-right:20px; padding-top:20px; float:right" alt="logo" />
53 53
 
54
-        <div id="motd"><?php print ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
54
+        <div id="motd"><?php print (isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
55 55
 
56
-        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1>
56
+        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Master::APPEARANCE['productname']; ?></a></h1>
57 57
         <div id="tou">
58 58
             <?php
59 59
             require "user/tou.php";
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     </td>
68 68
                     <?php
69 69
                     if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
70
-                        $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>";
70
+                        $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>";
71 71
                     }
72 72
                     ?>
73 73
                     <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>
Please login to merge, or discard this patch.
web/4013.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @package UserGUI
27 27
  */
28 28
 error_reporting(E_ALL | E_STRICT);
29
-require dirname(dirname(__FILE__)) . "/config/_config.php";
29
+require dirname(dirname(__FILE__))."/config/_config.php";
30 30
 
31 31
 $langObject = new \core\common\Language();
32 32
 $langObject->setTextDomain("web_user");
@@ -39,24 +39,24 @@  discard block
 block discarded – undo
39 39
 <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
40 40
     <div id="heading">
41 41
         <?php
42
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
43
-        print '<div id="motd">' . ( isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp' ) . '</div>';
44
-        print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']) . '</h1>
45
-<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'] . '</h2>';
42
+        print '<img src="'.dirname($_SERVER['SCRIPT_NAME']).'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
43
+        print '<div id="motd">'.(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : '&nbsp').'</div>';
44
+        print '<h1 style="padding-bottom:0px; height:1em;">'.sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']).'</h1>
45
+<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Master::APPEARANCE['productname_long'].'</h2>';
46 46
         echo '<table id="lang_select"><tr><td>';
47 47
         echo _("View this page in");
48 48
         ?>
49 49
         <?php
50 50
         foreach (\config\Master::LANGUAGES as $lang => $value) {
51
-            echo "<a href='javascript:changeLang(\"$lang\")'>" . $value['display'] . "</a> ";
51
+            echo "<a href='javascript:changeLang(\"$lang\")'>".$value['display']."</a> ";
52 52
         }
53
-        echo '</td><td style="text-align:right;padding-right:20px"><a href="' . dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang() . '">' . _("Start page") . '</a></td></tr></table>';
53
+        echo '</td><td style="text-align:right;padding-right:20px"><a href="'.dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang().'">'._("Start page").'</a></td></tr></table>';
54 54
         ?>
55 55
     </div> <!-- id="heading" -->
56 56
     <div id="main_body" style='padding:20px;'>
57
-        <h1><?php echo _("Maybe this is the CAT you are looking for...");?></h1>
58
-        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as");?></p>
57
+        <h1><?php echo _("Maybe this is the CAT you are looking for..."); ?></h1>
58
+        <p><?php echo _("but we don't want to show it to you. You need to be authenticated and authorised to see this content. Since you are not, you got this error page usually known as"); ?></p>
59 59
         <h2>401/403</h2>
60
-        <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang())?></p>
60
+        <p><?php echo sprintf(_("Your mistake? Our error? Who knows! Maybe you should go back to the <a href='%s'>Start Page</a>."), dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang())?></p>
61 61
     </div>
62 62
         <?php echo $deco->footer();
Please login to merge, or discard this patch.
web/lib/admin/MapGoogle.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function htmlHeadCode() {
48 48
         $cat = new \core\CAT();
49 49
         \core\common\Entity::intoThePotatoes();
50
-        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=" . \config\Master::APPEARANCE['google_maps_api_key'] . "'></script>
50
+        $retval = "<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?key=".\config\Master::APPEARANCE['google_maps_api_key']."'></script>
51 51
     <script type='text/javascript'>
52 52
         // some global variables;
53 53
         var center_lat=49.6114885608729;
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
          *
104 104
          */
105 105
         function locator_magic() {
106
-            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName) . "\", 'region':\"" . strtolower($this->fedName) . "\"},
106
+            geocoder.geocode({'address':\"" . preg_replace("/\"/", "&quot;", $this->instName)."\", 'region':\"".strtolower($this->fedName)."\"},
107 107
             function(r,status) {
108 108
                 if(status != google.maps.GeocoderStatus.OK) {
109
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\");
109
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\");
110 110
                 } else {
111 111
                     var i;
112 112
                     for(i = 0; i < r.length; i++) {
113 113
                         Addr = getAddressElements(r[i].address_components);
114
-                        if(Addr.country == \"" . strtoupper($this->fedName) . "\")
114
+                        if(Addr.country == \"" . strtoupper($this->fedName)."\")
115 115
                         break;
116 116
                     }
117
-                    if(Addr.country != \"" . strtoupper($this->fedName) . "\")
118
-                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)] . "\");
117
+                    if(Addr.country != \"" . strtoupper($this->fedName)."\")
118
+                    locate_country(\"" . $cat->knownFederations[strtoupper($this->fedName)]."\");
119 119
                     else {
120 120
                         addMarker(r[i].geometry.location,15,null);
121 121
                     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         function markerClicked(m) {
130 130
             info_window.close();
131
-            var t = \"" . _("This is location ") . "\"+m.info;
131
+            var t = \"" . _("This is location ")."\"+m.info;
132 132
             info_window.setContent(t);
133 133
             info_window.setPosition(m.getPosition());
134 134
             info_window.open(map,m);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         function getAddressLocation() {
208 208
             var city = $('#address').val();
209 209
             if(city == '') {
210
-                alert(\"" . _("nothing entered in the address field") . "\");
210
+                alert(\"" . _("nothing entered in the address field")."\");
211 211
                 return false;
212 212
             }
213 213
             geocoder.geocode( { 'address': city}, function(results, status) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
          * trigger geolocation
228 228
          */
229 229
         function locateMe() {
230
-            $('#address').val(\"" . _("locating") . "\");
230
+            $('#address').val(\"" . _("locating")."\");
231 231
             navigator.geolocation.getCurrentPosition(locate_succes,locate_fail,{maximumAge:3600000, timeout:5000});
232 232
         }
233 233
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
         if ($this->readOnly) {
346 346
             return "<div id='map' class='googlemap'></div>";
347 347
         } else {
348
-            return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . "<div id='map' class='googlemap'></div>" . $this->htmlPostEdit(FALSE);
348
+            return $this->htmlPreEdit($wizard, $additional).$this->findLocationHtml()."<div id='map' class='googlemap'></div>".$this->htmlPostEdit(FALSE);
349 349
         }
350 350
     }
351 351
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
         // quiesce warnings about unused variable
361 361
         sprintf("%s", $coords);
362 362
         \core\common\Entity::intoThePotatoes();
363
-        $retval = "<button id='location_b_" . $number . "' class='location_button'>" . _("Click to see location") . " $number</button>";
363
+        $retval = "<button id='location_b_".$number."' class='location_button'>"._("Click to see location")." $number</button>";
364 364
         \core\common\Entity::outOfThePotatoes();
365 365
         return $retval;
366 366
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      * @return string
372 372
      */
373 373
     public function bodyTagCode() {
374
-        return "onload='load(" . ($this->readOnly ? "0" : "1") . ")'";
374
+        return "onload='load(".($this->readOnly ? "0" : "1").")'";
375 375
     }
376 376
 
377 377
     /**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      */
382 382
     private function findLocationHtml() {
383 383
         \core\common\Entity::intoThePotatoes();
384
-        $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>";
384
+        $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>";
385 385
         \core\common\Entity::outOfThePotatoes();
386 386
         return $retval;
387 387
     }
Please login to merge, or discard this patch.
web/lib/admin/OptionDisplay.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @return string HTML code <table>
86 86
      */
87 87
     public function prefilledOptionTable(string $attributePrefix) {
88
-        $retval = "<table id='expandable_$attributePrefix" . "_options'>";
88
+        $retval = "<table id='expandable_$attributePrefix"."_options'>";
89 89
 
90 90
         $prepopulate = [];
91 91
         foreach ($this->listOfOptions as $existingAttribute) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 $prepopulate[] = $existingAttribute;
94 94
             }
95 95
         }
96
-        if (is_array($prepopulate) && ( count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific" )) { // editing... fill with values
96
+        if (is_array($prepopulate) && (count($prepopulate) > 0 || $attributePrefix == "device-specific" || $attributePrefix == "eap-specific")) { // editing... fill with values
97 97
             $retval .= $this->addOptionEdit($attributePrefix, $prepopulate);
98 98
         } else {
99 99
             $retval .= $this->addOptionNew($attributePrefix);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 $optiontypearray = $optioninfo->optionType($option['name']);
126 126
                 $loggerInstance = new \core\common\Logging();
127 127
                 $loggerInstance->debug(5, "About to execute optiontext with PREFILL!\n");
128
-                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-' . $option['level'] . '-' . $option['row'] : $option['value']), $option['lang']);
128
+                $retval .= $this->optiontext([$option['name']], ($optiontypearray["type"] == "file" ? 'ROWID-'.$option['level'].'-'.$option['row'] : $option['value']), $option['lang']);
129 129
             }
130 130
         }
131 131
         return $retval;
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         if (!isset($descriptions[$input])) {
198 198
             return "";
199 199
         }
200
-        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:" . ($isVisible ? "block" : "none") . "' onclick='alert(\"" . $descriptions[$input] . "\")'><img src='../resources/images/icons/question-mark-icon.png" . "'></span>";
200
+        return "<span class='tooltip' id='S$rowid-tooltip-$input' style='display:".($isVisible ? "block" : "none")."' onclick='alert(\"".$descriptions[$input]."\")'><img src='../resources/images/icons/question-mark-icon.png"."'></span>";
201 201
     }
202 202
 
203 203
     /**
@@ -210,18 +210,18 @@  discard block
 block discarded – undo
210 210
      */
211 211
     private function selectElement($rowid, $list) {
212 212
         $jsmagic = "onchange='
213
-                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
213
+                               if (/#ML#/.test(document.getElementById(\"option-S" . $rowid."-select\").value)) {
214 214
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"block\";
215 215
                                    } else {
216 216
                                    document.getElementById(\"S$rowid-input-langselect\").style.display = \"none\";
217 217
                                    }";
218 218
         foreach (array_keys(OptionDisplay::HTML_DATATYPE_TEXTS) as $key) {
219
-            $jsmagic .= "if (/#" . $key . "#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
220
-                                  document.getElementById(\"S$rowid-input-file\").style.display = \"" . ($key == \core\Options::TYPECODE_FILE ? "block" : "none") . "\";
221
-                                  document.getElementById(\"S$rowid-input-text\").style.display = \"" . ($key == \core\Options::TYPECODE_TEXT ? "block" : "none") . "\";
222
-                                  document.getElementById(\"S$rowid-input-string\").style.display = \"" . ($key == \core\Options::TYPECODE_STRING ? "block" : "none") . "\";
223
-                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"" . ($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none") . "\";
224
-                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"" . ($key == \core\Options::TYPECODE_INTEGER ? "block" : "none") . "\";
219
+            $jsmagic .= "if (/#".$key."#/.test(document.getElementById(\"option-S".$rowid."-select\").value)) {
220
+                                  document.getElementById(\"S$rowid-input-file\").style.display = \"".($key == \core\Options::TYPECODE_FILE ? "block" : "none")."\";
221
+                                  document.getElementById(\"S$rowid-input-text\").style.display = \"".($key == \core\Options::TYPECODE_TEXT ? "block" : "none")."\";
222
+                                  document.getElementById(\"S$rowid-input-string\").style.display = \"".($key == \core\Options::TYPECODE_STRING ? "block" : "none")."\";
223
+                                  document.getElementById(\"S$rowid-input-boolean\").style.display = \"".($key == \core\Options::TYPECODE_BOOLEAN ? "block" : "none")."\";
224
+                                  document.getElementById(\"S$rowid-input-integer\").style.display = \"".($key == \core\Options::TYPECODE_INTEGER ? "block" : "none")."\";
225 225
                              }
226 226
                              ";
227 227
             // hide all tooltips (each is a <span>, and there are no other <span>s)
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                 $value = array_shift($list);
253 253
                 $listtype = $optioninfo->optionType($value);
254 254
                 $retval .= $uiElements->displayName($value);
255
-                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#'/>";
255
+                $retval .= "<input type='hidden' name='option[S$rowid]' value='$value#".$listtype["type"]."#".$listtype["flag"]."#'/>";
256 256
                 $activelisttype = $listtype;
257 257
                 $tooltips = $this->tooltip($rowid, $value, TRUE);
258 258
                 break;
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 $retval .= "<select id='option-S$rowid-select' name='option[S$rowid]' $jsmagic>";
261 261
                 foreach ($list as $value) {
262 262
                     $listtype = $optioninfo->optionType($value);
263
-                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ";
263
+                    $retval .= "<option id='option-S$rowid-v-$value' value='$value#".$listtype["type"]."#".$listtype["flag"]."#' ";
264 264
                     if ($iterator == $this->optionIterator) {
265 265
                         $retval .= "selected='selected'";
266 266
                         $activelisttype = $listtype;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
                     } else {
269 269
                         $tooltips .= $this->tooltip($rowid, $value, FALSE);
270 270
                     }
271
-                    $retval .= ">" . $uiElements->displayName($value) . "</option>";
271
+                    $retval .= ">".$uiElements->displayName($value)."</option>";
272 272
                     $iterator++;
273 273
                 }
274 274
 
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
      */
294 294
     private function selectLanguage($rowid, $makeVisible) {
295 295
         \core\common\Entity::intoThePotatoes();
296
-        $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
297
-            <option value='' name='select_language' selected>" . _("select language") . "</option>
298
-            <option value='C' name='all_languages'>" . _("default/other languages") . "</option>";
296
+        $retval = "<select style='display:".($makeVisible ? "block" : "none")."' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect'>
297
+            <option value='' name='select_language' selected>" . _("select language")."</option>
298
+            <option value='C' name='all_languages'>" . _("default/other languages")."</option>";
299 299
         foreach (\config\Master::LANGUAGES as $langindex => $possibleLang) {
300 300
             $thislang = $possibleLang['display'];
301 301
             $retval .= "<option value='$langindex' name='$langindex'>$thislang</option>";
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     private function inputFields($rowid, $activetype) {
324 324
         $retval = "";
325 325
         foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) {
326
-            $retval .= "<" . $type['html'] . " style='display:" . ($activetype['type'] == $key ? "block" : "none") . "' name='value[S$rowid-$key]' id='S" . $rowid . "-input-" . $key . "'" . $type['tail'] . ">";
326
+            $retval .= "<".$type['html']." style='display:".($activetype['type'] == $key ? "block" : "none")."' name='value[S$rowid-$key]' id='S".$rowid."-input-".$key."'".$type['tail'].">";
327 327
         }
328 328
         return $retval;
329 329
     }
@@ -338,11 +338,11 @@  discard block
 block discarded – undo
338 338
     private function noPrefillText(int $rowid, array $list) {
339 339
         // first column: the <select> element with the names of options and their field-toggling JS magic
340 340
         $selectorInfo = $this->selectElement($rowid, $list);
341
-        $retval = "<td>" . $selectorInfo["TEXT"] . "</td>";
341
+        $retval = "<td>".$selectorInfo["TEXT"]."</td>";
342 342
         // second column: the <select> element for language selection - only visible if the active option is multi-lang
343
-        $retval .= "<td>" . $this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML") . "</td>";
343
+        $retval .= "<td>".$this->selectLanguage($rowid, $selectorInfo['ACTIVE']['flag'] == "ML")."</td>";
344 344
         // third column: the actual input fields; the data type of the active option is visible, all others hidden
345
-        $retval .= "<td>" . $this->inputFields($rowid, $selectorInfo['ACTIVE']) . "</td>";
345
+        $retval .= "<td>".$this->inputFields($rowid, $selectorInfo['ACTIVE'])."</td>";
346 346
         return $retval;
347 347
     }
348 348
 
@@ -365,20 +365,20 @@  discard block
 block discarded – undo
365 365
         $retval .= "<td>";
366 366
         $uiElements = new UIElements();
367 367
         $listtype = $optioninfo->optionType($optionName);
368
-        $retval .= "<span style='display:flex;'>" . $uiElements->displayName($optionName);
369
-        $retval .= $this->tooltip($rowid, $optionName, TRUE) . "</span>";
370
-        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#" . $listtype["type"] . "#" . $listtype["flag"] . "#' ></td>";
368
+        $retval .= "<span style='display:flex;'>".$uiElements->displayName($optionName);
369
+        $retval .= $this->tooltip($rowid, $optionName, TRUE)."</span>";
370
+        $retval .= "<input type='hidden' id='option-S$rowid-select' name='option[S$rowid]' value='$optionName#".$listtype["type"]."#".$listtype["flag"]."#' ></td>";
371 371
 
372 372
         // language tag if any
373 373
         $retval .= "<td>";
374 374
         if ($listtype["flag"] == "ML") {
375 375
 
376
-            $language = "(" . strtoupper($optionLang) . ")";
376
+            $language = "(".strtoupper($optionLang).")";
377 377
             if ($optionLang == 'C') {
378 378
                 $language = _("(default/other languages)");
379 379
             }
380 380
             $retval .= $language;
381
-            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect' value='" . $optionLang . "' style='display:block'>";
381
+            $retval .= "<input type='hidden' name='value[S$rowid-lang]' id='S".$rowid."-input-langselect' value='".$optionLang."' style='display:block'>";
382 382
         }
383 383
         $retval .= "</td>";
384 384
 // attribute content
@@ -388,12 +388,12 @@  discard block
 block discarded – undo
388 388
             case \core\Options::TYPECODE_COORDINATES:
389 389
                 $this->allLocationCount = $this->allLocationCount + 1;
390 390
                 // display of the locations varies by map provider
391
-                $classname = "\web\lib\admin\Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'];
391
+                $classname = "\web\lib\admin\Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'];
392 392
                 $link = $classname::optionListDisplayCode($optionValue, $this->allLocationCount);
393
-                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
393
+                $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-".\core\Options::TYPECODE_TEXT."]' id='S$rowid-input-text' value='$optionValue'>$link";
394 394
                 break;
395 395
             case \core\Options::TYPECODE_FILE:
396
-                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
396
+                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S".$rowid."-input-string' style='display:none' value='".urlencode($optionValue)."'>";
397 397
                 $uiElements = new UIElements();
398 398
                 switch ($optionName) {
399 399
                     case "eap:ca_file":
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                 if ($listtype['type'] == \core\Options::TYPECODE_BOOLEAN) {// only modify in this one case
424 424
                     $displayedVariant = ($optionValue == "on" ? _("on") : _("off"));
425 425
                 }
426
-                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-" . $listtype['type'] . "]' id='S" . $rowid . "-input-" . $listtype["type"] . "' value=\"" . htmlspecialchars($optionValue) . "\" style='display:block'>";
426
+                $retval .= "<strong>$displayedVariant</strong><input type='hidden' name='value[S$rowid-".$listtype['type']."]' id='S".$rowid."-input-".$listtype["type"]."' value=\"".htmlspecialchars($optionValue)."\" style='display:block'>";
427 427
                 break;
428 428
             default:
429 429
                 // this should never happen!
@@ -468,10 +468,10 @@  discard block
 block discarded – undo
468 468
        <td>
469 469
           <button type='button' class='delete' onclick='";
470 470
         if ($prefillValue !== NULL && $item == "general:geo_coordinates") {
471
-            $funcname = "Map" . \config\ConfAssistant::MAPPROVIDER['PROVIDER'] . 'DeleteCoord';
472
-            $retval .= 'if (typeof ' . $funcname . ' === "function") { ' . $funcname . '(' . $this->allLocationCount . '); } ';
471
+            $funcname = "Map".\config\ConfAssistant::MAPPROVIDER['PROVIDER'].'DeleteCoord';
472
+            $retval .= 'if (typeof '.$funcname.' === "function") { '.$funcname.'('.$this->allLocationCount.'); } ';
473 473
         }
474
-        $retval .= 'deleteOption("option-S' . $rowid . '")';
474
+        $retval .= 'deleteOption("option-S'.$rowid.'")';
475 475
         $retval .= "'>-</button>
476 476
        </td>
477 477
     </tr>";
Please login to merge, or discard this patch.
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
 /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
88 88
         $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']);
89 89
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']);
90
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']);
90
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']);
91 91
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']);
92 92
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
93 93
         $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/skins/modern/Menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
         $langsArray = [];
41 41
         foreach (\config\Master::LANGUAGES as $lang => $value) {
42 42
             if ($lang == $selectedLang) {
43
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")', 'class'=>'selected-lang'];
43
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")', 'class'=>'selected-lang'];
44 44
             } else {
45
-                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("' . $lang . '")'];
45
+                $langsArray[] = ['text'=>$value['display'], 'link'=>'javascript:changeLang("'.$lang.'")'];
46 46
             }
47 47
         }
48 48
         $this->menu = [['id' => 'start',
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
                 $iD = $menuItem['id'] ?? $id;
102 102
                 $catInfo = NULL;
103 103
                 if (!empty($menuItem['catInfo'])) {
104
-                    $catInfo = 'javascript:infoCAT("' . $iD . '", "' . $menuItem['catInfo'][0] . '","' . $menuItem['catInfo'][1] . '")';
104
+                    $catInfo = 'javascript:infoCAT("'.$iD.'", "'.$menuItem['catInfo'][0].'","'.$menuItem['catInfo'][1].'")';
105 105
                 }
106 106
                 if (!empty($menuItem['link']) && substr($menuItem['link'], 0, 1) === '/') {
107
-                    $menuItem['link'] = \core\CAT::getRootUrlPath() . $menuItem['link'];
107
+                    $menuItem['link'] = \core\CAT::getRootUrlPath().$menuItem['link'];
108 108
                 }
109 109
                 $link = $catInfo ?? $menuItem['link'] ?? '';
110
-                $class = empty($menuItem['class']) ? '' : ' class="' . $menuItem['class'] . '"';
110
+                $class = empty($menuItem['class']) ? '' : ' class="'.$menuItem['class'].'"';
111 111
                 $submenu = $menuItem['submenu'] ?? [];
112 112
                 $out .= $this->printMenuItem($menuItem['text'], $link, $class);
113 113
                 $out .= $this->printMenu($submenu, $iD);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($itemLink === '') {
132 132
             return("<li><span>$itemText</span>");
133 133
         }
134
-        return "<li><a href='" . $itemLink . "'" . $itemClass . '>' . $itemText . "</a>";
134
+        return "<li><a href='".$itemLink."'".$itemClass.'>'.$itemText."</a>";
135 135
     }
136 136
     
137 137
     /**
Please login to merge, or discard this patch.
core/CertficationAuthorityEduPki.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 class CertificationAuthorityEduPki extends EntityWithDBProperties implements CertificationAuthorityInterface {
18 18
 
19
-    private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
20
-    private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
21
-    private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
19
+    private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
20
+    private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
21
+    private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
22 22
     private const EDUPKI_RA_ID = 700;
23 23
     private const EDUPKI_CERT_PROFILE = "User SOAP";
24 24
     private const EDUPKI_RA_PKEY_PASSPHRASE = "...";
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
         parent::__construct();
34 34
 
35 35
         if (stat(CertificationAuthorityEduPki::LOCATION_RA_CERT) === FALSE) {
36
-            throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPki::LOCATION_RA_CERT);
36
+            throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPki::LOCATION_RA_CERT);
37 37
         }
38 38
         if (stat(CertificationAuthorityEduPki::LOCATION_RA_KEY) === FALSE) {
39
-            throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPki::LOCATION_RA_KEY);
39
+            throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPki::LOCATION_RA_KEY);
40 40
         }
41 41
         if (stat(CertificationAuthorityEduPki::LOCATION_WEBROOT) === FALSE) {
42
-            throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPki::LOCATION_WEBROOT);
42
+            throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPki::LOCATION_WEBROOT);
43 43
         }
44 44
     }
45 45
 
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
         // initialise connection to eduPKI CA / eduroam RA and send the request to them
69 69
         try {
70 70
             $altArray = [# Array mit den Subject Alternative Names
71
-                "email:" . $csr["USERNAME"]
71
+                "email:".$csr["USERNAME"]
72 72
             ];
73 73
             $soapPub = $this->initEduPKISoapSession("PUBLIC");
74 74
             $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n");
75
-            $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPki::EDUPKI_RA_ID . "\n");
76
-            $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR"] . "\n");
75
+            $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPki::EDUPKI_RA_ID."\n");
76
+            $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR"]."\n");
77 77
             $this->loggerInstance->debug(5, "PARAM_3: ");
78 78
             $this->loggerInstance->debug(5, $altArray);
79
-            $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE . "\n");
80
-            $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n");
81
-            $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n");
82
-            $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERNAME"] . "\n");
83
-            $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n");
79
+            $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE."\n");
80
+            $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n");
81
+            $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n");
82
+            $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERNAME"]."\n");
83
+            $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n");
84 84
             $this->loggerInstance->debug(5, "PARAM_9: false\n");
85 85
             $soapNewRequest = $soapPub->newRequest(
86 86
                     CertificationAuthorityEduPki::EDUPKI_RA_ID, # RA-ID
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
         } catch (Exception $e) {
103 103
             // PHP 7.1 can do this much better
104 104
             if (is_soap_fault($e)) {
105
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}:  {
105
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}:  {
106 106
                     $e->faultstring
107 107
                 }\n");
108 108
             }
109
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
109
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
110 110
         }
111 111
         try {
112 112
             $soap = $this->initEduPKISoapSession("RA");
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
                     $soapReqnum, [
119 119
                 "RaID" => CertificationAuthorityEduPki::EDUPKI_RA_ID,
120 120
                 "Role" => CertificationAuthorityEduPki::EDUPKI_CERT_PROFILE,
121
-                "Subject" => "DC=eduroam,DC=test,DC=test,C=" . $csr["FED"] . ",O=" . \config\ConfAssistant::CONSORTIUM['name'] . ",OU=" . $csr["FED"] . ",CN=" . $csr['USERNAME'] . ",emailAddress=" . $csr['USERNAME'],
122
-                "SubjectAltNames" => ["email:" . $csr["USERNAME"]],
121
+                "Subject" => "DC=eduroam,DC=test,DC=test,C=".$csr["FED"].",O=".\config\ConfAssistant::CONSORTIUM['name'].",OU=".$csr["FED"].",CN=".$csr['USERNAME'].",emailAddress=".$csr['USERNAME'],
122
+                "SubjectAltNames" => ["email:".$csr["USERNAME"]],
123 123
                 "NotBefore" => (new \DateTime())->format('c'),
124 124
                 "NotAfter" => $expiry->format('c'),
125 125
                     ]
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
139 139
             // rather than just using the string. Grr.
140 140
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
141
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext);
141
+            file_put_contents($tempdir['dir']."/content.txt", $soapCleartext);
142 142
             // retrieve our RA cert from filesystem                    
143 143
             // the RA certificates are not needed right now because we
144 144
             // have resorted to S/MIME signatures with openssl command-line
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
151 151
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
152 152
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n  $soapCleartext\n");
153
-            $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
153
+            $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
154 154
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline:   $execCmd\n");
155 155
             $output = [];
156 156
             $return = 999;
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
                 throw new Exception("Non-zero return value from openssl smime!");
160 160
             }
161 161
             // and get the signature blob back from the filesystem
162
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
162
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
163 163
             $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n");
164
-            $this->loggerInstance->debug(5, $soapReqnum . "\n");
165
-            $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending!
166
-            $this->loggerInstance->debug(5, $detachedSig . "\n");
164
+            $this->loggerInstance->debug(5, $soapReqnum."\n");
165
+            $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending!
166
+            $this->loggerInstance->debug(5, $detachedSig."\n");
167 167
             $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig);
168
-            $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest());
169
-            $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse());
168
+            $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest());
169
+            $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse());
170 170
             if ($soapIssueCert === FALSE) {
171 171
                 throw new Exception("The locally approved request was NOT processed by the CA.");
172 172
             }
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
                 throw new Exception("CAInfo has no root certificate for us!");
204 204
             }
205 205
         } catch (SoapFault $e) {
206
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
206
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
207 207
         } catch (Exception $e) {
208
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
208
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
209 209
         }
210 210
         return [
211 211
             "CERT" => openssl_x509_read($parsedCert['pem']),
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
238 238
             // rather than just using the string. Grr.
239 239
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
240
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest);
240
+            file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest);
241 241
             // retrieve our RA cert from filesystem
242 242
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
243 243
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
244 244
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n");
245
-            $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPki::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPki::LOCATION_RA_CERT;
245
+            $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPki::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPki::LOCATION_RA_CERT;
246 246
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n");
247 247
             $output = [];
248 248
             $return = 999;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 throw new Exception("Non-zero return value from openssl smime!");
252 252
             }
253 253
             // and get the signature blob back from the filesystem
254
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
254
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
255 255
             $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig);
256 256
             if ($soapIssueRev === FALSE) {
257 257
                 throw new Exception("The locally approved revocation request was NOT processed by the CA.");
@@ -259,9 +259,9 @@  discard block
 block discarded – undo
259 259
         } catch (Exception $e) {
260 260
             // PHP 7.1 can do this much better
261 261
             if (is_soap_fault($e)) {
262
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n");
262
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n");
263 263
             }
264
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
264
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
265 265
         }
266 266
     }
267 267
 
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
      * @return string the integer as string in an XML fragment
359 359
      */
360 360
     public function soapToXmlInteger($x) {
361
-        return '<' . $x[0] . '>'
361
+        return '<'.$x[0].'>'
362 362
                 . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1)
363
-                . '</' . $x[0] . '>';
363
+                . '</'.$x[0].'>';
364 364
     }
365 365
 
366 366
     /**
@@ -378,9 +378,9 @@  discard block
 block discarded – undo
378 378
         // dump private key into directory
379 379
         $outstring = "";
380 380
         openssl_pkey_export($privateKey, $outstring);
381
-        file_put_contents($tempdir . "/pkey.pem", $outstring);
381
+        file_put_contents($tempdir."/pkey.pem", $outstring);
382 382
         // PHP can only do one DC in the Subject. But we need three.
383
-        $execCmd = \config\Master::PATHS['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username";
383
+        $execCmd = \config\Master::PATHS['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username";
384 384
         $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n");
385 385
         $output = [];
386 386
         $return = 999;
Please login to merge, or discard this patch.
core/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
         common\Entity::intoThePotatoes();
155 155
         $mail = \core\common\OutsideComm::mailHandle();
156 156
 // who to whom?
157
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
158
-        $mail->addReplyTo(\config\Master::APPEARANCE['support-contact']['developer-mail'], \config\Master::APPEARANCE['productname'] . " " . _("Feedback"));
157
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
158
+        $mail->addReplyTo(\config\Master::APPEARANCE['support-contact']['developer-mail'], \config\Master::APPEARANCE['productname']." "._("Feedback"));
159 159
         $mail->addAddress($mailaddr[0]["value"]);
160 160
 // what do we want to say?
161 161
         $mail->Subject = $subject;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 }
219 219
                 $lookFor .= "$name";
220 220
             }
221
-            $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches);
221
+            $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches);
222 222
             if ($finding === 0 || $finding === FALSE) {
223 223
                 return FALSE;
224 224
             }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                         $matchedProviders[] = $idp;
237 237
                         $name = $idp;
238 238
                         if ($skipCurl == 0) {
239
-                            $url = \config\Diagnostics::EDUGAINRESOLVER['url'] . "?action=get_entity_name&type=idp&e_id=$idp&lang=$lang";
239
+                            $url = \config\Diagnostics::EDUGAINRESOLVER['url']."?action=get_entity_name&type=idp&e_id=$idp&lang=$lang";
240 240
                             $ch = curl_init($url);
241 241
                             if ($ch === FALSE) {
242 242
                                 $loggerInstance->debug(2, "Unable ask eduGAIN about IdP - CURL init failed!");
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                             }
253 253
                             curl_close($ch);
254 254
                         }
255
-                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]] . " - IdP: " . $name;
255
+                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]]." - IdP: ".$name;
256 256
                     }
257 257
                     break;
258 258
                 case $providerStrings[1]:
Please login to merge, or discard this patch.