From ed1d4b1a5053e61b3c00b8399d1fc2b081afeb93 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 14 Oct 2024 10:17:20 +0200 Subject: [PATCH] regex replaces old content links with new CIS4 controller links and adopts the Menu Entry links to not refresh the page when closing the Menu point --- application/controllers/api/frontend/v1/Cms.php | 1 - application/libraries/CmsLib.php | 5 ++++- system/dbupdate_3.4/25999_C4_Menu.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/controllers/api/frontend/v1/Cms.php b/application/controllers/api/frontend/v1/Cms.php index 9b45fe81d..51acf5067 100644 --- a/application/controllers/api/frontend/v1/Cms.php +++ b/application/controllers/api/frontend/v1/Cms.php @@ -81,7 +81,6 @@ class Cms extends FHCAPI_Controller $sichtbar = $this->input->get("sichtbar",TRUE); $content = $this->cmslib->getContent($content_id, $version, $sprache, $sichtbar); - $content = $this->getDataOrTerminateWithError($content); $this->terminateWithSuccess($content); diff --git a/application/libraries/CmsLib.php b/application/libraries/CmsLib.php index 746d7f831..b65e2a71c 100755 --- a/application/libraries/CmsLib.php +++ b/application/libraries/CmsLib.php @@ -117,8 +117,11 @@ class CmsLib $transformed_content = $processor->transformToXML($XML); + //replaces all the dms.php with the new CIS4 Controller $transformed_content = str_replace('dms.php', APP_ROOT . 'cms/dms.php', $transformed_content); - + //replaces all the cms.php with the new CIS4 Controller + $transformed_content = preg_replace('/content\.php\?content\_id\=([0-9]+)/', APP_ROOT.'cis.php/CisVue/Cms/content/$1', $transformed_content); + return success([ "betreff"=>$betreff, "type"=>$content->template_kurzbz, diff --git a/system/dbupdate_3.4/25999_C4_Menu.php b/system/dbupdate_3.4/25999_C4_Menu.php index 624eb60d6..ec31f3cc3 100755 --- a/system/dbupdate_3.4/25999_C4_Menu.php +++ b/system/dbupdate_3.4/25999_C4_Menu.php @@ -225,7 +225,7 @@ if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibun -- queries the content_id for the VORLAGEN (SELECT content_id from campus.tbl_content WHERE beschreibung = 'VORLAGEN'), 1,TRUE, - '', + '', null,null,null,null,NOW(),null,'Vorlagen',null );