From 38e82e92e5efc9b5cea3e631d7dc31b2f42db9fe Mon Sep 17 00:00:00 2001 From: hgz5w Date: Mon, 20 Jul 2015 16:55:01 -0300 Subject: [PATCH] Update userclass_class.php plugin.xml can NOT add more than one class --- e107_handlers/userclass_class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e107_handlers/userclass_class.php b/e107_handlers/userclass_class.php index d462abb09..f3ca6d76b 100644 --- a/e107_handlers/userclass_class.php +++ b/e107_handlers/userclass_class.php @@ -1617,6 +1617,10 @@ class user_class_admin extends user_class { return FALSE; } + //findNewClassID() always returns an unused ID. + //if a plugin.xml adds more than one within tag + //it will add 1 class only because class_tree never updates itself after adding classes and will return the same unnused ID + $this->class_tree[$classrec['userclass_id']] = $classrec; $this->clearCache(); return TRUE; } @@ -1956,4 +1960,4 @@ class user_class_admin extends user_class -?> \ No newline at end of file +?>