summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-01-26 00:57:06 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-01-26 00:57:40 -0500
commit42133f38d223a2b3b81d309f2d1a983ef2012485 (patch)
treea9a01095cbb54474e83f8ec220a15991542819e1 /lib/class
parent5f02e4f43cb1423653c156e612da53e4c5938583 (diff)
downloadampache-42133f38d223a2b3b81d309f2d1a983ef2012485.tar.gz
ampache-42133f38d223a2b3b81d309f2d1a983ef2012485.tar.bz2
ampache-42133f38d223a2b3b81d309f2d1a983ef2012485.zip
Move access_denied() from lib/ui.lib.php to UI
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/ui.class.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/class/ui.class.php b/lib/class/ui.class.php
index b1a54f33..7a56d2d7 100644
--- a/lib/class/ui.class.php
+++ b/lib/class/ui.class.php
@@ -33,6 +33,19 @@ class UI {
}
/**
+ * access_denied
+ *
+ * Throw an error when they try to do something naughty.
+ */
+ public static function access_denied($error = 'Access Denied') {
+ // Clear any buffered crap
+ ob_end_clean();
+ header("HTTP/1.1 403 $error");
+ require_once Config::get('prefix') . '/templates/show_denied.inc.php';
+ exit;
+ }
+
+ /**
* check_ticker
*
* Stupid little cutesie thing to ratelimit output of long-running