Commit f54284cd authored by Lukas Haemmerle's avatar Lukas Haemmerle

Merge branch 'master+custom_strings' into 'master'

allow custom strings in configuration

See merge request aai/SWITCHwayf!3
parents ba277898 22de4b8c
......@@ -238,11 +238,6 @@
// operated on the same host
//$instanceIdentifier = 'SWITCHwayf';
// Name of the federation [deprecated]
// This value is not used anymore in the standard code.
// Please ensure it is not used anymore in templates
//$federationName = 'myFederation';
// URL to send user to when clicking on federation logo
// Insert %s as macro to be substituted by the language (e.g. 'en', 'de', 'fr', ...) the WAYF uses
// Set to an empty string to hide the logo
......@@ -284,6 +279,10 @@
// Set to an empty string to hide the logo
//$privacyURL = 'http://www.example.org/%s/myFed/privacy/';
// Additional strings form custom templates
//$customStrings = array(
// federationName = 'myFederation'
//);
// Development mode settings
......
......@@ -45,6 +45,7 @@ function initConfigOptions(){
global $logoURL;
global $smallLogoURL;
global $organizationLogoURL;
global $customStrings;
global $IDPConfigFile;
global $backupIDPConfigFile;
global $metadataFile;
......@@ -101,6 +102,7 @@ function initConfigOptions(){
$defaults['WAYFLogFile'] = '/var/log/apache2/wayf.log';
$defaults['kerberosRedirectURL'] = dirname($_SERVER['SCRIPT_NAME']).'kerberosRedirect.php';
$defaults['developmentMode'] = false;
$defaults['customStrings'] = array();
// Initialize independent defaults
foreach($defaults as $key => $value){
......
......@@ -19,6 +19,7 @@ function printHeader(){
global $langStrings, $language, $imageURL, $javascriptURL, $cssURL, $logoURL;
global $useImprovedDropDownList, $disableRemoteLogos, $organizationLogoURL;
global $federationURL, $organizationURL, $faqURL, $helpURL, $privacyURL;
global $customStrings;
// Check if custom header template exists
if(file_exists('custom-header.php')){
......@@ -35,6 +36,7 @@ function printHeader(){
function printWAYF(){
global $selectedIDP, $language, $IDProviders, $SProviders, $redirectCookieName, $imageURL, $redirectStateCookieName, $showPermanentSetting;
global $customStrings;
if (!isset($showPermanentSetting)){
$showPermanentSetting = false;
......@@ -99,6 +101,7 @@ function printWAYF(){
function printSettings(){
global $selectedIDP, $language, $IDProviders, $redirectCookieName;
global $customStrings;
$actionURL = $_SERVER['SCRIPT_NAME'].'?'.htmlentities($_SERVER['QUERY_STRING']);
$defaultSelected = ($selectedIDP == '-') ? 'selected="selected"' : '';
......@@ -238,6 +241,7 @@ function printOptionElement($IDProviders, $key, $selectedIDP){
function printNotice(){
global $redirectCookieName, $IDProviders;
global $customStrings;
$actionURL = $_SERVER['SCRIPT_NAME'].'?'.htmlentities($_SERVER['QUERY_STRING']);
......@@ -280,6 +284,8 @@ function printNotice(){
// Prints end of HTML page
function printFooter(){
global $customStrings;
// Check if footer template exists
if(file_exists('custom-footer.php')){
include('custom-footer.php');
......@@ -294,6 +300,7 @@ function printFooter(){
function printError($message){
global $langStrings, $language, $supportContactEmail;
global $customStrings;
// Show Header
printHeader();
......@@ -316,6 +323,7 @@ function printEmbeddedWAYFScript(){
global $langStrings, $language, $imageURL, $javascriptURL, $cssURL, $logoURL, $smallLogoURL, $federationURL;
global $selectedIDP, $IDProviders, $SAMLDomainCookieName, $redirectCookieName, $redirectStateCookieName, $federationName;
global $customStrings;
// Set values that are used in the java script
$loginWithString = getLocalString('login_with');
......@@ -410,6 +418,7 @@ ENTRY;
// Print sample configuration script used for Embedded WAYF
function printEmbeddedConfigurationScript(){
global $IDProviders;
global $customStrings;
$types = array();
foreach ($IDProviders as $IDProvider){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment