From: Banana Date: Sun, 3 Jan 2021 14:12:26 +0000 (+0100) Subject: non existing index check and also returning the data requested at first run X-Git-Tag: 1.0~15 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=29c8ef26a276319cbb9bfe99fa7feba63ac14fc4;p=bibliotheca-php.git non existing index check and also returning the data requested at first run --- diff --git a/TODO b/TODO index e602a65..c5d0862 100644 --- a/TODO +++ b/TODO @@ -10,3 +10,4 @@ * tag management. Edit, update and unused ones. * imdb collector. Number storage -> runtime * clickable image in card view +* stats overview page. amount of entries. file and db storage. diff --git a/webclient/lib/gorenest.class.php b/webclient/lib/gorenest.class.php index dee1e20..a26f7cc 100644 --- a/webclient/lib/gorenest.class.php +++ b/webclient/lib/gorenest.class.php @@ -99,15 +99,20 @@ class GoreNest { * @return array */ public function get($category,$reload=false) { + $ret = array(); if(empty($category)) return false; if(empty($reload) && isset($this->_menuData[$category])) { return $this->_menuData[$category]; } + $this->loadMenu($reload); + if(isset($this->_menuData[$category])) { + $ret = $this->_menuData[$category]; + } - return $this->_menuData[$category]; + return $ret; } /** diff --git a/webclient/lib/mancubus.class.php b/webclient/lib/mancubus.class.php index c88e4cd..ce2b346 100644 --- a/webclient/lib/mancubus.class.php +++ b/webclient/lib/mancubus.class.php @@ -554,6 +554,7 @@ class Mancubus { catch (Exception $e) { error_log("[ERROR] ".__METHOD__." mysql catch: ".$e->getMessage()); } + $ret = $this->_cacheLookupValuesForEntry[$this->_collectionId][$entryId][$fieldData['id']]; } }