Passed
Push — release_2_0 ( 0d5fd5...cf68a9 )
by Maja
08:03
created
web/skins/modern/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 $operatingSystem = $Gui->detectOS();
44 44
 $Gui->loggerInstance->debug(4, $operatingSystem);
45 45
 if ($operatingSystem) {
46
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
46
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
47 47
 }
48 48
 
49
-print 'downloadMessage = "' . $Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";';
49
+print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";';
50 50
 //TODO modify this based on OS detection
51 51
 $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? "";
52 52
 if (preg_match('/Android/', $userAgent)) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     <?php echo $divs->divHeading($visibility); ?>
76 76
     <div id="main_page">
77 77
         <div id="loading_ico">
78
-          <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
78
+          <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
79 79
         </div>
80 80
         <div id="info_overlay"> <!-- device info -->
81 81
             <div id="info_window"></div>
Please login to merge, or discard this patch.
web/skins/modern/test.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
          <?php if (empty($_REQUEST['idp'])) { ?>
92 92
               <div id="front_page">
93 93
                   <?php
94
-                         echo $divs->divTopWelcome();
94
+                            echo $divs->divTopWelcome();
95 95
 //                         echo $divs->div_roller();
96 96
 //                         echo $divs->div_main_button(); ?>
97 97
               </div> <!-- id="front_page" -->
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 ?>
29 29
 
30 30
 <!-- JQuery -->
31
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js") ?>"></script>
32
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate-1.2.1.js") ?>"></script>
33
-<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js") ?>"></script>
31
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js") ?>"></script>
32
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate-1.2.1.js") ?>"></script>
33
+<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js") ?>"></script>
34 34
 <!-- JQuery -->
35 35
 
36 36
 <script type="text/javascript">
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 $operatingSystem = $Gui->detectOS();
45 45
 $Gui->loggerInstance->debug(4, $operatingSystem);
46 46
 if ($operatingSystem) {
47
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
47
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
48 48
 }
49 49
 
50
-print 'downloadMessage = "' . $Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";';
50
+print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";';
51 51
 //TODO modify this based on OS detection
52 52
 if (preg_match('/Android/', $_SERVER['HTTP_USER_AGENT'])) {
53 53
     $profile_list_size = 1;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 include("user/js/cat_js.php");
59 59
 ?>
60 60
     var loading_ico = new Image();
61
-    loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>";
61
+    loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>";
62 62
 </script>
63 63
 <?php $Gui->langObject->setTextDomain("web_user"); ?>
64 64
 <!-- DiscoJuice -->
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     front_page = 0;
68 68
     var lang = "<?php echo($Gui->langObject->getLang()) ?>";
69 69
 </script>
70
-<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","discojuice/css/discojuice.css")?>" />
70
+<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "discojuice/css/discojuice.css")?>" />
71 71
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
72
-<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" />
72
+<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
73 73
 </head>
74 74
 <body>
75 75
 <div id="wrap">
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
     <?php echo $divs->divHeading($visibility); ?>
78 78
     <div id="main_page">
79 79
         <div id="loading_ico">
80
-          <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>" alt="Authenticating ..."/>
80
+          <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>" alt="Authenticating ..."/>
81 81
         </div>
82 82
         <div id="info_overlay"> <!-- device info -->
83 83
             <div id="info_window"></div>
84
-            <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
84
+            <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
85 85
         </div>
86 86
         <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu -->
87
-          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/>
87
+          <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/>
88 88
           <div id="main_menu_content"></div>
89 89
         </div>
90 90
         <div id="main_body">
Please login to merge, or discard this patch.
web/lib/admin/API.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -297,8 +297,8 @@
 block discarded – undo
297 297
             "OPT" => [API::AUXATTRIB_TARGETMAIL],
298 298
             "RETVAL" => [
299 299
                 ["TOKEN URL", 
300
-                 "EMAIL SENT",              // Dependent on TARGETMAIL input.
301
-                 "EMAIL TRANSPORT SECURE"], // Dependent on TARGETMAIL input.
300
+                    "EMAIL SENT",              // Dependent on TARGETMAIL input.
301
+                    "EMAIL TRANSPORT SECURE"], // Dependent on TARGETMAIL input.
302 302
             ]
303 303
         ],
304 304
         API::ACTION_ADMIN_DEL => [
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 use Exception;
30 30
 
31
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
31
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
32 32
 
33 33
 /**
34 34
  * This class defines the various actions doable with the admin API, the
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     const ACTIONS = [
239 239
         // Inst-level actions.
240 240
         API::ACTION_NEWINST_BY_REF => [
241
-            "REQ" => [API::AUXATTRIB_EXTERNALID,],
241
+            "REQ" => [API::AUXATTRIB_EXTERNALID, ],
242 242
             "OPT" => [
243 243
                 'general:geo_coordinates',
244 244
                 'general:logo_file',
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             "OPT" => [API::AUXATTRIB_TARGETMAIL],
299 299
             "RETVAL" => [
300 300
                 ["TOKEN URL", 
301
-                 "EMAIL SENT",              // Dependent on TARGETMAIL input.
301
+                 "EMAIL SENT", // Dependent on TARGETMAIL input.
302 302
                  "EMAIL TRANSPORT SECURE"], // Dependent on TARGETMAIL input.
303 303
             ]
304 304
         ],
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
         API::ACTION_ENDUSER_NEW => [
361 361
             "REQ" => [API::AUXATTRIB_CAT_PROFILE_ID, API::AUXATTRIB_SB_USERNAME, API::AUXATTRIB_SB_EXPIRY],
362 362
             "OPT" => [],
363
-            "RETVAL" => [ API::AUXATTRIB_SB_USERNAME, API::AUXATTRIB_SB_USERID ],
363
+            "RETVAL" => [API::AUXATTRIB_SB_USERNAME, API::AUXATTRIB_SB_USERID],
364 364
         ],
365 365
         API::ACTION_ENDUSER_DEACTIVATE => [
366 366
             "REQ" => [API::AUXATTRIB_CAT_PROFILE_ID, API::AUXATTRIB_SB_USERID],
@@ -371,14 +371,14 @@  discard block
 block discarded – undo
371 371
             "REQ" => [API::AUXATTRIB_CAT_PROFILE_ID],
372 372
             "OPT" => [],
373 373
             "RETVAL" => [
374
-                [ API::AUXATTRIB_SB_USERID => API::AUXATTRIB_SB_USERNAME],
374
+                [API::AUXATTRIB_SB_USERID => API::AUXATTRIB_SB_USERNAME],
375 375
             ],
376 376
         ],
377 377
         API::ACTION_ENDUSER_IDENTIFY => [
378 378
             "REQ" => [API::AUXATTRIB_CAT_PROFILE_ID],
379 379
             "OPT" => [API::AUXATTRIB_SB_USERID, API::AUXATTRIB_SB_USERNAME, API::AUXATTRIB_SB_CERTSERIAL],
380 380
             "RETVAL" => [
381
-                [ API::AUXATTRIB_SB_USERID => API::AUXATTRIB_SB_USERNAME],
381
+                [API::AUXATTRIB_SB_USERID => API::AUXATTRIB_SB_USERNAME],
382 382
             ],
383 383
         ],
384 384
 
@@ -388,9 +388,9 @@  discard block
 block discarded – undo
388 388
             "RETVAL" => [
389 389
                 API::AUXATTRIB_TOKENURL, 
390 390
                 API::AUXATTRIB_TOKEN, 
391
-                "EMAIL SENT",             // Dependent on TARGETMAIL input.
391
+                "EMAIL SENT", // Dependent on TARGETMAIL input.
392 392
                 "EMAIL TRANSPORT SECURE", // Dependent on TARGETMAIL input.
393
-                "SMS SENT",               // Dependent on TARGETSMS input.
393
+                "SMS SENT", // Dependent on TARGETSMS input.
394 394
             ]
395 395
         ],
396 396
         API::ACTION_TOKEN_REVOKE => [
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             "REQ" => [API::AUXATTRIB_CAT_PROFILE_ID, API::AUXATTRIB_SB_USERID],
410 410
             "OPT" => [],
411 411
             "RETVAL" => [
412
-                [ API::AUXATTRIB_SB_CERTSERIAL => ["ISSUED", "EXPIRY", "STATUS", "DEVICE", "CN" ]]
412
+                [API::AUXATTRIB_SB_CERTSERIAL => ["ISSUED", "EXPIRY", "STATUS", "DEVICE", "CN"]]
413 413
             ]
414 414
         ],
415 415
         API::ACTION_CERT_REVOKE => [
@@ -546,8 +546,8 @@  discard block
 block discarded – undo
546 546
 
547 547
                 case \core\Options::TYPECODE_COORDINATES:
548 548
                     $extension = \core\Options::TYPECODE_TEXT;
549
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
550
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
549
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
550
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
551 551
                     break;
552 552
                 case \core\Options::TYPECODE_TEXT:
553 553
                 // Fall-through: they all get the same treatment.
@@ -557,18 +557,18 @@  discard block
 block discarded – undo
557 557
                 // Fall-through: they all get the same treatment.
558 558
                 case \core\Options::TYPECODE_INTEGER:
559 559
                     $extension = $optionInfo['type'];
560
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
561
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
560
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
561
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
562 562
                     if ($optionInfo['flag'] == "ML") {
563
-                        $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG'];
563
+                        $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG'];
564 564
                     }
565 565
                     break;
566 566
                 case \core\Options::TYPECODE_FILE:
567 567
                     // Binary data is expected in base64 encoding. This is true also for PEM files!
568 568
                     $extension = $optionInfo['type'];
569
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
570
-                    file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE']));
571
-                    $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension;
569
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
570
+                    file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE']));
571
+                    $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension;
572 572
                     break;
573 573
                 default:
574 574
                     throw new Exception("We don't seem to know this type code!");
Please login to merge, or discard this patch.
web/diag/findRealm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,16 +37,16 @@
 block discarded – undo
37 37
  */
38 38
 function check_my_nonce($nonce, $optSalt = '') {
39 39
     $remote = filter_input(INPUT_SERVER, 'REMOTE_ADDR');
40
-    $lasthour = date("G") - 1 < 0 ? date('Ymd') . '23' : date("YmdG") - 1;
41
-    if (hash_hmac('sha256', session_id() . $optSalt, date("YmdG") . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce ||
42
-            hash_hmac('sha256', session_id() . $optSalt, $lasthour . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce) {
40
+    $lasthour = date("G") - 1 < 0 ? date('Ymd').'23' : date("YmdG") - 1;
41
+    if (hash_hmac('sha256', session_id().$optSalt, date("YmdG").'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce ||
42
+            hash_hmac('sha256', session_id().$optSalt, $lasthour.'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce) {
43 43
         return true;
44 44
     } else {
45 45
         return false;
46 46
     }
47 47
 }
48 48
 
49
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
49
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
50 50
 
51 51
 // we are referring to $_SESSION later in the file
52 52
 CAT_session_start();
Please login to merge, or discard this patch.
web/admin/inc/manageNewInst.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $uiElements = new \web\lib\admin\UIElements();
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
 echo sprintf(_("On this page, you can add a new %s to your %s. Please fill out the form below to send out an email invitation to the new %s administrator."), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst);
59 59
 if (CONFIG['DB']['enforce-external-sync']) {
60
-    echo "<p>" . sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst) . "</p>";
61
-    echo "<p>" . sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</p>";    
60
+    echo "<p>".sprintf(_("You can either register a known %s (as defined in the %s database) or create a totally new %s."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $uiElements->nomenclatureInst)."</p>";
61
+    echo "<p>".sprintf(_("The latter one is typically for an %s which is yet in a testing phase and therefore doesn't appear in the %s database yet."), $uiElements->nomenclatureInst, CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</p>";    
62 62
 }
63 63
 ?>
64 64
 <hr/>
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
         <?php
69 69
         if (CONFIG['DB']['enforce-external-sync']) {
70 70
             echo "<tr><td>
71
-                <input type='radio' name='creation' value='existing'>" . _("Existing IdP:") . "</input>
71
+                <input type='radio' name='creation' value='existing'>" . _("Existing IdP:")."</input>
72 72
                      </td>";
73 73
 
74 74
             echo "<td colspan='2'>
75 75
                 <select id='externals' name='externals' onchange='document.sendinvite.creation[0].checked=true; document.sendinvite.mailaddr.value=this.options[this.selectedIndex].id;'>
76
-                    <option value='FREETEXT'>" . _("--- select IdP here ---") . "</option>";
76
+                    <option value='FREETEXT'>" . _("--- select IdP here ---")."</option>";
77 77
 
78 78
             foreach ($feds as $fed_value) {
79 79
                 $thefed = new \core\Federation(strtoupper($fed_value['value']));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 $entities = $thefed->listExternalEntities(TRUE, \core\Federation::EDUROAM_DB_TYPE_IDP);
83 83
 
84 84
                 foreach ($entities as $v) {
85
-                    echo "<option id='" . $v['contactlist'] . "' value='" . $v['ID'] . "'>[" . $fed_value['value'] . "] " . $v['name'] . "</option>";
85
+                    echo "<option id='".$v['contactlist']."' value='".$v['ID']."'>[".$fed_value['value']."] ".$v['name']."</option>";
86 86
                 }
87 87
             }
88 88
 
Please login to merge, or discard this patch.