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
(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--'),
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.
--- /dev/null
+# 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
}
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 {
(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--'),
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,'...');
}
<?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>
<?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>
<?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'])) { ?>
<?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>
-<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
}
<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>
<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>
<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>
-<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>
<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>
-<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>
<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>
-<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>
-<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>
<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>
<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>
<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>
<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, {
<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>
<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>
<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>
<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>
</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">
<?php
$existingFieldValue = array();
-if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
+if(isset($TemplateData['editData'][$field['identifier']])) {
$existingFieldValue = $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>
<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>
<?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>
<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>
<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>
<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>
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"
<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>
<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 />
<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">
</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 } ?>
<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">
</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">
<?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>
<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">
<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">
<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">
<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 } ?>
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>
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']]);
<?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>
<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
<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>
-<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
}
}
}
?>
-
</article>
</div>
<div class="uk-width-1-2@l">
<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>
<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>
<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
<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>
<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>
<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>
<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
<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">
<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">
<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']] ?? ''; ?>"
>
<?php
$existingFieldValue = array();
-if(Summoner::ifset($TemplateData['editData'], $field['identifier'])) {
+if(isset($TemplateData['editData'][$field['identifier']])) {
$existingFieldValue = $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>
<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>
><?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>
<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>
<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>
<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>
<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
<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>
<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">
<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">
<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">
<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>
$TemplateData['existingGroups'] = $Possessed->getGroups();
$TemplateData['existingUsers'] = $Possessed->getUsers();
$TemplateData['editData'] = array();
-$TemplateData['editData']['groups'] = array();
$TemplateData['pageTitle'] = 'Manage users';
$_id = '';
<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']) {
}
}
?>
-
</select>
</div>
</div>
<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>
<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">
<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">
<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">
<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>
<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>
<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 } ?>