summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/install.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locationinfo/install.inc.php')
-rw-r--r--modules-available/locationinfo/install.inc.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules-available/locationinfo/install.inc.php b/modules-available/locationinfo/install.inc.php
index 732ea6e9..f4bbca1c 100644
--- a/modules-available/locationinfo/install.inc.php
+++ b/modules-available/locationinfo/install.inc.php
@@ -30,6 +30,7 @@ $t3 = $res[] = tableCreate('locationinfo_panel', "
`paneltype` enum('DEFAULT', 'SUMMARY', 'URL', 'UPCOMING') NOT NULL,
`panelconfig` blob NOT NULL,
`lastchange` int(10) UNSIGNED NOT NULL DEFAULT 0,
+ `ispublic` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`paneluuid`),
KEY `panelname` (`panelname`)
");
@@ -103,7 +104,7 @@ if (tableGetConstraints('locationinfo_backendlog', 'serverid',
'locationinfo_coursebackend', 'serverid', 'ON UPDATE CASCADE ON DELETE CASCADE');
}
-// 2025-06-17: Make locationds text column
+// 2025-06-17: Make locationids text column
if (stripos(tableColumnType('locationinfo_panel', 'locationids'), 'text') === false) {
if (Database::exec('ALTER TABLE `locationinfo_panel` MODIFY `locationids` text CHAR SET ascii NOT NULL')) {
$res[] = UPDATE_DONE;
@@ -112,6 +113,15 @@ if (stripos(tableColumnType('locationinfo_panel', 'locationids'), 'text') === fa
}
}
+// 2025-12-12: Add "public" column
+if (!tableHasColumn('locationinfo_panel', 'ispublic')) {
+ if (Database::exec('ALTER TABLE `locationinfo_panel` ADD `ispublic` tinyint(1) NOT NULL DEFAULT 0') !== false) {
+ $res[] = UPDATE_DONE;
+ } else {
+ $res[] = UPDATE_FAILED;
+ }
+}
+
// Create response for browser
if (in_array(UPDATE_RETRY, $res)) {