[pmwiki-users] MiniEdit seems to reset ctime

Petko Yotov 5ko at 5ko.fr
Wed Mar 14 17:57:31 CDT 2012

You can understand if a problem comes from one or another recipe. If you  
disable the editformcustomfields.php recipe, you will see that MiniEdit does  
not delete the ctime attribute.

The two recipes are not completely compatible. A temporary fix would be to  
add such a line before including editformcustomfields.php :

  if($action == 'miniedit') $customFields_isActive['ctime'] = false;

Otherwise, the editformcustomfields.php recipe could be slightly tuned to  
work with recipes which use the UpdatePage() core mechanism, like MiniEdit,  
Flipbox, PmForm and maybe other recipes. It may refrain from deleting the  
page attributes ctime or title if the page is not edited via the regular  
edit form. Something like this could replace the lines 56-60:

  if ($customFields_isActive['ctime']){
    $requestVal = @$_REQUEST['ctime'];
     if ($requestVal != '') {
        $SaveProperties[] = 'ctime';  # THIS line moved
        $aResult = strptime($requestVal, $ctimeDispFmt);

This could be done in many different ways, for example by checking

and I didn't look into the part dealing with the title attribute, so I'll  
leave it to the author to decide if and what to do. At any rate, he has  
provided a way to disable the recipe with the line I gave you at the top of  
this message.


kirpi at kirpi.it writes:
> > Try to create a new page and check if it has a 'ctime' attribute before
> > using MiniEdit. Then edit the gallery with MiniEdit and if the 'ctime'
> > attribute actually disappears,
> I just tried and create a new page: its ctime was fine.
> Then tried to edit it by hand: again the value was retained and
> properly kept and shown.
> Then uploaded a picture and MiniEdit(ed) it caption.
> Now ctime has disappeared from the page!
> The fact that
> ctime=
> disappears from the page is proven by looking at the page file.
> It is nonetheless worth mentioning that, in order to better work with
> ctime in pagelists and make it editable from the page form, I set in
> config.php
>   $FmtPV['$PageCreationDate'] = '@strftime("%d-%m-%Y at %R",  
> $page["ctime"])';
> as found in http://www.pmichaud.com/pipermail/pmwiki-users/2009-December/ 
> 056265.html
> and also
>   $ctimeDispFmt = '%d-%m-%Y alle %R';
>   include_once('cookbook/editformcustomfields.php');
> as found in http://www.pmwiki.org/wiki/Cookbook/EditFormCustomFields
> Is there any test more I can do to help solving the puzzle?
> :-)
> Luigi

More information about the pmwiki-users mailing list