[pLog-svn] r2796 - plog/trunk/class/template/templatesets
Oscar Renalias
oscar at renalias.net
Tue Jan 17 19:43:22 GMT 2006
Mark, I cannot reproduce this issue in my local instance or in
devel.lifetype.net following the steps below.
Can you try yourself over at devel.lifetype.net? Use user 'test' and
password 't3st' to log in. Template uploads are allowed and the
folder templates/blog_1/ has the right permissions. Let me know if
you can reproduce it there.
Oscar
On 16 Jan 2006, at 12:50, mark at devel.lifetype.net wrote:
> Author: mark
> Date: 2006-01-16 10:50:13 +0000 (Mon, 16 Jan 2006)
> New Revision: 2796
>
> Modified:
> plog/trunk/class/template/templatesets/templatesets.class.php
> plog/trunk/class/template/templatesets/templatesetstorage.class.php
> Log:
> The addBlogTemplate/deletBlogTemplte should work again. But I have
> no idea how to solve the cache issue. Please follow the steps to
> reproduce my problem:
>
> 1. Add a template through addBlogTemplate (for example fdwan.zip)
> 2. Delete the fdwan template through deleteBlogTemplate
> 3. Okay, now goto BlogSettings, and update the settings.
> 4. You will see the fdwan apper again ...
>
> Weird, it seems I only add it or remove it from cache, not real DB
> update ...
>
> Modified: plog/trunk/class/template/templatesets/
> templatesets.class.php
> ===================================================================
> --- plog/trunk/class/template/templatesets/templatesets.class.php
> 2006-01-16 08:10:06 UTC (rev 2795)
> +++ plog/trunk/class/template/templatesets/templatesets.class.php
> 2006-01-16 10:50:13 UTC (rev 2796)
> @@ -184,7 +184,8 @@
> function isBlogTemplate( $templateName, $blogId )
> {
> $blogs = new Blogs();
> - $blogSettings = $blogs->getBlogSettings( $blogId );
> + $blog = $blogs->getBlogInfo( $blogId );
> + $blogSettings = $blog->getSettings( $blogId );
>
> // get the array with the template names stored in the
> settings
> $blogTemplates = $blogSettings->getValue
> ( "blog_templates" );
>
> Modified: plog/trunk/class/template/templatesets/
> templatesetstorage.class.php
> ===================================================================
> --- plog/trunk/class/template/templatesets/
> templatesetstorage.class.php 2006-01-16 08:10:06 UTC (rev 2795)
> +++ plog/trunk/class/template/templatesets/
> templatesetstorage.class.php 2006-01-16 10:50:13 UTC (rev 2796)
> @@ -158,13 +158,12 @@
> */
> function removeBlogTemplate( $templateName, $blogId )
> {
> - die("removeBlogTemplate: FIXME!!!");
> -
> $config =& Config::getConfig();
>
> // get the settings of this blog
> - $blogs = new Blogs();
> - $blogSettings = $blogs->getBlogSettings( $blogId );
> + $blogs = new Blogs();
> + $blog = $blogs->getBlogInfo( $blogId );
> + $blogSettings = $blog->getSettings();
>
> // looks like the blog doesn't exist, so let's not
> bother...
> if( $blogSettings == false || $blogSettings == "" )
> @@ -186,7 +185,8 @@
>
> // finally, save the settings
> $blogSettings->setValue( "blog_templates",
> $newTemplateList );
> - $blogs->updateBlogSettings( $blogId, $blogSettings );
> + $blog->setSettings( $blogSettings );
> + $blogs->updateBlog( $blog );
>
> return true;
> }
> @@ -281,11 +281,9 @@
> */
> function addLocalTemplate( $templateName, $blogId )
> {
> - die("addLocaleTemplatemplate: FIXME!!!");
> -
> $blogs = new Blogs();
> $blog = $blogs->getBlogInfo( $blogId );
> - $blogSettings = $blog->getBlogSettings();
> + $blogSettings = $blog->getSettings();
> if( $blogSettings == "" || $blogSettings == false )
> return false;
>
> @@ -301,7 +299,8 @@
>
> array_push( $blogTemplates, $templateName );
> $blogSettings->setValue( "blog_templates",
> $blogTemplates );
> - $blogs->updateBlogSettings( $blogId, $blogSettings );
> + $blog->setSettings( $blogSettings );
> + $blogs->updateBlog( $blog );
>
> return true;
> }
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
More information about the pLog-svn
mailing list