[Bps-public-commit] r13969 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 10 17:05:07 EDT 2008


Author: sartak
Date: Thu Jul 10 17:05:06 2008
New Revision: 13969

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Record.pm

Log:
 r64079 at onn:  sartak | 2008-07-10 16:46:53 -0400
 Force "id" to be displayed first


Modified: Prophet/trunk/lib/Prophet/Record.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Record.pm	(original)
+++ Prophet/trunk/lib/Prophet/Record.pm	Thu Jul 10 17:05:06 2008
@@ -364,7 +364,7 @@
     return $luid;
 }
 
-=head2 show_props
+=head2 stringify_props
 
 Returns a stringified form of the properties suitable for displaying directly
 to the user. Also includes luid and uuid.
@@ -383,18 +383,18 @@
 
     my $props = $self->get_props;
 
-    # kind of ugly but it simplifies the code
-    $props->{id} = $self->luid ." (" . $self->uuid . ")";
-
     # which props are we going to display?
     my @show_props;
     if ($self->can('props_to_show')) {
         @show_props = $self->props_to_show(\%args);
     }
     else {
-        @show_props = keys %$props;
+        @show_props = ('id', keys %$props);
     }
 
+    # kind of ugly but it simplifies the code
+    $props->{id} = $self->luid ." (" . $self->uuid . ")";
+
     my $max_length = 0;
     my @fields;
 



More information about the Bps-public-commit mailing list