[jifty-devel] sort_order in Jifty::DBI Schema definition ignored

Jesse Vincent jesse at bestpractical.com
Mon Oct 30 13:46:45 EST 2006




On Mon, Oct 30, 2006 at 07:31:58PM +0100, Wolfgang Kinkeldei wrote:
> Hello,
> 
> when setting a 'sort_order' attribute in a column definition for a  
> model, the value given for the 'sort_order' is ignored. Instead, a  
> zero value is assigned to the 'sort_order' attribute every time this  
> attribute is set.


> 
> The fix looks like this:
> 
> --- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm     (Revision 2086)
> +++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm     (Working copy)
> @@ -346,7 +346,7 @@
> =cut
> sub sort_order {
> -    _item ( sort_order => 0, @_);
> +    _list ( sort_order => @_);


Why isn't the fix 


+    _item ( sort_order => (shift @_ || 0));

?
> }
> 
> 
> Did I overlook some side-effect, this change would have?
> 
> 
> Regards,
> 
> Wolfgang
> 
> -- 
> 
> ' /\_/\ ' .print[split??,"".(($/=q|Cms)+-03467:;<=|)=~tr!C-z -B! -z!)x
> '( o.o )' .$/]->[hex]foreach split qr<>,qq+1ecd039ad65b025b8063475b+||
> ' > ^ < ' .q<!-- Wolfgang Kinkeldei - mailto:wolfgang at kinkeldei.de -->
> 
> 
> 
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> 

-- 


More information about the jifty-devel mailing list