]> git.deb.at Git - pkg/blosxom.git/commitdiff
Avoid "conditional and" for setting $static_or_dynamic
authorBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 08:33:28 +0000 (08:33 +0000)
committerBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 08:33:28 +0000 (08:33 +0000)
blosxom.cgi

index bba92f18a07e149f5516054e10f088d048b9e713..c7d8887afb5e42dc2943a3a20085bbd9b9207832 100755 (executable)
@@ -142,8 +142,17 @@ $depth += ($datadir =~ tr[/][]) - 1 if $depth;
 # Global variable to be used in head/foot.{flavour} templates
 $path_info = '';
 
-$static_or_dynamic = (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and param('-password') eq $static_password) ? 'static' : 'dynamic';
-$static_or_dynamic eq 'dynamic' and param(-name=>'-quiet', -value=>1);
+if (    !$ENV{GATEWAY_INTERFACE}
+    and param('-password')
+    and $static_password
+    and param('-password') eq $static_password )
+{
+    $static_or_dynamic = 'static';
+}
+else {
+    $static_or_dynamic = 'dynamic';
+    param( -name => '-quiet', -value => 1 );
+}
 
 # Path Info Magic
 # Take a gander at HTTP's PATH_INFO for optional blog name, archive yr/mo/day