[livejournal] r22637: LJSUP-12849 (When clicking on resized im...
Committer: ailyin
LJSUP-12849 (When clicking on resized image in the post - original should be opened)U trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm 2012-08-14 13:08:34 UTC (rev 22636)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm 2012-08-14 13:20:30 UTC (rev 22637)
@@ -1734,10 +1734,14 @@
$res;
} @photos ];
+ my $user_selected_image_size =
+ $remote->prop('user_selected_image_size') ||
+ $LJ::PICS_DEFAULT_IMAGE_SIZE;
+
my @photo_sizes = map { {
'size' => $_,
'text' => LJ::Lang::ml("fotki.size.$_.text"),
- 'is_default' => ( $_ == $remote->prop ('user_selected_image_size') ) ? 1 : 0,
+ 'is_default' => ( $_ eq $user_selected_image_size ) ? 1 : 0,
} } @LJ::Pics::Photo::DISPLAYED_SIZES;
my $album_list = [];
@@ -1773,10 +1777,17 @@
$migration_status = $remote ? ($remote->prop ('fotki_migration_status') || 0) : 0;
} else {
+ my $user_selected_image_size = $LJ::PICS_DEFAULT_IMAGE_SIZE;
+ if ($remote) {
+ $user_selected_image_size =
+ $remote->prop('user_selected_image_size') ||
+ $LJ::PICS_DEFAULT_IMAGE_SIZE;
+ }
+
my @photo_sizes = map { {
'size' => $_,
'text' => LJ::Lang::ml("fotki.size.$_.text"),
- 'is_default' => ( $remote && $_ == $remote->prop ('user_selected_image_size') ) ? 1 : 0,
+ 'is_default' => $_ eq $user_selected_image_size ? 1 : 0,
} } @LJ::Pics::Photo::DISPLAYED_SIZES;
