Passed
Push — master ( a7aa10...668d26 )
by Tomasz
07:06
created
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\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp' ) . '</div>';
44
-        print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), \config\Main::APPEARANCE['productname']) . '</h1>
45
-<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Main::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\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp').'</div>';
44
+        print '<h1 style="padding-bottom:0px; height:1em;">'.sprintf(_("Welcome to %s"), \config\Main::APPEARANCE['productname']).'</h1>
45
+<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Main::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\Main::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/tou.php 1 patch
Spacing   +8 added lines, -8 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\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
54
+        <div id="motd"><?php print (isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp'); ?></div>
55 55
 
56
-        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']) . '?lang=' . $langObject->getLang(); ?>"><?php echo \config\Main::APPEARANCE['productname']; ?></a></h1>
56
+        <h1><a href="<?php echo dirname($_SERVER['SCRIPT_NAME']).'?lang='.$langObject->getLang(); ?>"><?php echo \config\Main::APPEARANCE['productname']; ?></a></h1>
57 57
         <div id="tou">
58 58
             <?php
59 59
             require "user/tou.php";
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
         </div>
62 62
         <div>
63 63
             <table style='width:100%'>
64
-                <caption><?php echo "Legalese";?></caption>
64
+                <caption><?php echo "Legalese"; ?></caption>
65 65
                 <tr>
66
-                    <th class='wai-invisible' scope='col'><?php echo "Copyright";?></th>
67
-                    <th class='wai-invisible' scope='col'><?php echo "Privacy Notice";?></th>
68
-                    <th class='wai-invisible' scope='col'><?php echo "Attribution";?></th>
66
+                    <th class='wai-invisible' scope='col'><?php echo "Copyright"; ?></th>
67
+                    <th class='wai-invisible' scope='col'><?php echo "Privacy Notice"; ?></th>
68
+                    <th class='wai-invisible' scope='col'><?php echo "Attribution"; ?></th>
69 69
                 </tr>
70 70
                 <tr>
71 71
                     <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'>
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                     </td>
74 74
                     <?php
75 75
                     if (!empty(\config\Main::APPEARANCE['privacy_notice_url'])) {
76
-                        $retval .= "<td><a href='".\config\Main::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['name']) . "</a></td>";
76
+                        $retval .= "<td><a href='".\config\Main::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['name'])."</a></td>";
77 77
                     }
78 78
                     ?>
79 79
                     <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>
Please login to merge, or discard this patch.
web/404.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
 $langObject = new \core\common\Language();
31 31
 $langObject->setTextDomain("web_user");
32 32
 
@@ -38,25 +38,25 @@  discard block
 block discarded – undo
38 38
 <body style='background: #fff url(resources/images/bg_grey_tile.png) repeat-x;'>
39 39
     <div id="heading">
40 40
         <?php
41
-        print '<img src="'. dirname($_SERVER['SCRIPT_NAME']) .'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
42
-        print '<div id="motd">' . ( isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp' ) . '</div>';
43
-        print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), \config\Main::APPEARANCE['productname']) . '</h1>
44
-<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Main::APPEARANCE['productname_long'] . '</h2>';
41
+        print '<img src="'.dirname($_SERVER['SCRIPT_NAME']).'/resources/images/consortium_logo.png" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>';
42
+        print '<div id="motd">'.(isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp').'</div>';
43
+        print '<h1 style="padding-bottom:0px; height:1em;">'.sprintf(_("Welcome to %s"), \config\Main::APPEARANCE['productname']).'</h1>
44
+<h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . \config\Main::APPEARANCE['productname_long'].'</h2>';
45 45
         echo '<table id="lang_select"><tr><td>';
46 46
         echo _("View this page in");
47 47
         ?>
48 48
         <?php
49 49
         foreach (\config\Main::LANGUAGES as $lang => $value) {
50
-            echo "<a href='javascript:changeLang(\"$lang\")'>" . $value['display'] . "</a> ";
50
+            echo "<a href='javascript:changeLang(\"$lang\")'>".$value['display']."</a> ";
51 51
         }
52
-        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>';
52
+        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 53
         ?>
54 54
     </div> <!-- id="heading" -->
55 55
     <div id="main_body" style='padding:20px;'>
56
-        <h1><?php echo _("This is not the CAT you are looking for.");?></h1>
57
-        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number");?></p>
56
+        <h1><?php echo _("This is not the CAT you are looking for."); ?></h1>
57
+        <p><?php echo _("Whatever you expected to see at this URL - it's not here. The only thing here is the number"); ?></p>
58 58
         <h2>404</h2>
59
-        <p><?php echo sprintf(_("staring at you. 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>
59
+        <p><?php echo sprintf(_("staring at you. 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 60
     </div> <!-- id="main_body" -->
61 61
 
62 62
         <?php echo $deco->footer();
Please login to merge, or discard this patch.
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\Main::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/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\Main::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.
web/skins/modern/copyright.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 <head>
25 25
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
26 26
 <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" />
27
-<title><?php echo config\Main::APPEARANCE['productname'];?> Copyright and Licensing</title>
27
+<title><?php echo config\Main::APPEARANCE['productname']; ?> Copyright and Licensing</title>
28 28
 </head>
29 29
 <body>
30 30
 <div id="wrap">
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             <div id="user_page" style="display:block">
36 36
                 <?php echo $divs->divPagetitle(config\Main::APPEARANCE['productname']." Copyright and Licensing", ""); ?>
37 37
                 <div style="padding:20px">
38
-            <?php require dirname(dirname(__DIR__)) . "/copyright.inc.php"; ?>
38
+            <?php require dirname(dirname(__DIR__))."/copyright.inc.php"; ?>
39 39
                 </div>
40 40
             </div>
41 41
         </div>
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png");
61 61
         if ($location !== FALSE) {
62 62
             $retval .= "<div id='cat_logo'>
63
-            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
63
+            <a href='" . \config\ConfAssistant::CONSORTIUM['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a>
64 64
             <span>Configuration Assistant Tool</span>
65 65
             </div>";
66 66
         }
67
-        $retval .= "<div id='motd'>" . (isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp') . "</div>";
67
+        $retval .= "<div id='motd'>".(isset(\config\Main::APPEARANCE['MOTD']) ? \config\Main::APPEARANCE['MOTD'] : '&nbsp')."</div>";
68 68
         $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png");
69 69
         if ($loc2 !== FALSE) {
70 70
             $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>";
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     public function divUserWelcome() {
88 88
         $retval = "
89 89
 <div id='user_welcome'> <!-- this information is shown just before the download -->
90
-    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong>
90
+    <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong>
91 91
     <p>
92 92
     <span id='download_info'>
93 93
     <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime -->
94
-        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . "
94
+        " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]."
95 95
     </span>
96
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . "
96
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]."
97 97
     <br/>
98 98
     <br/>";
99 99
         switch (\config\ConfAssistant::CONSORTIUM['name']) {
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         }
105 105
         $retval .= "
106 106
     </p>
107
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . "
108
-    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . "
107
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]."
108
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]."
109 109
     </p>
110 110
     <p>
111
-    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a>
111
+    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a>
112 112
     </p>
113 113
 </div> <!-- id='user_welcomer_page' -->
114 114
 ";
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function divSilverbullet() {
124 124
         $retval = "
125 125
 <div id='silverbullet'>"
126
-                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
126
+                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY].
127 127
                 "</div>
128 128
     ";
129 129
         return $retval;
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
     public function divTopWelcome() {
138 138
         $retval = '';
139 139
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
140
-            $retval = "<br><div id='top_invite_ad'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD] . "</div>";
140
+            $retval = "<br><div id='top_invite_ad'>".$this->Gui->textTemplates->templates[user\FRONTPAGE_EDUROAM_AD]."</div>";
141 141
         }
142 142
         return "
143 143
 <div id='welcome_top1'>
144
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . "
144
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]."
145 145
 </div>
146 146
 <div id='top_invite'>
147
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . "
147
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval."
148 148
 </div>";
149 149
     }
150 150
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $retval = "
158 158
 <div id='roller'>
159 159
     <div id='slides'>
160
-        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span>
160
+        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
161 161
         <span id='line2'></span>
162 162
         <span id='line3'></span>
163 163
         <span id='line4'>";
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
     public function divProfiles() {
220 220
         return "
221 221
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
222
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
222
+    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
223 223
     </div>" .
224
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
224
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
225 225
                 "</div>";
226 226
     }
227 227
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     public function divInstitution($selectButton = TRUE) {
250 250
         $retval = "<div id='institution_name'>
251 251
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
252
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") .
252
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
253 253
                 "</div>";
254 254
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
255 255
         return $retval;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     public function divOtherinstallers() {
274 274
         $retval = "
275 275
 <div class='sub_h'>
276
-    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
276
+    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
277 277
          <table id='device_list' style='padding:0px;'>";
278 278
 
279 279
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -281,18 +281,18 @@  discard block
 block discarded – undo
281 281
             $deviceIndex = 0;
282 282
 
283 283
             $imgTag = "";
284
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
284
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
285 285
             if ($imgLocation !== FALSE) {
286
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
286
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
287 287
             }
288
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
288
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
289 289
             foreach ($deviceGroup as $d => $D) {
290 290
                 if ($deviceIndex) {
291 291
                     $retval .= '<tr>';
292 292
                 }
293
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
294
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
295
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
293
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
294
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
295
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
296 296
                 $deviceIndex++;
297 297
             }
298 298
             $retval .= "</tbody>";
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
      * @return string
313 313
      */
314 314
     public function divGuessOs($operatingSystem) {
315
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
315
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
316 316
         $vendorstyle = "";
317 317
         if ($vendorlogo !== FALSE) {
318
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
318
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
319 319
         }
320 320
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
321 321
         $deleteImg = "";
322 322
         if ($deleteIcon !== FALSE) {
323
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
323
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
324 324
         }
325 325
         return "
326 326
 <div class='sub_h' id='guess_os'>
@@ -328,23 +328,23 @@  discard block
 block discarded – undo
328 328
     <table id='browser'>
329 329
         <tr>
330 330
             <td>
331
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
331
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
332 332
                     $deleteImg
333
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
333
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
334 334
                     </div>
335 335
                     <div class='download_button_text'>" .
336
-                $operatingSystem['display'] . "
336
+                $operatingSystem['display']."
337 337
                     </div>
338 338
                 </button>
339
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
339
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
340 340
           </td>
341 341
           <td style='vertical-align:top'>
342
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
342
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
343 343
           </td>
344 344
       </tr>
345 345
     </table> <!-- id='browser' -->
346 346
     <div class='sub_h'>
347
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
347
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
348 348
     </div>
349 349
 </div> <!-- id='guess_os' -->";
350 350
     }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
             </td>";
366 366
 
367 367
         if (!empty(\config\Main::APPEARANCE['privacy_notice_url'])) {
368
-            $retval .= "<td><a href='" . \config\Main::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
368
+            $retval .= "<td><a href='".\config\Main::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
369 369
         }
370 370
         $retval .= "<td>";
371 371
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.
web/admin/edit_profile.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 ?>
29 29
 <?php
30
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
30
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
31 31
 
32 32
 $deco = new \web\lib\admin\PageDecoration();
33 33
 $validator = new \web\lib\common\InputValidation();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     <?php
128 128
     echo $uiElements->instLevelInfoBoxes($my_inst);
129 129
 
130
-    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&amp;profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'>
131
-                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Main::MAX_UPLOAD_SIZE . "'>";
130
+    echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&amp;profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'>
131
+                <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Main::MAX_UPLOAD_SIZE."'>";
132 132
     $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE);
133 133
     ?>
134 134
     <fieldset class="option_container">
@@ -137,29 +137,29 @@  discard block
 block discarded – undo
137 137
         </legend>
138 138
         <?php
139 139
         if ($wizardStyle) {
140
-            echo "<p>" . _("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>";
140
+            echo "<p>"._("We will now define a profile for your user group(s).  You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>";
141 141
         }
142 142
         ?>
143 143
         <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3>
144 144
         <?php
145 145
         if ($wizardStyle) {
146
-            echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>";
147
-            echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>";
148
-            echo "<p>" . _("You can also tell us your RADIUS realm. ");
146
+            echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>";
147
+            echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>";
148
+            echo "<p>"._("You can also tell us your RADIUS realm. ");
149 149
             if (\config\Main::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
150 150
                 printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']);
151 151
             }
152
-            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>";
152
+            echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>";
153 153
         }
154 154
 
155 155
         echo $optionDisplay->prefilledOptionTable("profile");
156 156
         ?>
157 157
         <button type='button' class='newoption' onclick='getXML("profile")'><?php echo _("Add new option"); ?></button>
158 158
         <table>
159
-            <caption><?php echo _("Basic Realm Information");?></caption>
159
+            <caption><?php echo _("Basic Realm Information"); ?></caption>
160 160
             <tr>
161
-                <th class="wai-invisible" scope="col"><?php echo _("Realm:");?></th>
162
-                <th class="wai-invisible" scope="col"><?php echo _("Realm input field");?></th>
161
+                <th class="wai-invisible" scope="col"><?php echo _("Realm:"); ?></th>
162
+                <th class="wai-invisible" scope="col"><?php echo _("Realm input field"); ?></th>
163 163
             </tr>
164 164
             <?php
165 165
             ?>
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 
205 205
         <?php
206 206
         if ($wizardStyle) {
207
-            echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>";
208
-            echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>";
209
-            echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>";
207
+            echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>";
208
+            echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>";
209
+            echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>";
210 210
         }
211 211
         ?>
212 212
         <p>
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 
215 215
             <!-- UI table to align elements-->
216 216
         <table>
217
-            <caption><?php echo _("Username Handling Options");?></caption>
217
+            <caption><?php echo _("Username Handling Options"); ?></caption>
218 218
             <tr>
219
-                <th class="wai-invisible" scope="col"><?php echo _("Option name");?></th>
220
-                <th class="wai-invisible" scope="col"><?php echo _("Option checkbox");?></th>
219
+                <th class="wai-invisible" scope="col"><?php echo _("Option name"); ?></th>
220
+                <th class="wai-invisible" scope="col"><?php echo _("Option checkbox"); ?></th>
221 221
             </tr>
222 222
 
223 223
             <tr>
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
                 </td>
230 230
                 <td>
231 231
                     <input type='checkbox' <?php
232
-                    echo ($verify != FALSE ? "checked" : "" );
232
+                    echo ($verify != FALSE ? "checked" : "");
233 233
                     ?> name='verify_support' onclick='
234 234
                             if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) {
235 235
                                 this.form.elements["hint_support"].setAttribute("disabled", "disabled");
@@ -237,48 +237,48 @@  discard block
 block discarded – undo
237 237
                                 this.form.elements["hint_support"].removeAttribute("disabled");
238 238
                             }
239 239
                             ;'/>
240
-                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
240
+                    <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
241 241
                         <?php echo _("Prefill user input with realm suffix:"); ?>
242 242
                     </span>
243
-                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> />
243
+                    <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> />
244 244
                 </td>
245 245
             </tr>
246 246
             <tr>
247 247
 
248 248
                 <!-- checkbox and input field for anonymity support, available only when realm is known-->
249 249
                 <td>
250
-                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
250
+                    <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
251 251
                         <?php echo _("Enable Anonymous Outer Identity:"); ?>
252 252
                     </span>
253 253
                 </td>
254 254
                 <td>
255
-                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick='
255
+                    <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick='
256 256
                             if (this.form.elements["anon_support"].checked !== true) {
257 257
                                 this.form.elements["anon_local"].setAttribute("disabled", "disabled");
258 258
                             } else {
259 259
                                 this.form.elements["anon_local"].removeAttribute("disabled");
260 260
                             }
261 261
                             ;'/>
262
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
262
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/>
263 263
                 </td>    
264 264
             </tr>
265 265
             <tr>
266 266
 
267 267
                 <!-- checkbox and input field for check realm outer id, available only when realm is known-->
268 268
                 <td>
269
-                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'>
269
+                    <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'>
270 270
                         <?php echo _("Use special Outer Identity for realm checks:"); ?>
271 271
                     </span>
272 272
                 </td>
273 273
                 <td>
274
-                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick='
274
+                    <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick='
275 275
                             if (this.form.elements["checkuser_support"].checked !== true) {
276 276
                                 this.form.elements["checkuser_local"].setAttribute("disabled", "disabled");
277 277
                             } else {
278 278
                                 this.form.elements["checkuser_local"].removeAttribute("disabled");
279 279
                             }
280 280
                             ;'/>
281
-                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
281
+                    <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/>
282 282
                 </td>
283 283
             </tr>
284 284
         </table>
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 
289 289
     <?php
290 290
     if ($wizardStyle) {
291
-        echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>";
291
+        echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>";
292 292
     }
293 293
     ?>
294 294
     <p>
295 295
 
296 296
         <?php
297
-        echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span>
298
-                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick='
297
+        echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span>
298
+                          <input type='checkbox'  name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick='
299 299
                               if (this.form.elements[\"redirect\"].checked != true) {
300 300
                                 this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\");
301 301
                               } else {
302 302
                                 this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\");
303 303
                               };'/>
304
-                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>";
304
+                          <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>";
305 305
         ?>
306 306
     </p>
307 307
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend>
311 311
     <?php
312 312
     if ($wizardStyle) {
313
-        echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>";
313
+        echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>";
314 314
     }
315 315
     ?>
316 316
     <?php
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     ?>
335 335
     <div>
336 336
         <table style="border:none">
337
-            <caption><?php echo _("EAP type support");?></caption>
337
+            <caption><?php echo _("EAP type support"); ?></caption>
338 338
             <tr>
339 339
                 <th scope="row" style="vertical-align:top; padding:1em">
340 340
                     <?php echo _('Supported EAP types for this profile'); ?>
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                         <?php
345 345
                         $D = [];
346 346
                         foreach ($prefill_methods as $prio => $value) {
347
-                            print '<li>' . $value->getPrintableRep() . "</li>\n";
347
+                            print '<li>'.$value->getPrintableRep()."</li>\n";
348 348
                             $D[$value->getPrintableRep()] = $prio;
349 349
                         }
350 350
                         ?>
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                             }
371 371
                             $display = $a->getPrintableRep();
372 372
                             if (!isset($D[$a->getPrintableRep()])) {
373
-                                print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n";
373
+                                print '<li class="eap1">'.$a->getPrintableRep()."</li>\n";
374 374
                             }
375 375
                         }
376 376
                         ?>
@@ -383,8 +383,8 @@  discard block
 block discarded – undo
383 383
     foreach ($methods as $a) {
384 384
         $display = $a->getPrintableRep();
385 385
         $v = isset($D[$display]) ? $D[$display] : '';
386
-        print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">';
387
-        print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">';
386
+        print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">';
387
+        print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">';
388 388
     }
389 389
     ?>
390 390
     <br style="clear:both;" />
@@ -404,11 +404,11 @@  discard block
 block discarded – undo
404 404
 foreach ($optionsAlreadySet as $optionNames) {
405 405
     if (preg_match("/^support:/", $optionNames)) {
406 406
         $has_support_options[$optionNames] = "SET";
407
-        $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
407
+        $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
408 408
     }
409 409
     if (preg_match("/^media:/", $optionNames)) {
410 410
         $has_media_options[$optionNames] = "SET";
411
-        $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>";
411
+        $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>";
412 412
     }
413 413
 }
414 414
 $fields = [
@@ -417,22 +417,22 @@  discard block
 block discarded – undo
417 417
     "media" => _("Media Properties for this profile")];
418 418
 
419 419
 foreach ($fields as $name => $description) {
420
-    echo "<fieldset class='option_container' id='" . $name . "_override'>
420
+    echo "<fieldset class='option_container' id='".$name."_override'>
421 421
     <legend><strong>$description</strong></legend>
422 422
     <p>";
423 423
 
424
-    if (count(${"has_" . $name . "_options"}) > 0) {
425
-        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>");
424
+    if (count(${"has_".$name."_options"}) > 0) {
425
+        printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>");
426 426
     }
427 427
 
428 428
     echo "</p>";
429 429
     echo $optionDisplay->prefilledOptionTable($name);
430
-    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>" . _("Add new option") . "</button>";
430
+    echo "<button type='button' class='newoption' onclick='getXML(\"$name\")'>"._("Add new option")."</button>";
431 431
     echo "</fieldset>";
432 432
 }
433 433
 
434 434
 if ($wizardStyle) {
435
-    echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>";
435
+    echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>";
436 436
 }
437
-echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>";
437
+echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_idp.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>";
438 438
 echo $deco->footer();
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     <div class="infobox">
51 51
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
52 52
         <table>
53
-            <caption><?php echo $tablecaption;?></caption>
53
+            <caption><?php echo $tablecaption; ?></caption>
54 54
             <tr>
55
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
56
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
57
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
55
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
56
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
57
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
58 58
             </tr>            
59 59
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
60 60
             <tr>
61 61
                 <td>
62
-                    <?php echo "" . _("Unique Identifier") ?>
62
+                    <?php echo ""._("Unique Identifier") ?>
63 63
                 </td>
64 64
                 <td>
65 65
                 </td>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     $mgmt = new \core\UserManagement();
75 75
 
76 76
     if (!$user->isFederationAdmin()) {
77
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
77
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
78 78
         echo $deco->footer();
79 79
         exit(0);
80 80
     }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
89 89
             </h2>
90 90
             <table>
91
-            <caption><?php echo $tablecaption2;?></caption>
91
+            <caption><?php echo $tablecaption2; ?></caption>
92 92
             <tr>
93
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
94
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
95
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
93
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
94
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
95
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
96 96
             </tr>
97 97
                 <!-- fed properties -->
98 98
                 <tr>
99 99
                     <td>
100
-                        <?php echo "" . _("Country") ?>
100
+                        <?php echo ""._("Country") ?>
101 101
                     </td>
102 102
                     <td>
103 103
                     </td>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                     default:
179 179
                         throw new Exception("Error: unknown encryption status of invitation!?!");
180 180
                 }
181
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
181
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
182 182
                 break;
183 183
             case "FAILURE":
184 184
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     default:
199 199
                         throw new Exception("Error: unknown encryption status of invitation!?!");
200 200
                 }
201
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
201
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
202 202
                 break;
203 203
             case "INVALIDSYNTAX":
204 204
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -214,27 +214,27 @@  discard block
 block discarded – undo
214 214
     } else {
215 215
         $link = 'http://';
216 216
     }
217
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
217
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
218 218
     $link = htmlspecialchars($link);
219 219
     if (\config\Main::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Main::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
220 220
         echo "<table><tr>
221
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst) . "</td>
221
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureInst)."</td>
222 222
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
223 223
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
224
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
224
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
225 225
                             </form>
226 226
                         </td>
227 227
                     </tr>
228 228
                     </table>";
229 229
     }
230 230
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
231
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
231
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
232 232
     } else {
233 233
         $helptext = "";
234 234
     }
235 235
     ?>
236 236
     <table class='user_overview' style='border:0px;'>
237
-        <caption><?php echo _("Participant Details");?></caption>
237
+        <caption><?php echo _("Participant Details"); ?></caption>
238 238
         <tr>
239 239
             <th scope='col'><?php echo _("Deployment Status"); ?></th>
240 240
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureInst); ?></th>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $pending_invites = $mgmt->listPendingInvitations();
244 244
 
245 245
             if (\config\Main::DB['enforce-external-sync']) {
246
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
246
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
247 247
             }
248 248
             ?>
249 249
             <th scope='col'>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         foreach ($feds as $onefed) {
259 259
             $thefed = new \core\Federation(strtoupper($onefed['value']));
260 260
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
261
-            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
261
+            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
262 262
 
263 263
             // extract only pending invitations for *this* fed
264 264
             $display_pendings = FALSE;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 // deployment status; need to dive into profiles for this
284 284
                 // show happy eyeballs if at least one profile is configured/showtime                    
285 285
                 echo "<td>";
286
-                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" );
286
+                echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "");
287 287
                 echo "</td>";
288 288
                 // name; and realm of silverbullet profiles if any
289 289
                 // instantiating all profiles is costly, so we only do this if
@@ -297,23 +297,23 @@  discard block
 block discarded – undo
297 297
                     }
298 298
                 }
299 299
                 echo "<td style='vertical-align:top;'>
300
-                         <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . "
300
+                         <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")."
301 301
                       </td>";
302 302
                 // external DB sync, if configured as being necessary
303 303
                 if (\config\Main::DB['enforce-external-sync']) {
304 304
                     echo "<td style='display: ruby;'>";
305 305
                     if ($readonly === FALSE) {
306
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
-                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>&nbsp;&nbsp;";
306
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
307
+                                    <button type='submit'>" . _("Manage DB Link")."</button></form>&nbsp;&nbsp;";
308 308
                     }
309 309
                     switch ($idp_instance->getExternalDBSyncState()) {
310 310
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING:
311 311
                             break;
312 312
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED:
313
-                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
313
+                            echo "<div class='acceptable'>"._("Linked")."</div>";
314 314
                             break;
315 315
                         case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED:
316
-                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>";
316
+                            echo "<div class='notacceptable'>"._("NOT linked")."</div>";
317 317
 
318 318
 
319 319
                             break;
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 echo "<td style='vertical-align: top;'>";
327 327
                 if ($readonly === FALSE) {
328 328
                     echo "<div style='white-space: nowrap;'>
329
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
329
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
330 330
                                       <button type='submit'>" .
331
-                    _("Add/Remove Administrators") . "
331
+                    _("Add/Remove Administrators")."
332 332
                                       </button>
333 333
                                   </form>
334 334
                                 </div>";
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 echo "<tr>
342 342
                             <td colspan='2'>
343 343
                                <strong>" .
344
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
344
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
345 345
                                </strong>
346 346
                             </td>
347 347
                          </tr>";
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
350 350
                         echo "<tr>
351 351
                                     <td>" .
352
-                        $oneinvite['name'] . "
352
+                        $oneinvite['name']."
353 353
                                     </td>
354 354
                                     <td>" .
355
-                        $oneinvite['mail'] . "
355
+                        $oneinvite['mail']."
356 356
                                     </td>
357 357
                                     <td colspan=2>";
358 358
                         if ($readonly === FALSE) {
359 359
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
360
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
361
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
360
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
361
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
362 362
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
363 363
                             . "</form>";
364 364
                         }
Please login to merge, or discard this patch.