From 3a0292303e453f38204279b5d1c978a4b9c367e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 3 Nov 2018 15:08:43 +0300 Subject: php: remove trailing whitespaces --- plugins/mail/init.php | 2 +- plugins/search_sphinx/sphinxapi.php | 40 ++++++++++++++++++------------------- plugins/vf_shared/init.php | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'plugins') diff --git a/plugins/mail/init.php b/plugins/mail/init.php index 28e160541..6525dc940 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -168,7 +168,7 @@ class Mail extends Plugin { print ""; - print ""; diff --git a/plugins/search_sphinx/sphinxapi.php b/plugins/search_sphinx/sphinxapi.php index 41b0fac41..4d1ed6116 100644 --- a/plugins/search_sphinx/sphinxapi.php +++ b/plugins/search_sphinx/sphinxapi.php @@ -124,7 +124,7 @@ define ( "SPH_GROUPBY_ATTRPAIR", 5 ); function sphPackI64 ( $v ) { assert ( is_numeric($v) ); - + // x64 if ( PHP_INT_SIZE>=8 ) { @@ -136,7 +136,7 @@ function sphPackI64 ( $v ) if ( is_int($v) ) return pack ( "NN", $v < 0 ? -1 : 0, $v ); - // x32, bcmath + // x32, bcmath if ( function_exists("bcmul") ) { if ( bccomp ( $v, 0 ) == -1 ) @@ -173,16 +173,16 @@ function sphPackI64 ( $v ) function sphPackU64 ( $v ) { assert ( is_numeric($v) ); - + // x64 if ( PHP_INT_SIZE>=8 ) { assert ( $v>=0 ); - + // x64, int if ( is_int($v) ) return pack ( "NN", $v>>32, $v&0xFFFFFFFF ); - + // x64, bcmath if ( function_exists("bcmul") ) { @@ -190,12 +190,12 @@ function sphPackU64 ( $v ) $l = bcmod ( $v, 4294967296 ); return pack ( "NN", $h, $l ); } - + // x64, no-bcmath $p = max ( 0, strlen($v) - 13 ); $lo = (int)substr ( $v, $p ); $hi = (int)substr ( $v, 0, $p ); - + $m = $lo + $hi*1316134912; $l = $m % 4294967296; $h = $hi*2328 + (int)($m/4294967296); @@ -206,7 +206,7 @@ function sphPackU64 ( $v ) // x32, int if ( is_int($v) ) return pack ( "NN", 0, $v ); - + // x32, bcmath if ( function_exists("bcmul") ) { @@ -219,7 +219,7 @@ function sphPackU64 ( $v ) $p = max(0, strlen($v) - 13); $lo = (float)substr($v, $p); $hi = (float)substr($v, 0, $p); - + $m = $lo + $hi*1316134912.0; $q = floor($m / 4294967296.0); $l = $m - ($q * 4294967296.0); @@ -275,11 +275,11 @@ function sphUnpackU64 ( $v ) // x32, bcmath if ( function_exists("bcmul") ) return bcadd ( $lo, bcmul ( $hi, "4294967296" ) ); - + // x32, no-bcmath $hi = (float)$hi; $lo = (float)$lo; - + $q = floor($hi/10000000.0); $r = $hi - $q*10000000.0; $m = $lo + $r*4967296.0; @@ -322,7 +322,7 @@ function sphUnpackI64 ( $v ) return $lo; return sprintf ( "%.0f", $lo - 4294967296.0 ); } - + $neg = ""; $c = 0; if ( $hi<0 ) @@ -331,7 +331,7 @@ function sphUnpackI64 ( $v ) $lo = ~$lo; $c = 1; $neg = "-"; - } + } $hi = sprintf ( "%u", $hi ); $lo = sprintf ( "%u", $lo ); @@ -343,7 +343,7 @@ function sphUnpackI64 ( $v ) // x32, no-bcmath $hi = (float)$hi; $lo = (float)$lo; - + $q = floor($hi/10000000.0); $r = $hi - $q*10000000.0; $m = $lo + $r*4967296.0; @@ -506,7 +506,7 @@ class SphinxClient $this->_path = $host; return; } - + assert ( is_int($port) ); $this->_host = $host; $this->_port = $port; @@ -586,14 +586,14 @@ class SphinxClient $fp = @fsockopen ( $host, $port, $errno, $errstr ); else $fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout ); - + if ( !$fp ) { if ( $this->_path ) $location = $this->_path; else $location = "{$this->_host}:{$this->_port}"; - + $errstr = trim ( $errstr ); $this->_error = "connection to $location failed (errno=$errno, msg=$errstr)"; $this->_connerror = true; @@ -1231,7 +1231,7 @@ class SphinxClient if ( $type==SPH_ATTR_FLOAT ) { list(,$uval) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; - list(,$fval) = unpack ( "f*", pack ( "L", $uval ) ); + list(,$fval) = unpack ( "f*", pack ( "L", $uval ) ); $attrvals[$attr] = $fval; continue; } @@ -1250,7 +1250,7 @@ class SphinxClient } else if ( $type==SPH_ATTR_STRING ) { $attrvals[$attr] = substr ( $response, $p, $val ); - $p += $val; + $p += $val; } else { $attrvals[$attr] = sphFixUint($val); @@ -1617,7 +1617,7 @@ class SphinxClient fclose ( $this->_socket ); $this->_socket = false; - + return true; } diff --git a/plugins/vf_shared/init.php b/plugins/vf_shared/init.php index a3b0daeb6..941d3c8ad 100644 --- a/plugins/vf_shared/init.php +++ b/plugins/vf_shared/init.php @@ -25,7 +25,7 @@ class VF_Shared extends Plugin { * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function get_unread($feed_id) { - $sth = $this->pdo->prepare("select count(int_id) AS count + $sth = $this->pdo->prepare("select count(int_id) AS count from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''"); $sth->execute([$_SESSION['uid']]); @@ -40,7 +40,7 @@ class VF_Shared extends Plugin { * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function get_total($feed_id) { - $sth = $this->pdo->prepare("select count(int_id) AS count + $sth = $this->pdo->prepare("select count(int_id) AS count from ttrss_user_entries where owner_uid = ? and uuid != ''"); $sth->execute([$_SESSION['uid']]); -- cgit v1.2.3