5
In admin/category.php find the following:
$sql = "UPDATE " . $xoopsDB -> prefix( 'wflinks_cat' ) . " SET title ='$title', imgurl='$imgurl', pid =$pid, description='$descriptionb', spotlighthis='$spotlighthis' , spotlighttop='$spotlighttop', nohtml='$nohtml', nosmiley='$nosmiley', noxcodes='$noxcodes', noimages='$noimages', nobreak='$nobreak', weight='$weight', client_id='$client_id', banner_id='$banner_id' WHERE cid=" . $cid;
$database_mess = _AM_WFL_CCATEGORY_MODIFIED;
}
if ( !$result = $xoopsDB -> query( $sql ) ) {
XoopsErrorHandler_HandleError( E_USER_WARNING, $sql, __FILE__, __LINE__ );
return false;
}
After this insert this code:
$module_id = $xoopsModule -> getVar('mid');
$newcatid = mysql_insert_id();
$sql2 = "INSERT INTO " . $xoopsDB -> prefix( 'group_permission' ) . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name ) VALUES ('3','$newcatid', '$module_id', 'WFLinkCatPerm')";
if ( !$result = $xoopsDB -> query( $sql2 ) ) {
XoopsErrorHandler_HandleError( E_USER_WARNING, $sql2, __FILE__, __LINE__ );
return false;
}
This will set the category view permission for anonymous users (if group-id = 3).