OSDN Git Service

MERGE: リビジョン1860。Blogオブジェクトの作成にManagerクラスによるキャッシュ機構を利用
[nucleus-jp/nucleus-next.git] / nucleus / xmlrpc / api_blogger.inc.php
index ce28e0c..769d911 100644 (file)
@@ -83,7 +83,7 @@
 
                $blogid = getBlogIDFromItemID($itemid);
 
-               $blog = new Blog($blogid);
+               $blog =& $manager->getBlog($blogid);
                $catid = $blog->getCategoryIdFromName($category);
 
                if ($old['draft'] && $publish) {
          * Returns a list of recent items
          */
        function _getRecentItemsBlogger($blogid, $username, $password, $amount) {
-
+               global $manager;
+               
                $blogid = intval($blogid);
                $amount = intval($amount);
 
                // 3. create and return list of recent items
                // Struct returned has dateCreated, userid, blogid and content
 
-               $blog = new Blog($blogid);
+               $blog =& $manager->getBlog($blogid);
 
                $structarray = array();         // the array in which the structs will be stored
 
                // Structure returned has dateCreated, userid, blogid and content
 
                $item =& $manager->getItem($itemid,1,1); // (also allow drafts and future items)
-               $blog = new Blog($blogid);
+               $blog =& $manager->getBlog($blogid);
 
                // get category
                $item['category'] = $blog->getCategoryName($item['catid']);