From 65e940fad3735acf3b4f564b731abe7f2ea55ab1 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 17 Nov 2017 15:37:01 +0100 Subject: [PATCH] part fix #2854 - load default prefs - after installation plugin prefs doesn't exist --- e107_plugins/list_new/list_class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107_plugins/list_new/list_class.php b/e107_plugins/list_new/list_class.php index 2740d62f8..c3d6a61f3 100644 --- a/e107_plugins/list_new/list_class.php +++ b/e107_plugins/list_new/list_class.php @@ -103,6 +103,13 @@ class listclass { return e107::pref('list_new'); //TODO Convert from old format to new. + //insert default preferences + if (empty( $listPrefs)) + { + $listPrefs = $this->list_pref = $this->getDefaultPrefs(); + e107::getPlugConfig('list_new')->reset()->setPref($listPrefs)->save(true); + } + return $listPrefs; /* $sql = e107::getDb(); //check preferences from database @@ -865,4 +872,4 @@ class listclass } } -?> \ No newline at end of file +?>