r4346 dismiss single-use variable
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 16 Mar 2011 22:36:08 +0000 (22:36 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 16 Mar 2011 22:36:08 +0000 (22:36 +0000)
wwwroot/index.php

index 58d6ffcdce0190a95a831d52f2c8f97dae8eccd1..c74720e5f18bbd8179949aeda19b06a0eab681bb 100644 (file)
@@ -56,12 +56,10 @@ try {
                        renderAccessDenied (FALSE);
                        break;
                }
-
-               $asattach = (isset ($_REQUEST['asattach']) and $_REQUEST['asattach'] == 'no') ? FALSE : TRUE;
                $file = getFile (getBypassValue());
                header("Content-Type: {$file['type']}");
                header("Content-Length: {$file['size']}");
-               if ($asattach)
+               if (! array_key_exists ('asattach', $_REQUEST) or $_REQUEST['asattach'] != 'no')
                        header("Content-Disposition: attachment; filename={$file['name']}");
                echo $file['contents'];
                break;