[pLog-svn] r6787 - plog/branches/lifetype-1.2/class/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Feb 2 20:45:07 EST 2009
Author: jondaley
Date: 2009-02-02 20:45:06 -0500 (Mon, 02 Feb 2009)
New Revision: 6787
Modified:
plog/branches/lifetype-1.2/class/dao/articles.class.php
Log:
need to remove the slug cache, otherwise the old value is still in the cache, and if the slug is changed, the removeData at the bottom doesn't do the right thing. There actually might be other similar bugs, I'll check some more
Modified: plog/branches/lifetype-1.2/class/dao/articles.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/articles.class.php 2009-02-01 14:26:22 UTC (rev 6786)
+++ plog/branches/lifetype-1.2/class/dao/articles.class.php 2009-02-03 01:45:06 UTC (rev 6787)
@@ -931,6 +931,10 @@
if($config->getValue("force_posturl_unique"))
{
$slug = $article->getPostSlug();
+
+ // remove the cached data now, before the slug changes
+ $this->_cache->removeData( $slug, CACHE_ARTICLES_BYNAME );
+
$i = 1;
// check if there already is an article with the same mangled name
while($existingArticle = $this->getBlogArticleByTitle($slug,
@@ -939,7 +943,7 @@
// if we found ourselves, it is okay to keep using this name
if($existingArticle->getId() == $article->getId())
break;
-
+
// found a match, so assign a new one
// if we already tried with slug+"i" we have
// to strip "i" before adding it again!
More information about the pLog-svn
mailing list