[pLog-svn] update to 1.1

Jon Daley plogworld at jon.limedaley.com
Thu Mar 23 05:20:28 GMT 2006


 	Whew.  updated one of my installs to 1.1.  The wizard needs some 
work.  I got a bunch of columns that were already created, etc, and had to 
edit the wizard manually to get it to go through.
 	I have been really busy lately, so haven't had much time for 
lifetype stuff.  I would love to see the wizard do a lot more checking 
before it starts; I have seen a couple web installers lately that look 
quite nice - and check various things before it starts, so it doesn't end 
up screwing up stuff, such that it requires database edits (my db had an 
extra category_id field in the articles table, apparently) etc.

 	Anyway - things are running alright, though I don't know how the 
new caching stuff works.  I originally copied getBlogInfoByName to 
getBlogInfoByDomain (this is the new subdomain feature thingy), but a 
function is now gone, so I tried to copy it again, but I am not sure what 
to do.  Any help?
 	I think if I made a new column in the table, I could copy it more 
easily, but even then, I am not sure how to assign the cache ids. 
Presumably, I change either the CACHE_BLOGIDBYNAME or the "getId" or both.


         function getBlogInfoByDomain( $blogDomain, $extendedInfo = false )
         {
//            require_once( PLOG_CLASS_PATH . 
'class/dao/bloginfo.class.php' );
//            return( $this->get( "settings", $blogName, 
CACHE_BLOGIDBYNAME, Array( CACHE_BLOGINFOS => "getId" )));


             $query = "SELECT id, settings FROM 
".$this->getPrefix()."blogs";
             $result = $this->Execute( $query );
             if( !$result )
                 return false;
             if( $result->RecordCount() == 0 )
                 return false;

             while($row = $result->FetchRow( $result )){
                 $blogSettings = $this->getBlogSettingsFromField( 
$row["settings"] );
                 if($blogSettings && $blogSettings->getValue("blog_domain") 
== $blogDomain){
                     $blogId = $row["id"];
                     break;
                 }
             }
             $result->Close();
             if(!isset($blogId))
                 return false;
             return $this->getBlogInfo( $blogId, $extendedInfo );
         }



More information about the pLog-svn mailing list