Index: branches/5.0.x/core/units/permissions/permissions_tag_processor.php =================================================================== diff -u -N -r12511 -r12706 --- branches/5.0.x/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 12511) +++ branches/5.0.x/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 12706) @@ -1,6 +1,6 @@ $category_pos) { $pos_sql .= '(#TABLE_PREFIX#.Permission = "'.$perm_name.'" AND #TABLE_PREFIX#.CatId = '.$categories[$category_pos].') OR '; } - $pos_sql = $pos_sql ? preg_replace('/(.*) OR $/', '\\1', $pos_sql) : '0'; + $pos_sql = $pos_sql ? substr($pos_sql, 0, -4) : '0'; // get all permissions list with iheritence status, inherited category id and permission value $sql = 'SELECT pc.PermissionName,