]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
replacfing old ifset implementation
authorBanana <mail@bananas-playground.net>
Tue, 20 Feb 2024 14:19:09 +0000 (15:19 +0100)
committerBanana <mail@bananas-playground.net>
Tue, 20 Feb 2024 14:19:09 +0000 (15:19 +0100)
77 files changed:
CHANGELOG
documentation/setup/bibliotheca.sql
upgrade/from-version-1.5.txt
upgrade/from-version-1.6.txt [new file with mode: 0644]
webclient/lib/possessed.class.php
webclient/setup/bibliotheca.sql.default
webclient/view/98/advancedsearch/advancedsearch.html
webclient/view/98/collections/collections.html
webclient/view/98/dashboard/dashboard.html
webclient/view/98/entry/entry.html
webclient/view/98/entry/field-date.html
webclient/view/98/entry/field-number.html
webclient/view/98/entry/field-selection.html
webclient/view/98/entry/field-text-title.html
webclient/view/98/entry/field-text.html
webclient/view/98/entry/field-text3-description.html
webclient/view/98/entry/field-text3.html
webclient/view/98/entry/field-textarea-content.html
webclient/view/98/entry/field-textarea.html
webclient/view/98/entry/field-upload-coverimage.html
webclient/view/98/entry/field-upload.html
webclient/view/98/entry/field-year.html
webclient/view/98/managecollectionfields/managecollectionfields.html
webclient/view/98/managecolletions/managecolletions.html
webclient/view/98/manageentry/field-lookupmultiple.html
webclient/view/98/manageentry/field-number.html
webclient/view/98/manageentry/field-selection.html
webclient/view/98/manageentry/field-text.html
webclient/view/98/manageentry/field-text3.html
webclient/view/98/manageentry/field-textarea.html
webclient/view/98/manageentry/field-upload.html
webclient/view/98/manageentry/field-year.html
webclient/view/98/managegroups/managegroups.html
webclient/view/98/manageusers/manageusers.html
webclient/view/98/profile/profile.html
webclient/view/98/tags/tags.html
webclient/view/98/tool/tool-googlebooks.html
webclient/view/98/tool/tool-imdbweb.html
webclient/view/98/tool/tool-musicbrainz.html
webclient/view/98/tool/tool.html
webclient/view/default/advancedsearch/advancedsearch.html
webclient/view/default/bulkedit/bulkedit.php
webclient/view/default/collections/collections.html
webclient/view/default/dashboard/dashboard.html
webclient/view/default/entry/entry.html
webclient/view/default/entry/field-date.html
webclient/view/default/entry/field-number.html
webclient/view/default/entry/field-selection.html
webclient/view/default/entry/field-text-title.html
webclient/view/default/entry/field-text.html
webclient/view/default/entry/field-text3-description.html
webclient/view/default/entry/field-text3.html
webclient/view/default/entry/field-textarea-content.html
webclient/view/default/entry/field-textarea.html
webclient/view/default/entry/field-upload-coverimage.html
webclient/view/default/entry/field-upload.html
webclient/view/default/entry/field-year.html
webclient/view/default/managecollectionfields/managecollectionfields.html
webclient/view/default/managecolletions/managecolletions.html
webclient/view/default/manageentry/field-hidden.html
webclient/view/default/manageentry/field-lookupmultiple.html
webclient/view/default/manageentry/field-number.html
webclient/view/default/manageentry/field-selection.html
webclient/view/default/manageentry/field-text.html
webclient/view/default/manageentry/field-text3.html
webclient/view/default/manageentry/field-textarea.html
webclient/view/default/manageentry/field-upload.html
webclient/view/default/manageentry/field-year.html
webclient/view/default/managegroups/managegroups.html
webclient/view/default/manageusers/manageusers.html
webclient/view/default/manageusers/manageusers.php
webclient/view/default/profile/profile.html
webclient/view/default/tags/tags.html
webclient/view/default/tool/tool-googlebooks.html
webclient/view/default/tool/tool-imdbweb.html
webclient/view/default/tool/tool-musicbrainz.html
webclient/view/default/tool/tool.html

index fe6f478a96969649293f51e7860107934beb3ef7..f932ada47e27b950a199ccd4e5580e16a74e63f1 100644 (file)
--- 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
index 89d6e037429e4bc193dc43158c049fdf98f15e32..fefa5d11208eb786e55f610ad43c08498ade9aa4 100644 (file)
@@ -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--'),
index 760da8d79fc7b159bd170002edc384afead16956..65517b8844b048faf5f800a2d02c88430c32a752 100644 (file)
@@ -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 (file)
index 0000000..4598242
--- /dev/null
@@ -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
index d1007f3c2eb09ab1c7c832bc9b64cd4452789dbe..dabd638e10e82c5fccdd4cfc1e6845fff72e9aa0 100644 (file)
@@ -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 {
index 89d6e037429e4bc193dc43158c049fdf98f15e32..fefa5d11208eb786e55f610ad43c08498ade9aa4 100644 (file)
@@ -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--'),
index 5cd6d106bc4c590ea176252302089defd387ebc0..15d9b86929d94a03a939f08b21a37fa5e475277d 100644 (file)
@@ -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.
        </p>
        <pre>title: bourne</pre>
-       <p>Available fields in <b><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></b> are:</p>
+       <p>Available fields in <b><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></b> are:</p>
        <pre style="white-space: normal">
        <?php foreach($TemplateData['collectionFields'] as $k=>$v) {
                echo $v['identifier']." ";
                                                ?>
                                        <td>
                                                <?php
-                                                               if(Summoner::ifset($f, 'value')) {
+                                                               if(isset($f['value'])) {
                                                                        if(is_array($f['value'])) {
                                                                                echo Summoner::limitWithDots(implode(', ',$f['value']),100,'...');
                                                                        }
index f814aded9ec8cb99f42f76e307cdd2752accdf9e..29c9a9ad735babf7c7c8b8da246b0bbc3ebb1d9a 100644 (file)
@@ -56,7 +56,7 @@
 <?php } ?>
 
 <?php if(!empty($TemplateData['entries'])) { ?>
-<h3><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></h3>
+<h3><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></h3>
 <div class="sunken-panel">
        <table width="100%">
                <thead>
@@ -71,7 +71,7 @@
                <?php foreach($TemplateData['entries']['results'] as $entryK=>$entry) { ?>
                        <tr>
                                <td>
-                                       <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                                       <?php if(isset($entry['fields']['coverimage'])) { ?>
                                        <a href="<?php echo $TemplateData['entryLinkPrefix']; ?>&id=<?php echo $entryK; ?>">
                                                <img src="<?php echo $TemplateData['storagePath'].'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                                     alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>"
                                        <?php } ?>
                                </td>
                                <td>
-                                       <?php if(Summoner::ifset($entry['fields'], 'title')) {
+                                       <?php if(isset($entry['fields']['title'])) {
                                                                echo $entry['fields']['title']['value'];
                                                        } ?>
                                </td>
                                <td>
-                                       <?php if(Summoner::ifset($entry['fields'], array('description','value'))) {
+                                       <?php if(isset($entry['fields']['description']['value'])) {
                                                                echo $entry['fields']['description']['value'];
                                                        } ?>
                                </td>
index c393ed5dce0451f2fca2a28bf13fd376296044d8..3cefe5ab89ee235d04523fa62bf515b5ef33978f 100644 (file)
@@ -20,7 +20,7 @@
 
 <?php foreach($TemplateData['latest'] as $k=>$v) { ?>
        <h4>
-               <a href="index.php?p=collections&collection=<?php echo $k; echo Summoner::ifset($TemplateData, 'navSearched'); ?>"><?php echo $v['name']; ?></a>
+               <a href="index.php?p=collections&collection=<?php echo $k; echo $TemplateData['navSearched'] ?? ''; ?>"><?php echo $v['name']; ?></a>
                <?php echo $v['description']; ?>
        </h4>
        <?php if(isset($v['entries']['results'])) { ?>
@@ -38,7 +38,7 @@
                        <?php foreach($v['entries']['results'] as $entryK=>$entry) { ?>
                                <tr>
                                        <td>
-                                               <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                                               <?php if(isset($entry['fields']['coverimage'])) { ?>
                                                <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>">
                                                        <img src="<?php echo PATH_WEB_STORAGE.'/'.$k.'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                                             alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>"
                                                <?php } ?>
                                        </td>
                                        <td>
-                                               <?php if(Summoner::ifset($entry['fields'], 'title')) {
+                                               <?php if(isset($entry['fields']['title'])) {
                                                        echo $entry['fields']['title']['value'];
                                                } ?>
                                        </td>
                                        <td>
-                                               <?php if(Summoner::ifset($entry['fields'], array('description','value'))) {
+                                               <?php if(isset($entry['fields']['description']['value'])) {
                                                        echo $entry['fields']['description']['value'];
                                                } ?>
                                        </td>
index 4586e57df2da4ede340855b43f794971d7007c37..1affd815eb99159423c48dfb90262943b595945f 100644 (file)
@@ -1,7 +1,7 @@
-<h3><a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+<h3><a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>"><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></a></h3>
 <article>
        <?php if($TemplateData['showEdit'] === true) { ?>
-       <p><a href="index.php?p=manageentry&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>&id=<?php echo $TemplateData['entry']['id']; ?>">EDIT</a></p>
+       <p><a href="index.php?p=manageentry&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>&id=<?php echo $TemplateData['entry']['id'] ?? ''; ?>">EDIT</a></p>
        <?php
        }
 
index 7ebf58bd7b07a28f8fb65f62dc87cff963d1055c..e34b64dea206c9d5f18293f38e7eadb4b9945dee 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="date" data-field-id="<?php echo $field['identifier']; ?>">
        <?php echo $field['displayname']; ?>:
-       <a href="index.php?p=collections&collection='.$TemplateData['loadedCollection']['id'].'&fid='.$field['identifier'].'&fv='.urlencode(Summoner::ifset($field, 'value')).'"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>&fid=<?php echo $field['identifier'] ?? ''; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index 2afc484ef8a4e742b45ba811e832429fdc887a71..6f748e83d2206dca7af714fa9818d735e7dedc3b 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="number" data-field-id="<?php echo $field['identifier']; ?>">
        <?php echo $field['displayname']; ?>:
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index 1ab89ba642a8bbaf29a84f129c1c5aa43db5c16a..00c8ad1170e2cc7da27d20715d381f8a136f30e4 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="selection" data-field-id="<?php echo $field['identifier']; ?>">
        <?php echo $field['displayname']; ?>:
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>&fid=<?php echo $field['identifier'] ?? ''; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php $field['value'] ?? ''; ?></a>
 </p>
index fbfb0797db5d9e0d52aa0c3087523cc27fbf66b9..07501b91dba1fbf6b9eef2ca06d15bb2ca8108e6 100644 (file)
@@ -1 +1 @@
-<h1 data-field-name="text-title" data-field-id="<?php echo $field['identifier']; ?>"><?php echo Summoner::ifset($field, 'value'); ?></h1>
+<h1 data-field-name="text-title" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['value'] ?? ''; ?></h1>
index 4c5c67ab743022c712dc96f6ebda819c4913a378..aa2573eb7fc5401b2c449fb49947bea3372077f4 100644 (file)
@@ -1,3 +1,3 @@
 <p data-field-name="text" data-field-id="<?php echo $field['identifier']; ?>">
-       <?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?>
+       <?php echo $field['displayname']; ?>: <?php echo nl2br($field['value'] ?? ''); ?>
 </p>
index 18ba6616d36d3708c9a39bc50e74e52484c4da7d..86923b78e8257dee5497d7a3a42b75429898d7e5 100644 (file)
@@ -1 +1 @@
-<p data-field-name="text3-description" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="text3-description" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br($field['value'] ?? ''); ?></p>
index 1210cdf824f922b5c47815046565783d52e7c67b..3a657497229dcac8b902713ffd4f846ac8a49a89 100644 (file)
@@ -1,3 +1,3 @@
 <p data-field-name="text3" data-field-id="<?php echo $field['identifier']; ?>">
-       <?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?>
+       <?php echo $field['displayname']; ?>: <?php echo nl2br($field['value'] ?? ''); ?>
 </p>
index f739df26a35beb5c70afa121736687f512451e2d..8e440b80dcda8d0812e1129582cf67a3cb988ddd 100644 (file)
@@ -1 +1 @@
-<p data-field-name="textarea-content" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="textarea-content" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br($field['value'] ?? ''); ?></p>
index 3520a525cdf22e7a3ce2b4eb44fe43c1cf29dd92..960033786397760005e3dfb32ebce9581f5a5394 100644 (file)
@@ -1 +1 @@
-<p data-field-name="textarea" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>: <?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="textarea" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>: <?php echo nl2br($field['value'] ?? ''); ?></p>
index 3ac58eee252dac92f6760e56bf66b9d9da8b6d53..a476a4124b861bc5ae983530c3b62b40f4750d61 100644 (file)
@@ -1,6 +1,6 @@
 <div data-field-name="upload-coverimage">
-       <img src="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>"
-                title="<?php echo Summoner::ifset($field, 'value'); ?>"
+       <img src="<?php echo $TemplateData['storagePath'].'/'.$field['value'] ?? ''; ?>"
+                title="<?php echo $field['value'] ?? ''; ?>"
                 width="500px"
        />
 </div>
index 6232e6d8765b3254fe76fe63f7c869a0b49d16de..431301afa177f5959517b0c8e68ccccc9658502c 100644 (file)
@@ -1,3 +1,3 @@
 <p data-field-name="upload" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>:
-       <a href="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>" target="_blank"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="<?php echo $TemplateData['storagePath'].'/'.$field['value'] ?? ''; ?>" target="_blank"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index a5dd7b8ca5b097d731a5faa8919a73aaba4b6de4..f19b736401f8693a1af654f3e6181de3645c279e 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="year" data-field-id="<?php echo $field['identifier']; ?>">
        <?php echo $field['displayname']; ?>:
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index fb163d053a092954fc236f976e3687c96c1f5c9b..886be3092e8799760ee25314988db8baca08149c 100644 (file)
 
 <form method="post" onsubmit="return saveOrderAndSubmit()">
        <input type="hidden" name="fdata[fieldSortString]" id="fieldSort"
-          value="<?php echo Summoner::ifset($TemplateData['editData'], 'fieldSortString'); ?>">
+          value="<?php echo $TemplateData['editData']['fieldSortString'] ?? ''; ?>">
        <input type="submit" name="submitForm" value="Save">
 </form>
 
 
-
 <script src="view/98/ui/js/sortable.js"></script>
 <script>
        new Sortable(collectionFields, {
index 8401f5bc813108d171390137e297821ddaa5bd2c..e68780ad9d0b63deac57efa4d216c74d0a3908bb 100644 (file)
@@ -9,12 +9,12 @@
                <label for="name">Name *</label>
                <input id="name" type="text" autocomplete="off" name="fdata[name]"
             placeholder="Unique name. No special chars." size="30"
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                       value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
     </div>
        <div class="field-row-stacked">
                <label for="description">Description</label>
                <input id="description" type="text" autocomplete="off" size="30" name="fdata[description]"
-                      value="<?php echo Summoner::ifset($TemplateData['editData'], 'description'); ?>">
+                      value="<?php echo $TemplateData['editData']['description'] ?? ''; ?>">
    </div>
        <div class="field-row-stacked">
                <label for="defaultSearchField">Default global search field</label>
@@ -22,7 +22,7 @@
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
                        <option value="<?php echo $v['identifier']; ?>"
-                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSearchField', $v['identifier'])) echo 'selected'; ?>
+                       <?php if(isset($TemplateData['editData']['defaultSearchField'][$v['identifier']])) echo 'selected'; ?>
                        ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                        <?php } ?>
                </select>
@@ -49,7 +49,7 @@
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
                        <option value="<?php echo $v['identifier']; ?>"
-                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSortField', $v['identifier'])) echo 'selected'; ?>
+                       <?php if(isset($TemplateData['editData']['defaultSortField'][$v['identifier']])) echo 'selected'; ?>
                        ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                        <?php } ?>
                </select>
@@ -66,7 +66,7 @@
                <select id="advancedSearchTableFields" name="fdata[advancedSearchTableFields][]" multiple="multiple" size="5">
                        <?php foreach($TemplateData['existingFields'] as $k=>$v) { ?>
                        <option value="<?php echo $v['id']; ?>"
-                       <?php if(Summoner::ifset($TemplateData['editData']['advancedSearchTableFields'], $v['id'])) echo 'selected'; ?>
+                       <?php if(isset($TemplateData['editData']['advancedSearchTableFields'][$v['id']])) echo 'selected'; ?>
                        ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                        <?php } ?>
                </select>
@@ -83,7 +83,7 @@
                                <option value="">None</option>
                                <?php foreach($TemplateData['toolSelection'] as $k=>$v) { ?>
                                <option value="<?php echo $k; ?>"
-                               <?php if(Summoner::ifset($TemplateData['editData']['tool'],$k)) echo 'selected'; ?>
+                               <?php if(isset($TemplateData['editData']['tool'][$k])) echo 'selected'; ?>
                                ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                                <?php } ?>
                        </select>
                        </tbody>
                </table>
        </div>
-       <?php if(Summoner::ifset($TemplateData['editData'], 'name')) { ?>
+       <?php if(isset($TemplateData['editData']['name'])) { ?>
        <div class="field-row-stacked">
                <input id="doRightsForEntries" type="checkbox" name="fdata[doRightsForEntries]" value="1">
                <label for="doRightsForEntries">Overwrite existing rights</label>
                        Warning: This will overwrite existing entry rights (user, group, rights) with the ones from the collection!
-               </label>
        </div>
        <div class="field-row-stacked">
                <input id="doDelete" type="checkbox" name="fdata[doDelete]" value="1">
index 56766311fb8309b7d842e79395f762a711e1fcf7..0cea1ff6e357937a27122e7e9abc5af26ef8f231 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 $existingFieldValue = array();
-if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
+if(isset($TemplateData['editData'][$field['identifier']])) {
        $existingFieldValue = $TemplateData['editData'][$field['identifier']];
 }
 ?>
@@ -27,7 +27,7 @@ if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
                onkeypress="addTag(event,'<?php echo $field['identifier']; ?>','<?php echo $field['inputValidation']; ?>')"
                placeholder="Write and press enter."
        >
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="add">Add</option>
index 1e68465b7d453754cba44093285a4f59bbf1422a..b1e61a82b736b8c8a859fe32f7a09da2519daec5 100644 (file)
@@ -3,10 +3,10 @@
        <input id="<?php echo $field['identifier']; ?>" type="number"
               autocomplete="off" maxlength="10"
               name="fdata[<?php echo $field['identifier']; ?>]"
-              value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+              value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
        />
 
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="replace">Replace</option>
index 28bd05117711156adf0f6e65dbcd8d3a1c993521..a494ac33cc9a51f665bcce3ce4028213aab32c56 100644 (file)
@@ -9,7 +9,7 @@
                <?php } ?>
        </select>
 
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="replace">Replace</option>
index 2d94cd3a3d7099780f5075c17049772cc3c298c6..3f56aa7058624010b1b18babfbfea1fca7190c9d 100644 (file)
@@ -1,14 +1,14 @@
 <div class="field-row-stacked">
        <label for="<?php echo $field['identifier']; ?>"><?php echo $field['displayname']; ?>
-               (<span id="<?php echo $field['identifier']; ?>_counter"><?php echo 128-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></span>)
+               (<span id="<?php echo $field['identifier']; ?>_counter"><?php echo 128-strlen($TemplateData['editData'][$field['identifier']] ?? ''); ?></span>)
        </label>
        <input id="<?php echo $field['identifier']; ?>" type="text" autocomplete="off"
           name="fdata[<?php echo $field['identifier']; ?>]"
-          value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+          value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
        maxlength="128"
        />
 
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="add">Add</option>
index 41183c6afa25a4691e192994daec2c887f1a7459..4ce4a3d754c816a212cdc84d34ca71ccecd24065 100644 (file)
@@ -1,14 +1,14 @@
 <div class="field-row-stacked">
        <label for="<?php echo $field['identifier']; ?>">
                <?php echo $field['displayname']; ?>
-               (<span id="<?php echo $field['identifier']; ?>_counter" ><?php echo 255-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></span>)
+               (<span id="<?php echo $field['identifier']; ?>_counter" ><?php echo 255-strlen($TemplateData['editData'][$field['identifier']] ?? ''); ?></span>)
        </label>
        <textarea autocomplete="off"
                          id="<?php echo $field['identifier']; ?>"
                          rows="3" maxlength="255"
-                         name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
+                         name="fdata[<?php echo $field['identifier']; ?>]"><?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?></textarea>
 
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select  name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="add">Add</option>
index b89c5b989b651e1717f28acd4fe6fba57cbfda46..0623df5f1bf13c3e3f7c64d0d2a1f84aebbe7914 100644 (file)
@@ -3,8 +3,8 @@
        <textarea autocomplete="off"
                id="<?php echo $field['identifier']; ?>"
         rows="10"
-               name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               name="fdata[<?php echo $field['identifier']; ?>]"><?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?></textarea>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="add">Add</option>
index 2cd1889d3eb5c77a743329cace86320f231f5590..9646afb23a1eefd59fbced8cf9849a53784d1f16 100644 (file)
@@ -5,9 +5,9 @@
                   name="fdata[<?php echo $field['identifier']; ?>]"
                />
 
-               <?php if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) { ?>
-               <?php echo '<a href="'.$TemplateData['storagePath'].'/'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'">'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'</a>'; ?>
-               <input type="checkbox" value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+               <?php if(isset($TemplateData['editData'][$field['identifier']])) { ?>
+               <?php echo '<a href="'.$TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']] ?? ''.'">'.$TemplateData['editData'][$field['identifier']] ?? ''.'</a>'; ?>
+               <input type="checkbox" value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                           name="fdata[<?php echo $field['identifier']; ?>_delete]"
                           title="Delete"
                           id="fdata[<?php echo $field['identifier']; ?>_delete"
index 143893df1150acb03edfdbaed3b406ef0bce6fa3..5c93dfd74047b19ec7374ef4089d84b5023cf4c8 100644 (file)
@@ -3,10 +3,10 @@
        <input id="<?php echo $field['identifier']; ?>" type="number" autocomplete="off"
                placeholder="YYYY" min="0000" max="9999"
                name="fdata[<?php echo $field['identifier']; ?>]"
-               value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+               value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
        />
 
-       <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+       <?php if(isset($field['bulkedit'])) { ?>
        <select name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                <option value="">Select bulk edit option</option>
                <option value="replace">Replace</option>
index 2b49990f207f9a4c0bb144c58d79aa9a2a9ebc08..d2a4d1fe448e27708edc46986c2c193425eef512 100644 (file)
@@ -5,15 +5,15 @@
        <div class="field-row-stacked">
                <label for="name">Name *</label>
                <input id="name" type="text" autocomplete="off" name="fdata[name]"
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                       value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
        </div>
        <div class="field-row-stacked">
                <label for="description">Description *</label>
                <input id="description" type="text" autocomplete="off" name="fdata[description]"
-                      value="<?php echo Summoner::ifset($TemplateData['editData'], 'description'); ?>">
+                      value="<?php echo $TemplateData['editData']['description'] ?? ''; ?>">
        </div>
 
-       <?php if(Summoner::ifset($TemplateData['editData'], 'name') && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
        <div class="field-row-stacked">
                <p>
                        Warning: Content owned by this group will not be deleted and thus only manageable by admin!<br />
index 4ba84731cf7b1f933f8b629c89b55da69fbd2a74..2ee133d05d38c69950bb4e1be1fae58443a658b7 100644 (file)
@@ -5,12 +5,12 @@
        <div class="field-row-stacked">
                <label for="username">Username *</label>
                <input id="username" type="text" autocomplete="off" name="fdata[username]"
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                       value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
        </div>
        <div class="field-row-stacked">
                <label for="login">Login *</label>
                <input id="login" type="text" autocomplete="off" name="fdata[login]"
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'login'); ?>">
+                       value="<?php echo $TemplateData['editData']['login'] ?? ''; ?>">
        </div>
        <div class="field-row-stacked">
                <label for="password">Password *</label>
                        <option value="">None</option>
                        <?php foreach($TemplateData['existingGroups'] as $k=>$v) { ?>
                        <option value="<?php echo $k; ?>"
-                       <?php if(Summoner::ifset($TemplateData['editData']['groups'],$k)) echo 'selected'; ?>
+                       <?php if(isset($TemplateData['editData']['groups'][$k])) echo 'selected'; ?>
                        ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                        <?php } ?>
                </select>
        </div>
        <div class="field-row-stacked">
                <input id="active" type="checkbox" name="fdata[active]" value="1"
-                       <?php if(Summoner::ifset($TemplateData['editData'], 'active')) echo "checked"; ?>>
+                       <?php if(isset($TemplateData['editData']['active'])) echo "checked"; ?>>
                <label for="active">Can login</label>
        </div>
-       <?php if(Summoner::ifset($TemplateData['editData'], 'name') && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
        <div class="field-row-stacked">
                <input id="delete" type="checkbox" name="fdata[doDelete]" value="1">
-               <label for="delete">Delete. Warning: Content owned by this user will not be deleted and thus only manageable by admin! Better disable the user if there is content.</label>
+               <label for="delete">Delete.</label>
+               Warning: Content owned by this user will not be deleted and thus only manageable by admin! Better disable the user if there is content.</label>
        </div>
        <div class="field-row-stacked">
                <input id="refreshApiToken" type="checkbox" name="fdata[refreshApiToken]" value="1">
@@ -55,8 +56,8 @@
        </div>
        <div class="field-row-stacked">
                <label>
-                       Current Token: <?php echo Summoner::ifset($TemplateData['editData'], 'apiToken'); ?><br />
-                       Valid until: <?php echo Summoner::ifset($TemplateData['editData'], 'apiTokenValidDate'); ?>
+                       Current Token: <?php echo $TemplateData['editData']['apiToken'] ?? ''; ?><br />
+                       Valid until: <?php echo $TemplateData['editData']['apiTokenValidDate'] ?? ''; ?>
                </label>
        </div>
        <?php } ?>
index a95be20c93d52318bc42494f3861bc62400c8b2e..948157895a4381645f0366406d058cd62fdec397 100644 (file)
@@ -4,7 +4,7 @@
        <div class="field-row-stacked">
                <label for="username">Username</label>
                <input id="username" type="text" autocomplete="off" name="fdata[username]"
-                      value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                      value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
        </div>
        <div class="field-row-stacked">
                <label for="password">Password</label>
        <div class="field-row-stacked">
                <label for="group">Main group</label>
                <input  id="group" type="text" name="fdata[group]" disabled
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'baseGroupName'); ?>">
+                       value="<?php echo $TemplateData['editData']['baseGroupName'] ?? ''; ?>">
        </div>
        <div class="field-row-stacked">
                <label for="additionalGroups">Additional groups</label>
-               <input id="additionalGroups" type="text" name="fdata[additionalGroups]" disabled
-                       value="To be done">
+               <select multiple="multiple" size="5" id="additionalGroups" name="fdata[additionalGroups]" disabled>
+                       <?php
+                       foreach($TemplateData['editData']['groups'] as $k=>$v) {
+                               if($v['groupName'] !== $TemplateData['editData']['baseGroupName']) {
+                                       echo "<option>".$v['groupName']."</option>";
+                               }
+                       }
+                       ?>
+               </select>
        </div>
        <div class="field-row-stacked">
                <input id="refreshApiToken" type="checkbox" name="fdata[refreshApiToken]" value="1">
@@ -26,8 +33,8 @@
        </div>
        <div class="field-row-stacked">
                <label>
-                       Valid until: <?php echo Summoner::ifset($TemplateData['editData'], 'apiTokenValidDate'); ?><br />
-                       Token: <?php echo Summoner::ifset($TemplateData['editData'], 'apiToken'); ?>
+                       Valid until: <?php echo $TemplateData['editData']['apiTokenValidDate'] ?? ''; ?><br />
+                       Token: <?php echo $TemplateData['editData']['apiToken'] ?? ''; ?>
                </label>
        </div>
        <div class="field-row-stacked">
index bcb4e110e3498c89fbcd2774593b29bad4d593a8..93cee6a10ee76e6edc0b414e440d492639a34f0e 100644 (file)
@@ -19,7 +19,7 @@
 <?php } ?>
 
 <?php if(!empty($TemplateData['tags'])) { ?>
-       <h3>Tags for: <a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+       <h3>Tags for: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>"><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></a></h3>
 
        <?php foreach($TemplateData['tags'] as $k=>$v) { ?>
        <h4><?php echo $v['displayname']; ?></h4>
index b6f0f492fc89bcb9208d35dfcea7bbbc1e705ff1..13974c1eae8e450bf94fc87982c8ffaddecb38b1 100644 (file)
@@ -9,7 +9,7 @@
                <label  for="search">Search ISBN</label>
                <input id="search" type="text" autocomplete="off"
                       name="fdata[search]"
-                      value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'isbn'); ?>"
+                      value="<?php echo $TemplateData['editEntry']['isbn'] ?? ''; ?>"
                />
        </div>
        <div class="field-row-stacked">
index 505c175f73af4b21532789c789cff07ad045634e..e78dc9dc2e00298bb3bc8f706e3f9354621b2663 100644 (file)
@@ -8,7 +8,7 @@
                <label for="search">Search</label>
                <input id="search" type="text" autocomplete="off"
                           name="fdata[search]"
-                          value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?>"
+                          value="<?php echo $TemplateData['editEntry']['title'] ?? ''; ?>"
                />
        </div>
        <div class="field-row-stacked">
index 6d7b67905242f952b5802cb38a476201adbff0bc..001eb687fdfe4c331c08d7d7b49b767338b3a7d7 100644 (file)
@@ -8,14 +8,14 @@
                <label for="artist">Artist</label>
                <input id="artist" type="text" autocomplete="off"
                        name="fdata[artist]"
-                       value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'artist'); ?>"
+                       value="<?php echo $TemplateData['editEntry']['artist'] ?? ''; ?>"
                >
        </div>
        <div class="field-row-stacked">
                <label for="album">Album/Title</label>
                <input class="uk-input" id="album" type="text" autocomplete="off"
                       name="fdata[album]"
-                      value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?>"
+                      value="<?php echo $TemplateData['editEntry']['title'] ?? ''; ?>"
                >
        </div>
        <div class="field-row-stacked">
index 6a2fdf55773edbae9d5266975d9442696ac972ff..6c8c7cb34cfdc4da1d070d2ad558dc4f5ebbb887 100644 (file)
@@ -1,7 +1,7 @@
 <h3 >Using <?php echo $TemplateData['tool']['name']; ?> with collection: <?php echo $TemplateData['collection']['name']; ?></h3>
 <?php if(!empty($TemplateData['editEntry'])) { ?>
 <p>
-       <a href="index.php?p=manageentry&collection=<?php echo $TemplateData['collection']['id']; ?>&id=<?php echo $TemplateData['editEntry']['id']; ?>"><?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?></a>
+       <a href="index.php?p=manageentry&collection=<?php echo $TemplateData['collection']['id']; ?>&id=<?php echo $TemplateData['editEntry']['id']; ?>"><?php echo $TemplateData['editEntry']['title'] ?? ''; ?></a>
 </p>
 <?php } ?>
 
index ad91493eb79a34e1d5fc5818d259055ab7fe1d19..5eb85b7fa4c009caaab6bb64c1669c6e9b993397 100644 (file)
@@ -63,7 +63,7 @@
                        If the search is within a field witch is not configured to be displayed in the table view, it will be added.
                </p>
                eg.: <code>title: bourne</code>
-               <p>Available fields in <b><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></b> are:</p>
+               <p>Available fields in <b><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></b> are:</p>
                <pre style="white-space: normal">
                <?php
                foreach($TemplateData['collectionFields'] as $k=>$v) {
                ?>
                        <td>
                                <?php
-                               if(Summoner::ifset($f, 'value')) {
+                               if(isset($f['value'])) {
                                        if(is_array($f['value'])) {
                                                echo Summoner::limitWithDots(implode(', ',$f['value']),100,'...');
                                        }
        <div class="uk-width-1-4@s uk-width-1-6@l">
                <div class="uk-card uk-card-default uk-card-small">
                        <div class="uk-card-media-top">
-                               <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                               <?php if(isset($entry['fields']['coverimage'])) { ?>
                                <a href="<?php echo $TemplateData['entryLinkPrefix']; ?>&id=<?php echo $entryK; ?>" target=_blank>
                                <img src="<?php echo $TemplateData['storagePath'].'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                     alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>">
                                <?php } ?>
                        </div>
                        <div class="uk-card-body uk-visible@l">
-                               <?php if(Summoner::ifset($entry['fields'], 'title')) { ?>
+                               <?php if(isset($entry['fields']['title'])) { ?>
                                <h3 class="uk-card-title"><?php echo $entry['fields']['title']['value']; ?></h3>
                                <?php } ?>
 
-                               <?php if(Summoner::ifset($entry['fields'], 'description')) { ?>
+                               <?php if(isset($entry['fields']['description'])) { ?>
                                <p><?php echo $entry['fields']['description']['value']; ?></p>
                                <?php } ?>
                        </div>
index 056a10c6b472d782c43917dad9ff1f232826e613..4060232f3a0275859c2e3a72fc836e39831ac985 100644 (file)
@@ -62,9 +62,7 @@ if(!empty($_collection)) {
 
                                if (!empty($fdata)) {
                                        foreach ($TemplateData['editFields'] as $fieldId=>$fieldData) {
-                                               if(isset($fdata['additionalEditOption'][$fieldData['identifier']])
-                                                       && !empty($fdata['additionalEditOption'][$fieldData['identifier']])) {
-
+                                               if(isset($fdata['additionalEditOption'][$fieldData['identifier']])) {
                                                        $fieldData['bulkeditMethod'] = $fdata['additionalEditOption'][$fieldData['identifier']];
                                                        if(isset($fdata[$fieldData['identifier']])) {
                                                                $_value = trim($fdata[$fieldData['identifier']]);
index 80a1112f74a4d51a041bf26b5671246f33ba838e..d16e2f51f2006a593698194ae780b7ba60f7e27e 100644 (file)
 <?php } ?>
 
 <?php if(!empty($TemplateData['entries'])) { ?>
-<h3 class="uk-h3"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></h3>
+<h3 class="uk-h3"><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></h3>
 <div class="uk-grid-small uk-grid-match" uk-grid>
        <?php foreach($TemplateData['entries']['results'] as $entryK=>$entry) { ?>
        <div class="uk-width-1-4@s uk-width-1-6@l">
                <div class="uk-card uk-card-default uk-card-small">
                        <div class="uk-card-media-top">
-                               <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                               <?php if(isset($entry['fields']['coverimage'])) { ?>
                                <a href="<?php echo $TemplateData['entryLinkPrefix']; ?>&id=<?php echo $entryK; ?>">
                                <img src="<?php echo $TemplateData['storagePath'].'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                         alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>">
                                <?php } ?>
                        </div>
                        <div class="uk-card-body uk-visible@l">
-                               <?php if(Summoner::ifset($entry['fields'], 'title')) { ?>
+                               <?php if(isset($entry['fields']['title'])) { ?>
                                <h3 class="uk-card-title"><?php echo $entry['fields']['title']['value']; ?></h3>
                                <?php } ?>
 
-                               <?php if(Summoner::ifset($entry['fields'], array('description','value'))) { ?>
+                               <?php if(isset($entry['fields']['description']['value'])) { ?>
                                <p><?php echo $entry['fields']['description']['value']; ?></p>
                                <?php } ?>
                        </div>
index d067fac5e5efce2d120e633003ff911648868477..40966c7ac9df003535fd1b433973696f6938a1b2 100644 (file)
@@ -13,7 +13,7 @@
 <div class="uk-grid-divider uk-child-width-expand@s" uk-grid>
 <?php foreach($TemplateData['latest'] as $k=>$v) { ?>
        <div class="uk-width-1@s uk-width-1-2@m uk-width-1-3@l">
-               <a href="index.php?p=collections&collection=<?php echo $k; echo Summoner::ifset($TemplateData, 'navSearched'); ?>"><?php echo $v['name']; ?></a><br  />
+               <a href="index.php?p=collections&collection=<?php echo $k; echo $TemplateData['navSearched'] ?? ''; ?>"><?php echo $v['name']; ?></a><br  />
                <?php echo $v['description']; ?>
 
                <?php
@@ -22,7 +22,7 @@
 
                <div class="uk-card uk-card-default uk-grid-collapse uk-child-width-1-2@s uk-child-width-1-1@m uk-child-width-1-2@xl uk-margin" uk-grid>
                        <div class="uk-card-media-left uk-cover-container">
-                               <?php if(Summoner::ifset($entry['fields'], 'coverimage')) { ?>
+                               <?php if(isset($entry['fields']['coverimage'])) { ?>
                                <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>">
                                <img src="<?php echo PATH_WEB_STORAGE.'/'.$k.'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
                                         alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>" uk-cover>
                        </div>
                        <div>
                                <div class="uk-card-body uk-visible@l">
-                                       <?php if(Summoner::ifset($entry['fields'], 'title')) { ?>
+                                       <?php if(isset($entry['fields']['title'])) { ?>
                                        <h3 class="uk-card-title"><?php echo $entry['fields']['title']['value']; ?></h3>
                                        <?php } ?>
 
-                                       <?php if(Summoner::ifset($entry['fields'], array('description','value'))) { ?>
+                                       <?php if(isset($entry['fields']['description']['value'])) { ?>
                                        <p><?php echo $entry['fields']['description']['value']; ?></p>
                                        <?php } ?>
                                </div>
index eeda4fce920882ee984d2aa2b72263597adacbd2..05855b1e939caa17344724ef45a4674778ed6c7d 100644 (file)
@@ -1,9 +1,9 @@
-<h3 class="uk-h3"><a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+<h3 class="uk-h3"><a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>"><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></a></h3>
 <div class="uk-grid-small uk-grid-row-small uk-grid-row-small" uk-grid>
        <div class="uk-width-1-2@l">
                <article class="uk-article">
                        <?php if($TemplateData['showEdit'] === true) { ?>
-                       <p class="uk-article-meta"><a href="index.php?p=manageentry&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>&id=<?php echo $TemplateData['entry']['id']; ?>">EDIT</a></p>
+                       <p class="uk-article-meta"><a href="index.php?p=manageentry&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>&id=<?php echo $TemplateData['entry']['id']; ?>">EDIT</a></p>
                        <?php
                        }
 
@@ -27,7 +27,6 @@
                                }
                        }
                        ?>
-
                </article>
        </div>
        <div class="uk-width-1-2@l">
index 7a6769c917ed2f7147aa05d76715d1b53a31da7e..d2965fab44a49824f96cda10549794c16f2261f2 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="date" data-field-id="<?php echo $field['identifier']; ?>">
        <span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span>
-       <a href="index.php?p=collections&collection='.$TemplateData['loadedCollection']['id'].'&fid='.$field['identifier'].'&fv='.urlencode(Summoner::ifset($field, 'value')).'"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index eb20d83f4eba87fa7b0055d014abb4bce386f9d2..ff3e8def4794caec0033b9bb24927c955ae3b402 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="number" data-field-id="<?php echo $field['identifier']; ?>">
        <span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span>
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index 4f149de3b397f3868f7931bcfa917a98ae3fb3b2..916b43cadbd5632f3e9678910eebe63b3ea8b3c5 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="selection" data-field-id="<?php echo $field['identifier']; ?>">
        <span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span>
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index 216fac69fe5b5b6f220016d703d3ead9986c0fd8..6b1a321644eca9e07712e0b163b66ba06a7abc9f 100644 (file)
@@ -1 +1 @@
-<h1 class="uk-article-title" data-field-name="text-title" data-field-id="<?php echo $field['identifier']; ?>"><?php echo Summoner::ifset($field, 'value'); ?></h1>
+<h1 class="uk-article-title" data-field-name="text-title" data-field-id="<?php echo $field['identifier']; ?>"><?php echo $field['value'] ?? ''; ?></h1>
index 94693786253f962a9de0d3fc5ff9c89b287e9a64..8ff4830d4bcd97e3533dd4ddcb97422eb9b0a43d 100644 (file)
@@ -1 +1 @@
-<p data-field-name="text" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="text" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br($field['value'] ?? ''); ?></p>
index b5def6a3def23fec728a9282547721dd006b191e..e556e1e80fb188ac5242d7c218bdd300783c562c 100644 (file)
@@ -1 +1 @@
-<p data-field-name="text3-description" class="uk-text-lead" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="text3-description" class="uk-text-lead" data-field-id="<?php echo $field['identifier']; ?>"><?php echo nl2br($field['value'] ?? ''); ?></p>
index b8412e7f3662c350fb3a7ce96499a2d85d9cbbec..e99b7a0ae9fdf79839a4c048f42c7682b5949dd7 100644 (file)
@@ -1 +1 @@
-<p data-field-name="text3" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="text3" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br($field['value'] ?? ''); ?></p>
index 75e8432d38e80a0aa91c3034dc7561760cf1ba91..d1797911b7161da7d8b36f447ee2ae6797d9b099 100644 (file)
@@ -1 +1 @@
-<p data-field-name="textarea-content" data-field-id="<?php echo $field['identifier']; ?>" class="uk-dropcap"><?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="textarea-content" data-field-id="<?php echo $field['identifier']; ?>" class="uk-dropcap"><?php echo nl2br($field['value'] ?? ''); ?></p>
index 49638c4d2c1d16e8c2e2b913e4f4ad15ac0a0c00..b86ce4d701be55f246032f6dbfa8f7be6974a922 100644 (file)
@@ -1 +1 @@
-<p data-field-name="textarea" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br(Summoner::ifset($field, 'value')); ?></p>
+<p data-field-name="textarea" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span> <?php echo nl2br($field['value'] ?? ''); ?></p>
index e4f2cecac383bae44c7624de2a1c2c5aef416059..a2ea3dc59cbcdd09d646aa95f6ade8840ee9cac5 100644 (file)
@@ -1,6 +1,6 @@
 <div class="uk-margin" data-field-name="upload-coverimage">
-       <img src="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>"
-                title="<?php echo Summoner::ifset($field, 'value'); ?>"
+       <img src="<?php echo $TemplateData['storagePath'].'/'.$field['value'] ?? ''; ?>"
+                title="<?php echo $field['value'] ?? ''; ?>"
                 width=""
        />
 </div>
index ddbea47bab704eaf88607621635c0f7924eeb2d5..98a355ef20914887f45f7b783530bfec4a5828d5 100644 (file)
@@ -1,3 +1,3 @@
 <p data-field-name="upload" data-field-id="<?php echo $field['identifier']; ?>"><span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span>
-       <a href="<?php echo $TemplateData['storagePath'].'/'.Summoner::ifset($field, 'value'); ?>" target="_blank"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="<?php echo $TemplateData['storagePath'].'/'.$field['value'] ?? ''; ?>" target="_blank"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index c3dfbf54abc93485d24294c74cc6d9a0e6c540cc..ed98f650eb7f94dd08708f99c4657b89aaca6543 100644 (file)
@@ -1,4 +1,4 @@
 <p data-field-name="year" data-field-id="<?php echo $field['identifier']; ?>">
        <span class="uk-text-muted"><?php echo $field['displayname']; ?>:</span>
-       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode(Summoner::ifset($field, 'value')); ?>"><?php echo Summoner::ifset($field, 'value'); ?></a>
+       <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id']; ?>&fid=<?php echo $field['identifier']; ?>&fv=<?php echo urlencode($field['value'] ?? ''); ?>"><?php echo $field['value'] ?? ''; ?></a>
 </p>
index 3b3ed8963438ad9366d2e65ce7b814a338cfdc05..237e9eb2da988dd06413013726393dc9db89b157 100644 (file)
@@ -21,7 +21,7 @@
 
                <form class="uk-form-horizontal uk-margin-small" method="post" onsubmit="return saveOrderAndSubmit()">
                        <input type="hidden" name="fdata[fieldSortString]" id="fieldSort"
-                          value="<?php echo Summoner::ifset($TemplateData['editData'], 'fieldSortString'); ?>">
+                          value="<?php echo $TemplateData['editData']['fieldSortString'] ?? ''; ?>">
                        <div class="uk-margin">
                                <button class="uk-button uk-button-primary" type="submit" name="submitForm">
                                        Save
index a354667da7576e9c9a525311059a6e95698ad98c..5823b61f9652d514f88aea570197593aa24274b1 100644 (file)
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="name" type="text" autocomplete="off" name="fdata[name]"
                                                placeholder="Unique name. No special chars."
-                                               value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                                               value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
                                <label class="uk-form-label" for="description">Description</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="description" type="text" autocomplete="off" name="fdata[description]"
-                                                  value="<?php echo Summoner::ifset($TemplateData['editData'], 'description'); ?>">
+                                                  value="<?php echo $TemplateData['editData']['description'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
@@ -88,7 +88,7 @@
                                        <select class="uk-select" id="advancedSearchTableFields" name="fdata[advancedSearchTableFields][]" multiple="multiple" size="5">
                                                <?php foreach($TemplateData['existingFields'] as $k=>$v) { ?>
                                                <option value="<?php echo $v['id']; ?>"
-                                               <?php if(Summoner::ifset($TemplateData['editData']['advancedSearchTableFields'], $v['id'])) echo 'selected'; ?>
+                                               <?php if(isset($TemplateData['editData']['advancedSearchTableFields'][$v['id']])) echo 'selected'; ?>
                                                ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                                <option value="">None</option>
                                                <?php foreach($TemplateData['toolSelection'] as $k=>$v) { ?>
                                                <option value="<?php echo $k; ?>"
-                                               <?php if(Summoner::ifset($TemplateData['editData']['tool'],$k)) echo 'selected'; ?>
+                                               <?php if(isset($TemplateData['editData']['tool'][$k])) echo 'selected'; ?>
                                                ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                        </table>
                                </div>
                        </div>
-                       <?php if(Summoner::ifset($TemplateData['editData'], 'name')) { ?>
+                       <?php if(isset($TemplateData['editData']['name'])) { ?>
                        <div class="uk-margin">
                                <div class="uk-form-label">Update entry with collection rights</div>
                                <div class="uk-form-controls uk-form-controls-text">
index 3a79532affe55c35f266560ef190a826ba0825fd..3ba1508d2d2b22bdc6450adbbce31795b73c127c 100644 (file)
@@ -1,4 +1,4 @@
 <input type="hidden" id="<?php echo $field['identifier']; ?>" autocomplete="off"
        name="fdata[<?php echo $field['identifier']; ?>]"
-       value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+       value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
 >
index d4dbb38cbe7d015dc21708631fda8c9e0aad310e..88e86b2d998321bc23224f7436512f0d624da4cb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 $existingFieldValue = array();
-if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
+if(isset($TemplateData['editData'][$field['identifier']])) {
        $existingFieldValue = $TemplateData['editData'][$field['identifier']];
 }
 ?>
@@ -27,7 +27,7 @@ if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
                        onkeypress="addTag(event,'<?php echo $field['identifier']; ?>','<?php echo $field['inputValidation']; ?>')"
                        placeholder="Write and press enter."
                >
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="add">Add</option>
index 306f0e6212b33ffa559048d780d3af4b4e011715..cd92132296afc6cdb79a08f313457a71b2820a08 100644 (file)
@@ -4,9 +4,9 @@
                <input class="uk-input" id="<?php echo $field['identifier']; ?>" type="number"
                       autocomplete="off" maxlength="10"
                       name="fdata[<?php echo $field['identifier']; ?>]"
-                      value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+                      value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                >
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="replace">Replace</option>
index 8618bd3b0449d37fdd2e049a01dd5315769c3389..ed5a2020b8028f4092f554516af64246254cc20e 100644 (file)
@@ -9,7 +9,7 @@
                        ><?php echo $v; ?></option>
                        <?php } ?>
                </select>
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="replace">Replace</option>
index da37bd5ee74471d3e42811a44a90e60e0bd7ee30..db065a013f59f935f86db1e8aec129ae564160ac 100644 (file)
@@ -3,11 +3,11 @@
        <div class="uk-form-controls">
                <input class="uk-input" id="<?php echo $field['identifier']; ?>" type="text" autocomplete="off"
                   name="fdata[<?php echo $field['identifier']; ?>]"
-                  value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+                  value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
               maxlength="128"
                >
-               <small id="<?php echo $field['identifier']; ?>_counter" class="uk-float-right"><?php echo 128-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></small>
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               <small id="<?php echo $field['identifier']; ?>_counter" class="uk-float-right"><?php echo 128-strlen($TemplateData['editData'][$field['identifier']] ?? ''); ?></small>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="add">Add</option>
index 268d61577b7c0d8189d155b6d718411f46269464..6033a4a674a9906fdece2d879f0f7a639ce9b758 100644 (file)
@@ -4,9 +4,9 @@
                <textarea class="uk-textarea" autocomplete="off"
                                  id="<?php echo $field['identifier']; ?>"
                                  rows="3" maxlength="255"
-                                 name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
-               <small id="<?php echo $field['identifier']; ?>_counter" class="uk-float-right"><?php echo 255-strlen(Summoner::ifset($TemplateData['editData'], $field['identifier'])); ?></small>
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+                                 name="fdata[<?php echo $field['identifier']; ?>]"><?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?></textarea>
+               <small id="<?php echo $field['identifier']; ?>_counter" class="uk-float-right"><?php echo 255-strlen($TemplateData['editData'][$field['identifier']] ??  ''); ?></small>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="add">Add</option>
index d5da701d9391221c46dfdc7ef1fcb37518ca30e7..8bf7daddb689284c2516ac900de3d2546e88ec74 100644 (file)
@@ -4,8 +4,8 @@
                <textarea class="uk-textarea" autocomplete="off"
                        id="<?php echo $field['identifier']; ?>"
                rows="10"
-                       name="fdata[<?php echo $field['identifier']; ?>]"><?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?></textarea>
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+                       name="fdata[<?php echo $field['identifier']; ?>]"><?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?></textarea>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="add">Add</option>
index 6eee5e0b05577364afbe4ecf807a39c6252562e5..f5dca9d7931264a7031eae36b48fe405e46ef5dd 100644 (file)
@@ -4,10 +4,10 @@
                <input type="file" id="<?php echo $field['identifier']; ?>" multiple="false"
                   name="fdata[<?php echo $field['identifier']; ?>]"
                >
-               <?php if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) { ?>
+               <?php if(isset($TemplateData['editData'][$field['identifier']])) { ?>
                <div uk-lightbox>
-                       <?php echo '<a href="'.$TemplateData['storagePath'].'/'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'">'.Summoner::ifset($TemplateData['editData'], $field['identifier']).'</a>'; ?>
-                       <input type="checkbox" value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+                       <?php echo '<a href="'.$TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']] ?? ''.'">'.$TemplateData['editData'][$field['identifier']] ?? ''.'</a>'; ?>
+                       <input type="checkbox" value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                                   name="fdata[<?php echo $field['identifier']; ?>_delete]"
                                   title="Delete"
                        /> Delete
index 19882b0140d8f7b319e59b14ad16fb41257d9878..11143f9c5fd9dac78b40f1db3b20b68580aa901f 100644 (file)
@@ -4,9 +4,9 @@
                <input class="uk-input" id="<?php echo $field['identifier']; ?>" type="number" autocomplete="off"
                        placeholder="YYYY" min="0000" max="9999"
                        name="fdata[<?php echo $field['identifier']; ?>]"
-                       value="<?php echo Summoner::ifset($TemplateData['editData'], $field['identifier']); ?>"
+                       value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                >
-               <?php if(Summoner::ifset($field,'bulkedit')) { ?>
+               <?php if(isset($field['bulkedit'])) { ?>
                <select class="uk-select" name="fdata[additionalEditOption][<?php echo $field['identifier']; ?>]">
                        <option value="">Select bulk edit option</option>
                        <option value="replace">Replace</option>
index 94c08ad762147c007e583ab6191e9423038a81a6..8ffadaff91999c2087bbca7dcde17ec574a32613 100644 (file)
@@ -7,18 +7,18 @@
                                <label class="uk-form-label" for="name">Name *</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="name" type="text" autocomplete="off" name="fdata[name]"
-                                              value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                                              value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
                                <label class="uk-form-label" for="description">Description *</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="description" type="text" autocomplete="off" name="fdata[description]"
-                                              value="<?php echo Summoner::ifset($TemplateData['editData'], 'description'); ?>">
+                                              value="<?php echo $TemplateData['editData']['description'] ?? ''; ?>">
                                </div>
                        </div>
 
-                       <?php if(Summoner::ifset($TemplateData['editData'], 'name') && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+                       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
                        <div class="uk-margin">
                                <div class="uk-form-label">Delete <span uk-icon="warning"></span></div>
                                <div class="uk-form-controls uk-form-controls-text">
index f8dc2fb06a3fb5d14a57518f62dd7c12f9a71bd2..b3c613895bc6dbe00d448dd2d74c7401626a33f1 100644 (file)
@@ -7,14 +7,14 @@
                                <label class="uk-form-label" for="username">Username *</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="username" type="text" autocomplete="off" name="fdata[username]"
-                                               value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                                               value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
                                <label class="uk-form-label" for="login">Login *</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="login" type="text" autocomplete="off" name="fdata[login]"
-                                               value="<?php echo Summoner::ifset($TemplateData['editData'], 'login'); ?>">
+                                               value="<?php echo $TemplateData['editData']['login'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
@@ -44,7 +44,7 @@
                                                <option value="">None</option>
                                                <?php foreach($TemplateData['existingGroups'] as $k=>$v) { ?>
                                                <option value="<?php echo $k; ?>"
-                                               <?php if(Summoner::ifset($TemplateData['editData']['groups'],$k)) echo 'selected'; ?>
+                                               <?php if(isset($TemplateData['editData']['groups'][$k])) echo 'selected'; ?>
                                                ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                <div class="uk-form-controls uk-form-controls-text">
                                        <label>
                                                <input class="uk-checkbox" type="checkbox" name="fdata[active]" value="1"
-                                                       <?php if(Summoner::ifset($TemplateData['editData'], 'active')) echo "checked"; ?>>
+                                                       <?php if(isset($TemplateData['editData']['active'])) echo "checked"; ?>>
                                        </label>
                                </div>
                        </div>
-                       <?php if(Summoner::ifset($TemplateData['editData'], 'name') && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+                       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
                        <div class="uk-margin">
                                <div class="uk-form-label">Delete <span uk-icon="warning"></span></div>
                                <div class="uk-form-controls uk-form-controls-text">
@@ -75,8 +75,8 @@
                                <div class="uk-form-controls uk-form-controls-text">
                                        <label>
                                                <input class="uk-checkbox" type="checkbox" name="fdata[refreshApiToken]" value="1"><br />
-                                               Valid until: <?php echo Summoner::ifset($TemplateData['editData'], 'apiTokenValidDate'); ?><br />
-                                               <?php echo Summoner::ifset($TemplateData['editData'], 'apiToken'); ?>
+                                               Valid until: <?php echo $TemplateData['editData']['apiTokenValidDate'] ?? ''; ?><br />
+                                               <?php echo $TemplateData['editData']['apiToken'] ?? ''; ?>
                                        </label>
                                </div>
                        </div>
index 0264a230ba308cd4a855c92acf1053fdc90ee175..547ad7fdb69899b474471501fb69ea08e835cbf7 100644 (file)
@@ -23,7 +23,6 @@ $Possessed = new Possessed($DB, $Doomguy);
 $TemplateData['existingGroups'] = $Possessed->getGroups();
 $TemplateData['existingUsers'] = $Possessed->getUsers();
 $TemplateData['editData'] = array();
-$TemplateData['editData']['groups'] = array();
 $TemplateData['pageTitle'] = 'Manage users';
 
 $_id = '';
index 4fd1a8084a3142e6a2ad38c00180ac2f28d0c844..b96678c2a34b4e53c2e0263b4169685fcce98181 100644 (file)
@@ -6,7 +6,7 @@
                                <label class="uk-form-label" for="username">Username</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="username" type="text" autocomplete="off" name="fdata[username]"
-                                              value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                                              value="<?php echo $TemplateData['editData']['name'] ?? ''; ?>">
                                </div>
                        </div>
                        <div class="uk-margin">
                                <label class="uk-form-label" for="group">Main group</label>
                                <div class="uk-form-controls">
                                        <input class="uk-input" id="group" type="text" name="fdata[group]" disabled
-                                              value="<?php echo Summoner::ifset($TemplateData['editData'], 'baseGroupName'); ?>"
+                                              value="<?php echo $TemplateData['editData']['baseGroupName'] ?? ''; ?>"
                                        >
                                </div>
                        </div>
                        <div class="uk-margin">
                                <label class="uk-form-label" for="additionalGroups">Additional groups</label>
                                <div class="uk-form-controls">
-                                       <select class="uk-select" multiple size="5" id="additionalGroups" name="fdata[additionalGroups]" disabled>
+                                       <select class="uk-select" multiple="multiple" size="5" id="additionalGroups" name="fdata[additionalGroups]" disabled>
                                        <?php
                                        foreach($TemplateData['editData']['groups'] as $k=>$v) {
                                                if($v['groupName'] !== $TemplateData['editData']['baseGroupName']) {
@@ -34,7 +34,6 @@
                                                }
                                        }
                                        ?>
-
                                        </select>
                                </div>
                        </div>
@@ -43,8 +42,8 @@
                                <div class="uk-form-controls uk-form-controls-text">
                                        <label>
                                                <input class="uk-checkbox" type="checkbox" name="fdata[refreshApiToken]" value="1"><br />
-                                               Valid until: <?php echo Summoner::ifset($TemplateData['editData'], 'apiTokenValidDate'); ?><br />
-                                               Key: <?php echo Summoner::ifset($TemplateData['editData'], 'apiToken'); ?>
+                                               Valid until: <?php echo $TemplateData['editData']['apiTokenValidDate'] ?? ''; ?><br />
+                                               Key: <?php echo $TemplateData['editData']['apiToken'] ?? ''; ?>
                                        </label>
                                </div>
                        </div>
index cdb01bb9fa45be7abbb96781ca290c00686abb15..8d674ba04cae501a56c794777cf0ca81c174accc 100644 (file)
@@ -1,7 +1,7 @@
 <div class="uk-grid-small uk-grid-row-small" uk-grid>
        <div class="uk-width-1-2@l">
        <?php if(!empty($TemplateData['tags'])) { ?>
-               <h3 class="uk-h3">Tags for: <a href="index.php?p=collections&collection=<?php echo Summoner::ifset($TemplateData['loadedCollection'], 'id'); ?>"><?php echo Summoner::ifset($TemplateData['loadedCollection'], 'name'); ?></a></h3>
+               <h3 class="uk-h3">Tags for: <a href="index.php?p=collections&collection=<?php echo $TemplateData['loadedCollection']['id'] ?? ''; ?>"><?php echo $TemplateData['loadedCollection']['name'] ?? ''; ?></a></h3>
 
                <?php if(!empty($TemplateData['search'])) { ?>
                <div uk-alert id="searchNotice">
index 92228be54d1ad03efcf33fd5441595e261c45abe..ef431a165ef4140e058a80ecc46fe4a33c117748 100644 (file)
@@ -7,7 +7,7 @@
                <div class="uk-form-controls">
                        <input class="uk-input" id="search" type="text" autocomplete="off"
                               name="fdata[search]"
-                              value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'isbn'); ?>"
+                              value="<?php echo $TemplateData['editEntry']['isbn'] ?? ''; ?>"
                        >
                </div>
                <div class="uk-margin">
index 6ac167e8a0e137cadd4cdcc14dee1253ce27fcd3..8d63a57344653d8fb7b5d6103045cc3869c70346 100644 (file)
@@ -7,7 +7,7 @@
                <div class="uk-form-controls">
                        <input class="uk-input" id="search" type="text" autocomplete="off"
                                   name="fdata[search]"
-                                  value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?>"
+                                  value="<?php echo $TemplateData['editEntry']['title'] ? ''; ?>"
                        >
                </div>
                <div class="uk-margin">
index cd1eaf302914a98ba35d483cfcae4960310016d2..eff6d90f406d18894051ae86fb9beca184df1aa6 100644 (file)
@@ -7,7 +7,7 @@
                <div class="uk-form-controls">
                        <input class="uk-input" id="artist" type="text" autocomplete="off"
                               name="fdata[artist]"
-                              value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'artist'); ?>"
+                              value="<?php echo $TemplateData['editEntry']['artist'] ?? ''; ?>"
                        >
                </div>
        </div>
@@ -16,7 +16,7 @@
                <div class="uk-form-controls">
                        <input class="uk-input" id="album" type="text" autocomplete="off"
                               name="fdata[album]"
-                              value="<?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?>"
+                              value="<?php echo $TemplateData['editEntry']['title'] ?? ''; ?>"
                        >
                </div>
        </div>
index 591cf0a04ff88fed140fecf139bfdfdddeaf55b2..f4127f2ae5a95e03b61725beca9af784f69f47d9 100644 (file)
@@ -1,7 +1,7 @@
 <h3 class="uk-h3">Using <?php echo $TemplateData['tool']['name']; ?> with collection: <?php echo $TemplateData['collection']['name']; ?></h3>
 <?php if(!empty($TemplateData['editEntry'])) { ?>
 <p><span uk-icon="arrow-left"></span>
-       <a href="index.php?p=manageentry&collection=<?php echo $TemplateData['collection']['id']; ?>&id=<?php echo $TemplateData['editEntry']['id']; ?>"><?php echo Summoner::ifset($TemplateData['editEntry'], 'title'); ?></a>
+       <a href="index.php?p=manageentry&collection=<?php echo $TemplateData['collection']['id']; ?>&id=<?php echo $TemplateData['editEntry']['id']; ?>"><?php echo $TemplateData['editEntry']['title'] ?? ''; ?></a>
 </p>
 <?php } ?>