[pLog-svn] r3102 - plog/trunk/class/action/admin

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Mar 23 14:30:18 GMT 2006


Author: jondaley
Date: 2006-03-23 14:30:18 +0000 (Thu, 23 Mar 2006)
New Revision: 3102

Modified:
   plog/trunk/class/action/admin/adminaddpostaction.class.php
   plog/trunk/class/action/admin/adminupdatepostaction.class.php
Log:
don't send xmlrpc pings if the date is in the future.  fixes http://bugs.lifetype.net/view.php?id=855.

Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php	2006-03-23 14:17:48 UTC (rev 3101)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php	2006-03-23 14:30:18 UTC (rev 3102)
@@ -145,9 +145,14 @@
 				$article->setId( $artId );
                 if( $article->getStatus() == POST_STATUS_PUBLISHED) {
                 	// get the output from the xmlrpc pings but only if the user decided to do so!
-					if( $this->_sendPings ) {
-						$pingsOutput = $this->sendXmlRpcPings();
-						$message .= "<br/><br/>".$pingsOutput;
+
+					if( $this->_sendPings) {
+                        $t = new Timestamp();
+                        $today = $t->getTimestamp();
+                        if($today > $article->getDate()){
+                            $pingsOutput = $this->sendXmlRpcPings();
+                            $message .= "<br/><br/>".$pingsOutput;
+                        }
 					}
 
                     // and now check what to do with the trackbacks

Modified: plog/trunk/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatepostaction.class.php	2006-03-23 14:17:48 UTC (rev 3101)
+++ plog/trunk/class/action/admin/adminupdatepostaction.class.php	2006-03-23 14:30:18 UTC (rev 3102)
@@ -167,7 +167,11 @@
                 }
 				
 				if( $this->_sendPings ) {
-					$message .= "<br/><br/>".$this->sendXmlRpcPings();
+                    $t = new Timestamp();
+                    $today = $t->getTimestamp();
+                    if($today > $article->getDate()){
+                        $message .= "<br/><br/>".$this->sendXmlRpcPings();
+                    }
 				}				
 				// and now check what to do with the trackbacks
 				if( $this->_sendTrackbacks ) {					



More information about the pLog-svn mailing list