diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php
index add43ff72..79867ab57 100644
--- a/system/dbupdate_3.4.php
+++ b/system/dbupdate_3.4.php
@@ -89,6 +89,7 @@ require_once('dbupdate_3.4/67490_studstatus_suche_abort_controller_haengt.php');
require_once('dbupdate_3.4/69065_Projektarbeiten_Firmen_verwalten.php');
require_once('dbupdate_3.4/68744_StV_settings.php');
require_once('dbupdate_3.4/62889_reihungstest_ueberwachung_mit_constructor.php');
+require_once('dbupdate_3.4/71399_dashboard_update_widget_paths.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '
Pruefe Tabellen und Attribute!
';
diff --git a/system/dbupdate_3.4/25999_C4_dashboard.php b/system/dbupdate_3.4/25999_C4_dashboard.php
index aab20089c..186866f73 100644
--- a/system/dbupdate_3.4/25999_C4_dashboard.php
+++ b/system/dbupdate_3.4/25999_C4_dashboard.php
@@ -39,7 +39,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'hallowelt',
'Hallo Welt Widget',
'{"css": "d-flex justify-content-center align-items-center h-100", "title": "Hallo Welt"}'::jsonb,
- '{"file": "DashboardWidget/Default.js", "icon": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Farben-Testbild.svg", "name": "Hallo Welt", "width": {"max": 99}, "height": {"max": 99}, "hideFooter": false}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/Default.js", "icon": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Farben-Testbild.svg", "name": "Hallo Welt", "width": {"max": 99}, "height": {"max": 99}, "hideFooter": false}'::jsonb
);
EOWHW;
@@ -71,7 +71,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'news',
'News Widget',
'{}'::jsonb,
- '{"file": "DashboardWidget/News.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "News", "width": {"max": 4, "min": 1}, "height": {"max": 2, "min": 1}, "cis4link": "/CisVue/Cms/news", "hideFooter": false}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/News.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "News", "width": {"max": 4, "min": 1}, "height": {"max": 2, "min": 1}, "cis4link": "/CisVue/Cms/news", "hideFooter": false}'::jsonb
);
EOWHW;
@@ -103,7 +103,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'url',
'Bookmark Widget',
'{}'::jsonb,
- '{"file": "DashboardWidget/Url.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Bookmark", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": true}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/Url.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Bookmark", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": true}'::jsonb
);
EOWHW;
@@ -135,7 +135,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'ampel',
'Ampel Widget',
'{}'::jsonb,
- '{"file": "DashboardWidget/Ampel.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Ampel", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": false}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/Ampel.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Ampel", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": false}'::jsonb
);
EOWHW;
@@ -162,7 +162,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
widget_kurzbz = 'lvplan',
beschreibung = 'LV-Plan Widget',
arguments = '{"bodyClass": "p-0"}'::jsonb,
- setup = '{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
+ setup = '{"file": "public/js/components/DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
WHERE
widget_kurzbz = 'stundenplan';
EOWHW;
@@ -195,7 +195,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'lvplan',
'LV-Plan Widget',
'{"bodyClass": "p-0"}'::jsonb,
- '{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
);
EOWHW;
@@ -227,7 +227,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
'studiengang',
'Das Studiengang-Widget enthält Informationen über den Studiengang eines Studenten.',
'{}'::jsonb,
- '{"file": "DashboardWidget/Studiengang.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Studiengang", "width": {"max": 2, "min": 1}, "height": {"max": 4, "min": 1}, "hideFooter": true}'::jsonb
+ '{"file": "public/js/components/DashboardWidget/Studiengang.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Studiengang", "width": {"max": 2, "min": 1}, "height": {"max": 4, "min": 1}, "hideFooter": true}'::jsonb
);
EOWHW;
@@ -349,4 +349,4 @@ EOGP;
echo 'dashboard.tbl_dashboard_preset: Added Student Preset for Dashboard "CIS"
';
}
}
-}
\ No newline at end of file
+}
diff --git a/system/dbupdate_3.4/71399_dashboard_update_widget_paths.php b/system/dbupdate_3.4/71399_dashboard_update_widget_paths.php
new file mode 100644
index 000000000..3849d6ec5
--- /dev/null
+++ b/system/dbupdate_3.4/71399_dashboard_update_widget_paths.php
@@ -0,0 +1,77 @@
+,
+ *
+ * Beschreibung:
+ * Dashboard DB Aenderungen
+ */
+if (! defined('DB_NAME')) exit('No direct script access allowed');
+
+$corewidgetssql = 'select tw.* from dashboard.tbl_widget tw where regexp_match((setup->\'file\')::text, \'^"DashboardWidget\') is not NULL';
+if (($rescore = $db->db_query($corewidgetssql)))
+{
+ if ($db->db_num_rows($rescore) > 0)
+ {
+ $coreqry = <<'file')::text, '^"DashboardWidget', '"public/js/components/DashboardWidget')::jsonb)
+ where
+ regexp_match((setup->'file')::text, '^"DashboardWidget') is not NULL;
+
+EOCOREQRY;
+
+ if (!$db->db_query($coreqry))
+ {
+ echo 'Dashboard Core Widgets Paths Update: '.$db->db_last_error().'
';
+ }
+ else
+ {
+ echo '
Dashboard Core Widgets Paths updated.';
+ }
+ }
+}
+
+$extwidgetssql = 'select tw.* from dashboard.tbl_widget tw where regexp_match((setup->\'file\')::text, \'^"../../\') is not NULL';
+if (($resext = $db->db_query($extwidgetssql)))
+{
+ if ($db->db_num_rows($resext) > 0)
+ {
+ $extqry = <<'file')::text, '^"../../', '"public/')::jsonb)
+ where
+ regexp_match((setup->'file')::text, '^"../../') is not NULL;
+
+EOEXTQRY;
+
+ if (!$db->db_query($extqry))
+ {
+ echo 'Dashboard Extensions Widgets Paths Update: '.$db->db_last_error().'
';
+ }
+ else
+ {
+ echo '
Dashboard Extensions Widgets Paths updated.';
+ }
+ }
+}
\ No newline at end of file