CIS4 MENU sql update WIP

This commit is contained in:
SimonGschnell
2024-09-27 12:20:37 +02:00
parent 73a2bf59f3
commit 23badc3404
3 changed files with 91 additions and 10 deletions
+9 -10
View File
@@ -28,25 +28,24 @@ export default {
this.entry.menu_open = true;
} else {
this.entry.menu_open = false;
/* if (this.entry.childs instanceof Array) {
for (let child of this.entry.childs) {
child.menu_open = false;
}
} */
}
}
},
'entry.menu_open': function (newValue,oldValue) {
if (this.entry.titel == "Mein Studium") {
if (this.entry.titel == "Mein Studium")
{
console.log("here",this.entry.titel,newValue,"newValue");
}
if (newValue) {
if (newValue)
{
console.log(this.entry.titel,"open")
// only invokes .show if this.collapse is not null
this.collapse && this.collapse.show();
} else {
}
else
{
console.log(this.entry.titel,"close")
// only invokes .hide if this.collapse is not null
this.collapse && this.collapse.hide();
}
},
+1
View File
@@ -64,6 +64,7 @@ require_once('dbupdate_3.4/28575_softwarebereitstellung.php');
require_once('dbupdate_3.4/41150_oe-pfad_db_view.php');
require_once('dbupdate_3.4/44031_stv_favorites.php');
require_once('dbupdate_3.4/39911_tabulator_in_contentmittitel.php');
require_once('dbupdate_3.4/25999_C4_Menu.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
+81
View File
@@ -0,0 +1,81 @@
<?php
if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibung='CIS4_ROOT'")) {
if ($db->db_num_rows($result) == 0) {
if (!$db->db_query("BEGIN;"))
{
echo '<strong>wasnt able to start transaction: ' . $db->db_last_error() . '</strong><br>';
}
else
{
$qry =
"
INSERT INTO campus.tbl_content
(template_kurzbz, oe_kurzbz, insertamum, insertvon, updateamum, updatevon, aktiv, menu_open, beschreibung)
VALUES
(
'contentmittitel','etw',NOW(),null,null,null,TRUE,FALSE,'CIS4_ROOT'
);
INSERT INTO campus.tbl_contentsprache
(sprache, content_id, version, sichtbar, content, reviewvon, reviewamum, updateamum, updatevon, insertamum, insertvon, titel, gesperrt_uid)
VALUES
(
'German',
-- queries the content_id for the CIS4_ROOT
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'CIS4_ROOT'),
1,TRUE,'<content></content>',null,null,null,null,NOW(),null,'Cis40',null
);
INSERT INTO campus.tbl_contentchild
(content_id, child_content_id, insertamum, insertvon, updateamum, updatevon, sort)
VALUES
(
-- queries the content_id for the CIS4_ROOT
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'CIS4_ROOT'),
10882, NOW(), null, null, null, 100
);
";
if (!$db->db_query($qry))
{
echo '<strong>Menu content: ' . $db->db_last_error() . '</strong><br>';
// Rollback
if (!$db->db_query("ROLLBACK;"))
{
echo '<strong>wasnt able to rollback: ' . $db->db_last_error() . '</strong><br>';
}
else
{
echo '<strong>ROLLED BACK</strong><br>';
}
}
else
{
// Commit
if (!$db->db_query("COMMIT;"))
{
echo '<strong>wasnt able to commit: ' . $db->db_last_error() . '</strong><br>';
}
else
{
echo '<strong>COMMITED</strong><br>';
}
echo '<br>Menu content created';
}
}
}
}