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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Feb 4 16:55:03 EST 2010


Author: jondaley
Date: 2010-02-04 16:55:02 -0500 (Thu, 04 Feb 2010)
New Revision: 6976

Modified:
   plog/branches/lifetype-1.2/class/dao/blogs.class.php
Log:
if no blogdomain found, try removing the www. prefix and check again

Modified: plog/branches/lifetype-1.2/class/dao/blogs.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/blogs.class.php	2010-02-04 21:54:45 UTC (rev 6975)
+++ plog/branches/lifetype-1.2/class/dao/blogs.class.php	2010-02-04 21:55:02 UTC (rev 6976)
@@ -50,9 +50,14 @@
 
         function getBlogInfoByDomain($blogDomain, $extendedInfo = false){
             lt_include(PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php');
-        	return( $this->get( "custom_domain", $blogDomain,
+        	$stuff = $this->get( "custom_domain", $blogDomain,
                                 CACHE_BLOGIDBYDOMAIN,
-                                Array( CACHE_BLOGINFOS => "getId" )));
+                                 Array( CACHE_BLOGINFOS => "getId" ));
+            if(!$stuff){
+                return $this->get("custom_domain", preg_replace("/^www./", "", $blogDomain),
+                                  CACHE_BLOGIDBYDOMAIN,
+                                  Array( CACHE_BLOGINFOS => "getId" ));
+            }
         }
 		
 		/**



More information about the pLog-svn mailing list