Test Setup Failed
Push — master ( 413a40...e97efd )
by Tomasz
11:58
created
utils/Update_eduroamDB1_2/update_monitor_copy.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * update the local copy
25 25
  */
26 26
 
27
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
27
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
28 28
 setlocale(LC_CTYPE, "en_US.UTF-8");
29 29
 require 'config.php';
30 30
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->db_ext->query("SET NAMES 'utf8'");
114 114
         $this->db_local->query("SET NAMES 'utf8mb4'");
115 115
         $result = $this->db_ext->query("SELECT * FROM $table");
116
-        $queryFields = implode(',', array_column($this->fields[$db][$table_name],0));
116
+        $queryFields = implode(',', array_column($this->fields[$db][$table_name], 0));
117 117
         while ($row = $result->fetch_assoc()) {
118 118
             $v = [];
119 119
             foreach ($this->fields[$db][$table_name] as $field) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                     }
132 132
                 }
133 133
             }
134
-            $queryValues = implode(',',$v);
134
+            $queryValues = implode(',', $v);
135 135
             $query = "INSERT INTO $tmpTable (".$queryFields.") VALUES (".$queryValues.")";
136 136
             $this->db_local->query($query);
137 137
         }
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
             $realms = explode(',', $row[1]);
154 154
             foreach ($contacts as $contact) {
155 155
                 foreach ($realms as $realm) {
156
-                    $email = empty($contact['mail']) ? 'NULL' :'"'.$contact['mail'].'"';
157
-                    $name = empty($contact['name']) ? 'NULL' :'"'.$contact['name'].'"';
158
-                    $phone = empty($contact['phone']) ? 'NULL' :'"'.$contact['phone'].'"';
156
+                    $email = empty($contact['mail']) ? 'NULL' : '"'.$contact['mail'].'"';
157
+                    $name = empty($contact['name']) ? 'NULL' : '"'.$contact['name'].'"';
158
+                    $phone = empty($contact['phone']) ? 'NULL' : '"'.$contact['phone'].'"';
159 159
                     $id = $db == 'eduroam' ? $row[2] : '"'.$row[2].'"';
160 160
                     $query = "INSERT INTO tmp_institution_admins (name, email, phone, inst_realm, $instid)"
161 161
                             . ' VALUES ('.$name.','.$email.','.$phone.',"'.$realm.'",'.$id.')';
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
     }
176 176
 
177 177
     private function escape($inp) {
178
-        $out=str_replace('\\','\\\\',$inp);
179
-        $out=str_replace('"','\"',$out);
180
-        $out=str_replace('?','\?',$out);
178
+        $out = str_replace('\\', '\\\\', $inp);
179
+        $out = str_replace('"', '\"', $out);
180
+        $out = str_replace('?', '\?', $out);
181 181
         $out = 'convert(cast(convert("'.$out.'" using latin1) as binary) using utf8)';
182 182
         return($out);
183 183
     }
Please login to merge, or discard this patch.
utils/Update_eduroamDB1_2/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $databases = [
4 4
     'eduroam' => "eduroam1_1_tmp", // this is the local copy of eduroam (v1) database created by update_monitor_copy.php
5 5
     'eduroamv2' => "eduroam2_1_tmp", // this is the local copy of eduroam (v2) database created by update_monitor_copy.php
6
-    'cat' => "cat_twoln_214_test2",  // this is the curent production CAT database where we need to put in new identifiers
6
+    'cat' => "cat_twoln_214_test2", // this is the curent production CAT database where we need to put in new identifiers
7 7
     'eduroam_new' => "monitor_copy2_test_xxx" // this is the resulting monitor_copy database containing all data required by CAT it must exist but tables will be created by the sript
8 8
 ];
9 9
 
Please login to merge, or discard this patch.
utils/Update_eduroamDB1_2/clean_databases.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
3
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
4 4
 setlocale(LC_CTYPE, "en_US.UTF-8");
5 5
 require 'config.php';
6 6
 
Please login to merge, or discard this patch.
utils/Update_eduroamDB1_2/sync_databases.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * 
9 9
  */
10 10
 
11
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
11
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
12 12
 setlocale(LC_CTYPE, "en_US.UTF-8");
13 13
 require 'config.php';
14 14
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 // add CAT ids to view_active_institution2
132 132
 print "add CAT ids to view_active_institution2\n";
133
-$q ="update view_active_institution2 join view_active_institution1
133
+$q = "update view_active_institution2 join view_active_institution1
134 134
         on view_active_institution2.instid1=view_active_institution1.id_institution
135 135
         set view_active_institution2.cat_sync_id=view_active_institution1.cat_sync_id";
136 136
 $result = $db_local->query($q);
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 'display' => sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP),
150 150
                 'help' => _("Set of default CAs to add to new IdPs on signup")],
151 151
             "fed:openroaming" => [
152
-                'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant),
152
+                'display' => sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant),
153 153
                 'help' => _("Allow IdP to set OpenRoaming support for its users.")],
154 154
             "fed:openroaming_customtarget" => ['display' => _("OpenRoaming: Custom NAPTR Target"), 'help' => "If you want your IdPs to use your own OpenRoaming → eduroam proxy then you can configure the hostname here; the realm check feature for IdPs will then warn them if the OpenRoaming destination server is not yours. This attribute does not need to be set, and the realm checks default to checking for the OpenRoaming → eduroam proxy operated by eduroam OT."],
155 155
             "fed:autoregister-synced" => [
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         ];
176 176
 
177 177
         if (!isset($displayNames[$input])) { // this is an error! throw an Exception
178
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
178
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
179 179
         }
180 180
         \core\common\Entity::outOfThePotatoes();
181 181
         // none of the strings have HTML in them, only translators can provide own text for it -> no threat, but complained about by the security review
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
         foreach ($optionlist as $option) {
203 203
             $type = $optioninfo->optionType($option['name']);
204
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
204
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
205 205
                 // all non-multilang attribs get this assignment ...
206 206
                 $language = "";
207 207
                 $content = $option['value'];
@@ -219,19 +219,19 @@  discard block
 block discarded – undo
219 219
                         $locationMarkers[] = $coords;
220 220
                         break;
221 221
                     case "file":
222
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
222
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
223 223
                         switch ($option['name']) {
224 224
                             case "general:logo_file":
225 225
                             case "fed:logo_file":
226
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
226
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
227 227
                                 break;
228 228
                             case "eap:ca_file":
229 229
                             // fall-through intended: display both the same way
230 230
                             case "fed:minted_ca_file":
231
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
231
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
232 232
                                 break;
233 233
                             case "support:info_file":
234
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
234
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
235 235
                                 break;
236 236
                             default:
237 237
                         }
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
242 242
                             break;
243 243
                         }
244
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
244
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
245 245
                         break;
246 246
                     default:
247
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
247
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
248 248
                 }
249 249
             }
250 250
         }
@@ -253,11 +253,11 @@  discard block
 block discarded – undo
253 253
             $locationCount = 0;
254 254
             foreach ($locationMarkers as $g) {
255 255
                 $locationCount++;
256
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
256
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
257 257
             }
258 258
             $marker .= '<\/markers>'; // some validator says this should be escaped
259 259
             $jMarker = json_encode($locationMarkers);
260
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
260
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
261 261
         }
262 262
         \core\common\Entity::outOfThePotatoes();
263 263
         return $retval;
@@ -273,11 +273,11 @@  discard block
 block discarded – undo
273 273
         \core\common\Entity::intoThePotatoes();
274 274
         $idpoptions = $myInst->getAttributes();
275 275
         $retval = "<div class='infobox'>
276
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2>
276
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2>
277 277
         <table>
278 278
             <tr>
279 279
                 <td>
280
-                    " . _("Country:") . "
280
+                    " . _("Country:")."
281 281
                 </td>
282 282
                 <td>
283 283
                 </td>
@@ -287,16 +287,16 @@  discard block
 block discarded – undo
287 287
         $retval .= $myFed->name;
288 288
         $retval .= "</strong>
289 289
                 </td>
290
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
290
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
291 291
         </table>
292 292
     </div>";
293 293
 
294 294
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
295 295
         foreach ($blocks as $block) {
296 296
             $retval .= "<div class='infobox'>
297
-            <h2>" . $block[1] . "</h2>
297
+            <h2>" . $block[1]."</h2>
298 298
             <table>" .
299
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
299
+                    $this->infoblock($idpoptions, $block[0], "IdP").
300 300
                     "</table>
301 301
         </div>";
302 302
         }
@@ -311,12 +311,12 @@  discard block
 block discarded – undo
311 311
      */
312 312
     private function displaySize(int $number) {
313 313
         if ($number > 1024 * 1024) {
314
-            return round($number / 1024 / 1024, 2) . " MiB";
314
+            return round($number / 1024 / 1024, 2)." MiB";
315 315
         }
316 316
         if ($number > 1024) {
317
-            return round($number / 1024, 2) . " KiB";
317
+            return round($number / 1024, 2)." KiB";
318 318
         }
319
-        return $number . " B";
319
+        return $number." B";
320 320
     }
321 321
 
322 322
     /**
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         $caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning'];
372 372
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
373 373
         if (is_bool($rawResult)) { // we didn't actually get a CA!
374
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
374
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
375 375
             \core\common\Entity::outOfThePotatoes();
376 376
             return $retval;
377 377
         }
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
 
388 388
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
389 389
         $details['name'] = preg_replace('/\//', "", $details['name']);
390
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
391
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
390
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
391
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
392 392
         $innerbgColor = "#0000ff";
393 393
         $leftBorderColor = "#00ff00";
394 394
         $message = "";
@@ -396,35 +396,35 @@  discard block
 block discarded – undo
396 396
             $leftBorderColor = "red";
397 397
             $message = _("This is a <strong>SERVER</strong> certificate!");
398 398
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
399
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
399
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
400 400
             }
401 401
             $message .= "<br/>";
402
-            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . $message . $details['name'] . "</div>";
402
+            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>".$message.$details['name']."</div>";
403 403
             \core\common\Entity::outOfThePotatoes();
404 404
             return $retval;
405 405
         }
406 406
         $now = time();
407 407
         if ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_critical'] > $details['full_details']['validTo_time_t']) {
408 408
             $leftBorderColor = "red";
409
-            $message = _("Certificate expired!") . "<br>";
410
-        } elseif($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning']  > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
409
+            $message = _("Certificate expired!")."<br>";
410
+        } elseif ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warning'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
411 411
             if ($leftBorderColor == "#00ff00") {
412 412
                 $leftBorderColor = "yellow";
413 413
             }
414
-            $message = _("Certificate close to expiry!") . "<br/>";            
414
+            $message = _("Certificate close to expiry!")."<br/>";            
415 415
         }
416 416
    
417 417
         if ($details['root'] == 1 && $details['basicconstraints_set'] == 0) {
418 418
             if ($leftBorderColor == "#00ff00") {
419 419
                 $leftBorderColor = "yellow";
420 420
             }
421
-            $message .= "<div style='max-width: 25em'><strong>" . _("Improper root certificate, required critical CA extension missing, will not reliably install!") . "</strong>";
421
+            $message .= "<div style='max-width: 25em'><strong>"._("Improper root certificate, required critical CA extension missing, will not reliably install!")."</strong>";
422 422
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
423
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
423
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
424 424
             }
425 425
             $message .= "</div><br/>";
426 426
         }
427
-        $retval =  "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $message . $details['name'] . "<br>" . $this->displayName('eap:ca_vailduntil') . " " . gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t']) . " UTC</div>";
427
+        $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$message.$details['name']."<br>".$this->displayName('eap:ca_vailduntil')." ".gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t'])." UTC</div>";
428 428
         \core\common\Entity::outOfThePotatoes();
429 429
         return $retval;
430 430
     }
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      */
438 438
     public function previewImageinHTML($imageReference) {
439 439
         \core\common\Entity::intoThePotatoes();
440
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
440
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
441 441
         \core\common\Entity::outOfThePotatoes();
442 442
         return $retval;
443 443
     }
@@ -454,13 +454,13 @@  discard block
 block discarded – undo
454 454
         $ref = $validator->databaseReference($fileReference);
455 455
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
456 456
         if (is_bool($fileBlob)) { // we didn't actually get a file!
457
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
457
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
458 458
             \core\common\Entity::outOfThePotatoes();
459 459
             return $retval;
460 460
         }
461 461
         $decodedFileBlob = base64_decode($fileBlob);
462 462
         $fileinfo = new \finfo();
463
-        $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>";
463
+        $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>";
464 464
         \core\common\Entity::outOfThePotatoes();
465 465
         return $retval;
466 466
     }
@@ -617,8 +617,8 @@  discard block
 block discarded – undo
617 617
             return "";
618 618
         }
619 619
 
620
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
621
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
620
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
621
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
622 622
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
623 623
             return "";
624 624
         }
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
         imagecolorallocate($whiteimage, 255, 255, 255);
645 645
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
646 646
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
647
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
647
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
648 648
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
649 649
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
650 650
         ob_start();
@@ -694,9 +694,9 @@  discard block
 block discarded – undo
694 694
                 $message = "Your configuration appears to be fine.";
695 695
                 break;
696 696
             default:
697
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
697
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
698 698
         }
699
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
699
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
700 700
         foreach ($test->out as $testValue) {
701 701
             foreach ($testValue as $o) {
702 702
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
core/User.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
             return false;
174 174
         }
175 175
         $entityId = $matches[1];
176
-        $url = \config\Diagnostics::EDUGAINRESOLVER['url'] . "?action=get_entity_name&type=idp&opt=2&e_id=$entityId";
177
-        \core\common\Logging::debug_s(4, $url, "URL: ","\n");
176
+        $url = \config\Diagnostics::EDUGAINRESOLVER['url']."?action=get_entity_name&type=idp&opt=2&e_id=$entityId";
177
+        \core\common\Logging::debug_s(4, $url, "URL: ", "\n");
178 178
         $ch = curl_init($url);
179 179
         if ($ch === false) {
180 180
             $loggerInstance->debug(2, "Unable ask eduGAIN about IdP - CURL init failed!");
@@ -200,10 +200,10 @@  discard block
 block discarded – undo
200 200
             return false;            
201 201
         }
202 202
         if ($responseDetails['name'] === null) {
203
-            \core\common\Logging::debug_s(4,"User not in eduGAIN\n");
203
+            \core\common\Logging::debug_s(4, "User not in eduGAIN\n");
204 204
             return false;            
205 205
         }
206
-        \core\common\Logging::debug_s(4,"User in eduGAIN\n");
206
+        \core\common\Logging::debug_s(4, "User in eduGAIN\n");
207 207
         $_SESSION['eduGAIN'] = $responseDetails['regauth'];
208 208
         return true;
209 209
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @return boolean did it work?
244 244
      */
245 245
     public static function sendMailToCATadmins($subject, $content) {
246
-        if (!isset(\config\Master::APPEARANCE['cat-admin-mail']) ||  \config\Master::APPEARANCE['cat-admin-mail'] === []) {
246
+        if (!isset(\config\Master::APPEARANCE['cat-admin-mail']) || \config\Master::APPEARANCE['cat-admin-mail'] === []) {
247 247
             return;
248 248
         }
249 249
         foreach (\config\Master::APPEARANCE['cat-admin-mail'] as $mailaddr) {
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
         common\Entity::intoThePotatoes();
267 267
         $mail = \core\common\OutsideComm::mailHandle();
268 268
 // who to whom?
269
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Notification System";
270
-        $mail->addReplyTo(\config\Master::APPEARANCE['support-contact']['developer-mail'], \config\Master::APPEARANCE['productname'] . " " . _("Feedback"));
269
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Notification System";
270
+        $mail->addReplyTo(\config\Master::APPEARANCE['support-contact']['developer-mail'], \config\Master::APPEARANCE['productname']." "._("Feedback"));
271 271
         $mail->addAddress($mailaddr);
272 272
 // what do we want to say?
273 273
         $mail->Subject = $subject;
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
                 }
334 334
                 $lookFor .= "$name";
335 335
             }
336
-            $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches);
336
+            $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches);
337 337
             if ($finding === 0 || $finding === false) {
338 338
                 return false;
339 339
             }
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                         $matchedProviders[] = $idp;
353 353
                         $name = $idp;
354 354
                         if ($skipCurl == 0) {
355
-                            $url = \config\Diagnostics::EDUGAINRESOLVER['url'] . "?action=get_entity_name&opt=2&type=idp&e_id=$idp&lang=$lang";
355
+                            $url = \config\Diagnostics::EDUGAINRESOLVER['url']."?action=get_entity_name&opt=2&type=idp&e_id=$idp&lang=$lang";
356 356
                             $ch = curl_init($url);
357 357
                             if ($ch === false) {
358 358
                                 $loggerInstance->debug(2, "Unable ask eduGAIN about IdP - CURL init failed!");
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                             }
378 378
                             curl_close($ch);
379 379
                         }
380
-                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]] . " - IdP: " . $name;
380
+                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]]." - IdP: ".$name;
381 381
                     }
382 382
                     break;
383 383
                 case $providerStrings[2]:
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
                     return false;
394 394
             }
395 395
         }
396
-        \core\common\Logging::debug_s(4,$listOfProviders, "PROVIDERS:\n", "\n");
396
+        \core\common\Logging::debug_s(4, $listOfProviders, "PROVIDERS:\n", "\n");
397 397
         return $listOfProviders;
398 398
     }
399 399
 }
400 400
\ No newline at end of file
Please login to merge, or discard this patch.