[pLog-svn] r6051 - plog/trunk/class/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Sat Nov 17 10:09:28 EST 2007


Author: mark
Date: 2007-11-17 10:09:28 -0500 (Sat, 17 Nov 2007)
New Revision: 6051

Modified:
   plog/trunk/class/dao/trackbackclient.class.php
Log:
Change the code as Jon suggested, it will make the code looks more clear.

Modified: plog/trunk/class/dao/trackbackclient.class.php
===================================================================
--- plog/trunk/class/dao/trackbackclient.class.php	2007-11-17 07:33:02 UTC (rev 6050)
+++ plog/trunk/class/dao/trackbackclient.class.php	2007-11-17 15:09:28 UTC (rev 6051)
@@ -121,9 +121,9 @@
         	if( !$s->submit( $trackbackUrl, $formvars ))
         		return false;
 
-        	preg_match( "/.*<error>(.*)<\/error>.*/", $s->results, $res );
+        	$matched = preg_match( "/.*<error>(.*)<\/error>.*/", $s->results, $res );
 
-        	if( empty($res) || $res[1] == 1 )
+        	if( !$matched || $res[1] == 1 )
         		return false;
         	else
         		return true;



More information about the pLog-svn mailing list