@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | #private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
25 | 25 | |
26 | 26 | |
27 | - private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | - private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | - private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
27 | + private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | + private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | + private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
30 | 30 | private const EDUPKI_RA_ID = 700; |
31 | 31 | private const EDUPKI_CERT_PROFILE = "Radius Server SOAP"; |
32 | 32 | private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | parent::__construct(); |
43 | 43 | |
44 | 44 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_CERT) === FALSE) { |
45 | - throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
45 | + throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
46 | 46 | } |
47 | 47 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_KEY) === FALSE) { |
48 | - throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
48 | + throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
49 | 49 | } |
50 | 50 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_WEBROOT) === FALSE) { |
51 | - throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
51 | + throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
@@ -106,22 +106,22 @@ discard block |
||
106 | 106 | // initialise connection to eduPKI CA / eduroam RA and send the request to them |
107 | 107 | try { |
108 | 108 | $altArray = [# Array mit den Subject Alternative Names |
109 | - "email:" . $csr["USERMAIL"] |
|
109 | + "email:".$csr["USERMAIL"] |
|
110 | 110 | ]; |
111 | 111 | foreach ($csr["ALTNAMES"] as $oneAltName) { |
112 | - $altArray[] = "DNS:" . $oneAltName; |
|
112 | + $altArray[] = "DNS:".$oneAltName; |
|
113 | 113 | } |
114 | 114 | $soapPub = $this->initEduPKISoapSession("PUBLIC"); |
115 | 115 | $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n"); |
116 | - $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPkiServer::EDUPKI_RA_ID . "\n"); |
|
117 | - $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR_STRING"] . "\n"); |
|
116 | + $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPkiServer::EDUPKI_RA_ID."\n"); |
|
117 | + $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR_STRING"]."\n"); |
|
118 | 118 | $this->loggerInstance->debug(5, "PARAM_3: "); |
119 | 119 | $this->loggerInstance->debug(5, $altArray); |
120 | - $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE . "\n"); |
|
121 | - $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n"); |
|
122 | - $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n"); |
|
123 | - $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n"); |
|
124 | - $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n"); |
|
120 | + $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE."\n"); |
|
121 | + $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n"); |
|
122 | + $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n"); |
|
123 | + $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n"); |
|
124 | + $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n"); |
|
125 | 125 | $this->loggerInstance->debug(5, "PARAM_9: false\n"); |
126 | 126 | $soapNewRequest = $soapPub->newRequest( |
127 | 127 | CertificationAuthorityEduPkiServer::EDUPKI_RA_ID, # RA-ID |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | } catch (Exception $e) { |
144 | 144 | // PHP 7.1 can do this much better |
145 | 145 | if (is_soap_fault($e)) { |
146 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: { |
|
146 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: { |
|
147 | 147 | $e->faultstring |
148 | 148 | }\n"); |
149 | 149 | } |
150 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
150 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
151 | 151 | } |
152 | 152 | try { |
153 | 153 | $soap = $this->initEduPKISoapSession("RA"); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
182 | 182 | // rather than just using the string. Grr. |
183 | 183 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
184 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext); |
|
184 | + file_put_contents($tempdir['dir']."/content.txt", $soapCleartext); |
|
185 | 185 | // retrieve our RA cert from filesystem |
186 | 186 | // the RA certificates are not needed right now because we |
187 | 187 | // have resorted to S/MIME signatures with openssl command-line |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
194 | 194 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
195 | 195 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n $soapCleartext\n"); |
196 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
196 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
197 | 197 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
198 | 198 | $output = []; |
199 | 199 | $return = 999; |
@@ -202,21 +202,21 @@ discard block |
||
202 | 202 | throw new Exception("Non-zero return value from openssl smime!"); |
203 | 203 | } |
204 | 204 | // and get the signature blob back from the filesystem |
205 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
205 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
206 | 206 | $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n"); |
207 | - $this->loggerInstance->debug(5, $soapReqnum . "\n"); |
|
208 | - $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending! |
|
209 | - $this->loggerInstance->debug(5, $detachedSig . "\n"); |
|
207 | + $this->loggerInstance->debug(5, $soapReqnum."\n"); |
|
208 | + $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending! |
|
209 | + $this->loggerInstance->debug(5, $detachedSig."\n"); |
|
210 | 210 | $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig); |
211 | - $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest()); |
|
212 | - $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse()); |
|
211 | + $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest()); |
|
212 | + $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse()); |
|
213 | 213 | if ($soapIssueCert === FALSE) { |
214 | 214 | throw new Exception("The locally approved request was NOT processed by the CA."); |
215 | 215 | } |
216 | 216 | } catch (SoapFault $e) { |
217 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
217 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
218 | 218 | } catch (Exception $e) { |
219 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
219 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
220 | 220 | } |
221 | 221 | return $soapReqnum; |
222 | 222 | } |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | throw new Exception("CAInfo has no root certificate for us!"); |
269 | 269 | } |
270 | 270 | } catch (SoapFault $e) { |
271 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
271 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
272 | 272 | } catch (Exception $e) { |
273 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
273 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
274 | 274 | } |
275 | 275 | return [ |
276 | 276 | "CERT" => openssl_x509_read($parsedCert['pem']), |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
304 | 304 | // rather than just using the string. Grr. |
305 | 305 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
306 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest); |
|
306 | + file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest); |
|
307 | 307 | // retrieve our RA cert from filesystem |
308 | 308 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
309 | 309 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
310 | 310 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n"); |
311 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
311 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
312 | 312 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
313 | 313 | $output = []; |
314 | 314 | $return = 999; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | throw new Exception("Non-zero return value from openssl smime!"); |
318 | 318 | } |
319 | 319 | // and get the signature blob back from the filesystem |
320 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
320 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
321 | 321 | $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig); |
322 | 322 | if ($soapIssueRev === FALSE) { |
323 | 323 | throw new Exception("The locally approved revocation request was NOT processed by the CA."); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | } catch (Exception $e) { |
326 | 326 | // PHP 7.1 can do this much better |
327 | 327 | if (is_soap_fault($e)) { |
328 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n"); |
|
328 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n"); |
|
329 | 329 | } |
330 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
330 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | |
@@ -427,9 +427,9 @@ discard block |
||
427 | 427 | */ |
428 | 428 | public function soapToXmlInteger($x) |
429 | 429 | { |
430 | - return '<' . $x[0] . '>' |
|
430 | + return '<'.$x[0].'>' |
|
431 | 431 | . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1) |
432 | - . '</' . $x[0] . '>'; |
|
432 | + . '</'.$x[0].'>'; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | /** |
@@ -448,9 +448,9 @@ discard block |
||
448 | 448 | // dump private key into directory |
449 | 449 | $outstring = ""; |
450 | 450 | openssl_pkey_export($privateKey, $outstring); |
451 | - file_put_contents($tempdir . "/pkey.pem", $outstring); |
|
451 | + file_put_contents($tempdir."/pkey.pem", $outstring); |
|
452 | 452 | // PHP can only do one DC in the Subject. But we need three. |
453 | - $execCmd = \config\Master::PATHS['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username"; |
|
453 | + $execCmd = \config\Master::PATHS['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username"; |
|
454 | 454 | $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n"); |
455 | 455 | $output = []; |
456 | 456 | $return = 999; |
@@ -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'".($this->langObject->rtl ? "dir='rtl'" : "")."> |
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 |
@@ -61,10 +61,10 @@ |
||
61 | 61 | header("Content-Type:text/html;charset=utf-8"); |
62 | 62 | ?> |
63 | 63 | <!DOCTYPE html> |
64 | - <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale;?>' <?php echo ($direction ? "dir='rtl'" : "");?>> |
|
65 | - <head lang='<?php echo $ourlocale;?>'> |
|
64 | + <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale; ?>' <?php echo ($direction ? "dir='rtl'" : ""); ?>> |
|
65 | + <head lang='<?php echo $ourlocale; ?>'> |
|
66 | 66 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> |
67 | - <title><?php echo htmlspecialchars($pagetitle);?></title> |
|
67 | + <title><?php echo htmlspecialchars($pagetitle); ?></title> |
|
68 | 68 | <script type="text/javascript">ie_version = 0;</script> |
69 | 69 | <!--[if IE]> |
70 | 70 | <script type="text/javascript">ie_version=1;</script> |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | $loggerInstance = new \core\common\Logging(); |
82 | 82 | $olddomain = textdomain(NULL); |
83 | 83 | $loggerInstance->debug(4, "set_locale($domain)\n"); |
84 | - $loggerInstance->debug(4, ROOT . "\n"); |
|
84 | + $loggerInstance->debug(4, ROOT."\n"); |
|
85 | 85 | textdomain($domain); |
86 | - bindtextdomain($domain, ROOT . "/translation/"); |
|
86 | + bindtextdomain($domain, ROOT."/translation/"); |
|
87 | 87 | bind_textdomain_codeset($domain, "UTF-8"); |
88 | 88 | return $olddomain; |
89 | 89 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | // check if this language is supported by the CAT config |
138 | 138 | foreach (\config\Master::LANGUAGES as $language => $value) { |
139 | - if (preg_match("/^" . $language . ".*/", $tryLang)) { |
|
139 | + if (preg_match("/^".$language.".*/", $tryLang)) { |
|
140 | 140 | $localeTmp = $value['locale']; |
141 | 141 | $langIndex = $language; // ??? |
142 | 142 | break; |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
154 | - putenv("LC_ALL=" . $theLocale); |
|
154 | + putenv("LC_ALL=".$theLocale); |
|
155 | 155 | $_SESSION['language'] = $langIndex; |
156 | 156 | $loggerInstance = new \core\common\Logging(); |
157 | 157 | $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n"); |
158 | 158 | $loggerInstance->debug(4, print_r($langConverted, true)); |
159 | - return([$langIndex, $theLocale,$isRtl]); |
|
159 | + return([$langIndex, $theLocale, $isRtl]); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $optionClass = \core\Options::instance(); |
102 | 102 | $optionProps = $optionClass->optionType($optiontype); |
103 | 103 | $allowedValues = explode(',', substr($optionProps["flags"], 7)); |
104 | - if (in_array($incomingBinary,$allowedValues)) { |
|
104 | + if (in_array($incomingBinary, $allowedValues)) { |
|
105 | 105 | return TRUE; |
106 | 106 | } |
107 | 107 | return FALSE; |
@@ -347,14 +347,14 @@ discard block |
||
347 | 347 | case \core\Options::TYPECODE_TEXT: |
348 | 348 | case \core\Options::TYPECODE_COORDINATES: |
349 | 349 | case \core\Options::TYPECODE_INTEGER: |
350 | - $varName = $listOfEntries["$objId-" . self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
350 | + $varName = $listOfEntries["$objId-".self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['field']]; |
|
351 | 351 | if (!empty($varName)) { |
352 | 352 | $content = call_user_func_array([$this->validator, self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['function']], array_merge([$varName], self::VALIDATOR_FUNCTIONS[$optioninfo['type']]['extraarg'])); |
353 | 353 | break; |
354 | 354 | } |
355 | 355 | continue 2; |
356 | 356 | case \core\Options::TYPECODE_BOOLEAN: |
357 | - $varName = $listOfEntries["$objId-" . \core\Options::TYPECODE_BOOLEAN]; |
|
357 | + $varName = $listOfEntries["$objId-".\core\Options::TYPECODE_BOOLEAN]; |
|
358 | 358 | if (!empty($varName)) { |
359 | 359 | $contentValid = $this->validator->boolean($varName); |
360 | 360 | if ($contentValid) { |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | } |
368 | 368 | continue 2; |
369 | 369 | case \core\Options::TYPECODE_STRING: |
370 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
370 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
371 | 371 | if (!empty(trim($previsionalContent))) { |
372 | 372 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
373 | 373 | if ($content === FALSE) { |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | continue 2; |
379 | 379 | |
380 | 380 | case \core\Options::TYPECODE_ENUM_OPENROAMING: |
381 | - $previsionalContent = $listOfEntries["$objId-" . \core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
381 | + $previsionalContent = $listOfEntries["$objId-".\core\Options::TYPECODE_ENUM_OPENROAMING]; |
|
382 | 382 | if (!empty($previsionalContent)) { |
383 | 383 | $content = $this->furtherStringChecks($objValue, $previsionalContent, $bad); |
384 | 384 | if ($content === FALSE) { |
@@ -389,15 +389,15 @@ discard block |
||
389 | 389 | continue 2; |
390 | 390 | case \core\Options::TYPECODE_FILE: |
391 | 391 | // this is either actually an uploaded file, or a reference to a DB entry of a previously uploaded file |
392 | - $reference = $listOfEntries["$objId-" . \core\Options::TYPECODE_STRING]; |
|
392 | + $reference = $listOfEntries["$objId-".\core\Options::TYPECODE_STRING]; |
|
393 | 393 | if (!empty($reference)) { // was already in, by ROWID reference, extract |
394 | 394 | // ROWID means it's a multi-line string (simple strings are inline in the form; so allow whitespace) |
395 | 395 | $content = $this->validator->string(urldecode($reference), TRUE); |
396 | 396 | break; |
397 | 397 | } |
398 | - $fileName = $listOfEntries["$objId-" . \core\Options::TYPECODE_FILE] ?? ""; |
|
398 | + $fileName = $listOfEntries["$objId-".\core\Options::TYPECODE_FILE] ?? ""; |
|
399 | 399 | if ($fileName != "") { // let's do the download |
400 | - $rawContent = \core\common\OutsideComm::downloadFile("file:///" . $fileName); |
|
400 | + $rawContent = \core\common\OutsideComm::downloadFile("file:///".$fileName); |
|
401 | 401 | |
402 | 402 | if ($rawContent === FALSE || !$this->checkUploadSanity($objValue, $rawContent)) { |
403 | 403 | $bad[] = $objValue; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | continue 2; |
410 | 410 | default: |
411 | - throw new Exception("Internal Error: Unknown option type " . $objValue . "!"); |
|
411 | + throw new Exception("Internal Error: Unknown option type ".$objValue."!"); |
|
412 | 412 | } |
413 | 413 | // lang can be NULL here, if it's not a multilang attribute, or a ROWID reference. Never mind that. |
414 | 414 | $retval[] = ["$objValue" => ["lang" => $languageFlag, "content" => $content]]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | $colour1 = \config\Master::APPEARANCE['colour1']; |
24 | 24 | $colour2 = \config\Master::APPEARANCE['colour2']; |
25 | 25 | // we need to know if we are serving a RTL language so we can flip some heading |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | body { |
37 | - background: <?php echo $colour1;?>; |
|
37 | + background: <?php echo $colour1; ?>; |
|
38 | 38 | color: #000000; |
39 | 39 | font-family:Verdana, Arial, Helvetica, sans-serif; |
40 | 40 | font-size:11px; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | button { |
60 | - background: <?php echo $colour2;?>; |
|
60 | + background: <?php echo $colour2; ?>; |
|
61 | 61 | color: #FFFFFF; |
62 | 62 | min-height: 23px; |
63 | 63 | border-start-style: outset; |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | background:#095e80; |
79 | 79 | border-style:inset; |
80 | 80 | position: relative; |
81 | - <?php echo $start;?>: 3px; |
|
81 | + <?php echo $start; ?>: 3px; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | button.pressedDisabled { |
85 | 85 | background:#999; |
86 | 86 | border-style:inset; |
87 | 87 | position: relative; |
88 | - <?php echo $start;?>: 3px; |
|
88 | + <?php echo $start; ?>: 3px; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | button.delete { |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | div.profilemodulebuttons { |
168 | 168 | position: inherit; |
169 | 169 | bottom: 5px; |
170 | - <?php echo $end;?>: 5px; |
|
171 | - text-align: <?php echo $end;?>; |
|
170 | + <?php echo $end; ?>: 5px; |
|
171 | + text-align: <?php echo $end; ?>; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | div.profilebox { |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | display: block; |
190 | 190 | position: absolute; |
191 | 191 | top:0; |
192 | - <?php echo $end;?>:0; |
|
192 | + <?php echo $end; ?>:0; |
|
193 | 193 | padding-end:20px; |
194 | 194 | padding-top:7px; |
195 | 195 | } |
196 | 196 | |
197 | 197 | div.sidebar { |
198 | 198 | display: inline; |
199 | - float: <?php echo $end;?>; |
|
199 | + float: <?php echo $end; ?>; |
|
200 | 200 | padding-end: 20px; |
201 | 201 | } |
202 | 202 | div.sidebar a { |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | |
242 | 242 | div.footer { |
243 | 243 | width: 100%; |
244 | - <?php echo $start;?>: 0; |
|
245 | - <?php echo $end;?>: 0; |
|
244 | + <?php echo $start; ?>: 0; |
|
245 | + <?php echo $end; ?>: 0; |
|
246 | 246 | bottom: 0; |
247 | 247 | position: absolute; |
248 | 248 | background: white; |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | position: fixed; |
289 | 289 | top: 0; |
290 | 290 | bottom: 0; |
291 | - <?php echo $start;?>: 0; |
|
292 | - <?php echo $end;?>: 0; |
|
291 | + <?php echo $start; ?>: 0; |
|
292 | + <?php echo $end; ?>: 0; |
|
293 | 293 | background-color: #000000; |
294 | 294 | opacity: 0.5; |
295 | 295 | z-index: 90; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | padding: 15px; |
316 | 316 | text-align: start; |
317 | 317 | width: 850px; |
318 | - <?php echo $start;?>: 100px; |
|
318 | + <?php echo $start; ?>: 100px; |
|
319 | 319 | top: 50px; |
320 | 320 | z-index: 100; |
321 | 321 | } |
@@ -324,15 +324,15 @@ discard block |
||
324 | 324 | position: absolute; |
325 | 325 | top: 0; |
326 | 326 | bottom: 0; |
327 | - <?php echo $start;?>: 0; |
|
328 | - <?php echo $end;?>: 0; |
|
327 | + <?php echo $start; ?>: 0; |
|
328 | + <?php echo $end; ?>: 0; |
|
329 | 329 | z-index: 100; |
330 | 330 | } |
331 | 331 | |
332 | 332 | div#msgbox div { |
333 | 333 | position: fixed; |
334 | - <?php echo $start;?>: 0; |
|
335 | - <?php echo $end;?>: 0; |
|
334 | + <?php echo $start; ?>: 0; |
|
335 | + <?php echo $end; ?>: 0; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | div#msgbox div div.graybox { |
@@ -346,12 +346,12 @@ discard block |
||
346 | 346 | div.graybox img { |
347 | 347 | display: block; |
348 | 348 | cursor: pointer; |
349 | - float: <?php echo $end;?>; |
|
349 | + float: <?php echo $end; ?>; |
|
350 | 350 | margin: 0px 0px 10px 10px; |
351 | 351 | } |
352 | 352 | |
353 | 353 | img.icon { |
354 | - float: <?php echo $start;?>; |
|
354 | + float: <?php echo $start; ?>; |
|
355 | 355 | margin-end: 5px; |
356 | 356 | margin-top: 3px; |
357 | 357 | } |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | span.edu_cat { |
410 | 410 | font-weight: bold; |
411 | - color: <?php echo $colour2;?>; |
|
411 | + color: <?php echo $colour2; ?>; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | span.tooltip { |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | border-bottom-style:solid; |
517 | 517 | border-top-width:5px; |
518 | 518 | border-bottom-width:5px; |
519 | - border-color: <?php echo $colour1;?>; |
|
519 | + border-color: <?php echo $colour1; ?>; |
|
520 | 520 | padding-start:30px; |
521 | 521 | } |
522 | 522 | |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | } |
587 | 587 | |
588 | 588 | #close_button { |
589 | - background: <?php echo $colour2;?>; |
|
589 | + background: <?php echo $colour2; ?>; |
|
590 | 590 | color: #FFFFFF; |
591 | 591 | height: 23px; |
592 | 592 | border-start-style: inset; |
@@ -606,14 +606,14 @@ discard block |
||
606 | 606 | padding-top: 1px; |
607 | 607 | padding-bottom: 1px; |
608 | 608 | position: relative; |
609 | - <?php echo $start;?>: 640px; |
|
609 | + <?php echo $start; ?>: 640px; |
|
610 | 610 | cursor:pointer; |
611 | 611 | } |
612 | 612 | |
613 | 613 | #loading_ico { |
614 | 614 | display: none; |
615 | 615 | position: absolute; |
616 | - <?php echo $start;?>: 200px; |
|
616 | + <?php echo $start; ?>: 200px; |
|
617 | 617 | top: 220px; |
618 | 618 | z-index: 200; |
619 | 619 | text-align: center; |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | z-index: 100; |
628 | 628 | position: absolute; |
629 | 629 | width: 700px; |
630 | - <?php echo $start;?>: 200px; |
|
630 | + <?php echo $start; ?>: 200px; |
|
631 | 631 | text-align: justify; |
632 | 632 | top: 200px; |
633 | 633 | box-shadow: 5px 5px 5px #666666; |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | width: 30em; |
662 | 662 | padding-start: 10px; |
663 | 663 | padding-end: 0px; |
664 | - background: <?php echo $colour2;?>; |
|
664 | + background: <?php echo $colour2; ?>; |
|
665 | 665 | color: white; |
666 | 666 | box-shadow: 10px 10px 5px #888888; |
667 | 667 | } |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | padding-top: 4px; |
709 | 709 | padding-bottom: 12px; |
710 | 710 | padding-start: 30px; |
711 | - background: <?php echo $colour1;?>; |
|
711 | + background: <?php echo $colour1; ?>; |
|
712 | 712 | text-align: start; |
713 | 713 | text-shadow: 10px 10px 5px #888888; |
714 | 714 | } |
@@ -718,9 +718,9 @@ discard block |
||
718 | 718 | border-bottom-style:solid; |
719 | 719 | border-top-width:5px; |
720 | 720 | border-bottom-width:5px; |
721 | - border-color: <?php echo $colour1;?>; |
|
721 | + border-color: <?php echo $colour1; ?>; |
|
722 | 722 | padding-start:30px; |
723 | - color: <?php echo $colour2;?>; |
|
723 | + color: <?php echo $colour2; ?>; |
|
724 | 724 | } |
725 | 725 | |
726 | 726 | #heading h1 { |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | text-align: justify; |
740 | 740 | border-bottom-style:solid; |
741 | 741 | border-bottom-width:5px; |
742 | - border-color: <?php echo $colour1;?>; |
|
742 | + border-color: <?php echo $colour1; ?>; |
|
743 | 743 | font-size: 11px; |
744 | 744 | font-weight: normal; |
745 | 745 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | #main_menu_info { |
749 | 749 | position: relative; |
750 | 750 | top: 15px; |
751 | - <?php echo $start;?>: 0px; |
|
751 | + <?php echo $start; ?>: 0px; |
|
752 | 752 | padding:10px; padding-start:20px; padding-end:20px; |
753 | 753 | background: #f0f0f0; |
754 | 754 | border: 1px solid #dddddd; |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | |
787 | 787 | #faq { |
788 | 788 | padding: 20px; |
789 | - color: <?php echo $colour2;?>; |
|
789 | + color: <?php echo $colour2; ?>; |
|
790 | 790 | background: #ffffff; |
791 | 791 | } |
792 | 792 | |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | #idp_logo { |
805 | 805 | display:none; |
806 | 806 | position:absolute; |
807 | - <?php echo $end;?>:30px; |
|
807 | + <?php echo $end; ?>:30px; |
|
808 | 808 | max-height:150px; |
809 | 809 | max-width:150px; |
810 | 810 | padding-top:10px; |
@@ -827,18 +827,18 @@ discard block |
||
827 | 827 | #slides img { |
828 | 828 | position: absolute; |
829 | 829 | top: 145px; |
830 | - <?php echo $end;?>: 60px; |
|
830 | + <?php echo $end; ?>: 60px; |
|
831 | 831 | } |
832 | 832 | |
833 | 833 | #slides span { |
834 | 834 | position: absolute; |
835 | - <?php echo $start;?>: 180px; |
|
835 | + <?php echo $start; ?>: 180px; |
|
836 | 836 | z-index: 20; |
837 | 837 | } |
838 | 838 | |
839 | 839 | #line1 { |
840 | 840 | top:145px; |
841 | - color: <?php echo $colour2;?>; |
|
841 | + color: <?php echo $colour2; ?>; |
|
842 | 842 | font-size:20px; |
843 | 843 | } |
844 | 844 | |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | |
851 | 851 | #line3 { |
852 | 852 | top:245px; |
853 | - <?php echo $start;?>: 200px; |
|
853 | + <?php echo $start; ?>: 200px; |
|
854 | 854 | color: maroon; |
855 | 855 | font-size:25px; |
856 | 856 | } |
@@ -885,7 +885,7 @@ discard block |
||
885 | 885 | |
886 | 886 | #front_page_leftmenu { |
887 | 887 | border-end:solid; |
888 | - border-color: <?php echo $colour1;?>; |
|
888 | + border-color: <?php echo $colour1; ?>; |
|
889 | 889 | border-width:5px; |
890 | 890 | min-height:400px; |
891 | 891 | padding-start: 10px; |
@@ -910,11 +910,11 @@ discard block |
||
910 | 910 | } |
911 | 911 | |
912 | 912 | a:link { |
913 | - color:<?php echo $colour2;?>; |
|
913 | + color:<?php echo $colour2; ?>; |
|
914 | 914 | } |
915 | 915 | |
916 | 916 | a:visited { |
917 | - color:<?php echo $colour2;?>; |
|
917 | + color:<?php echo $colour2; ?>; |
|
918 | 918 | } |
919 | 919 | |
920 | 920 | a:hover { |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | } |
923 | 923 | |
924 | 924 | a:active { |
925 | - color:<?php echo $colour2;?>; |
|
925 | + color:<?php echo $colour2; ?>; |
|
926 | 926 | } |
927 | 927 | |
928 | 928 | .comment { |
@@ -972,7 +972,7 @@ discard block |
||
972 | 972 | .download_button_text { |
973 | 973 | width: 380px; |
974 | 974 | position:absolute; |
975 | - <?php echo $end;?>: 5px; |
|
975 | + <?php echo $end; ?>: 5px; |
|
976 | 976 | padding-top:0px; |
977 | 977 | } |
978 | 978 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * License: see the web/copyright.inc.php file in the file structure or |
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | -require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/config/_config.php"; |
|
21 | +require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/config/_config.php"; |
|
22 | 22 | $langInstance = new core\common\Language(); |
23 | 23 | $start = $langInstance->rtl ? "right" : "left"; |
24 | 24 | $end = $langInstance->rtl ? "left" : "right"; |