[pLog-svn] r6888 - in plog/branches/lifetype-1.2: class/action/admin js/ui

Jon Daley plogworld at jon.limedaley.com
Wed May 13 09:09:57 EDT 2009


Maybe the multiple cookie fix doesn't actually work, because perhaps the 
all cookies concatenated are subject to the 4K limit?

On Wed, 13 May 2009, jondaley at devel.lifetype.net wrote:

> Author: jondaley
> Date: 2009-05-13 08:58:34 -0400 (Wed, 13 May 2009)
> New Revision: 6888
>
> Modified:
>   plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php
>   plog/branches/lifetype-1.2/js/ui/autosave.js
> Log:
> actually delete the cookie when the post is published successfully.  Added comments to both sections if we ever want to use multiple cookies per article.  Which - is there any reason why we don't?  Looks like a nice feature
>
> Modified: plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php	2009-05-13 12:13:48 UTC (rev 6887)
> +++ plog/branches/lifetype-1.2/class/action/admin/adminaddpostaction.class.php	2009-05-13 12:58:34 UTC (rev 6888)
> @@ -223,8 +223,11 @@
>
>         	// set the auto save cookie as false
> 	    	setcookie( $cookieBaseName.'postNotSaved', '0', -1, '/' );
> -	    	setcookie( $cookieBaseName.'postTopic', '', -1, '/' );
> -	    	setcookie( $cookieBaseName.'postText', '', -1, '/' );
> +                // cookies always have a 'cookieNum' suffix, if we ever go to using multiple cookies
> +                // we'll need to be smarter here - TODO: just delete 0-5 or something?  How else do
> +                // we get the maxBackupCookiesPerBlog value from autosave.js?
> +	    	setcookie( $cookieBaseName.'postTopic0', '', -1, '/' );
> +	    	setcookie( $cookieBaseName.'postText0', '', -1, '/' );
>         }
>     }
> ?>
> \ No newline at end of file
>
> Modified: plog/branches/lifetype-1.2/js/ui/autosave.js
> ===================================================================
> --- plog/branches/lifetype-1.2/js/ui/autosave.js	2009-05-13 12:13:48 UTC (rev 6887)
> +++ plog/branches/lifetype-1.2/js/ui/autosave.js	2009-05-13 12:58:34 UTC (rev 6888)
> @@ -13,6 +13,8 @@
> var maxBackupCookieLength = 3240;
>
> // How many cookies we can use per postText and PostExtentedText
> +// see comment in clearAutoSaveCookie in adminaddnewpostaction.class.php if you change
> +// this to be something other than 1
> var maxBackupCookiesPerBlog = 1;
>
> // It doesn't make sense just backup few characters, use this to control the minimal backup length
> @@ -147,4 +149,4 @@
>
> 	$('autoSaveMessage').innerHTML = '';
> 	Element.hide($('autoSaveMessage'));
> -}
> \ No newline at end of file
> +}
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com
~~
Any clapping and cheering during the sermon is welcomed.
-- Mike Pierson


More information about the pLog-svn mailing list