Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [59294] trunk/phase3/includes/memcached-client.php

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


ialex at svn

Nov 20, 2009, 11:14 AM

Post #1 of 1 (57 views)
Permalink
SVN: [59294] trunk/phase3/includes/memcached-client.php

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59294

Revision: 59294
Author: ialex
Date: 2009-11-20 19:14:24 +0000 (Fri, 20 Nov 2009)

Log Message:
-----------
Fix for r59289 and 59293: finish to rename the class, really sorry for that :(

Modified Paths:
--------------
trunk/phase3/includes/memcached-client.php

Modified: trunk/phase3/includes/memcached-client.php
===================================================================
--- trunk/phase3/includes/memcached-client.php 2009-11-20 18:44:43 UTC (rev 59293)
+++ trunk/phase3/includes/memcached-client.php 2009-11-20 19:14:24 UTC (rev 59294)
@@ -398,22 +398,21 @@
*/
function get ($key)
{
- $fname = 'memcached::get';
- wfProfileIn( $fname );
+ wfProfileIn( __METHOD__ );

if ( $this->_debug ) {
$this->_debugprint( "get($key)\n" );
}

if (!$this->_active) {
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return false;
}

$sock = $this->get_sock($key);

if (!is_resource($sock)) {
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return false;
}

@@ -423,7 +422,7 @@
if (!$this->_safe_fwrite($sock, $cmd, strlen($cmd)))
{
$this->_dead_sock($sock);
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return false;
}

@@ -434,7 +433,7 @@
foreach ($val as $k => $v)
$this->_debugprint(sprintf("MemCache: sock %s got %s\n", serialize($sock), $k));

- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return @$val[$key];
}

@@ -621,7 +620,7 @@
*
* @access public
*
- * @see memcahced::memcached
+ * @see MWMemcached::__construct
*/
function set_debug ($dbg)
{
@@ -638,7 +637,7 @@
*
* @access public
*
- * @see memcached::memcached()
+ * @see MWMemcached::__construct()
*/
function set_servers ($list)
{
@@ -903,12 +902,12 @@
return false;
}

- if ($this->_have_zlib && $flags & memcached::COMPRESSED)
+ if ($this->_have_zlib && $flags & self::COMPRESSED)
$ret[$rkey] = gzuncompress($ret[$rkey]);

$ret[$rkey] = rtrim($ret[$rkey]);

- if ($flags & memcached::SERIALIZED)
+ if ($flags & self::SERIALIZED)
$ret[$rkey] = unserialize($ret[$rkey]);

} else
@@ -949,7 +948,7 @@
if (!is_scalar($val))
{
$val = serialize($val);
- $flags |= memcached::SERIALIZED;
+ $flags |= self::SERIALIZED;
if ($this->_debug)
$this->_debugprint(sprintf("client: serializing data as it is not scalar\n"));
}
@@ -962,13 +961,13 @@
$c_val = gzcompress($val, 9);
$c_len = strlen($c_val);

- if ($c_len < $len*(1 - memcached::COMPRESSION_SAVINGS))
+ if ($c_len < $len*(1 - self::COMPRESSION_SAVINGS))
{
if ($this->_debug)
$this->_debugprint(sprintf("client: compressing data; was %d bytes is now %d bytes\n", $len, $c_len));
$val = $c_val;
$len = $c_len;
- $flags |= memcached::COMPRESSED;
+ $flags |= self::COMPRESSED;
}
}
if (!$this->_safe_fwrite($sock, "$cmd $key $flags $exp $len\r\n$val\r\n"))



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.