From e78e410f710e2f5d7f488d78c08d04ff8e6b20c9 Mon Sep 17 00:00:00 2001 From: Sergey Romaneko Date: Thu, 4 Oct 2012 15:24:46 +0300 Subject: [PATCH] Update monstra/helpers/html.php --- monstra/helpers/html.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/monstra/helpers/html.php b/monstra/helpers/html.php index 04c84d6..9796d5c 100644 --- a/monstra/helpers/html.php +++ b/monstra/helpers/html.php @@ -221,14 +221,14 @@ */ public static function doctype($type = 'html5') { - $doctypes = array('xhtml11' => '', - 'xhtml1-strict' => '', - 'xhtml1-trans' => '', - 'xhtml1-frame' => '', - 'html5' => '', - 'html4-strict' => '', - 'html4-trans' => '', - 'html4-frame' => ''); + $doctypes = array('xhtml11' => '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => ''); if (isset($doctypes[$type])) return $doctypes[$type]; else return false; @@ -252,9 +252,10 @@ if (strpos($file, '://') === FALSE) { $file = Url::base().'/'.$file; } - + // Add the image link $attributes['src'] = $file; + $attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME); return ''; }