diff options
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/date_helper.php | 2 | ||||
-rw-r--r-- | system/helpers/file_helper.php | 4 | ||||
-rw-r--r-- | system/helpers/form_helper.php | 4 | ||||
-rw-r--r-- | system/helpers/security_helper.php | 8 | ||||
-rw-r--r-- | system/helpers/typography_helper.php | 6 | ||||
-rw-r--r-- | system/helpers/user_agent_helper.php | 89 |
6 files changed, 12 insertions, 101 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 03519e686..911862423 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -507,7 +507,7 @@ function timezone_menu($default = 'UTC', $class = "", $name = 'timezones') * Timezones * * Returns an array of timezones. This is a helper function - * for varios other ones in this library + * for various other ones in this library * * @access public * @param string timezone diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 635ef1ba0..7a04324e4 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -73,7 +73,7 @@ function read_file($file) * Write File * * Writes data to the file specified in the path. - * Creats a new file if non-existant. + * Creates a new file if non-existent. * * @access public * @param string path to file @@ -102,7 +102,7 @@ function write_file($path, $data, $mode = 'wb') * * Deletes all files contained in the supplied directory path. * Files must be writable or owned by the system in order to be deleted. - * If the second parameter is set to TRUE, any direcotries contained + * If the second parameter is set to TRUE, any directories contained * within the supplied base directory will be nuked as well. * * @access public diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 3fd361041..e12d89319 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -204,7 +204,7 @@ function form_textarea($data = '', $value = '', $extra = '') // ------------------------------------------------------------------------ /** - * Dropdown Menu + * Drop-down Menu * * @access public * @param string @@ -348,7 +348,7 @@ function form_prep($str = '') * * @access private * @param array - * @parm array + * @param array * @return string */ function parse_form_attributes($attributes, $default) diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 347cab427..34386ffea 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -31,8 +31,8 @@ * XSS Filtering * * @access public - * @parm string - * @parm string the character set of your data + * @param string + * @param string the character set of your data * @return string */ function xss_clean($str, $charset = 'ISO-8859-1') @@ -84,7 +84,7 @@ function dohash($str, $type = 'sha1') * Strip Image Tags * * @access public - * @parm string + * @param string * @return string */ function strip_image_tags($str) @@ -101,7 +101,7 @@ function strip_image_tags($str) * Convert PHP tags to entities * * @access public - * @parm string + * @param string * @return string */ function encode_php_tags($str) diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php index ba6804873..fe9e3bb92 100644 --- a/system/helpers/typography_helper.php +++ b/system/helpers/typography_helper.php @@ -65,7 +65,7 @@ function nl2br_except_pre($str) * * * @access public - * @parm string + * @param string * @return string */ function auto_typography($str) @@ -125,7 +125,7 @@ class Auto_typography { $str = preg_replace("/\n\n+/", "\n\n", $str); /* - * Convert quotes within tags to tempoarary marker + * Convert quotes within tags to temporary marker * * We don't want quotes converted within * tags so we'll temporarily convert them to @@ -156,7 +156,7 @@ class Auto_typography { $str = preg_replace("#(</.*?)(".$this->block_elements.")(.*?>)#", "\\1\\2\\3<p>", $str); /* - * Convert "ignore" tags to tempoarary marker + * Convert "ignore" tags to temporary marker * * The parser splits out the string at every tag * it encounters. Certain inline tags, like image diff --git a/system/helpers/user_agent_helper.php b/system/helpers/user_agent_helper.php deleted file mode 100644 index 3c6085e77..000000000 --- a/system/helpers/user_agent_helper.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); -/** - * Code Igniter - * - * An open source application development framework for PHP 4.3.2 or newer - * - * @package CodeIgniter - * @author Rick Ellis - * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html - * @link http://www.codeigniter.com - * @since Version 1.0 - * @filesource - */ - -// ------------------------------------------------------------------------ - -/** - * Code Igniter User Agent Helper - * - * @package CodeIgniter - * @subpackage Helpers - * @category Helpers - * @author Rick Ellis - * @link http://www.codeigniter.com/user_guide/helpers/array_helper.html - */ - -// ------------------------------------------------------------------------ - -/** - * Get the OS of the user currently browsing the site - * - * @access public - * @return string - */ -function get_OS() -{ - if ( ! isset($_SERVER['HTTP_USER_AGENT'])) - { - return 'Unknown OS'; - } - - $os = array ( - 'windows nt 6.0' => 'Windows Longhorn', - 'windows nt 5.2' => 'Windows 2003', - 'windows nt 5.0' => 'Windows 2000', - 'windows nt 5.1' => 'Windows XP', - 'windows nt 4.0' => 'Windows NT 4.0', - 'winnt4.0' => 'Windows NT 4.0', - 'winnt 4.0' => 'Windows NT', - 'winnt' => 'Windows NT', - 'windows 98' => 'Windows 98', - 'win98' => 'Windows 98', - 'windows 95' => 'Windows 95', - 'win95' => 'Windows 95', - 'windows' => 'Unknown Windows OS', - 'mac os x' => 'Mac OS X', - 'freebsd' => 'FreeBSD', - 'ppc' => 'Macintosh', - 'sunos' => 'Sun Solaris', - 'linux' => 'Linux', - 'debian' => 'Debian', - 'beos' => 'BeOS', - 'apachebench' => 'ApacheBench', - 'aix' => 'AIX', - 'irix' => 'Irix', - 'osf' => 'DEC OSF', - 'hp-ux' => 'HP-UX', - 'netbsd' => 'NetBSD', - 'bsdi' => 'BSDi', - 'openbsd' => 'OpenBSD', - 'gnu' => 'GNU/Linux', - 'unix' => 'Unknown Unix OS' - ); - - - foreach ($os as $key => $val) - { - if (preg_match("|$key|i", $_SERVER['HTTP_USER_AGENT'])) - { - return $val; - } - } - - return 'Unknown OS'; -} - - -?>
\ No newline at end of file |