Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel
Patch to fix accessors in Bric::Biz::Element::Field
 

Index | Next | Previous | View Flat


adrian at gossamer-threads

Feb 6, 2009, 10:05 AM


Views: 2430
Permalink
Patch to fix accessors in Bric::Biz::Element::Field

Hi,

While figuring things out for the in-place editor, I ran into what seems like a
bug where Bric::Biz::Element::Field->get_max_length was returning $self instead
of the max_length. I took a look at the SVN log, but there wasn't a message
relating to why it was added:

http://viewsvn.bricolage.cc/bricolage/trunk/lib/Bric/Biz/Element/Field.pm?view=diff&r1=6698&r2=6699

Here's the patch, essentially removing the bit of code and relying on the built
in accessors:

***** start patch *****
Index: lib/Bric/Biz/Element/Field.pm
===================================================================
--- lib/Bric/Biz/Element/Field.pm (revision 8406)
+++ lib/Bric/Biz/Element/Field.pm (working copy)
@@ -731,12 +731,6 @@

=cut

-sub get_max_length {
- my $self = shift;
- return $self if $self->_get('max_length');
- return;
-}
-
##############################################################################

=item my $sql_type = $data->get_sql_type
***** end patch *****

There are a couple other methods which do the same thing that may want to be
removed/fixed as well: is_autopopulated, is_multiple

Adrian

Subject User Time
Patch to fix accessors in Bric::Biz::Element::Field adrian at gossamer-threads Feb 6, 2009, 10:05 AM
    Re: Patch to fix accessors in Bric::Biz::Element::Field david at kineticode Feb 6, 2009, 12:46 PM
    Re: Patch to fix accessors in Bric::Biz::Element::Field david at kineticode Mar 11, 2009, 10:32 AM
    Re: Patch to fix accessors in Bric::Biz::Element::Field adrian at gossamer-threads Mar 12, 2009, 6:50 PM
        Re: Patch to fix accessors in Bric::Biz::Element::Field david at kineticode Mar 12, 2009, 7:26 PM
    Re: Patch to fix accessors in Bric::Biz::Element::Field adrian at gossamer-threads Mar 12, 2009, 7:42 PM
        Re: Patch to fix accessors in Bric::Biz::Element::Field lannings at who Mar 13, 2009, 1:29 AM
            Re: Patch to fix accessors in Bric::Biz::Element::Field david at kineticode Mar 13, 2009, 9:34 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.