From: Steinar H. Gunderson Date: Tue, 26 Dec 2006 15:58:14 +0000 (+0100) Subject: Revert the default for the processing/scaling, except for events that contain X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=675db3ce4a65a4e75374eb2db2092955ee6c65eb;ds=sidebyside Revert the default for the processing/scaling, except for events that contain NEF files; it's really annoying in the long run, and breaks with a long-standing pr0n principle. --- diff --git a/perl/Sesse/pr0n/Index.pm b/perl/Sesse/pr0n/Index.pm index 6e1d237..e85ab6e 100644 --- a/perl/Sesse/pr0n/Index.pm +++ b/perl/Sesse/pr0n/Index.pm @@ -34,8 +34,8 @@ sub handler { my %defsettings = ( thumbxres => 80, thumbyres => 64, - xres => undef, - yres => undef, + xres => -1, + yres => -1, start => 1, num => -1, all => 1, @@ -45,6 +45,11 @@ sub handler { fullscreen => 0, ); + # Any NEF files => default to processing + my $ref = $dbh->selectrow_hashref('SELECT * FROM images WHERE event=? AND LOWER(filename) LIKE \'%.nef\' LIMIT 1', + undef, $event) + and $defsettings{'xres'} = $defsettings{'yres'} = undef; + # Reduce the front page load when in overload mode. if (Sesse::pr0n::Overload::is_in_overload($r)) { $defsettings{'num'} = 100;