summaryrefslogtreecommitdiffstats
path: root/system/helpers/html_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-26 17:31:02 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-26 17:31:02 +0100
commitea41c8aa1951216b6a9ccc99832d69d2b41c5ead (patch)
tree57b8b39c7325217795e172cafb71e5f7e63fc563 /system/helpers/html_helper.php
parent4247ed1c0fb588f968f18fd80a5f95debefc63f6 (diff)
Don't use error suppression on realpath() + style adjustments
Diffstat (limited to 'system/helpers/html_helper.php')
-rw-r--r--system/helpers/html_helper.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 604d1144a..8246cbd2b 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -118,10 +118,10 @@ if ( ! function_exists('_list'))
}
// Set the indentation based on the depth
- $out = str_repeat(' ', $depth);
+ $out = str_repeat(' ', $depth)
+ // Write the opening list tag
+ .'<'.$type._stringify_attributes($attributes).">\n";
- // Write the opening list tag
- $out .= '<'.$type._stringify_attributes($attributes).">\n";
// Cycle through the list elements. If an array is
// encountered we will recursively call _list()
@@ -152,22 +152,6 @@ if ( ! function_exists('_list'))
// ------------------------------------------------------------------------
-if ( ! function_exists('br'))
-{
- /**
- * Generates HTML BR tags based on number supplied
- *
- * @param int $count Number of times to repeat the tag
- * @return string
- */
- function br($count = 1)
- {
- return str_repeat('<br />', $count);
- }
-}
-
-// ------------------------------------------------------------------------
-
if ( ! function_exists('img'))
{
/**
@@ -368,7 +352,7 @@ if ( ! function_exists('meta'))
$str = '';
foreach ($name as $meta)
{
- $type = ( ! isset($meta['type']) OR $meta['type'] === 'name') ? 'name' : 'http-equiv';
+ $type = (isset($meta['type']) && $meta['type'] !== 'name') ? 'http-equiv' : 'name';
$name = isset($meta['name']) ? $meta['name'] : '';
$content = isset($meta['content']) ? $meta['content'] : '';
$newline = isset($meta['newline']) ? $meta['newline'] : "\n";
@@ -382,6 +366,22 @@ if ( ! function_exists('meta'))
// ------------------------------------------------------------------------
+if ( ! function_exists('br'))
+{
+ /**
+ * Generates HTML BR tags based on number supplied
+ *
+ * @param int $count Number of times to repeat the tag
+ * @return string
+ */
+ function br($count = 1)
+ {
+ return str_repeat('<br />', $count);
+ }
+}
+
+// ------------------------------------------------------------------------
+
if ( ! function_exists('nbs'))
{
/**