summaryrefslogtreecommitdiff
path: root/includes/ZhClient.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/ZhClient.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/ZhClient.php')
-rw-r--r--includes/ZhClient.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/includes/ZhClient.php b/includes/ZhClient.php
index 8bb36b23..d3d79165 100644
--- a/includes/ZhClient.php
+++ b/includes/ZhClient.php
@@ -41,10 +41,7 @@ class ZhClient {
$errno = $errstr = '';
$this->mFP = fsockopen( $this->mHost, $this->mPort, $errno, $errstr, 30 );
wfRestoreWarnings();
- if ( !$this->mFP ) {
- return false;
- }
- return true;
+ return !$this->mFP;
}
/**
@@ -77,10 +74,7 @@ class ZhClient {
$data .= $str;
}
// data should be of length $len. otherwise something is wrong
- if ( strlen( $data ) != $len ) {
- return false;
- }
- return $data;
+ return strlen( $data ) == $len;
}
/**
@@ -124,6 +118,7 @@ class ZhClient {
}
return $ret;
}
+
/**
* Perform word segmentation
*