[FFmpeg-devel] [FATESERVER/PATCH 3/8] index: move the declaration of $sort to the beginning of the file

Timothy Gu timothygu99 at gmail.com
Wed Jun 11 03:07:49 CEST 2014


Signed-off-by: Timothy Gu <timothygu99 at gmail.com>
---
 index.cgi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/index.cgi b/index.cgi
index 1aa2c00..9157daa 100755
--- a/index.cgi
+++ b/index.cgi
@@ -30,6 +30,9 @@ use URI::Escape;
 # split(/:/, $this_query, 2);
 my @queries = split(/\/\//, uri_unescape param 'query') if (param 'query');
 
+my $sort = param('sort');
+$sort    = $sort eq 'arch' ? 'subarch': $sort;
+
 (my $uri = $ENV{REQUEST_URI}) =~ s/\?.*//;
 
 opendir D, $fatedir or fail 'Server error: $fatedir not found';
@@ -78,9 +81,8 @@ $allfail = 100 * $allfail / @reps;
 my $warn = 100 - $allpass - $allfail;
 
 my @sort = ('subarch', 'os', 'cc', 'comment', 'slot');
-my $sort = param('sort');
 my $sdir = 1; # default to ascending sorting
-defined $sort and unshift @sort, $sort eq 'arch'? 'subarch': $sort;
+defined $sort and unshift @sort, $sort;
 $sort ||= $sort[0];
 
 sub nscmp {
-- 
1.9.1



More information about the ffmpeg-devel mailing list