From 29c8ef26a276319cbb9bfe99fa7feba63ac14fc4 Mon Sep 17 00:00:00 2001 From: Banana Date: Sun, 3 Jan 2021 15:12:26 +0100 Subject: [PATCH] non existing index check and also returning the data requested at first run --- TODO | 1 + webclient/lib/gorenest.class.php | 7 ++++++- webclient/lib/mancubus.class.php | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) 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']]; } } -- 2.39.5