From 7327499064ae165468c7440f8571c3e570b58a0b Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 5 May 2008 16:39:18 +0000 Subject: Added get_dir_file_info(), get_file_info(), and get_mime_by_extension() to the File Helper. Changed ( ! condition) into (! condition) within the code --- system/libraries/Trackback.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'system/libraries/Trackback.php') diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 5371e9050..3e1c20210 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -56,7 +56,7 @@ class CI_Trackback { */ function send($tb_data) { - if ( ! is_array($tb_data)) + if (! is_array($tb_data)) { $this->set_error('The send() method must be passed an array'); return FALSE; @@ -65,7 +65,7 @@ class CI_Trackback { // Pre-process the Trackback Data foreach (array('url', 'title', 'excerpt', 'blog_name', 'ping_url') as $item) { - if ( ! isset($tb_data[$item])) + if (! isset($tb_data[$item])) { $this->set_error('Required item missing: '.$item); return FALSE; @@ -102,7 +102,7 @@ class CI_Trackback { } // Build the Trackback data string - $charset = ( ! isset($tb_data['charset'])) ? $this->charset : $tb_data['charset']; + $charset = (! isset($tb_data['charset'])) ? $this->charset : $tb_data['charset']; $data = "url=".rawurlencode($url)."&title=".rawurlencode($title)."&blog_name=".rawurlencode($blog_name)."&excerpt=".rawurlencode($excerpt)."&charset=".rawurlencode($charset); @@ -139,13 +139,13 @@ class CI_Trackback { { foreach (array('url', 'title', 'blog_name', 'excerpt') as $val) { - if ( ! isset($_POST[$val]) OR $_POST[$val] == '') + if (! isset($_POST[$val]) OR $_POST[$val] == '') { $this->set_error('The following required POST variable is missing: '.$val); return FALSE; } - $this->data['charset'] = ( ! isset($_POST['charset'])) ? 'auto' : strtoupper(trim($_POST['charset'])); + $this->data['charset'] = (! isset($_POST['charset'])) ? 'auto' : strtoupper(trim($_POST['charset'])); if ($val != 'url' && function_exists('mb_convert_encoding')) { @@ -212,7 +212,7 @@ class CI_Trackback { */ function data($item) { - return ( ! isset($this->data[$item])) ? '' : $this->data[$item]; + return (! isset($this->data[$item])) ? '' : $this->data[$item]; } // -------------------------------------------------------------------- @@ -233,14 +233,14 @@ class CI_Trackback { $target = parse_url($url); // Open the socket - if ( ! $fp = @fsockopen($target['host'], 80)) + if (! $fp = @fsockopen($target['host'], 80)) { $this->set_error('Invalid Connection: '.$url); return FALSE; } // Build the path - $ppath = ( ! isset($target['path'])) ? $url : $target['path']; + $ppath = (! isset($target['path'])) ? $url : $target['path']; $path = (isset($target['query']) && $target['query'] != "") ? $ppath.'?'.$target['query'] : $ppath; @@ -267,7 +267,7 @@ class CI_Trackback { } @fclose($fp); - if ( ! eregi("0", $this->response)) + if (! eregi("0", $this->response)) { $message = 'An unknown error was encountered'; @@ -360,7 +360,7 @@ class CI_Trackback { $tb_array = explode('/', $url); $tb_end = $tb_array[count($tb_array)-1]; - if ( ! is_numeric($tb_end)) + if (! is_numeric($tb_end)) { $tb_end = $tb_array[count($tb_array)-2]; } @@ -378,13 +378,13 @@ class CI_Trackback { $tb_array = explode('/', $url); $tb_id = $tb_array[count($tb_array)-1]; - if ( ! is_numeric($tb_id)) + if (! is_numeric($tb_id)) { $tb_id = $tb_array[count($tb_array)-2]; } } - if ( ! preg_match ("/^([0-9]+)$/", $tb_id)) + if (! preg_match ("/^([0-9]+)$/", $tb_id)) { return false; } -- cgit v1.2.3-24-g4f1b