From: Nicolas Boisselier Date: Wed, 28 Sep 2016 13:35:06 +0000 (+0200) Subject: print_header X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=27968fdc17b1a482774c665981bf77fe648d6349;p=nb.git print_header --- diff --git a/lib/php/db.php b/lib/php/db.php index 978fe6d3..0304ffa0 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -446,10 +446,10 @@ class Db extends nb { return $this->tables; } - function print_header($format) { + public static function print_header($format) { if (empty($_SERVER['DOCUMENT_ROOT'])) return null; - if (!$mime=$this->ext2mime($format)) return false; + if (!$mime=self::ext2mime($format)) return false; header('Content-type: '.$mime); return $mime;