Potential data loss because wrong management of node property: og_files_enabled

develCuy - November 28, 2008 - 01:32
Project:OG Files
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:develCuy
Status:needs review
Description

Property $node->og_files_enabled is set to TRUE in hook_nodeapi(), but it is not interpreted and populated the right way in hook_form_alter(), so it wipes corresponding record in {og_files} when node is edited.

#1

develCuy - November 28, 2008 - 01:52

This patch fixes og_files_enabled field definition in hook_form_alter and adds a description with notice to warn user.
It also removes isset() check in hook_nodeapi since it is not needed.

Blessings!

AttachmentSize
og_files_fix-og_files_enabled-field.patch 1.66 KB

#2

develCuy - November 28, 2008 - 02:03
Status:active» needs review
 
 

Drupal is a registered trademark of Dries Buytaert.