Closed (fixed)
Project:
Node Limit Number
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2008 at 20:13 UTC
Updated:
7 May 2008 at 13:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
davemybes commentedI had a go at doing something for this problem. If I put in a check for the node id (one will be present if the node already exists i.e. the user is editing the node), immediately following
if ($op == 'prepare' && $user->uid != 1) {, the edit function now works. I checked and the node limit still works.I am attaching a patch for this possible fix. Not sure if there's a better way to do it. Oh, the patch also includes some code cleanup (mostly extra spaces added and removed where necessary). Take a look at the Coder module for cleaning up your code (I didn't use it myself on this, but I have found it useful before).
Comment #2
nachenko commentedF###, I can't apply the patch, don't know why.
Anyway, I read it and applied your fix myself. Additionally, I've moved some hook_nodeapi code to a helper function, as part of my deadly and mad plan to add limits in a per-user basis.
About code cleaning... well, I guess Dreamweaver for Windows is not the right tool for this kind of coding, It looks good here, I'll check the config.
I'm testing here and seems fixed.
I've committed changes. They should appear with date april 23rd in Dev version.
Comment #3
davemybes commentedAwesome! It works for me! Thanks.
For clean code, I wouldn't recommend Dreamweaver. The main problem is that it puts in tabs instead of spaces for indentation. So when I read the code in my text editor, things look a little screwy. See if it has an option to insert spaces instead of tabs.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.