Needs work
Project:
Favorite Nodes
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2008 at 13:41 UTC
Updated:
8 Jul 2008 at 08:34 UTC
Jump to comment: Most recent file
Comments
Comment #1
kbahey commentedI don't like this piece of code. It is very complex and will be a maintenance nightmare.
It has to be more clear with comments. For example:
It has to be a separate function (e.g.
function _favorite_node_can_add()) Also use && and || as per code guidelines.Comment #2
flexer commented"Refactoring" the code as per your suggestions, I found that using permission doesn't work (the user 1 bypasses that check). I moved the option from being a permission to a setting. Patch attached.