function editCat($catid) { //Mirjam: In v1.13 catid was used where since v1.14 gid is used, but locally in a function catid is fine global $rsgConfig; $my = JFactory::getUser(); $database = JFactory::getDBO(); if ($catid) { //Edit category $database->setQuery("SELECT * FROM #__rsgallery2_galleries WHERE id ='{$catid}'"); $rows = $database->LoadObjectList(); myGalleries::editCat($rows); } else { //Check if maximum number of usercats are already made $count = galleryUtils::userCategoryTotal($my->id); if ($count >= $rsgConfig->get('uu_maxCat')) { $mainframe->redirect(JRoute::_("index.php?option=com_rsgallery2&page=my_galleries"), JText::_('MAX_USERCAT_ALERT')); } else { //New category myGalleries::editCat(); } } }