From 4e821eb6b26fd65143c1dcaa73ae4c98814113e1 Mon Sep 17 00:00:00 2001
From: Banana
Date: Tue, 20 Feb 2024 15:19:09 +0100
Subject: [PATCH] replacfing old ifset implementation
---
CHANGELOG | 1 +
documentation/setup/bibliotheca.sql | 2 +-
upgrade/from-version-1.5.txt | 2 +-
upgrade/from-version-1.6.txt | 5 +++++
webclient/lib/possessed.class.php | 2 +-
webclient/setup/bibliotheca.sql.default | 2 +-
.../98/advancedsearch/advancedsearch.html | 4 ++--
.../view/98/collections/collections.html | 8 ++++----
webclient/view/98/dashboard/dashboard.html | 8 ++++----
webclient/view/98/entry/entry.html | 4 ++--
webclient/view/98/entry/field-date.html | 2 +-
webclient/view/98/entry/field-number.html | 2 +-
webclient/view/98/entry/field-selection.html | 2 +-
webclient/view/98/entry/field-text-title.html | 2 +-
webclient/view/98/entry/field-text.html | 2 +-
.../98/entry/field-text3-description.html | 2 +-
webclient/view/98/entry/field-text3.html | 2 +-
.../view/98/entry/field-textarea-content.html | 2 +-
webclient/view/98/entry/field-textarea.html | 2 +-
.../98/entry/field-upload-coverimage.html | 4 ++--
webclient/view/98/entry/field-upload.html | 2 +-
webclient/view/98/entry/field-year.html | 2 +-
.../managecollectionfields.html | 3 +--
.../98/managecolletions/managecolletions.html | 15 +++++++--------
.../98/manageentry/field-lookupmultiple.html | 4 ++--
.../view/98/manageentry/field-number.html | 4 ++--
.../view/98/manageentry/field-selection.html | 2 +-
webclient/view/98/manageentry/field-text.html | 6 +++---
.../view/98/manageentry/field-text3.html | 6 +++---
.../view/98/manageentry/field-textarea.html | 4 ++--
.../view/98/manageentry/field-upload.html | 6 +++---
webclient/view/98/manageentry/field-year.html | 4 ++--
.../view/98/managegroups/managegroups.html | 6 +++---
.../view/98/manageusers/manageusers.html | 17 +++++++++--------
webclient/view/98/profile/profile.html | 19 +++++++++++++------
webclient/view/98/tags/tags.html | 2 +-
webclient/view/98/tool/tool-googlebooks.html | 2 +-
webclient/view/98/tool/tool-imdbweb.html | 2 +-
webclient/view/98/tool/tool-musicbrainz.html | 4 ++--
webclient/view/98/tool/tool.html | 2 +-
.../advancedsearch/advancedsearch.html | 10 +++++-----
webclient/view/default/bulkedit/bulkedit.php | 4 +---
.../view/default/collections/collections.html | 8 ++++----
.../view/default/dashboard/dashboard.html | 8 ++++----
webclient/view/default/entry/entry.html | 5 ++---
webclient/view/default/entry/field-date.html | 2 +-
.../view/default/entry/field-number.html | 2 +-
.../view/default/entry/field-selection.html | 2 +-
.../view/default/entry/field-text-title.html | 2 +-
webclient/view/default/entry/field-text.html | 2 +-
.../entry/field-text3-description.html | 2 +-
webclient/view/default/entry/field-text3.html | 2 +-
.../default/entry/field-textarea-content.html | 2 +-
.../view/default/entry/field-textarea.html | 2 +-
.../entry/field-upload-coverimage.html | 4 ++--
.../view/default/entry/field-upload.html | 2 +-
webclient/view/default/entry/field-year.html | 2 +-
.../managecollectionfields.html | 2 +-
.../managecolletions/managecolletions.html | 10 +++++-----
.../default/manageentry/field-hidden.html | 2 +-
.../manageentry/field-lookupmultiple.html | 4 ++--
.../default/manageentry/field-number.html | 4 ++--
.../default/manageentry/field-selection.html | 2 +-
.../view/default/manageentry/field-text.html | 6 +++---
.../view/default/manageentry/field-text3.html | 6 +++---
.../default/manageentry/field-textarea.html | 4 ++--
.../default/manageentry/field-upload.html | 6 +++---
.../view/default/manageentry/field-year.html | 4 ++--
.../default/managegroups/managegroups.html | 6 +++---
.../view/default/manageusers/manageusers.html | 14 +++++++-------
.../view/default/manageusers/manageusers.php | 1 -
webclient/view/default/profile/profile.html | 11 +++++------
webclient/view/default/tags/tags.html | 2 +-
.../view/default/tool/tool-googlebooks.html | 2 +-
webclient/view/default/tool/tool-imdbweb.html | 2 +-
.../view/default/tool/tool-musicbrainz.html | 4 ++--
webclient/view/default/tool/tool.html | 2 +-
77 files changed, 167 insertions(+), 160 deletions(-)
create mode 100644 upgrade/from-version-1.6.txt
diff --git a/CHANGELOG b/CHANGELOG
index fe6f478..f932ada 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
1.x - The Ceremonial Chambers
* Added group infos to profile view.
* User- and groupmanagement: Check if in use before deletion.
+ * Remove legacy ifset method and replace with ??
1.6 - Chizra 2024-02-03
diff --git a/documentation/setup/bibliotheca.sql b/documentation/setup/bibliotheca.sql
index 89d6e03..fefa5d1 100644
--- a/documentation/setup/bibliotheca.sql
+++ b/documentation/setup/bibliotheca.sql
@@ -150,7 +150,7 @@ INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`,
(14, 'year', 'Year', 'year', 'entrySingleNum', '`year` int(10) NULL, ADD INDEX (`year`)', '', NULL, 'int 10', '2019-09-01 19:30:11', '2021-07-09 08:30:23', 0, 1, 1, 'rw-r--r--'),
(15, 'coverimage', 'Cover image', 'upload', NULL, NULL, '', NULL, 'One file in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2021-01-02 19:56:10', 0, 1, 1, 'rw-r--r--'),
(16, 'attachment', 'Attachments', 'upload_multiple', NULL, NULL, '', NULL, 'Multiple in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2021-01-02 19:56:10', 0, 1, 1, 'rw-r--r--'),
-(17, 'os', 'Operating system and version', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', '2019-09-01 19:55:13', '2022-10-08 10:46:55', 0, 1, 1, 'rw-r--r--'),
+(17, 'os', 'Operating system and version', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', '2019-09-01 19:55:13', '2022-10-08 10:46:55', 0, 1, 1, 'rw-r--r--'),
(18, 'actors', 'Actors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:12:48', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
(19, 'countries', 'Countries', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:16:08', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
(20, 'directors', 'Directors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:17:59', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
diff --git a/upgrade/from-version-1.5.txt b/upgrade/from-version-1.5.txt
index 760da8d..65517b8 100644
--- a/upgrade/from-version-1.5.txt
+++ b/upgrade/from-version-1.5.txt
@@ -2,7 +2,7 @@
As of version 1.6, the field 'Combined Search' provides a much better search base.
How to change and use new field: Run the following sql query. Replace #REPLACEME# with the used DB prefix.
```
-INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'combSearch', 'Combined Search', 'hidden', 'entryText', '`combSearch` text NULL DEFAULT NULL, ADD FULLTEXT (`combSearch`)', '', NULL, 'mysql text - Content will be auto generated from other entry fields', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, '1', '1', 'rw-r--r--');
+INSERT INTO `bib_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'combSearch', 'Combined Search', 'hidden', 'entryText', '`combSearch` text NULL DEFAULT NULL, ADD FULLTEXT (`combSearch`)', '', NULL, 'mysql text - Content will be auto generated from other entry fields', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, '1', '1', 'rw-r--r--');
```
Add the new field 'Combined Search' to a collection.
Change the 'Default gloabal seach field' to 'Combined search' and save.
diff --git a/upgrade/from-version-1.6.txt b/upgrade/from-version-1.6.txt
new file mode 100644
index 0000000..4598242
--- /dev/null
+++ b/upgrade/from-version-1.6.txt
@@ -0,0 +1,5 @@
+# DB changes. Run each line against your bibliotheca DB.
+Replace #REPLACEME# with your table prefix. Default is bib
+```
+UPDATE `#REPLACEME#_sys_fields` SET `value` = 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', `apiinfo` = 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11' WHERE `#REPLACEME#_sys_fields`.`id` = 17;
+```
\ No newline at end of file
diff --git a/webclient/lib/possessed.class.php b/webclient/lib/possessed.class.php
index d1007f3..dabd638 100644
--- a/webclient/lib/possessed.class.php
+++ b/webclient/lib/possessed.class.php
@@ -714,7 +714,7 @@ class Possessed {
}
if(!$ret) {
- $queryStr = "SELECT `id` FROM `".DB_PREFIX."_user2group`
+ $queryStr = "SELECT `fk_group_id` FROM `".DB_PREFIX."_user2group`
WHERE `fk_group_id` = '".$this->_DB->real_escape_string($groupId)."'";
if(QUERY_DEBUG) Summoner::sysLog("[QUERY] ".__METHOD__." query: ".Summoner::cleanForLog($queryStr));
try {
diff --git a/webclient/setup/bibliotheca.sql.default b/webclient/setup/bibliotheca.sql.default
index 89d6e03..fefa5d1 100644
--- a/webclient/setup/bibliotheca.sql.default
+++ b/webclient/setup/bibliotheca.sql.default
@@ -150,7 +150,7 @@ INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`,
(14, 'year', 'Year', 'year', 'entrySingleNum', '`year` int(10) NULL, ADD INDEX (`year`)', '', NULL, 'int 10', '2019-09-01 19:30:11', '2021-07-09 08:30:23', 0, 1, 1, 'rw-r--r--'),
(15, 'coverimage', 'Cover image', 'upload', NULL, NULL, '', NULL, 'One file in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2021-01-02 19:56:10', 0, 1, 1, 'rw-r--r--'),
(16, 'attachment', 'Attachments', 'upload_multiple', NULL, NULL, '', NULL, 'Multiple in $_FILES[uploads] of post', '2019-09-01 19:48:44', '2021-01-02 19:56:10', 0, 1, 1, 'rw-r--r--'),
-(17, 'os', 'Operating system and version', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', '2019-09-01 19:55:13', '2022-10-08 10:46:55', 0, 1, 1, 'rw-r--r--'),
+(17, 'os', 'Operating system and version', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 98,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', '2019-09-01 19:55:13', '2022-10-08 10:46:55', 0, 1, 1, 'rw-r--r--'),
(18, 'actors', 'Actors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:12:48', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
(19, 'countries', 'Countries', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:16:08', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
(20, 'directors', 'Directors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', '2020-07-26 07:17:59', '2021-04-03 14:41:48', NULL, 1, 1, 'rw-r--r--'),
diff --git a/webclient/view/98/advancedsearch/advancedsearch.html b/webclient/view/98/advancedsearch/advancedsearch.html
index 5cd6d10..15d9b86 100644
--- a/webclient/view/98/advancedsearch/advancedsearch.html
+++ b/webclient/view/98/advancedsearch/advancedsearch.html
@@ -21,7 +21,7 @@
If the search is within a field witch is not configured to be displayed in the table view, it will be added.
title: bourne
- Available fields in are:
+ Available fields in are:
$v) {
echo $v['identifier']." ";
@@ -112,7 +112,7 @@
?>
-
+
@@ -71,7 +71,7 @@
$entry) { ?>
-
+
|
-
|
-
|
diff --git a/webclient/view/98/dashboard/dashboard.html b/webclient/view/98/dashboard/dashboard.html
index c393ed5..3cefe5a 100644
--- a/webclient/view/98/dashboard/dashboard.html
+++ b/webclient/view/98/dashboard/dashboard.html
@@ -20,7 +20,7 @@
$v) { ?>
-
+
@@ -38,7 +38,7 @@
$entry) { ?>
-
+
|
-
|
-
|
diff --git a/webclient/view/98/entry/entry.html b/webclient/view/98/entry/entry.html
index 4586e57..1affd81 100644
--- a/webclient/view/98/entry/entry.html
+++ b/webclient/view/98/entry/entry.html
@@ -1,7 +1,7 @@
-
+
- EDIT
+ EDIT
">
:
-
+
diff --git a/webclient/view/98/entry/field-number.html b/webclient/view/98/entry/field-number.html
index 2afc484..6f748e8 100644
--- a/webclient/view/98/entry/field-number.html
+++ b/webclient/view/98/entry/field-number.html
@@ -1,4 +1,4 @@
:
-
+
diff --git a/webclient/view/98/entry/field-selection.html b/webclient/view/98/entry/field-selection.html
index 1ab89ba..00c8ad1 100644
--- a/webclient/view/98/entry/field-selection.html
+++ b/webclient/view/98/entry/field-selection.html
@@ -1,4 +1,4 @@
:
-
+
diff --git a/webclient/view/98/entry/field-text-title.html b/webclient/view/98/entry/field-text-title.html
index fbfb079..07501b9 100644
--- a/webclient/view/98/entry/field-text-title.html
+++ b/webclient/view/98/entry/field-text-title.html
@@ -1 +1 @@
-
+
diff --git a/webclient/view/98/entry/field-text.html b/webclient/view/98/entry/field-text.html
index 4c5c67a..aa2573e 100644
--- a/webclient/view/98/entry/field-text.html
+++ b/webclient/view/98/entry/field-text.html
@@ -1,3 +1,3 @@
- :
+ :
diff --git a/webclient/view/98/entry/field-text3-description.html b/webclient/view/98/entry/field-text3-description.html
index 18ba661..86923b7 100644
--- a/webclient/view/98/entry/field-text3-description.html
+++ b/webclient/view/98/entry/field-text3-description.html
@@ -1 +1 @@
-
+
diff --git a/webclient/view/98/entry/field-text3.html b/webclient/view/98/entry/field-text3.html
index 1210cdf..3a65749 100644
--- a/webclient/view/98/entry/field-text3.html
+++ b/webclient/view/98/entry/field-text3.html
@@ -1,3 +1,3 @@
- :
+ :
diff --git a/webclient/view/98/entry/field-textarea-content.html b/webclient/view/98/entry/field-textarea-content.html
index f739df2..8e440b8 100644
--- a/webclient/view/98/entry/field-textarea-content.html
+++ b/webclient/view/98/entry/field-textarea-content.html
@@ -1 +1 @@
-
+
diff --git a/webclient/view/98/entry/field-textarea.html b/webclient/view/98/entry/field-textarea.html
index 3520a52..9600337 100644
--- a/webclient/view/98/entry/field-textarea.html
+++ b/webclient/view/98/entry/field-textarea.html
@@ -1 +1 @@
-:
+:
diff --git a/webclient/view/98/entry/field-upload-coverimage.html b/webclient/view/98/entry/field-upload-coverimage.html
index 3ac58ee..a476a41 100644
--- a/webclient/view/98/entry/field-upload-coverimage.html
+++ b/webclient/view/98/entry/field-upload-coverimage.html
@@ -1,6 +1,6 @@
-
diff --git a/webclient/view/98/entry/field-upload.html b/webclient/view/98/entry/field-upload.html
index 6232e6d..431301a 100644
--- a/webclient/view/98/entry/field-upload.html
+++ b/webclient/view/98/entry/field-upload.html
@@ -1,3 +1,3 @@
:
-
+
diff --git a/webclient/view/98/entry/field-year.html b/webclient/view/98/entry/field-year.html
index a5dd7b8..f19b736 100644
--- a/webclient/view/98/entry/field-year.html
+++ b/webclient/view/98/entry/field-year.html
@@ -1,4 +1,4 @@
:
-
+
diff --git a/webclient/view/98/managecollectionfields/managecollectionfields.html b/webclient/view/98/managecollectionfields/managecollectionfields.html
index fb163d0..886be30 100644
--- a/webclient/view/98/managecollectionfields/managecollectionfields.html
+++ b/webclient/view/98/managecollectionfields/managecollectionfields.html
@@ -40,12 +40,11 @@
-
|