From 71ebc760d41564b7476bc720cb7f37dad20aedc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <mantas@utenos-kolegija.lt> Date: Sat, 5 Sep 2015 17:14:45 +0300 Subject: [PATCH] Avoid PHP warnings about redefining constants --- attributemap/deprecatedSchacNS.php | 9 +++++++-- attributemap/newSchacNS.php | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/attributemap/deprecatedSchacNS.php b/attributemap/deprecatedSchacNS.php index f47716324..5f90e03ab 100644 --- a/attributemap/deprecatedSchacNS.php +++ b/attributemap/deprecatedSchacNS.php @@ -3,8 +3,13 @@ * This file provides translations from the schac namespace to the old, deprecated namespace provided by TERENA. */ -define('SCHAC_OLD_NS', 'urn:mace:terena.org:attribute-def:'); -define('SCHAC_NEW_NS', 'urn:schac:attribute-def:'); +if (!defined('SCHAC_OLD_NS')) { + define('SCHAC_OLD_NS', 'urn:mace:terena.org:attribute-def:'); +} + +if (!defined('SCHAC_NEW_NS')) { + define('SCHAC_NEW_NS', 'urn:schac:attribute-def:'); +} $attributemap = array( SCHAC_NEW_NS.'schacCountryOfCitizenship' => SCHAC_OLD_NS.'schacCountryOfCitizenship', diff --git a/attributemap/newSchacNS.php b/attributemap/newSchacNS.php index 80f621c08..8b3d2a756 100644 --- a/attributemap/newSchacNS.php +++ b/attributemap/newSchacNS.php @@ -3,8 +3,13 @@ * This file provides translations from the deprecated schac namespace provided by TERENA, to the new namespace. */ -define('SCHAC_OLD_NS', 'urn:mace:terena.org:attribute-def:'); -define('SCHAC_NEW_NS', 'urn:schac:attribute-def:'); +if (!defined('SCHAC_OLD_NS')) { + define('SCHAC_OLD_NS', 'urn:mace:terena.org:attribute-def:'); +} + +if (!defined('SCHAC_NEW_NS')) { + define('SCHAC_NEW_NS', 'urn:schac:attribute-def:'); +} $attributemap = array( SCHAC_OLD_NS.'schacCountryOfCitizenship' => SCHAC_NEW_NS.'schacCountryOfCitizenship', -- GitLab