Bug fixes
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Dec 2003 10:56:20 +0000 (10:56 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 4 Dec 2003 10:56:20 +0000 (10:56 +0000)
includes/Article.php
includes/MemCachedClient.inc.php

index 003ae20..305aaf7 100644 (file)
@@ -1079,7 +1079,7 @@ class Article {
                                if (!$messageCache) {
                                        $messageCache = wfLoadAllMessages();
                                }
-                               $messageCache[$title] = $text;
+                               $messageCache[$this->mTitle->getDBkey()] = $text;
                                $wgMemc->set( "$wgDBname:messages", $messageCache, 86400 );
                        }
                }
index 6bee4fd..b21c0e7 100644 (file)
@@ -1062,7 +1062,7 @@ class MemCachedClient
 
                        // if we're almost at the end, read the rest, so 
                        // that we don't corrupt the \r\nEND\r\n
-                       if ($bytes_read >= $len)
+                       if ($bytes_read >= $len && $bytes_read < ($len +7))
                        {
                                $lastbit = socket_read($sock, $len - $bytes_read + 7, PHP_BINARY_READ);
                                $line .= $lastbit;