From b567ad77179835e1056a0a9e379e6f67c38971e2 Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Mon, 6 Nov 2017 07:53:08 +0100 Subject: [PATCH 1/4] Community Addon -> YCom YCom Anpassungen --- lib/YConverter/Converter.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/YConverter/Converter.php b/lib/YConverter/Converter.php index 8083be4..66a71ad 100644 --- a/lib/YConverter/Converter.php +++ b/lib/YConverter/Converter.php @@ -203,6 +203,13 @@ public function boot() ['seo42\s*::\s*getLangCode\((.*?)\)' => 'rex_clang::getCurrent()->getCode()'], ['seo42\s*::\s*getBaseUrl\((.*?)\)' => 'rex::getServer()'], ] + ], [ + // Community Addon -> YCom + 'replaces' => [ + ['checkperm' => 'checkPerm'], + ['community' => 'ycom'], + ['rex_com_auth' => 'rex_ycom_auth'], + ] ], ]; From 6e7f883abc1a644fc924c175c8f9e89b118b3f8b Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Mon, 6 Nov 2017 08:13:18 +0100 Subject: [PATCH 2/4] Methodenersetzung abgesichert --- lib/YConverter/Converter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/YConverter/Converter.php b/lib/YConverter/Converter.php index 66a71ad..8d781ad 100644 --- a/lib/YConverter/Converter.php +++ b/lib/YConverter/Converter.php @@ -206,7 +206,7 @@ public function boot() ], [ // Community Addon -> YCom 'replaces' => [ - ['checkperm' => 'checkPerm'], + ['checkperm\(' => 'checkPerm('], ['community' => 'ycom'], ['rex_com_auth' => 'rex_ycom_auth'], ] From 6db8c28611c864b699d9d9fe926e9336ad226bdc Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Mon, 6 Nov 2017 08:15:10 +0100 Subject: [PATCH 3/4] Verwendung Klassenname abgesichert --- lib/YConverter/Converter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/YConverter/Converter.php b/lib/YConverter/Converter.php index 8d781ad..8908373 100644 --- a/lib/YConverter/Converter.php +++ b/lib/YConverter/Converter.php @@ -208,7 +208,7 @@ public function boot() 'replaces' => [ ['checkperm\(' => 'checkPerm('], ['community' => 'ycom'], - ['rex_com_auth' => 'rex_ycom_auth'], + ['rex_com_auth\s*::' => 'rex_ycom_auth::'], ] ], ]; From b1059a4cdac44543f107d43b90e00e9efe69813c Mon Sep 17 00:00:00 2001 From: Tobias Krais Date: Mon, 6 Nov 2017 10:07:37 +0100 Subject: [PATCH 4/4] Community rename failsafe --- lib/YConverter/Converter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/YConverter/Converter.php b/lib/YConverter/Converter.php index 8908373..4fc75f4 100644 --- a/lib/YConverter/Converter.php +++ b/lib/YConverter/Converter.php @@ -207,7 +207,9 @@ public function boot() // Community Addon -> YCom 'replaces' => [ ['checkperm\(' => 'checkPerm('], - ['community' => 'ycom'], + ['rex_addon::get\((["']{1})community$1\)->isActivated\(\)' => 'rex_addon::get(\'ycom\')->isActivated()'], + ['rex_addon::get\((["']{1})community$1\)->isAvailable\(\)' => 'rex_addon::get(\'ycom\')->isAvailable()'], + ['rex_addon::get\((["']{1})community$1\)->isInstalled\(\)' => 'rex_addon::get(\'ycom\')->isInstalled()'], ['rex_com_auth\s*::' => 'rex_ycom_auth::'], ] ],