extract djvu text (bug 18046); escape possible script with htmlspecialchars instead...
[lhc/web/wiklou.git] / includes / memcached-client.php
index 8adb523..7974530 100644 (file)
@@ -57,7 +57,6 @@
  * $val = $mc->get('key');
  *
  * @author  Ryan T. Dean <rtdean@cytherianage.net>
- * @package memcached-client
  * @version 0.1.2
  */
 
@@ -69,7 +68,7 @@
  * memcached client class implemented using (p)fsockopen()
  *
  * @author  Ryan T. Dean <rtdean@cytherianage.net>
- * @addtogroup Cache
+ * @ingroup Cache
  */
 class memcached
 {
@@ -153,7 +152,7 @@ class memcached
    /**
     * At how many bytes should we compress?
     *
-    * @var     integer 
+    * @var     integer
     * @access  private
     */
    var $_compress_threshold;
@@ -193,7 +192,7 @@ class memcached
    /**
     * Total # of bit buckets we have
     *
-    * @var     integer 
+    * @var     integer
     * @access  private
     */
    var $_bucketcount;
@@ -201,7 +200,7 @@ class memcached
    /**
     * # of total servers we have
     *
-    * @var     integer 
+    * @var     integer
     * @access  private
     */
    var $_active;
@@ -455,9 +454,9 @@ class memcached
       if (!$this->_active)
          return false;
 
-      $this->stats['get_multi']++;
+      @$this->stats['get_multi']++;
       $sock_keys = array();
-      
+
       foreach ($keys as $key)
       {
          $sock = $this->get_sock($key);
@@ -801,8 +800,8 @@ class memcached
          if (is_resource($sock)) {
             $this->_flush_read_buffer($sock);
             return $sock;
-         }
-         $hv += $this->_hashfunc($tries . $realkey);
+                }
+         $hv = $this->_hashfunc( $hv . $realkey );
       }
 
       return false;
@@ -984,9 +983,7 @@ class memcached
 
       if ($this->_debug)
       {
-         if ($flags & memcached::COMPRESSED)
-            $val = 'compressed data';
-         $this->_debugprint(sprintf("MemCache: %s %s => %s (%s)\n", $cmd, $key, $val, $line));
+         $this->_debugprint(sprintf("%s %s (%s)\n", $cmd, $key, $line));
       }
       if ($line == "STORED")
          return true;
@@ -1090,4 +1087,3 @@ class memcached
 // vim: sts=3 sw=3 et
 
 // }}}
-