@@ -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) { |
@@ -251,10 +251,11 @@ |
||
251 | 251 | <allow-save>true</allow-save> |
252 | 252 | '; |
253 | 253 | if ($useAnon == 1) { |
254 | - if ($outer_user == '') |
|
255 | - $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
256 | - else |
|
257 | - $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
254 | + if ($outer_user == '') { |
|
255 | + $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
256 | + } else { |
|
257 | + $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
258 | + } |
|
258 | 259 | } |
259 | 260 | $profileFileCont .= '</ClientSideCredential> |
260 | 261 | <ServerSideCredential> |
@@ -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])) { |
|
259 | + if (!empty($attr['internal:hint_userinput_suffix'][0])) { |
|
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])) { |
|
263 | + if (!empty($attr['internal:verify_userinput_suffix'][0])) { |
|
264 | 264 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
265 | 265 | '; |
266 | 266 | } |
@@ -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() { |
@@ -208,13 +208,13 @@ discard block |
||
208 | 208 | if(j.local_url !== undefined && j.local_url) |
209 | 209 | txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
210 | 210 | if(j.local_email !== undefined && j.local_email) |
211 | - txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
211 | + txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
212 | 212 | if(j.local_phone !== undefined && j.local_phone) |
213 | - txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>'; |
|
213 | + txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>'; |
|
214 | 214 | if(txt) |
215 | - 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>'; |
|
215 | + 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>'; |
|
216 | 216 | else |
217 | - 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>"; |
|
217 | + 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>"; |
|
218 | 218 | $("#user_info").html(txt); |
219 | 219 | $("#user_info").show(); |
220 | 220 | resetDevices(); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $("#g_"+v.id).addClass('alertButton'); |
228 | 228 | $("#cross_icon_"+v.id).show(); |
229 | 229 | $("#"+v.id).addClass('disabledDevice'); |
230 | - $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"); |
|
230 | + $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"); |
|
231 | 231 | $("#info_b_"+v.id+",#g_info_b_"+v.id).hide(); |
232 | 232 | } else { |
233 | 233 | if(v.status == -1) |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
240 | 240 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
241 | 241 | i_div = $("#info_"+$(this).attr('id')); |
242 | - 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>"; |
|
242 | + 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>"; |
|
243 | 243 | i_div.html(t); |
244 | 244 | $(".redirect_link").click(function(event) { |
245 | 245 | i_div.hide(); |
@@ -247,13 +247,13 @@ discard block |
||
247 | 247 | |
248 | 248 | }); |
249 | 249 | } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) { |
250 | - var continue_text = "<?php escaped_echo(_("Continue"));?>"; |
|
250 | + var continue_text = "<?php escaped_echo(_("Continue")); ?>"; |
|
251 | 251 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
252 | 252 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
253 | 253 | i_div = $("#info_"+$(this).attr('id')); |
254 | 254 | if(v.status > 0) { |
255 | - t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"; |
|
256 | - continue_text = "<?php escaped_echo(_("Close"));?>"; |
|
255 | + t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"; |
|
256 | + continue_text = "<?php escaped_echo(_("Close")); ?>"; |
|
257 | 257 | } else { |
258 | 258 | t = i_div.html(); |
259 | 259 | if(v.message != '0') { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } |
323 | 323 | |
324 | 324 | function infoCAT(k,subK,title) { |
325 | - $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE","user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
325 | + $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
326 | 326 | showInfo(data, title)}); |
327 | 327 | } |
328 | 328 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $("#loading_ico").css('left',x+'px'); |
332 | 332 | $("#loading_ico").attr('src','resources/images/icons/loading9.gif'); |
333 | 333 | $("#loading_ico").show(); |
334 | - window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php")?>?lang="+lang); |
|
334 | + window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php")?>?lang="+lang); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | return(Math.round(windowWidth/2)); |
354 | 354 | } |
355 | 355 | |
356 | -<?php if($idpId) { |
|
356 | +<?php if ($idpId) { |
|
357 | 357 | print "front_page = 0;\n"; |
358 | 358 | } ?> |
359 | 359 | |
@@ -477,13 +477,13 @@ discard block |
||
477 | 477 | "overlay":true,"cookie":true,"type":false, |
478 | 478 | "country":true,"location":true, |
479 | 479 | "title":"<?php escaped_echo($cat->nomenclature_inst) ?>", |
480 | - "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>", |
|
481 | - "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>", |
|
482 | - "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'])); ?>", |
|
480 | + "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>", |
|
481 | + "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>", |
|
482 | + "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'])); ?>", |
|
483 | 483 | "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>", |
484 | 484 | "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>", |
485 | 485 | "textAllCountries": "<?php escaped_echo(_("all countries")) ?>", |
486 | - "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>", |
|
486 | + "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>", |
|
487 | 487 | "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>", |
488 | 488 | "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>", |
489 | 489 | "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>", |