[prev in list] [next in list] [prev in thread] [next in thread]
List: bricolage-bugs
Subject: [Bug 1324] New: get_value() ignores $format
From: bugzilla-daemon () exclupen ! com
Date: 2008-03-23 3:56:58
Message-ID: bug-1324-190 () http ! bugs ! bricolage ! cc/
[Download RAW message or body]
http://bugs.bricolage.cc/show_bug.cgi?id=1324
Summary: get_value() ignores $format
Product: Bricolage
Version: 1.10.3 - Current Stable Release
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: API
AssignedTo: bugs@lists.bricolage.cc
ReportedBy: rbt@rbt.ca
CODE SNIPPET:
my $dateUnformatted = $refElem->get_value('date_published', 1, '%Y-%m-%d');
my $dt = datetime(sprintf('%sT00:00:00Z', $dateUnformatted));
my $datePublished = $dt->strftime('%Y-%m-%d');
printf "Should be formatted: %s\n\nReally Formatted: %s\n\nOBJECT: %s\n\n",
$dateUnformatted, $datePublished, Data::Dumper::Dumper($refElem);
RESULTS:
Should be formatted: 2007-11-06T00:00:00Z
Really Formatted: 2007-11-06
OBJECT: $VAR1 = bless( {
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '1',
'relate_media' => '0',
'parent_id' => '384000',
'_active' => '1',
'related_story_id' => undef,
'id' => '384002',
'object_order' => '1',
'_subelems' => [
bless( {
'widget_type' => 'text',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '1',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146705',
'object_order' => '1',
'name' => 'Title',
'sql_type' => 'short',
'description' => '',
'key_name' => 'name',
'_blob_val' => undef,
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1073',
'max_length' => '0',
'_short_val' => 'An 80-storey tower
reclaims the lost corner of Yonge and Bloor'
}, 'Bric::Biz::Element::Field' ),
bless( {
'widget_type' => 'text',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '2',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146706',
'object_order' => '1',
'name' => 'Publisher',
'sql_type' => 'short',
'description' => '',
'key_name' => 'publisher',
'_blob_val' => undef,
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1072',
'max_length' => '0',
'_short_val' => 'Globe and Mail'
}, 'Bric::Biz::Element::Field' ),
bless( {
'widget_type' => 'date',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '3',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146707',
'object_order' => '1',
'name' => 'Date Published',
'sql_type' => 'short',
'description' => '',
'key_name' => 'date_published',
'_blob_val' => undef,
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1176',
'max_length' => '0',
'_short_val' =>
'2007-11-06T00:00:00Z'
}, 'Bric::Biz::Element::Field' ),
bless( {
'widget_type' => 'text',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '4',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146708',
'object_order' => '1',
'name' => 'Author',
'sql_type' => 'short',
'description' => '',
'key_name' => 'author',
'_blob_val' => undef,
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1068',
'max_length' => '0',
'_short_val' => 'Derek Raymaker'
}, 'Bric::Biz::Element::Field' ),
bless( {
'widget_type' => 'textarea',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '5',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146709',
'object_order' => '1',
'name' => 'Relevant Paragraphs',
'sql_type' => 'blob',
'description' => '',
'key_name' => 'text_snippet',
'_blob_val' => 'Sales officially
launched Tuesday morning, ranging from $355,000 to more than $2-million for
pre-registered potential buyers, with sizes ranging from 540 to 2,110 square
feet (excluding lanai space). A large majority of the suites, even the smallest
ones, have lanais and balconies.',
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1074',
'max_length' => '99999',
'_short_val' => undef
}, 'Bric::Biz::Element::Field' ),
bless( {
'widget_type' => 'text',
'object_type' => 'story',
'object_instance_id' => '43814',
'place' => '6',
'_hold_val' => '0',
'_autopopulated' => '0',
'parent_id' => '384002',
'_active' => '1',
'_multiple' => '0',
'id' => '1146710',
'object_order' => '1',
'name' => 'Reference Id',
'sql_type' => 'short',
'description' => '',
'key_name' => 'reference_id',
'_blob_val' => undef,
'_date_val' => undef,
'_dirty' => 0,
'field_type_id' => '1186',
'max_length' => '0',
'_short_val' => '4739527'
}, 'Bric::Biz::Element::Field' )
],
'name' => 'Reference Material - Bibliography Entry',
'related_media_id' => undef,
'key_name' => 'information_sources',
'description' => 'Material that can be found outside of this
website.',
'relate_story' => '0',
'element_type_id' => '1038',
'_dirty' => 0
}, 'Bric::Biz::Element::Container' );
--
Configure bugmail: http://bugs.bricolage.cc/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic