From 43a05fc13b3e97466ccb14efa81965e00fedef8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ou=C5=A1ek?= <brousek@ics.muni.cz>
Date: Fri, 24 Jun 2022 16:03:00 +0200
Subject: [PATCH] fix: rename wayf.php to module_campusmultiauth.php

---
 README.md                                                 | 2 +-
 config-templates/{wayf.php => module_campusmultiauth.php} | 0
 www/idpSearch.php                                         | 2 +-
 www/selectsource.php                                      | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename config-templates/{wayf.php => module_campusmultiauth.php} (100%)

diff --git a/README.md b/README.md
index e2d4df3..4164b43 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Of course, both authsources must be defined in authsources.php file. When the co
 
 ## Login page configuration
 
-The second part of the configuration is setting up the login page itself. While doing that, it's highly recommended to follow our suggestions (***TODO link***). To configure the login page, you need to create a new configuration file `wayf.php`. In this module, there is an example configuration available at `config-templates/wayf.php`. In configuration file, there are following options available:
+The second part of the configuration is setting up the login page itself. While doing that, it's highly recommended to follow our suggestions (***TODO link***). To configure the login page, you need to create a new configuration file `module_campusmultiauth.php`. In this module, there is an example configuration available at `config-templates/module_campusmultiauth.php`. In configuration file, there are following options available:
 
 `css_framework` - if set to `muni_jvs`, the login page displays in MUNI framework. Otherwise, Bootstrap 5 is used.
 
diff --git a/config-templates/wayf.php b/config-templates/module_campusmultiauth.php
similarity index 100%
rename from config-templates/wayf.php
rename to config-templates/module_campusmultiauth.php
diff --git a/www/idpSearch.php b/www/idpSearch.php
index 3de6b70..09da519 100644
--- a/www/idpSearch.php
+++ b/www/idpSearch.php
@@ -9,7 +9,7 @@ header('Content-type: application/json');
 
 $index = $_GET['index'];
 
-$config = $wayfConfig = Configuration::getConfig('wayf.php')->toArray();
+$config = Configuration::getConfig('module_campusmultiauth.php')->toArray();
 $searchBox = $config['components'][$index];
 
 $metadataStorageHandler = MetaDataStorageHandler::getMetadataHandler();
diff --git a/www/selectsource.php b/www/selectsource.php
index 87e5098..bd272d8 100644
--- a/www/selectsource.php
+++ b/www/selectsource.php
@@ -68,7 +68,7 @@ if (array_key_exists('source', $_POST)) {
     }
 }
 
-$wayfConfig = Configuration::getConfig('wayf.php')->toArray();
+$wayfConfig = Configuration::getConfig('module_campusmultiauth.php')->toArray();
 
 if (!empty($wayfConfig['footer']['format']) && $wayfConfig['footer']['format'] === 'markdown') {
     $converter = new CommonMarkConverter();
-- 
GitLab