diff options
author | philsturgeon <devnull@localhost> | 2011-06-15 17:00:03 +0200 |
---|---|---|
committer | philsturgeon <devnull@localhost> | 2011-06-15 17:00:03 +0200 |
commit | 0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch) | |
tree | ce168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /system/helpers/html_helper.php | |
parent | 3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff) | |
parent | 3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff) |
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'system/helpers/html_helper.php')
-rw-r--r-- | system/helpers/html_helper.php | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 68c6f5908..bd66bc2d0 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -1,4 +1,4 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * @@ -30,7 +30,7 @@ /** * Heading * - * Generates an HTML heading tag. First param is the data. + * Generates an HTML heading tag. First param is the data. * Second param is the size of the heading tag. * * @access public @@ -40,9 +40,10 @@ */ if ( ! function_exists('heading')) { - function heading($data = '', $h = '1') + function heading($data = '', $h = '1', $attributes = '') { - return "<h".$h.">".$data."</h".$h.">"; + $attributes = ($attributes != '') ? ' '.$attributes : $attributes; + return "<h".$h.$attributes.">".$data."</h".$h.">"; } } @@ -113,7 +114,7 @@ if ( ! function_exists('_list')) // Set the indentation based on the depth $out = str_repeat(" ", $depth); - // Were any attributes submitted? If so generate a string + // Were any attributes submitted? If so generate a string if (is_array($attributes)) { $atts = ''; @@ -127,7 +128,7 @@ if ( ! function_exists('_list')) // Write the opening list tag $out .= "<".$type.$attributes.">\n"; - // Cycle through the list elements. If an array is + // Cycle through the list elements. If an array is // encountered we will recursively call _list() static $_last_list_item = ''; @@ -243,7 +244,7 @@ if ( ! function_exists('img')) * Generates a page document type declaration * * Valid options are xhtml-11, xhtml-strict, xhtml-trans, xhtml-frame, - * html4-strict, html4-trans, and html4-frame. Values are saved in the + * html4-strict, html4-trans, and html4-frame. Values are saved in the * doctypes config file. * * @access public @@ -258,7 +259,16 @@ if ( ! function_exists('doctype')) if ( ! is_array($_doctypes)) { - if ( ! require_once(APPPATH.'config/doctypes.php')) + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php')) + { + include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'); + } + elseif (is_file(APPPATH.'config/doctypes.php')) + { + include(APPPATH.'config/doctypes.php'); + } + + if ( ! is_array($_doctypes)) { return FALSE; } |