[pLog-svn] r3173 - plog/trunk

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Sun Apr 2 21:18:24 GMT 2006


Author: pwestbro
Date: 2006-04-02 21:18:24 +0000 (Sun, 02 Apr 2006)
New Revision: 3173

Modified:
   plog/trunk/xmlrpc.php
Log:
Fixed some problems in xmlrpc.php.  Now posting works with metaWeblog

Modified: plog/trunk/xmlrpc.php
===================================================================
--- plog/trunk/xmlrpc.php	2006-04-02 21:15:55 UTC (rev 3172)
+++ plog/trunk/xmlrpc.php	2006-04-02 21:18:24 UTC (rev 3173)
@@ -310,14 +310,19 @@
             "postid" =>
         */
 
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
         if ($auth)
         {
             $userInfo = $users->getUserInfoFromUsername( $username );
 
-            $item = $articles->getUserArticle( $postid, $userInfo->getId() );
+            $item = $articles->getBlogArticle($postid,
+                                                 -1, // blogId
+                                                 true, // includeHiddenFields
+                                                 -1, // date
+                                                 -1, // categoryId
+                                                 $userInfo->getId());
             $dateObject = $item->getDateObject();
-            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
             // Get the unix time stamp 
             $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
@@ -351,11 +356,18 @@
 
         if ($auth)
         {
+            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+
             $userInfo = $users->getUserInfoFromUsername( $username );
 
-            $item = $articles->getUserArticle( $postid, $userInfo->getId() );
+            $item = $articles->getBlogArticle($postid,
+                                              -1, // blogId
+                                              true, // includeHiddenFields
+                                              -1, // date
+                                              -1, // categoryId
+                                              $userInfo->getId());
+
             $dateObject = $item->getDateObject();
-            include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
             // Get the unix time stamp 
             $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
             
@@ -423,7 +435,12 @@
             $content = implode("\n", $dummy);
             unset($dummy);
 
-            $article = $articles->getUserArticle($postid);
+            $article = $articles->getBlogArticle($postid,
+                                                 -1, // blogId
+                                                 true, // includeHiddenFields
+                                                 -1, // date
+                                                 -1, // categoryId
+                                                 $userInfo->getId());
             $article->setText($content);
             $article->setTopic($title);
             $article->setStatus($status);
@@ -464,7 +481,7 @@
             boolean, true or false
         */
 
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
         if ($auth)
         {
             $userInfo = $users->getUserInfoFromUsername( $username );
@@ -480,7 +497,12 @@
             $title = $content["title"];
             $body = $content["description"];
             
-            $article = $articles->getUserArticle($postid);
+            $article = $articles->getBlogArticle($postid,
+                                                 -1, // blogId
+                                                 true, // includeHiddenFields
+                                                 -1, // date
+                                                 -1, // categoryId
+                                                 $userInfo->getId());
             
             $catList = $content["categories"];
             //
@@ -546,12 +568,17 @@
         $publish    = $args[4];
 
         // -mhe todo
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
         if ($auth)
         {
             $userInfo = $users->getUserInfoFromUsername( $username );
 
-            $article = $articles->getUserArticle($postid, $userInfo->getId());
+            $article = $articles->getBlogArticle($postid,
+                                                 -1, // blogId
+                                                 true, // includeHiddenFields
+                                                 -1, // date
+                                                 -1, // categoryId
+                                                 $userInfo->getId());
             
 			// Get the plugin manager
 			$plugMgr =& PluginManager::getPluginManager();
@@ -594,7 +621,7 @@
         $password   = $args[3];
         $number     = $args[4];
 
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
         if ($auth)
         {
             $ret = array();
@@ -608,7 +635,7 @@
             foreach($list as $item)
             {
                 $dateObject = $item->getDateObject();
-                include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+                include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
                 // Get the unix time stamp 
                 $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
@@ -641,7 +668,7 @@
         $password   = $args[2];
         $number     = $args[3];
 
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
 
         if ($auth)
         {
@@ -656,7 +683,7 @@
             foreach($list as $item)
             {
                 $dateObject = $item->getDateObject();
-                include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+                include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
                 // Get the unix time stamp 
                 $time = $dateObject->getTimestamp(DATE_FORMAT_UNIXTIME);
 
@@ -703,7 +730,7 @@
         $password   = $args[2];
         $file       = $args[3];
 
-        $auth = $users->getUserInfo($username,$password);
+        $auth = $users->authenticateUser($username,$password);
         if ($auth)
         {
             // Save this file to the tmp directory
@@ -783,7 +810,7 @@
 		
 		$users = new Users();
 		
-        $auth = $users->getUserInfo( $username, $password );
+        $auth = $users->authenticateUser( $username, $password );
 
         if ($auth)
         {
@@ -815,7 +842,7 @@
             "blogid" =>
         */
 
-        $auth = $users->getUserInfo( $username, $password );
+        $auth = $users->authenticateUser( $username, $password );
 
         if ($auth)
         {



More information about the pLog-svn mailing list