[pLog-svn] r6055 - plog/branches/lifetype-1.2/class/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Nov 19 03:58:26 EST 2007


Author: mark
Date: 2007-11-19 03:58:25 -0500 (Mon, 19 Nov 2007)
New Revision: 6055

Modified:
   plog/branches/lifetype-1.2/class/dao/trackbackclient.class.php
Log:
Backport the trackback client fixed from trunk rev. 6050 to 1.2 branch.

Modified: plog/branches/lifetype-1.2/class/dao/trackbackclient.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/trackbackclient.class.php	2007-11-19 04:53:40 UTC (rev 6054)
+++ plog/branches/lifetype-1.2/class/dao/trackbackclient.class.php	2007-11-19 08:58:25 UTC (rev 6055)
@@ -4,7 +4,7 @@
     lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
     lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
     lt_include( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
-	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );    
+	lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 
     define( "TRACKBACK_SUCCESS", 0 );
     define( "TRACKBACK_FAILED", 1 );
@@ -18,7 +18,7 @@
 	 *
 	 * \ingroup DAO
      */
-    class TrackbackClient  
+    class TrackbackClient
 	{
 
     	/**
@@ -26,7 +26,7 @@
          */
     	function TrackbackClient()
         {
-        	
+
         }
 
     	/**
@@ -121,8 +121,9 @@
         	if( !$s->submit( $trackbackUrl, $formvars ))
         		return false;
 
-        	preg_match( "/.*<error>(.*)<\/error>.*/", $s->results, $res );
-        	if( $res[1] == 1 )
+        	$matched = preg_match( "/.*<error>(.*)<\/error>.*/", $s->results, $res );
+
+        	if( !$matched || $res[1] == 1 )
         		return false;
         	else
         		return true;
@@ -228,12 +229,12 @@
     	{
 
 	    	$results = Array();
-	    	
+
 	    	// to avoid annoying errors with the foreach() loop in case somebody's passing
 	    	// something which is not an array
 	    	if( !is_array( $trackbacks ))
 	    	  $trackbacks = Array();
-	    	
+
     		foreach( $trackbacks as $trackback )
         	{
        			// try and send a trackback



More information about the pLog-svn mailing list