summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/cookie_helper.php43
-rw-r--r--system/helpers/file_helper.php4
2 files changed, 3 insertions, 44 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 40afadb57..4be371efe 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -46,50 +46,9 @@ if ( ! function_exists('set_cookie'))
{
function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
{
- if (is_array($name))
- {
- foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item)
- {
- if (isset($name[$item]))
- {
- $$item = $name[$item];
- }
- }
- }
-
// Set the config file options
$CI =& get_instance();
-
- if ($prefix == '' AND $CI->config->item('cookie_prefix') != '')
- {
- $prefix = $CI->config->item('cookie_prefix');
- }
- if ($domain == '' AND $CI->config->item('cookie_domain') != '')
- {
- $domain = $CI->config->item('cookie_domain');
- }
- if ($path == '/' AND $CI->config->item('cookie_path') != '/')
- {
- $path = $CI->config->item('cookie_path');
- }
-
- if ( ! is_numeric($expire))
- {
- $expire = time() - 86500;
- }
- else
- {
- if ($expire > 0)
- {
- $expire = time() + $expire;
- }
- else
- {
- $expire = 0;
- }
- }
-
- setcookie($prefix.$name, $value, $expire, $path, $domain, 0);
+ $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix);
}
}
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 2be06ac4f..274c4ad37 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -125,7 +125,7 @@ if ( ! function_exists('delete_files'))
if ( ! $current_dir = @opendir($path))
{
- return TRUE;
+ return FALSE;
}
while(FALSE !== ($filename = @readdir($current_dir)))
@@ -218,7 +218,7 @@ if ( ! function_exists('get_filenames'))
*
* @access public
* @param string path to source
- * @param bool whether to include the path as part of the filename
+ * @param bool Look only at the top level directory specified?
* @param bool internal variable to determine recursion status - do not use in calls
* @return array
*/