Index: /branches/release-39/php/lib/mtdb_base.php
===================================================================
--- /branches/release-39/php/lib/mtdb_base.php (revision 2519)
+++ /branches/release-39/php/lib/mtdb_base.php (revision 2521)
@@ -469,4 +469,9 @@
         }
 
+        if ( !$blog ) {
+            global $mt;
+            $blog = $this->fetch_blog($mt->blog_id);
+        }
+
         // determine any custom fields that we should filter on
         $fields = array();
@@ -495,7 +500,4 @@
         #        $args['lastn'] = $posts;
         #    }
-            if ($posts = $blog['blog_entries_on_index']) {
-                $limit = $posts;
-            }
         }
         if ($args['limit'] == 'auto') {
