summaryrefslogtreecommitdiff
path: root/src/lib/View.class.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-09-19 22:57:30 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-09-19 22:57:30 -0400
commit02ec60f86816088e07b737130d618a17a12c3532 (patch)
tree4a1ec8427a2c013a2f2a2cdb33cdb6e6da87c4d2 /src/lib/View.class.php
parentc95783b9ecd888dea04b3264461537ac73973fe3 (diff)
Add a decent fallback for when both file extension and Accept methods of selecting the view fail (as they do in IE6-8)
Diffstat (limited to 'src/lib/View.class.php')
-rw-r--r--src/lib/View.class.php4
1 files changed, 4 insertions, 0 deletions
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.
}