Closed (fixed)
Project:
Disk Node
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2006 at 01:14 UTC
Updated:
16 Jun 2006 at 08:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
NicholasClark commentedI also had an issue here, but I found that the base name was not being used internally which screwed things up when the form hook call checked the disknode type variables.
This code will ensure that the displayed name is the full node type name but the actual single word type is used internally.
foreach (node_get_types() as $type => $name) {
if ($type == 'disknode') continue;
$form['_disknodebehavior']['disknode_node_'.$type] = array(
'#type' => 'checkbox',
'#title' => t('Attach to %base', array('%base' => node_get_name($type))),
'#default_value' => variable_get('disknode_node_'.$type, 0),
'#description' => t('Provide the disknode functionality to the node type %type.', array('%type' => $type)),
);
}
I hope my explainations made some sense.
Comment #2
NicholasClark commentedI think the function
_disknode_convertwill need updating too.Comment #3
smk-ka commentedYep. New patch combining both patches from above and adressing the
_disknode_convertissue.Comment #4
smk-ka commentedMaybe it should be mentioned that this patch breaks existing Disk Node installations, as it changes the internal variable names, and, thus, requires the node types it should work with to be reassigned (by going to http://example.com/admin/settings/disknode).
Comment #5
smk-ka commentedI've made an install file (MySQL and Postgres support) that includes an update hook, which converts the old variable names to the new ones. Not sure if it's correctly applied, though, so this needs testing.
Users who have applied the above patch should direct their browser to http://www.example.com/update.php to update their existing Disk Node entries.
Comment #6
elmuerte commentedthanks, I've merged the patch with the cvs
Comment #7
(not verified) commented