From c566d0784739fb1d97e4fe04a70fc1076a51ea0e Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 21 May 2024 13:34:58 +0200 Subject: [PATCH] fixes little xml layout issue --- .../39911_tabulator_in_contentmittitel.php | 92 ++++++++++--------- 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/system/dbupdate_3.4/39911_tabulator_in_contentmittitel.php b/system/dbupdate_3.4/39911_tabulator_in_contentmittitel.php index 1e86da19e..b743648ed 100644 --- a/system/dbupdate_3.4/39911_tabulator_in_contentmittitel.php +++ b/system/dbupdate_3.4/39911_tabulator_in_contentmittitel.php @@ -1,6 +1,6 @@ @@ -36,61 +36,71 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -END; + +EOD; -$raum_contentmittitel_xsd= << -END; + +EOD; -$raum_contentmittitel_xslt_xhtml_c4= << -

- -

- -
-END; +

+ +

+ + + +EOD; -$raum_contentmittitel_insert_query= <<db_query($raum_contentmittitel_insert_query)) - echo 'FAILED INSERTING NEW TEMPLATE RAUM_CONTENTMITTITEL : ' . $db->db_last_error() . '
'; -else - echo '
SUCCESSFULLY INSERTING NEW TEMPLATE RAUM_CONTENTMITTITEL '; - - -$raum_content_update_query= <<db_query($raum_content_update_query)) - echo 'FAILED TO UPDATE ROOMS WITH NEW TEMPLATE raum_contentmittitel : ' . $db->db_last_error() . '
'; -else - echo '
SUCCESSFULLY UPDATED ROOMS WITH NEW TEMPLATE raum_contentmittitel'; - + ('raum_contentmittitel','template for the raum view that uses the tabulator javascript instead of the jquery scripts and the table sorter ', '{$raum_contentmittitel_xsd}', '{$raum_contentmittitel_xslt_xhtml}' , NULL, '{$raum_contentmittitel_xslt_xhtml_c4}'); +EOD; + +$raum_content_update_query= <<db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='raum_contentmittitel'")) { + + // only inserting the new template if it doesn't exist already + if ($db->db_num_rows($result) == 0) { + + // executing the insert statement for the new template + if (!$db->db_query($raum_contentmittitel_insert_query)){ + echo 'FAILED INSERTING NEW TEMPLATE RAUM_CONTENTMITTITEL : ' . $db->db_last_error() . '
'; + + } + else { + echo '
SUCCESSFULLY INSERTING NEW TEMPLATE RAUM_CONTENTMITTITEL '; + + // only update the rooms template if the insert of the room_contentmittitel template was successful + // executing the update statement to update the template for all room content + if (!$db->db_query($raum_content_update_query)){ + echo 'FAILED TO UPDATE ROOMS WITH NEW TEMPLATE raum_contentmittitel : ' . $db->db_last_error() . '
'; + } + else{ + echo '
SUCCESSFULLY UPDATED ROOMS WITH NEW TEMPLATE raum_contentmittitel'; + } + } + + } +} \ No newline at end of file