From f7c1e57cf021f1d6f00b209f1640bc24c6303391 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Fri, 8 Apr 2011 23:15:33 -0400 Subject: Transcoding/streaming cleanup. Derive our new filesize from the length, not the previous bitrate and size. Allow higher bitrates than the source when they're different formats. Return HTTP error codes when an error occurs. Minor cleanup. --- lib/ui.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ui.lib.php') diff --git a/lib/ui.lib.php b/lib/ui.lib.php index c7d21741..ded371a1 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -103,10 +103,11 @@ if (!function_exists('ngettext')) { * access_denied * Throws an error if they try to do something that they aren't allowed to. */ -function access_denied() { +function access_denied($error = "Access Denied") { // Clear any crap we've got up top ob_end_clean(); + header("HTTP/1.1 403 $error"); require_once Config::get('prefix') . '/templates/show_denied.inc.php'; exit; -- cgit