]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
removed ifsetvalue
authorBanana <mail@bananas-playground.net>
Tue, 20 Feb 2024 15:20:40 +0000 (16:20 +0100)
committerBanana <mail@bananas-playground.net>
Tue, 20 Feb 2024 15:20:40 +0000 (16:20 +0100)
12 files changed:
webclient/lib/summoner.class.php
webclient/view/98/managecolletions/managecolletions.html
webclient/view/98/manageentry/field-selection.html
webclient/view/98/manageentry/manageentry.html
webclient/view/98/managegroups/managegroups.html
webclient/view/98/manageusers/manageusers.html
webclient/view/default/managecolletions/managecolletions.html
webclient/view/default/manageentry/field-selection.html
webclient/view/default/manageentry/manageentry.html
webclient/view/default/managegroups/managegroups.html
webclient/view/default/manageusers/manageusers.html
webclient/view/default/tool/tool-imdbweb.html

index 8ab6f3f01ccf48925b6f3088afe1f3e4e96d6b92..97327077c708010f078aaafce3febf5ed6ad308d 100644 (file)
@@ -436,22 +436,7 @@ class Summoner {
             return isset($array[$key]) ? $array[$key] : false;
         }
     }
-
-    /**
-     * based on self::ifset check also the value
-     *
-     * @param array $array The array to use
-     * @param string $key The key to check
-     * @param string $value The value to compare
-     * @return bool
-     */
-    static function ifsetValue(array $array, string $key, string $value): bool {
-        if(self::ifset($array,$key) !== false) {
-            return $array[$key] == $value;
-        }
-        return false;
-    }
-
+    
     /**
      * Replace in $haystack the $needle with $replace only once
      *
index e68780ad9d0b63deac57efa4d216c74d0a3908bb..ee6e1c6b42f551a974bf25002fdcf2812699d472 100644 (file)
@@ -94,7 +94,7 @@
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['ownerSelection'] as $k=>$v) { ?>
                        <option value="<?php echo $k; ?>"
-                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'owner',$k)) echo 'selected'; ?>
+                       <?php echo ($TemplateData['editData']['owner'] ?? '') == $k ? 'selected' : ''; ?>
                        ><?php echo $v['login']; ?> (<?php echo $v['name']; ?>)</option>
                        <?php } ?>
                </select>
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['groupSelection'] as $k=>$v) { ?>
                        <option value="<?php echo $k; ?>"
-                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'group',$k)) echo 'selected'; ?>
+                       <?php echo ($TemplateData['editData']['group'] ?? '') == $k ? 'selected' : ''; ?>
                        ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                        <?php } ?>
                </select>
                                <tr>
                                        <td>
                                                <input id="user_read" type="checkbox" name="fdata[rights][user][read]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['user']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                                <label for="user_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="user_write" type="checkbox" name="fdata[rights][user][write]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['user']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                                <label for="user_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="user_delete" type="checkbox" name="fdata[rights][user][delete]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['user']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                                <label for="user_delete">x &nbsp; &nbsp; &nbsp;</label>
                                        </td>
                                        <td>
                                                <input id="group_read" type="checkbox" name="fdata[rights][group][read]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['group']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                                <label for="group_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="group_write" type="checkbox" name="fdata[rights][group][write]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['group']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                                <label for="group_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="group_delete" type="checkbox" name="fdata[rights][group][delete]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['group']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                                <label for="group_delete">x &nbsp; &nbsp; &nbsp;</label>
                                        </td>
                                        <td>
                                                <input id="other_read" type="checkbox" name="fdata[rights][other][read]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['other']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                                <label for="other_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="other_write" type="checkbox" name="fdata[rights][other][write]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['other']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                                <label for="other_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                                <input id="other_delete" type="checkbox" name="fdata[rights][other][delete]" value="1"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>>
+                                               <?php echo ($TemplateData['editData']['rights']['other']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                                <label for="other_delete">x &nbsp; &nbsp; &nbsp;</label>
                                        </td>
                                </tr>
index a494ac33cc9a51f665bcce3ce4028213aab32c56..e2bbc28eb02ab90470ad2e5476553f2892107281 100644 (file)
@@ -4,7 +4,7 @@
                <option value="">Please select</option>
                <?php foreach($field['options'] as $k=>$v) { ?>
                <option value="<?php echo $v; ?>"
-                       <?php if(Summoner::ifsetValue($TemplateData['editData'], $field['identifier'],$v)) echo 'selected'; ?>
+                       <?php echo ($TemplateData['editData'][$field['identifier']] ?? '') == $v ? 'selected' : ''; ?>
                ><?php echo $v; ?></option>
                <?php } ?>
        </select>
index fce3eca94fd1c21b33e278d11c53efd80d263bd5..1724513c1f6eb682b94d87d8cc1f82ddab378c70 100644 (file)
@@ -65,41 +65,41 @@ Possible duplicate
                        <tr>
                                <td>
                                        <input id="user_read" type="checkbox" name="fdata[rights][user][read]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['user']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                        <label for="user_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="user_write" type="checkbox" name="fdata[rights][user][write]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['user']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                        <label for="user_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="user_delete" type="checkbox" name="fdata[rights][user][delete]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['user']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                        <label for="user_delete">x &nbsp; &nbsp; &nbsp;</label>
                                </td>
                                <td>
                                        <input id="group_read" type="checkbox" name="fdata[rights][group][read]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['group']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                        <label for="group_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="group_write" type="checkbox" name="fdata[rights][group][write]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['group']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                        <label for="group_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="group_delete" type="checkbox" name="fdata[rights][group][delete]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['group']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                        <label for="group_delete">x &nbsp; &nbsp; &nbsp;</label>
                                </td>
                                <td>
                                        <input id="other_read" type="checkbox" name="fdata[rights][other][read]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['other']['read'] ?? '') == 'r' ? "checked" : ""; ?>>
                                        <label for="other_read">r &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="other_write" type="checkbox" name="fdata[rights][other][write]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['other']['write'] ?? '') == 'w' ? "checked" : ""; ?>>
                                        <label for="other_write">w &nbsp; &nbsp; &nbsp;</label>
 
                                        <input id="other_delete" type="checkbox" name="fdata[rights][other][delete]" value="1"
-                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>>
+                                       <?php echo ($TemplateData['editData']['rights']['other']['delete'] ?? '') == 'x' ? "checked" : ""; ?>>
                                        <label for="other_delete">x &nbsp; &nbsp; &nbsp;</label>
                                </td>
                        </tr>
index d2a4d1fe448e27708edc46986c2c193425eef512..94f21564dc6fa983c76e7a93da25d357ca20ab2b 100644 (file)
@@ -13,7 +13,7 @@
                       value="<?php echo $TemplateData['editData']['description'] ?? ''; ?>">
        </div>
 
-       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+       <?php if(isset($TemplateData['editData']['name']) && (($TemplateData['editData']['protected'] ?? '') == '0' ? true : false)) { ?>
        <div class="field-row-stacked">
                <p>
                        Warning: Content owned by this group will not be deleted and thus only manageable by admin!<br />
index 2ee133d05d38c69950bb4e1be1fae58443a658b7..0b748f5993b91f41c8c91049548c9ced5546dc11 100644 (file)
@@ -22,7 +22,7 @@
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['existingGroups'] as $k=>$v) { ?>
                        <option value="<?php echo $k; ?>"
-                               <?php if(Summoner::ifsetValue($TemplateData['editData'], 'baseGroupId',$k)) echo 'selected'; ?>
+                               <?php ($TemplateData['editData']['baseGroupId'] ?? '') == $k ? 'selected' : ''; ?>
                                ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                        <?php } ?>
                </select>
@@ -44,7 +44,7 @@
                        <?php if(isset($TemplateData['editData']['active'])) echo "checked"; ?>>
                <label for="active">Can login</label>
        </div>
-       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+       <?php if(isset($TemplateData['editData']['name']) && (($TemplateData['editData']['protected'] ?? '') == '0' ? true : false)) { ?>
        <div class="field-row-stacked">
                <input id="delete" type="checkbox" name="fdata[doDelete]" value="1">
                <label for="delete">Delete.</label>
index 5823b61f9652d514f88aea570197593aa24274b1..c45e434cf1704344ca3554edd622e1da6b806837 100644 (file)
@@ -30,7 +30,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 ($TemplateData['editData']['defaultSearchField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
                                                ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                                                <?php } ?>
                                        </select>
@@ -67,7 +67,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 echo ($TemplateData['editData']['defaultSortField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
                                                ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                                <option value="">Please select</option>
                                                <?php foreach($TemplateData['ownerSelection'] as $k=>$v) { ?>
                                                <option value="<?php echo $k; ?>"
-                                               <?php if(Summoner::ifsetValue($TemplateData['editData'], 'owner',$k)) echo 'selected'; ?>
+                                               <?php echo ($TemplateData['editData']['owner'] ?? '') == $k ? 'selected' : ''; ?>
                                                ><?php echo $v['login']; ?> (<?php echo $v['name']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                                <option value="">Please select</option>
                                                <?php foreach($TemplateData['groupSelection'] as $k=>$v) { ?>
                                                <option value="<?php echo $k; ?>"
-                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'group',$k)) echo 'selected'; ?>
+                                                       <?php echo ($TemplateData['editData']['group'] ?? '') == $k ? 'selected' : ''; ?>
                                                ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                                <tr>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                </tr>
                                        </table>
index ed5a2020b8028f4092f554516af64246254cc20e..dde2c7ac921b684bc8032d9957fd3ebf38fa40f9 100644 (file)
@@ -5,7 +5,7 @@
                        <option value="">Please select</option>
                        <?php foreach($field['options'] as $k=>$v) { ?>
                        <option value="<?php echo $v; ?>"
-                               <?php if(Summoner::ifsetValue($TemplateData['editData'], $field['identifier'],$v)) echo 'selected'; ?>
+                               <?php echo ($TemplateData['editData'][$field['identifier']] ?? '') == $v ? 'selected' : ''; ?>
                        ><?php echo $v; ?></option>
                        <?php } ?>
                </select>
index 99c8f6812e72c02d02443fd711632bf303ddfb41..ef0ed0c988279853ad622220c13c6186c6f92b46 100644 (file)
@@ -53,27 +53,27 @@ Possible duplicate
                                                <tr>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][user][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['user']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][group][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['group']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                        <td>
                                                                <label>r:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][read]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['read'] ?? '') == 'r' ? "checked" : ""; ?>></label>
                                                                <label>w:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][write]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['write'] ?? '') == 'w' ? "checked" : ""; ?>></label>
                                                                <label>x:<input class="uk-checkbox" type="checkbox" name="fdata[rights][other][delete]" value="1"
-                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>></label>
+                                                                       <?php echo ($TemplateData['editData']['rights']['other']['delete'] ?? '') == 'x' ? "checked" : ""; ?>></label>
                                                        </td>
                                                </tr>
                                        </table>
index 8ffadaff91999c2087bbca7dcde17ec574a32613..2443da25c338b5cb468cd9c8ebd530439849840f 100644 (file)
@@ -18,7 +18,7 @@
                                </div>
                        </div>
 
-                       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+                       <?php if(isset($TemplateData['editData']['name']) && (($TemplateData['editData']['protected'] ?? '') == '0' ? true : false)) { ?>
                        <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 b3c613895bc6dbe00d448dd2d74c7401626a33f1..e345919912ab255dbf67b09c3bd38affaa875d26 100644 (file)
@@ -30,7 +30,7 @@
                                                <option value="">Please select</option>
                                                <?php foreach($TemplateData['existingGroups'] as $k=>$v) { ?>
                                                <option value="<?php echo $k; ?>"
-                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'baseGroupId',$k)) echo 'selected'; ?>
+                                                       <?php echo ($TemplateData['editData']['baseGroupId'] ?? '') == $k ? 'selected' : ''; ?>
                                                        ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
                                                <?php } ?>
                                        </select>
@@ -59,7 +59,7 @@
                                        </label>
                                </div>
                        </div>
-                       <?php if(isset($TemplateData['editData']['name']) && Summoner::ifsetValue($TemplateData['editData'], 'protected', '0')) { ?>
+                       <?php if(isset($TemplateData['editData']['name']) && (($TemplateData['editData']['protected'] ?? '') == '0' ? true : false)) { ?>
                        <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 8d63a57344653d8fb7b5d6103045cc3869c70346..68817c320b36b24214473de224ee1d3ea061c950 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 $TemplateData['editEntry']['title'] ? ''; ?>"
+                                  value="<?php echo $TemplateData['editEntry']['title'] ?? ''; ?>"
                        >
                </div>
                <div class="uk-margin">