Closed (fixed)
Project:
Protected Node
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jul 2010 at 20:57 UTC
Updated:
1 May 2011 at 03:02 UTC
Protected node includes some rather worrisome use of variable_get/set().
For example:
if ($node->show_title) {
variable_set('protected_node-'. $node->nid .'-show_title', TRUE );
}
This is terrible misuse of the variables table. Worse yet, if the node is deleted these variables are not cleaned up. They're also not cleaned up if you uninstall the module.
These settings should be included as part of the protected_node table and all these variables should be cleaned up from the variables table.
Comments
Comment #1
AlexisWilke commentedGood catch. I wanted to change that as well since it doesn't make any sense to use a variable for such. (imagine that you create 100,000 nodes and all have a show_title flag... that's 100,000 variables!)
I added the necessary DELETE to the uninstall function, but I won't fix the node delete since I will instead get rid of those horrible variables.
Thank you.
Alexis
Comment #2
AlexisWilke commentedOkay, the show_title is now fixed too. (along with many other problems that were in this module.)
Thank you.
Alexis Wilke