Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
user.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2010 at 19:12 UTC
Updated:
10 Jun 2010 at 23:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
andypostDo not use hook_schema() from within hook_update_N() http://drupal.org/node/150220
So both fields' changed are placed within user_update_7005()
Comment #2
marcingy commentedPatch in #1 doesn't change the size of the field and doesn't change the init field size in hook_schema
Comment #3
marcingy commentedReroll that updates field length and incorporates the changes in #1.
Comment #4
andypost@marcingy Yes, I forget about this change.
patch is trivial so RTBC
Comment #5
andypostSame patch but doc-block comment trimmed to standard.
Comment #6
andypostGrrr wrong patch...
Comment #7
marcingy commentedNew doc block looks good not sure if we second a opinion but I'll mark it rbtc on account @andypost was gave it the thumbs up in #4.
Comment #8
andypost@marcingy About #5 read more at Coding standards and about Doxygen http://drupal.org/node/1354#functions
Comment #9
andypostAlso it's could be great if you add comment about why 254 chars was chosen from #502968: Increase maximum allowable length of email addresses
Comment #10
marcingy commentedSee the original comment for the issue clearly states why. And note the original doxygen was reviewed and accepted as part of an earlier patch hence my reason for not amending it.
Comment #11
marcingy commentedComment #12
aspilicious commented+ * Change the users table to allow longer email addresses.
Please change the verb to "changes".
I know there are a lot of places in core not following the standard but we try to do our best with new patches.
Comment #13
dries commentedI'm OK with this change. In Drupal, we tend to write 'e-mail' instead of 'email' though.
Comment #14
damien tournoud commentedWhile we are at it: db_change_field() mandate that you drop and recreate the indexes on the changed fields. We have an index on 'mail', so the code should read:
Comment #15
marcingy commentedNew version taking into account comments above
* Fixes verbage
* amends email to e-mail
* adds a reference to the original discussion node
* creates the index in hook update
Comment #16
aspilicious commentedIf you going to add the reference, you have to put a newline between the first sentence of the docblock and the see
+ * Changes the users table to allow longer e-mail addresses.
+ * See http://drupal.org/node/502968 for further discussion.
Comment #17
marcingy commentedReroll with #16
Comment #18
catchWe don't usually put links to issues in code comments - otherwise we'd have thousands of them, and cvs annotate lets you find the issue with a bit of work, apart from that looks RTBC although I didn't test it.
Comment #19
marcingy commentedHopefully one last time....;)
Comment #20
catchComment #21
dries commentedCommitted to CVS HEAD. I'm moving this to HEAD 2 HEAD.
Comment #22
David_Rothstein commentedLet's not move core issues to the queue of a module that about 5 people are using :) Instead we can just create separate issues in Head to Head and crosslink them. (Most people probably aren't interested in the Head to Head issue, and moving it there also prevents the core change from being widely visible or easily reopened for any necessary followups that might arise.)
In this case, @catch already opened a Head to Head issue preemptively anyway:
#809428: {users}.init length
I've posted a patch there.