diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-01-23 18:03:09 -0500 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-23 18:03:09 -0500 |
commit | a1a66004571c2f6161335f9413b39d255190f153 (patch) | |
tree | 9b1403c7ea35db20772c18ee7d1d11742f5b6b56 /modules/gallery/helpers/gallery.php | |
parent | d928064f0b7b4f12ce1371d7e0e61f6832f09a01 (diff) |
Enable the profiler and debug output if var/PROFILE exists. This
provides a quick/easy way for server admins to provide profile output.
Fixes #1959.
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
-rw-r--r-- | modules/gallery/helpers/gallery.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 38002b58..725a710d 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -214,4 +214,12 @@ class gallery_Core { } return null; } + + /** + * Return true if we should show the profiler at the bottom of the page. Note that this + * function is called at database setup time so it cannot rely on the database. + */ + static function show_profiler() { + return file_exists(VARPATH . "PROFILE"); + } }
\ No newline at end of file |