From 02ec60f86816088e07b737130d618a17a12c3532 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 19 Sep 2011 22:57:30 -0400 Subject: Add a decent fallback for when both file extension and Accept methods of selecting the view fail (as they do in IE6-8) --- src/lib/View.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/View.class.php b/src/lib/View.class.php index f0afa39..33a9c4e 100644 --- a/src/lib/View.class.php +++ b/src/lib/View.class.php @@ -29,6 +29,10 @@ class View { */ private function chooseBetweenEquals($extensions) { if (count($extensions)<1) return false; + $pref = array('html'); + foreach ($pref as $ext) { + if (in_array($ext, $extensions)) return $ext; + } return $extensions[0]; // XXX: Worst. Solution. Ever. } -- cgit v1.2.3