r2115 + sendfile: don't require the file to be not empty
[racktables] / process.php
CommitLineData
b325120a 1<?php
e673ee24
DO
2
3require 'inc/init.php';
da958e52 4fixContext();
e673ee24 5
da958e52 6if (empty ($op) or !isset ($ophandler[$pageno][$tabno][$op]))
e673ee24 7{
b0348307 8 showError ("Invalid request in operation broker: page '${pageno}', tab '${tabno}', op '${op}'", __FILE__);
e673ee24
DO
9 die();
10}
11
12// We have a chance to handle an error before starting HTTP header.
46f92ff7 13if (!isset ($delayauth[$pageno][$tabno][$op]) and !permitted())
e81fb764
DO
14{
15 $errlog = array
16 (
17 'v' => 2,
18 'm' => array (0 => array ('c' => 157)) // operation not permitted
19 );
20 $location = buildWideRedirectURL ($errlog);
21}
46f92ff7
DO
22else
23 $location = $ophandler[$pageno][$tabno][$op]();
e673ee24
DO
24header ("Location: " . $location);
25
26?>