]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
some cleanup.
authorBanana <mail@bananas-playground.net>
Mon, 19 Feb 2024 13:14:57 +0000 (14:14 +0100)
committerBanana <mail@bananas-playground.net>
Mon, 19 Feb 2024 13:14:57 +0000 (14:14 +0100)
added group info to profile view

CHANGELOG
TODO
webclient/config/config-googlebooks.php.default
webclient/config/config-imdbweb.php.default
webclient/config/config-musicbrainz.php.default
webclient/config/config.php.default
webclient/lib/gorenest.class.php
webclient/lib/mancubus.class.php
webclient/view/default/profile/profile.html

index 487881287348ff41a4be514c1e86b2ad2bb8e56d..83d67c90015ca02639b42772979ff75c7f0ff326 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
 1.x - The Ceremonial Chambers
+    * Added group infos to profile view.
 
 
 1.6 - Chizra 2024-02-03
diff --git a/TODO b/TODO
index b4e81b0445116e26eafd57eb7e43c7830e28abf7..c613771382595e304b62b41d00896b413d77ee8f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,8 @@
 * Better error handling and display while adding / update and delete
 ** Maybe some message "store"
-* query optimization and default indexes on columns
 * make documentation markdown to be nicer
 * change multiple-attachment to a field which tells it is used for a image gallery
 * update JS and remove deprecations
-* complete profile view. Groups still missing.
 * minimal theme
 ** https://watercss.kognise.dev/
 * create a real fallback theme, which does not depend on any styling/css
index f4bccbfe99cb4c4579de0ad3091cb5bde318dd7b..2a4a645097dfe4233b4632491ddd7eee62211d8e 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2023 Johannes Keßler
+ * Copyright 2018-2024 Johannes Keßler
  *
  * This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 652391809b22e0fab21997908acecf0a38810c74..030e5c2af53888c6f0bc16c50562db3a39ec9967 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2023 Johannes Keßler
+ * Copyright 2018-2024 Johannes Keßler
  *
  * This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 589b132f572a8c1eec0e4ce85f1a3b223179f51a..7f62ffadca3353ad70c69872a44c71677180a04c 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2023 Johannes Keßler
+ * Copyright 2018-2024 Johannes Keßler
  *
  * This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ffe5915b666499d771589f9eaac4b9b1181fc5ff..54b285e9a22f57d68e48f8c8ca2a1e7136c7721b 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2023 Johannes Keßler
+ * Copyright 2018-2024 Johannes Keßler
  *
  * This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c6c98ef4c436be747349ccc8414d54022ea151f0..540cc5d138d5b43f79c30174f096e7b5a39256cd 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Bibliotheca
  *
- * Copyright 2018-2023 Johannes Keßler
+ * Copyright 2018-2024 Johannes Keßler
  *
  * This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -100,7 +100,7 @@ class GoreNest {
                # reset the menu
                $this->_menuData = array();
 
-               $queryStr = "SELECT id, text, action, icon, category, contextaction
+               $queryStr = "SELECT `id`, `text`, `action`, `icon`, `category`, `contextaction`
                                        FROM `".DB_PREFIX."_menu`
                                        WHERE ".$this->_User->getSQLRightsString()."                            
                                                ORDER BY position";
index 1d699634f2ca2b6b5e8cb3c32b01dd3c2daf71cd..8173ff5ce8ffc5310f36b11f85c0f58004e7303c 100644 (file)
@@ -349,92 +349,7 @@ class Mancubus {
                return $ret;
        }
 
-       /**
-        * Get entries for loaded collection by looking for the given value in given field
-     *
-     * @TODO: unused?
-        *
-        * @param string $fieldId Number ID of the field to search in
-        * @param string $fieldValue Value of the field
-        * @return array
-        */
-       public function getEntriesByFieldValue(string $fieldId, string $fieldValue): array {
-               $ret = array();
-
-               $_entryFields = $this->_getEntryFields();
-               if(isset($_entryFields[$fieldId])) {
-                       $fieldData = $_entryFields[$fieldId];
-               }
-
-               if(empty($fieldData)) return $ret;
-
-               if($fieldData['type'] !== "lookupmultiple") {
-                       return $this->getEntries(
-                               array(
-                                       0 => array(
-                                               'colName' => $fieldData['identifier'],
-                                               'colValue' => $fieldValue,
-                                               'fieldData' => $fieldData
-                                       )
-                               )
-                       );
-
-               }
-
-               $querySelect = "SELECT `fk_entry`";
-               $queryFrom = " FROM `".DB_PREFIX."_collection_entry2lookup_".$this->_DB->real_escape_string($this->_collectionId)."` AS t";
-               $queryWhere = " WHERE t.fk_field = '".$this->_DB->real_escape_string($fieldId)."'
-                                       AND t.value = '".$this->_DB->real_escape_string($fieldValue)."'";
-
-               $queryOrder = " ORDER BY";
-               if(!empty($this->_queryOptions['sort'])) {
-                       $queryOrder .= ' t.'.$this->_queryOptions['sort'];
-               }
-               else {
-                       $queryOrder .= " t.value";
-               }
-               if(!empty($this->_queryOptions['sortDirection'])) {
-                       $queryOrder .= ' '.$this->_queryOptions['sortDirection'];
-               }
-               else {
-                       $queryOrder .= " ASC";
-               }
-
-               $queryLimit = '';
-               if(!empty($this->_queryOptions['limit'])) {
-                       $queryLimit .= " LIMIT ".$this->_queryOptions['limit'];
-                       # offset can be 0
-                       if($this->_queryOptions['offset'] !== false) {
-                               $queryLimit .= " OFFSET ".$this->_queryOptions['offset'];
-                       }
-               }
-
-               $queryStr = $querySelect.$queryFrom.$queryWhere.$queryOrder.$queryLimit;
-               if(QUERY_DEBUG) Summoner::sysLog("[QUERY] ".__METHOD__." query: ".Summoner::cleanForLog($queryStr));
-               try {
-                       $query = $this->_DB->query($queryStr);
-
-                       if($query !== false && $query->num_rows > 0) {
-                               while(($result = $query->fetch_assoc()) != false) {
-                                       $_r = $this->getEntry($result['fk_entry']);
-                                       $ret['results'][$_r['id']] = $_r;
-                               }
-
-                               $queryCountStr = "SELECT COUNT(t.value) AS amount ".$queryFrom.$queryWhere;
-                               if(QUERY_DEBUG) Summoner::sysLog("[QUERY] ".__METHOD__." query: ".Summoner::cleanForLog($queryCountStr));
-                               $query = $this->_DB->query($queryCountStr);
-                               $result = $query->fetch_assoc();
-                               $ret['amount'] = $result['amount'];
-                       }
-               }
-               catch (Exception $e) {
-            Summoner::sysLog("[ERROR] ".__METHOD__." mysql catch: ".$e->getMessage());
-               }
-
-               return $ret;
-       }
-
-       /**
+    /**
         * Return the storage info for loaded collection
         * Used by API
         *
index f20eb26167f2a7ca5b6c5895cf8c8d2a857a6c85..4fd1a8084a3142e6a2ad38c00180ac2f28d0c844 100644 (file)
                        <div class="uk-margin">
                                <label class="uk-form-label" for="additionalGroups">Additional groups</label>
                                <div class="uk-form-controls">
-                                       <input class="uk-input" id="additionalGroups" type="text" name="fdata[additionalGroups]" disabled
-                                              value="To be done"
-                                       >
+                                       <select class="uk-select" 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>
                        <div class="uk-margin">