@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'getUserCerts', |
40 | 40 | ]; |
41 | 41 | |
42 | -function getRequest($varName,$filter) { |
|
42 | +function getRequest($varName, $filter) { |
|
43 | 43 | $safeText = ["options"=>["regexp"=>"/^[\w\d-]+$/"]]; |
44 | 44 | switch ($filter) { |
45 | 45 | case 'safe_text': |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // make sure this is a known action |
59 | 59 | $actionR = getRequest('action', 'safe_text'); |
60 | -$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE; |
|
60 | +$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE; |
|
61 | 61 | if ($action === FALSE) { |
62 | 62 | exit; |
63 | 63 | } |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | $lang = $langR ? $validator->supportedLanguage($langR) : FALSE; |
66 | 66 | $deviceR = getRequest('device', 'safe_text'); |
67 | 67 | $device = $deviceR ? $validator->Device($deviceR) : FALSE; |
68 | -$idpR = getRequest('idp','int'); |
|
68 | +$idpR = getRequest('idp', 'int'); |
|
69 | 69 | $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE; |
70 | -$profileR = getRequest('profile','int'); |
|
70 | +$profileR = getRequest('profile', 'int'); |
|
71 | 71 | $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE; |
72 | -$federationR = getRequest('federation','safe_text'); |
|
72 | +$federationR = getRequest('federation', 'safe_text'); |
|
73 | 73 | $federation = $federationR ? $validator->Federation($deviceR)->identifier : FALSE; |
74 | -$disco = getRequest('disco','int'); |
|
75 | -$width = getRequest('width','int') ?? 0; |
|
76 | -$height = getRequest('height','int') ?? 0; |
|
77 | -$sort = getRequest('sort','int') ?? 0; |
|
78 | -$generatedforR = getRequest('generatedfor','safe_text') ?? 'user'; |
|
79 | -$token = getRequest('token','safe_text'); |
|
74 | +$disco = getRequest('disco', 'int'); |
|
75 | +$width = getRequest('width', 'int') ?? 0; |
|
76 | +$height = getRequest('height', 'int') ?? 0; |
|
77 | +$sort = getRequest('sort', 'int') ?? 0; |
|
78 | +$generatedforR = getRequest('generatedfor', 'safe_text') ?? 'user'; |
|
79 | +$token = getRequest('token', 'safe_text'); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | switch ($action) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | <key>PayloadIdentifier</key> |
73 | 73 | <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
74 | 74 | <key>PayloadOrganization</key> |
75 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
75 | + <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ($this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
76 | 76 | <key>PayloadType</key> |
77 | 77 | <string>Configuration</string> |
78 | 78 | <key>PayloadUUID</key> |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | $retval .= " |
326 | 326 | </array>"; |
327 | 327 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
328 | - $retval .= "<key>UserName</key><string>".$this->clientCert["username"]."</string>"; |
|
328 | + $retval .= "<key>UserName</key><string>" . $this->clientCert["username"] . "</string>"; |
|
329 | 329 | } |
330 | - $retval .=" |
|
330 | + $retval .= " |
|
331 | 331 | <key>TTLSInnerAuthentication</key> |
332 | 332 | <string>" . ($eapType['INNER'] == \core\common\EAP::NONE ? "PAP" : "MSCHAPv2") . "</string> |
333 | 333 | </dict>"; |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | <key>PayloadVersion</key> |
505 | 505 | <integer>1</integer> |
506 | 506 | </dict>", |
507 | - "UUID" => $payloadUUID,]; |
|
507 | + "UUID" => $payloadUUID, ]; |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | private function expiryBlock() { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
233 | 233 | '; |
234 | 234 | } |
235 | - $fcontents .= ' |
|
235 | + $fcontents .= ' |
|
236 | 236 | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
237 | 237 | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
238 | 238 | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | !define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '" |
242 | 242 | ;-------------------------------- |
243 | 243 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
244 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
245 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
244 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
245 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
246 | 246 | '; |
247 | 247 | |
248 | 248 | |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
257 | 257 | '; |
258 | 258 | } |
259 | - if(!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
259 | + if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
260 | 260 | $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
261 | 261 | '; |
262 | 262 | } |
263 | - if(!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
263 | + if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
264 | 264 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
265 | 265 | '; |
266 | 266 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | <?php |
12 | 12 | $cat = new core\CAT(); |
13 | 13 | function escaped_echo($s) { |
14 | - echo preg_replace('/"/','"',$s); |
|
14 | + echo preg_replace('/"/', '"', $s); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $langObject = new \core\common\Language(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | result = j.status; |
71 | 71 | if(! result) { |
72 | 72 | alert("<?php escaped_echo(_("no matching data found"))?>"); |
73 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
73 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
74 | 74 | } |
75 | 75 | j = j.data; |
76 | 76 | n = j.length; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | inst_name = j[0].idp_name; |
79 | 79 | logo = j[0].logo; |
80 | 80 | $("#inst_name").val(inst_name); |
81 | - $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"),$cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>"); |
|
81 | + $("#inst_name_span").html("<?php escaped_echo(sprintf(_("Selected %s:"), $cat->nomenclature_inst))?> <strong>"+inst_name+"</strong>"); |
|
82 | 82 | $(".inst_name").text(inst_name); |
83 | 83 | $("#user_page").show(); |
84 | 84 | $("#institution_name").show(); |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | j1 = $.parseJSON(data); |
192 | 192 | result = j1.status; |
193 | 193 | if(! result) { |
194 | - alert("<?php escaped_echo( _("no matching data found"))?>"); |
|
195 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/').'/'?>'; |
|
194 | + alert("<?php escaped_echo(_("no matching data found"))?>"); |
|
195 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'?>'; |
|
196 | 196 | } |
197 | 197 | j = j1.data; |
198 | 198 | if(j.description !== undefined && j.description) { |
@@ -203,15 +203,15 @@ discard block |
||
203 | 203 | $("#profile_desc").text(''); |
204 | 204 | } |
205 | 205 | if(j.local_url !== undefined && j.local_url) |
206 | - txt = txt+'<tr><td><?php escaped_echo(_("WWW:"));?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
206 | + txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
|
207 | 207 | if(j.local_email !== undefined && j.local_email) |
208 | - txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
208 | + txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
209 | 209 | if(j.local_phone !== undefined && j.local_phone) |
210 | - txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>'; |
|
210 | + txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>'; |
|
211 | 211 | if(txt) |
212 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
212 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
213 | 213 | else |
214 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
214 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
215 | 215 | $("#user_info").html(txt); |
216 | 216 | $("#user_info").show(); |
217 | 217 | if(j.silverbullet) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $("#g_"+v.id).addClass('alertButton'); |
230 | 230 | $("#cross_icon_"+v.id).show(); |
231 | 231 | $("#"+v.id).addClass('disabledDevice'); |
232 | - $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"); |
|
232 | + $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"); |
|
233 | 233 | $("#info_b_"+v.id+",#g_info_b_"+v.id).hide(); |
234 | 234 | } else { |
235 | 235 | if(v.status == -1) |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
242 | 242 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
243 | 243 | i_div = $("#info_"+$(this).attr('id')); |
244 | - t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>"; |
|
244 | + t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>"; |
|
245 | 245 | i_div.html(t); |
246 | 246 | $(".redirect_link").click(function(event) { |
247 | 247 | i_div.hide(); |
@@ -249,13 +249,13 @@ discard block |
||
249 | 249 | |
250 | 250 | }); |
251 | 251 | } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) { |
252 | - var continue_text = "<?php escaped_echo(_("Continue"));?>"; |
|
252 | + var continue_text = "<?php escaped_echo(_("Continue")); ?>"; |
|
253 | 253 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
254 | 254 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
255 | 255 | i_div = $("#info_"+$(this).attr('id')); |
256 | 256 | if(v.status > 0) { |
257 | - t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"; |
|
258 | - continue_text = "<?php escaped_echo(_("Close"));?>"; |
|
257 | + t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"; |
|
258 | + continue_text = "<?php escaped_echo(_("Close")); ?>"; |
|
259 | 259 | } else { |
260 | 260 | t = i_div.html(); |
261 | 261 | if(v.message != '0') { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | function infoCAT(k,title) { |
315 | - $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php");?>', {page: k, lang: lang}, function(data) { |
|
315 | + $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php"); ?>', {page: k, lang: lang}, function(data) { |
|
316 | 316 | if(data.substring(0,8) == 'no_title') { |
317 | 317 | data = data.substring(8,data.length); |
318 | 318 | } else { |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | var x = getWindowHCenter() - 16; |
331 | 331 | $("#loading_ico").css('left',x+'px'); |
332 | 332 | $("#loading_ico").show(); |
333 | - window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php");?>?lang="+lang); |
|
333 | + window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php"); ?>?lang="+lang); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | /* Get horizontal center of the Browser Window */ |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | return(Math.round(windowWidth/2)); |
352 | 352 | } |
353 | 353 | |
354 | -<?php if($idpId) { |
|
354 | +<?php if ($idpId) { |
|
355 | 355 | print "front_page = 0;\n"; |
356 | 356 | } ?> |
357 | 357 | |
@@ -389,10 +389,10 @@ discard block |
||
389 | 389 | $("#download_info a").attr('href',download_link); |
390 | 390 | $('#download_info').show(); |
391 | 391 | if( generateTimer > 0 ) { |
392 | - setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link",generateTimer); |
|
392 | + setTimeout("document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link",generateTimer); |
|
393 | 393 | } |
394 | 394 | else { |
395 | - document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']),'/')?>'+'/'+download_link; |
|
395 | + document.location.href='<?php echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/')?>'+'/'+download_link; |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | } |
@@ -510,13 +510,13 @@ discard block |
||
510 | 510 | "overlay":true,"cookie":true,"type":false, |
511 | 511 | "country":true,"location":true, |
512 | 512 | "title":"<?php escaped_echo($cat->nomenclature_inst) ?>", |
513 | - "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>", |
|
514 | - "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>", |
|
515 | - "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
513 | + "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>", |
|
514 | + "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>", |
|
515 | + "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
516 | 516 | "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>", |
517 | - "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"),$cat->nomenclature_inst)) ?>", |
|
517 | + "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>", |
|
518 | 518 | "textAllCountries": "<?php escaped_echo(_("all countries")) ?>", |
519 | - "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>", |
|
519 | + "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>", |
|
520 | 520 | "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>", |
521 | 521 | "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>", |
522 | 522 | "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>", |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | public function writeInstaller() { |
34 | 34 | $installerPath = $this->installerBasename . ".py"; |
35 | 35 | $this->copyFile("main.py", $installerPath); |
36 | - $installer = fopen($installerPath,"a"); |
|
37 | - fwrite($installer,$this->writeMessages()); |
|
38 | - fwrite($installer,$this->writeConfigVars()); |
|
36 | + $installer = fopen($installerPath, "a"); |
|
37 | + fwrite($installer, $this->writeMessages()); |
|
38 | + fwrite($installer, $this->writeConfigVars()); |
|
39 | 39 | fwrite($installer, "run_installer()\n"); |
40 | 40 | return($installerPath); |
41 | 41 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $out .= 'Messages.p12_title = "' . _("personal certificate file (p12 or pfx)") . "\"\n"; |
101 | 101 | $out .= 'Messages.save_wpa_conf = "' . _("Network Manager configuration failed, but we may generate a wpa_supplicant configuration file if you wish. Be warned that your connection password will be saved in this file as clear text.") . "\"\n"; |
102 | 102 | $out .= 'Messages.save_wpa_confirm = "' . _("Write the file") . "\"\n"; |
103 | - $out .= 'Messages.wrongUsernameFormat = "' ._("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
103 | + $out .= 'Messages.wrongUsernameFormat = "' . _("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
104 | 104 | $out .= 'Messages.wrong_realm = "' . _("Error: your username must be in the form of 'xxx@{}'. Please enter the username in the correct format.") . "\"\n"; |
105 | 105 | $out .= 'Messages.wrong_realm_suffix = "' . _("Error: your username must be in the form of 'xxx@institutionID' and end with '{}'. Please enter the username in the correct format.") . "\"\n"; |
106 | 106 | |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | $out .= "Config.use_other_tls_id = False\n"; |
130 | 130 | } |
131 | 131 | $tou = $this->mkUserConsent(); |
132 | - $out .= 'Config.tou = ' . ( $tou ? '"""' . $tou . '"""' : 'None' ) . "\n"; |
|
133 | - $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
132 | + $out .= 'Config.tou = ' . ($tou ? '"""' . $tou . '"""' : 'None') . "\n"; |
|
133 | + $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
134 | 134 | $out .= "Config.anonymous_identity = '" . $this->determineOuterIdString() . "'\n"; |
135 | 135 | $out .= 'Config.init_info = """' . $this->mkIntro() . '"""' . "\n"; |
136 | 136 | $out .= 'Config.init_confirmation = "' . $this->mkProfileConfirmation() . "\"\n"; |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | if (!empty($this->attributes['internal:realm'][0])) { |
140 | 140 | $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
141 | 141 | } |
142 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
142 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
143 | 143 | $out .= "Config.hint_user_input = True\n"; |
144 | 144 | } |
145 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
145 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
146 | 146 | $out .= "Config.verify_user_realm_input = True\n"; |
147 | 147 | } |
148 | 148 | return $out; |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | $out .= "'DNS:$oneServer'"; |
184 | 184 | } |
185 | - return "[" . $out. "]"; |
|
185 | + return "[" . $out . "]"; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | return '[' . implode(', ', $outArray) . ']'; |
207 | 207 | } |
208 | 208 | |
209 | - private function mkCAfile(){ |
|
209 | + private function mkCAfile() { |
|
210 | 210 | $out = ''; |
211 | 211 | $cAlist = $this->attributes['internal:CAs'][0]; |
212 | 212 | foreach ($cAlist as $oneCa) { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | while ($oneAttrib = mysqli_fetch_object($idpWideOptionsQuery)) { |
96 | 96 | if (!isset($profiles[$oneAttrib->institution_id])) { |
97 | - $idp = new \core\IdP((int)$oneAttrib->institution_id); |
|
97 | + $idp = new \core\IdP((int) $oneAttrib->institution_id); |
|
98 | 98 | $profiles[$oneAttrib->institution_id] = ['IdP' => $idp, 'Profiles' => $idp->listProfiles()]; |
99 | 99 | echo "Debug: IdP " . $idp->identifier . " has profiles "; |
100 | 100 | foreach ($profiles[$oneAttrib->institution_id]['Profiles'] as $oneProfileObject) { |
@@ -29,6 +29,6 @@ |
||
29 | 29 | $link = \core\ProfileSilverbullet::generateTokenLink($cleanToken); |
30 | 30 | header("Content-Type:text/html;charset=utf-8"); |
31 | 31 | ?> |
32 | -<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code");?></h1> |
|
33 | -<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11));?>'/> |
|
34 | -<p>(<a href='<?php echo $link;?>'><?php echo $link;?>)</a></p> |
|
35 | 32 | \ No newline at end of file |
33 | +<h1 style='text-align:center;'><?php echo _("Invitation Token QR Code"); ?></h1> |
|
34 | +<img style='float:none' src='data:image/png;base64,<?php echo base64_encode($uiElements->pngInjectConsortiumLogo(\QRcode::png($link, FALSE, QR_ECLEVEL_Q, 11), 11)); ?>'/> |
|
35 | +<p>(<a href='<?php echo $link; ?>'><?php echo $link; ?>)</a></p> |
|
36 | 36 | \ No newline at end of file |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | |
61 | 61 | $deco = new \web\lib\admin\PageDecoration(); |
62 | 62 | ?> |
63 | -<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" /> |
|
63 | +<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" /> |
|
64 | 64 | <!-- JQuery --> |
65 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js") ?>"></script> |
|
66 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate.js") ?>"></script> |
|
67 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js") ?>"></script> |
|
65 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js") ?>"></script> |
|
66 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate.js") ?>"></script> |
|
67 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js") ?>"></script> |
|
68 | 68 | <!-- JQuery --> |
69 | 69 | <script type="text/javascript"> |
70 | 70 | if (screen.width <= 480) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | <div id="heading"> |
107 | 107 | <?php |
108 | 108 | print '<img src="' . $Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png") . '" alt="Consortium Logo" style="float:right; padding-right:20px; padding-top:20px"/>'; |
109 | - print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ' ) . '</div>'; |
|
109 | + print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ') . '</div>'; |
|
110 | 110 | print '<h1 style="padding-bottom:0px; height:1em;">' . sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']) . '</h1> |
111 | 111 | <h2 style="padding-bottom:0px; height:0px; vertical-align:bottom;">' . CONFIG['APPEARANCE']['productname_long'] . '</h2>'; |
112 | 112 | echo '<table id="lang_select"><tr><td>'; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <span id="line1"><?php printf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?></span> |
161 | 161 | <span id="line2"></span> |
162 | 162 | <span id="line3"></span> |
163 | - <span id="line4"><?php echo sprintf(_("Custom built for your %s"),$Gui->nomenclature_inst) ?></span> |
|
163 | + <span id="line4"><?php echo sprintf(_("Custom built for your %s"), $Gui->nomenclature_inst) ?></span> |
|
164 | 164 | <span id="line5"> |
165 | 165 | <?php |
166 | 166 | if (isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "") { |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | ?> |
19 | 19 | |
20 | 20 | <!-- JQuery --> |
21 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery.js") ?>"></script> |
|
22 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-migrate-1.2.1.js") ?>"></script> |
|
23 | -<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","jquery/jquery-ui.js") ?>"></script> |
|
21 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery.js") ?>"></script> |
|
22 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-migrate-1.2.1.js") ?>"></script> |
|
23 | +<script type="text/javascript" src="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "jquery/jquery-ui.js") ?>"></script> |
|
24 | 24 | <!-- JQuery --> |
25 | 25 | |
26 | 26 | <script type="text/javascript"> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | include("user/js/cat_js.php"); |
49 | 49 | ?> |
50 | 50 | var loading_ico = new Image(); |
51 | - loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>"; |
|
51 | + loading_ico.src = "<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>"; |
|
52 | 52 | </script> |
53 | 53 | <?php $Gui->langObject->setTextDomain("web_user"); ?> |
54 | 54 | <!-- DiscoJuice --> |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | front_page = 0; |
58 | 58 | var lang = "<?php echo($Gui->langObject->getLang()) ?>"; |
59 | 59 | </script> |
60 | -<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL","discojuice/css/discojuice.css")?>" /> |
|
60 | +<link rel="stylesheet" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("EXTERNAL", "discojuice/css/discojuice.css")?>" /> |
|
61 | 61 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"> |
62 | -<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS","cat-user.css");?>" /> |
|
62 | +<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $Gui->skinObject->findResourceUrl("CSS", "cat-user.css"); ?>" /> |
|
63 | 63 | </head> |
64 | 64 | <body> |
65 | 65 | <div id="wrap"> |
@@ -67,14 +67,14 @@ discard block |
||
67 | 67 | <?php echo $divs->div_heading($visibility); ?> |
68 | 68 | <div id="main_page"> |
69 | 69 | <div id="loading_ico"> |
70 | - <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
70 | + <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif")?>" alt="Authenticating ..."/> |
|
71 | 71 | </div> |
72 | 72 | <div id="info_overlay"> <!-- device info --> |
73 | 73 | <div id="info_window"></div> |
74 | - <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
74 | + <img id="info_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
75 | 75 | </div> |
76 | 76 | <div id="main_menu_info" style="display:none"> <!-- stuff triggered form main menu --> |
77 | - <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES","icons/button_cancel.png")?>" ALT="Close"/> |
|
77 | + <img id="main_menu_close" class="close_button" src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/button_cancel.png")?>" ALT="Close"/> |
|
78 | 78 | <div id="main_menu_content"></div> |
79 | 79 | </div> |
80 | 80 | <div id="main_body"> |