hook_order can_update operation in uc_order_update_status never returns false

mradcliffe - November 5, 2009 - 20:25
Project:Ubercart
Version:6.x-2.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

The 'can_update' operation is currently broken in hook_order(). See example where can_update should return false always, and the update op should never be displayed. I ran into this because for some reason i was still developing with ubercart BETA5 and when I was testing on a more recent version I was perplexed why updates were happening anyway.

I've taken the time to write a proper module_invoke_all() block instead of the $return = $function that's currently in uc_order_update_status().

Also, uc_order_view_update_form_submit() will always display "order updated" even if you can't update. This is a documentation issue and should probably fixed later with a warning issued instead.

AttachmentSize
uc_order.patch1.09 KB
 
 

Drupal is a registered trademark of Dries Buytaert.