Committer: nnikulochkina
LJSUP-11926: ensure that fotobilder API works with the new photo hostingU trunk/lib/FB/Protocol/Fotki/GetGals.pm U trunk/lib/FB/Protocol/Fotki/GetGalsTree.pm
Modified: trunk/lib/FB/Protocol/Fotki/GetGals.pm =================================================================== --- trunk/lib/FB/Protocol/Fotki/GetGals.pm 2012-04-24 12:42:38 UTC (rev 1464) +++ trunk/lib/FB/Protocol/Fotki/GetGals.pm 2012-04-24 15:29:29 UTC (rev 1465) @@ -29,16 +29,19 @@ for my $album (@$albums) { next unless($album); my $album_ret = { - id => $album->album_id, - Name => [ FB::transform_gal_name($album->album_title) ], - Sec => [ FB::Protocol::Fotki->lj2fb_security($album->security, $album->allowmask) ], - Date => [ FB::date_unix_to_mysql($album->timecreate) ], - ($album->timeupdate ? (TimeUpdate => [ $album->timeupdate ]) : ()), - URL => [ $album->page_url ], + id => $album->album_id, + Name => [ FB::transform_gal_name($album->album_title) ], + Sec => [ FB::Protocol::Fotki->lj2fb_security($album->security, $album->allowmask) ], + Date => [ FB::date_unix_to_mysql($album->timecreate) ], + TimeUpdate => [ $album->timeupdate ], + URL => [ $album->page_url ], }; # is this the incoming gallery? $album_ret->{incoming} = 1 if $album->is_default; + #sortorder + $album_ret->{sortorder} = $album->album_id_displayed; + # GalMembers my $photos = [ $album->photos ]; $album_ret->{GalMembers}->{GalMember} = [ map { { id => $_->photo_id } } @$photos ]; Modified: trunk/lib/FB/Protocol/Fotki/GetGalsTree.pm =================================================================== --- trunk/lib/FB/Protocol/Fotki/GetGalsTree.pm 2012-04-24 12:42:38 UTC (rev 1464) +++ trunk/lib/FB/Protocol/Fotki/GetGalsTree.pm 2012-04-24 15:29:29 UTC (rev 1465) @@ -33,12 +33,12 @@ for my $album (@$albums) { next unless($album); my $album_ret = { - id => $album->album_id, - Name => [ $album->album_title ], - Sec => [ FB::Protocol::Fotki->lj2fb_security($album->security, $album->allowmask) ], - Date => [ FB::date_unix_to_mysql($album->timecreate) ], # gallery creation date in 2004-01-01 01:01:01 format - ($album->timeupdate ? (TimeUpdate => [ $album->timeupdate ]) : ()), # update timestamp - URL => [ $album->page_url ], + id => $album->album_id, + Name => [ $album->album_title ], + Sec => [ FB::Protocol::Fotki->lj2fb_security($album->security, $album->allowmask) ], + Date => [ FB::date_unix_to_mysql($album->timecreate) ], # gallery creation date in 2004-01-01 01:01:01 format + TimeUpdate => [ $album->timeupdate ], # update timestamp + URL => [ $album->page_url ], }; # is this the incoming gallery? $album_ret->{incoming} = 1 if $album->is_default;