[pmwiki-users] newgroupbox & bad creation dates
adam overton
a at plus1plus1plus.org
Mon Jun 2 04:38:04 CDT 2008
well, just figured this one out - it appears 'ctime' was added to
NewPageBoxPlus, but not to NewGroupBox. here's what i added to the
recipe in order to get a correct creation time:
if (@$_REQUEST['save'] AND ($EnableAutoSave==1 OR CondAuth
($pagename,'edit'))) {
//if(PageExists($newpage)) Redirect($newpage, $urlfmt);
if(PageExists($newpage)) Redirect($nameTakenErrorRedirect); //
my own code, different than newgroupbox
if (@$_REQUEST['template'] && PageExists($_REQUEST['template'])) {
$p = RetrieveAuthPage($_REQUEST['template'], 'read', false,
READPAGE_CURRENT);
if ($p['text'] > '') $new['text'] = $p['text'];
$new['author'] = $Author;
}
--> $new['ctime'] = $Now; // was included in newpageboxplus, but
not in newgroupbox
. . . and so forth
and then one must also add $Now to the global variables defined at
the top of the function block...
adam
> hi again
>
> i'm noticing that when i use newgroupbox to create a new group, the
> creation date for the new group-page is always incorrectly given as
> 31 Dec 1969... i'm currently using the following code (from the
> bottom of PmWiki/PageVariables) to get the creation date:
>
> # add page variable in format yyyy-mm-dd
> $FmtPV['$PageCreationDate'] = 'strftime("%Y-%m-%d", $page
> ["ctime"])';
>
> When i create a group the "natural" way - i.e. by typing a new
> group and page into the address bar and then saving the new page -
> i get the correct creation date...
> is there a way to fix this? something i can add to the recipe?
> thanks
> adam
>
>
>
>
> . . .
>
> a at plus1plus1plus.org
> 661 373 8679
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080602/3617f0da/attachment.html
More information about the pmwiki-users
mailing list