dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Rename $usableSkins to $allowedSkins"
[lhc/web/wiklou.git]
/
includes
/
ZhClient.php
diff --git
a/includes/ZhClient.php
b/includes/ZhClient.php
index
4299841
..
c5955ae
100644
(file)
--- a/
includes/ZhClient.php
+++ b/
includes/ZhClient.php
@@
-50,7
+50,7
@@
class ZhClient {
}
/**
}
/**
- * Establish conn
ce
tion
+ * Establish conn
ec
tion
*
* @access private
*
*
* @access private
*
@@
-81,14
+81,14
@@
class ZhClient {
$result = fgets( $this->mFP, 1024 );
list( $status, $len ) = explode( ' ', $result );
$result = fgets( $this->mFP, 1024 );
list( $status, $len ) = explode( ' ', $result );
- if( $status == 'ERROR' ) {
+ if
( $status == 'ERROR' ) {
// $len is actually the error code...
print "zhdaemon error $len<br />\n";
return false;
}
$bytesread = 0;
$data = '';
// $len is actually the error code...
print "zhdaemon error $len<br />\n";
return false;
}
$bytesread = 0;
$data = '';
- while( !feof( $this->mFP ) && $bytesread < $len ) {
+ while
( !feof( $this->mFP ) && $bytesread < $len ) {
$str = fread( $this->mFP, $len - $bytesread );
$bytesread += strlen( $str );
$data .= $str;
$str = fread( $this->mFP, $len - $bytesread );
$bytesread += strlen( $str );
$data .= $str;
@@
-100,8
+100,8
@@
class ZhClient {
/**
* Convert the input to a different language variant
*
/**
* Convert the input to a different language variant
*
- * @param
$text String:
input text
- * @param
$tolang String:
language variant
+ * @param
string $text
input text
+ * @param
string $tolang
language variant
* @return string the converted text
*/
function convert( $text, $tolang ) {
* @return string the converted text
*/
function convert( $text, $tolang ) {
@@
-117,7
+117,7
@@
class ZhClient {
/**
* Convert the input to all possible variants
*
/**
* Convert the input to all possible variants
*
- * @param
$text String:
input text
+ * @param
string $text
input text
* @return array langcode => converted_string
*/
function convertToAllVariants( $text ) {
* @return array langcode => converted_string
*/
function convertToAllVariants( $text ) {
@@
-131,7
+131,7
@@
class ZhClient {
$info = explode( ';', $infoline );
$ret = array();
$i = 0;
$info = explode( ';', $infoline );
$ret = array();
$i = 0;
- foreach( $info as $variant ) {
+ foreach
( $info as $variant ) {
list( $code, $len ) = explode( ' ', $variant );
$ret[strtolower( $code )] = substr( $data, $i, $len );
$i += $len;
list( $code, $len ) = explode( ' ', $variant );
$ret[strtolower( $code )] = substr( $data, $i, $len );
$i += $len;
@@
-142,7
+142,7
@@
class ZhClient {
/**
* Perform word segmentation
*
/**
* Perform word segmentation
*
- * @param
$text String:
input text
+ * @param
string $text
input text
* @return string segmented text
*/
function segment( $text ) {
* @return string segmented text
*/
function segment( $text ) {