diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-05-05 18:39:18 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-05-05 18:39:18 +0200 |
commit | 7327499064ae165468c7440f8571c3e570b58a0b (patch) | |
tree | 4f0d0053e7d25f7064c63070edcbc3af114abed9 /system/libraries/Trackback.php | |
parent | 7539f67a23c8536f892263d8d7ab9448655d8e22 (diff) |
Added get_dir_file_info(), get_file_info(), and get_mime_by_extension() to the File Helper.
Changed ( ! condition) into (! condition) within the code
Diffstat (limited to 'system/libraries/Trackback.php')
-rw-r--r-- | system/libraries/Trackback.php | 24 |
1 files changed, 12 insertions, 12 deletions
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("<error>0</error>", $this->response))
+ if (! eregi("<error>0</error>", $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;
}
|