@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author Stefan Winter <[email protected]> |
26 | 26 | */ |
27 | 27 | |
28 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
28 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
29 | 29 | |
30 | 30 | $auth = new \web\lib\admin\Authentication(); |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -46,18 +46,18 @@ discard block |
||
46 | 46 | |
47 | 47 | if ($submitGiven == web\lib\common\FormElements::BUTTON_SAVE) { // here we go |
48 | 48 | $fed_name = $my_fed->name; |
49 | - echo "<h1>" . sprintf(_("Submitted attributes for %s '%s'"), $uiElements->nomenclatureFed, $fed_name) . "</h1>"; |
|
49 | + echo "<h1>".sprintf(_("Submitted attributes for %s '%s'"), $uiElements->nomenclatureFed, $fed_name)."</h1>"; |
|
50 | 50 | echo "<table>"; |
51 | 51 | echo $optionParser->processSubmittedFields($my_fed, $_POST, $_FILES); |
52 | 52 | echo "</table>"; |
53 | 53 | |
54 | 54 | $loggerInstance = new \core\common\Logging(); |
55 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "FED " . $my_fed->name . " - attributes changed"); |
|
55 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "FED ".$my_fed->name." - attributes changed"); |
|
56 | 56 | |
57 | 57 | // re-instantiate ourselves... profiles need fresh data |
58 | 58 | |
59 | 59 | $my_fed = $validator->existingFederation($_GET['fed_id'], $_SESSION['user']); |
60 | 60 | |
61 | - echo "<br/><form method='post' action='overview_federation.php' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
61 | + echo "<br/><form method='post' action='overview_federation.php' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
62 | 62 | } |
63 | 63 | echo $deco->footer(); |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | $retval = "<div class='sidebar'><p>"; |
67 | 67 | |
68 | 68 | if ($advancedControls) { |
69 | - $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name'] |
|
69 | + $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name'] |
|
70 | 70 | ."<br/> |
71 | 71 | <br/> |
72 | - <a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> |
|
73 | - <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> "; |
|
72 | + <a href='" . \core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> |
|
73 | + <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> "; |
|
74 | 74 | } |
75 | - $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a> |
|
75 | + $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a> |
|
76 | 76 | </p> |
77 | 77 | </div> <!-- sidebar -->"; |
78 | 78 | \core\common\Entity::outOfThePotatoes(); |
@@ -96,23 +96,23 @@ discard block |
||
96 | 96 | <h1>$cap1</h1> |
97 | 97 | </div><!--header_captions--> |
98 | 98 | <div id='langselection' style='padding-top:20px; padding-left:10px;'> |
99 | - <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . " |
|
99 | + <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")." |
|
100 | 100 | <select id='lang' name='lang' onchange='this.form.submit()'>"; |
101 | 101 | |
102 | 102 | foreach (\config\Master::LANGUAGES as $lang => $getValue) { |
103 | - $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> "; |
|
103 | + $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> "; |
|
104 | 104 | } |
105 | 105 | $retval .= "</select>"; |
106 | 106 | |
107 | 107 | foreach ($_GET as $getVar => $getValue) { |
108 | 108 | $filterValue = filter_input(INPUT_GET, $getVar, FILTER_SANITIZE_STRING); |
109 | 109 | if ($getVar != "lang" && $getValue != "") { |
110 | - $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>"; |
|
110 | + $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>"; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | $retval .= "</form> |
114 | 114 | </div><!--langselection-->"; |
115 | - $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png"; |
|
115 | + $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png"; |
|
116 | 116 | $retval .= "<div class='consortium_logo'> |
117 | 117 | <img id='test_locate' src='$logoUrl' alt='Consortium Logo'> |
118 | 118 | </div> <!-- consortium_logo --> |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") { |
207 | 207 | $retval .= "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'> |
208 | - <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p> |
|
208 | + <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p> |
|
209 | 209 | </div><!--header_MOTD-->"; |
210 | 210 | } |
211 | 211 | $retval .= $this->sidebar($advancedControls); |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'> |
232 | 232 | <head lang='$ourlocale'> |
233 | 233 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"; |
234 | - $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php"; |
|
234 | + $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php"; |
|
235 | 235 | $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
236 | - $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>"; |
|
236 | + $retval .= "<title>".htmlspecialchars($pagetitle)."</title>"; |
|
237 | 237 | return $retval; |
238 | 238 | } |
239 | 239 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | // we may need to jump up one dir if we are either in admin/ or accountstatus/ |
248 | 248 | // (accountstatus courtesy of my good mood. It's userspace not admin space so |
249 | 249 | // it shouldn't be using this function any more.) |
250 | - $logoBase = \core\CAT::getRootUrlPath() . "/resources/images"; |
|
250 | + $logoBase = \core\CAT::getRootUrlPath()."/resources/images"; |
|
251 | 251 | return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/> |
252 | 252 | <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span> |
253 | 253 | <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>"; |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | <table style='width:100%'> |
270 | 270 | <tr> |
271 | 271 | <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'> |
272 | - " . $cat->catCopyright . "</td>"; |
|
272 | + " . $cat->catCopyright."</td>"; |
|
273 | 273 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
274 | - $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>"; |
|
274 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>"; |
|
275 | 275 | } |
276 | 276 | $retval .= " <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>"; |
277 | 277 |
@@ -19,7 +19,7 @@ discard block |
||
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 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | // contains port number; needs to be redacted for filter_var to work |
72 | 72 | // in any case, it's a printable string, so filter it initially |
73 | 73 | |
74 | - $filteredHost = filter_input(INPUT_GET,'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST,'src', FILTER_SANITIZE_STRING); |
|
74 | + $filteredHost = filter_input(INPUT_GET, 'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'src', FILTER_SANITIZE_STRING); |
|
75 | 75 | $hostonly1 = preg_replace('/:[0-9]*$/', "", $filteredHost); |
76 | 76 | $hostonly2 = preg_replace('/^\[/', "", $hostonly1); |
77 | 77 | $hostonly3 = preg_replace('/\]$/', "", $hostonly2); |
@@ -147,10 +147,10 @@ discard block |
||
147 | 147 | break; |
148 | 148 | case \core\common\Entity::L_REMARK: |
149 | 149 | case \core\common\Entity::L_WARN: |
150 | - $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
150 | + $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
151 | 151 | break; |
152 | 152 | case \core\common\Entity::L_ERROR: |
153 | - $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
|
153 | + $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level]; |
|
154 | 154 | break; |
155 | 155 | } |
156 | 156 | break; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT: |
202 | 202 | $level = $returnarray['result'][$i]['level']; |
203 | 203 | if ($level > \core\common\Entity::L_OK) { |
204 | - $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level]; |
|
204 | + $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level]; |
|
205 | 205 | } else { |
206 | 206 | $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned."); |
207 | 207 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $level = \core\common\Entity::L_ERROR; |
225 | 225 | break; |
226 | 226 | } |
227 | - $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n"); |
|
227 | + $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n"); |
|
228 | 228 | $returnarray['result'][$i]['level'] = $level; |
229 | 229 | $returnarray['result'][$i]['message'] = $message; |
230 | 230 | break; |
@@ -238,13 +238,13 @@ discard block |
||
238 | 238 | if (isset($rfc6614suite->TLS_CA_checks_result[$host])) { |
239 | 239 | $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']); |
240 | 240 | if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) { |
241 | - $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
241 | + $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).' ms)'; |
|
242 | 242 | $returnarray['level'] = \core\common\Entity::L_ERROR; |
243 | 243 | } else { |
244 | 244 | $returnarray['message'] = $rfc6614suite->returnCodes[$rfc6614suite->TLS_CA_checks_result[$host]['status']]["message"]; |
245 | 245 | $returnarray['level'] = \core\common\Entity::L_OK; |
246 | 246 | if ($rfc6614suite->TLS_CA_checks_result[$host]['status'] != \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) { |
247 | - $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
247 | + $returnarray['message'] .= ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).' ms)'; |
|
248 | 248 | } else { |
249 | 249 | $returnarray['level'] = \core\common\Entity::L_ERROR; |
250 | 250 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @return boolean |
37 | 37 | */ |
38 | 38 | |
39 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
39 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
40 | 40 | |
41 | 41 | // we are referring to $_SESSION later in the file |
42 | 42 | \core\CAT::sessionStart(); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | otherdata = j.otherdata; |
84 | 84 | if(! result) { |
85 | 85 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found"))?>"); |
86 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
86 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
87 | 87 | } |
88 | 88 | j = j.data; |
89 | 89 | n = j.length; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | result = j1.status; |
221 | 221 | if(! result) { |
222 | 222 | alert("<?php $cat->javaScriptEscapedEcho(_("no matching data found")) ?>"); |
223 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/' ?>'; |
|
223 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/' ?>'; |
|
224 | 224 | } |
225 | 225 | j = j1.data; |
226 | 226 | if(j.description !== undefined && j.description) { |
@@ -60,11 +60,11 @@ discard block |
||
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\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ') . "</div>"; |
|
67 | + $retval .= "<div id='motd'>".(isset(\config\Master::APPEARANCE['MOTD']) ? \config\Master::APPEARANCE['MOTD'] : ' ')."</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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
365 | 365 | </td>"; |
366 | 366 | |
367 | 367 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
368 | - $retval .= "<td><a href='" . \config\Master::APPEARANCE['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>"; |
|
368 | + $retval .= "<td><a href='".\config\Master::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") { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private function inputValidationError($customtext) { |
40 | 40 | \core\common\Entity::intoThePotatoes(); |
41 | - $retval = "<p>" . _("Input validation error: ") . $customtext . "</p>"; |
|
41 | + $retval = "<p>"._("Input validation error: ").$customtext."</p>"; |
|
42 | 42 | \core\common\Entity::outOfThePotatoes(); |
43 | 43 | return $retval; |
44 | 44 | } |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | */ |
438 | 438 | public function hostname($input) { |
439 | 439 | // is it a valid IP address (IPv4 or IPv6), or a hostname? |
440 | - if (filter_var($input, FILTER_VALIDATE_IP) || $this->email("stefan@" . $input) !== FALSE) { |
|
440 | + if (filter_var($input, FILTER_VALIDATE_IP) || $this->email("stefan@".$input) !== FALSE) { |
|
441 | 441 | // if it's a verified IP address or hostname then it does not contain |
442 | 442 | // rubbish of course. But just to be sure, run htmlspecialchars around it |
443 | 443 | return htmlspecialchars($input, ENT_QUOTES); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | try { |
517 | 517 | $image->readImageBlob($binary); |
518 | 518 | } catch (\ImagickException $exception) { |
519 | - echo "Error" . $exception->getMessage(); |
|
519 | + echo "Error".$exception->getMessage(); |
|
520 | 520 | return FALSE; |
521 | 521 | } |
522 | 522 | // image survived the sanity check |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | parent::__construct(); |
104 | 104 | common\Entity::intoThePotatoes(); |
105 | 105 | |
106 | - $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>") . "</a>"; |
|
106 | + $this->catVersionString = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>"; |
|
107 | 107 | if (CAT::RELEASE_VERSION) { |
108 | 108 | $major = CAT::VERSION_MAJOR; |
109 | 109 | $minor = CAT::VERSION_MINOR; |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | if (CAT::VERSION_EXTRA != "") { |
118 | 118 | $temp_version .= "-$extra"; |
119 | 119 | } |
120 | - $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version); |
|
120 | + $this->catVersionString = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version); |
|
121 | 121 | } |
122 | 122 | $product = \config\Master::APPEARANCE['productname']; |
123 | 123 | $minYear = self::COPYRIGHT_MIN_YEAR; |
124 | 124 | $maxYear = self::COPYRIGHT_MAX_YEAR; |
125 | 125 | $holder = self::COPYRIGHT_HOLDER; |
126 | 126 | $consortia = self::COPYRIGHT_CONSORTIA; |
127 | - $this->catCopyright = "$product - " . $this->catVersionString . " © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
127 | + $this->catCopyright = "$product - ".$this->catVersionString." © $minYear-$maxYear $holder<br/>on behalf of $consortia; and others <a href='copyright.php'>Full Copyright and Licenses</a>"; |
|
128 | 128 | |
129 | 129 | |
130 | 130 | /* Federations are created in DB with bootstrapFederation, and listed via listFederations |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | * @return \core\ExternalEduroamDBData|\core\ExternalNothing |
617 | 617 | */ |
618 | 618 | public static function determineExternalConnection() { |
619 | - if(\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { |
|
619 | + if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { |
|
620 | 620 | return new ExternalEduroamDBData(); |
621 | 621 | } |
622 | 622 | return new ExternalNothing(); |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | case "EXTERNAL": |
61 | 61 | case "FRONTEND": |
62 | 62 | case "DIAGNOSTICS": |
63 | - if (!isset(self::${"instance" . $theDb})) { |
|
63 | + if (!isset(self::${"instance".$theDb})) { |
|
64 | 64 | $class = __CLASS__; |
65 | - self::${"instance" . $theDb} = new $class($database); |
|
66 | - DBConnection::${"instance" . $theDb}->databaseInstance = $theDb; |
|
65 | + self::${"instance".$theDb} = new $class($database); |
|
66 | + DBConnection::${"instance".$theDb}->databaseInstance = $theDb; |
|
67 | 67 | } |
68 | - return self::${"instance" . $theDb}; |
|
68 | + return self::${"instance".$theDb}; |
|
69 | 69 | default: |
70 | - throw new Exception("This type of database (" . strtoupper($database) . ") is not known!"); |
|
70 | + throw new Exception("This type of database (".strtoupper($database).") is not known!"); |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
@@ -106,18 +106,18 @@ discard block |
||
106 | 106 | } |
107 | 107 | } |
108 | 108 | // log exact query to debug log, if log level is at 5 |
109 | - $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n"); |
|
109 | + $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n"); |
|
110 | 110 | if ($types !== NULL) { |
111 | - $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true)); |
|
111 | + $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true)); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | if ($this->connection->connect_error) { |
115 | - throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!"); |
|
115 | + throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!"); |
|
116 | 116 | } |
117 | 117 | if ($types === NULL) { |
118 | 118 | $result = $this->connection->query($querystring); |
119 | 119 | if ($result === FALSE) { |
120 | - throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--"); |
|
120 | + throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--"); |
|
121 | 121 | } |
122 | 122 | } else { |
123 | 123 | // fancy! prepared statement with dedicated argument list |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | $prepResult = $statementObject->prepare($querystring); |
135 | 135 | if ($prepResult === FALSE) { |
136 | - throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--."); |
|
136 | + throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--."); |
|
137 | 137 | } |
138 | 138 | $this->preparedStatements[$querystring] = $statementObject; |
139 | 139 | } |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | array_unshift($localArray, $types); |
147 | 147 | $retval = call_user_func_array([$statementObject, "bind_param"], $localArray); |
148 | 148 | if ($retval === FALSE) { |
149 | - throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--"); |
|
149 | + throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--"); |
|
150 | 150 | } |
151 | 151 | $result = $statementObject->execute(); |
152 | 152 | if ($result === FALSE) { |
153 | - throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--"); |
|
153 | + throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--"); |
|
154 | 154 | } |
155 | 155 | $selectResult = $statementObject->get_result(); |
156 | 156 | if ($selectResult !== FALSE) { |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | |
161 | 161 | // all cases where $result could be FALSE have been caught earlier |
162 | 162 | if ($this->connection->errno) { |
163 | - throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!"); |
|
163 | + throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!"); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | |
167 | 167 | if ($isMoreThanSelect) { |
168 | - $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring); |
|
168 | + $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring); |
|
169 | 169 | if ($types !== NULL) { |
170 | - $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true)); |
|
170 | + $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true)); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | return $result; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $databaseCapitalised = strtoupper($database); |
253 | 253 | $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']); |
254 | 254 | if ($this->connection->connect_error) { |
255 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
255 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
256 | 256 | } |
257 | 257 | $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly']; |
258 | 258 | } |