XoopsModules25x / publisher

Publishing module for XOOPS for static/HTML content and articles stored and provided in a hierarchical manner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create subcategories while creating a category

bleekk opened this issue · comments

When you create a category you have the you have the option to create subcategories all at once.
You see it if you scroll to the bottom of the site where you create a category.
If you try to create more then one subcategory only the first one will be created.

I looked at the code /admin/category.php and at line 142 you have this
$sizeof = count(XoopsRequest::getString('scname', '', 'POST'));
this will always return a 1

I changed this line to $sizeof = count(XoopsRequest::getArray('scname', array(), 'POST'));
and now everything works fine. Can someone confirm that the code is correct