[pLog-svn] r4104 - plog/branches/lifetype-1.1.1/class/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Oct 8 21:01:31 GMT 2006
Author: oscar
Date: 2006-10-08 21:01:31 +0000 (Sun, 08 Oct 2006)
New Revision: 4104
Modified:
plog/branches/lifetype-1.1.1/class/dao/blogs.class.php
Log:
fixed mantis issue http://bugs.lifetype.net/view.php?id=1077 -- blog templates not being deleted when purging blogs
Modified: plog/branches/lifetype-1.1.1/class/dao/blogs.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/dao/blogs.class.php 2006-10-08 20:25:04 UTC (rev 4103)
+++ plog/branches/lifetype-1.1.1/class/dao/blogs.class.php 2006-10-08 21:01:31 UTC (rev 4104)
@@ -322,6 +322,9 @@
require_once( PLOG_CLASS_PATH . 'class/gallery/dao/galleryalbums.class.php' );
require_once( PLOG_CLASS_PATH . 'class/dao/bayesiantokens.class.php' );
require_once( PLOG_CLASS_PATH . 'class/dao/bayesianfilterinfos.class.php' );
+ require_once( PLOG_CLASS_PATH . 'class/template/templatesets/templatesets.class.php' );
+ require_once( PLOG_CLASS_PATH . 'class/template/templatesets/templatesetstorage.class.php' );
+ require_once( PLOG_CLASS_PATH . 'class/file/file.class.php' );
// first of all, delete the posts
$articles = new Articles();
@@ -356,6 +359,16 @@
// update blog categories
$blog = $this->getBlogInfo( $blogId );
$this->updateBlogCategoriesLink( $blog );
+
+ // delete the blog template sets
+ $templateSets = new TemplateSets();
+ $tsStorage = new TemplateSetStorage();
+ $blogTemplates = $templateSets->getBlogTemplates( $blogId );
+ foreach( $blogTemplates as $template ) {
+ $tsStorage->removeBlogTemplate( $template, $blogId );
+ }
+ // when done, remove the parent "blog_X" folder
+ File::deleteDir( TemplateSetStorage::getBlogBaseTemplateFolder( $blogId ));
// and finally, remove the cache and delete the blog
$this->_cache->removeData( $blog->getCustomDomain(), CACHE_BLOGIDBYDOMAIN );
More information about the pLog-svn
mailing list