phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] repost handling (was StyleGuide)


From: Sigurd Nes
Subject: Re: [Phpgroupware-developers] repost handling (was StyleGuide)
Date: Wed, 28 May 2003 12:20:12 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030521 Thunderbird/0.1a

I am still having a problem:
The $history[$this->history_id] is set to true to before it is received from the post - thus causing all postings to be reposts.

Sigurd



Dave Hall wrote:

I have updated the code on the wiki.

Bugs fixed:
Typo - thanks Sigurd :)
The history_id is only generate once per page call (not per link call)

Added an option for limiting the size of the history - using array_shift.

If people have no problems with it I will commit it to cvs tomorrow my
time (late evening in Europe).

Cheers

Dave

Dave Hall <address@hidden> wrote:

"Lars Kneschke(priv.)" <address@hidden> wrote:

Dave Hall <address@hidden> schrieb:
"Lars Kneschke(priv.)" <address@hidden> wrote:

Don't know how fast it is, but this are only 3 lines.
Yeah ... i understand that, but how do we search for the
history_ids?> >
Maybe we could use a pop to keep it short, dunno.
We could store the history id on the right side. When we want
to
lookup the
history id, we just switch the array.

$lastIDs = array ("111111", "222222");
array_unshift ($lastIDs, "555555");

$lastIDs =
(
 [0] => 555555
 [1] => 222222
 [2] => 111111
)

If you want to look up for a specific ID, we do following:

$lastIDs = array_flip($lastIDs);

if(is_set($lastIDs[$newLastID]))
{
 // data sent twice
}

Is that what you mean?
This is one way of doing it, but lex suggested to me that we could
include data in the value (such as imploding $_GET and also
$_SERVER['HTTP_RAW_POST_DATA'] ) when running in debug mode, to get a full click path. In normal mode we could just store True. I will playwith this more today.

Cheers

Dave


------------------------------------------------------------------------

_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers







reply via email to

[Prev in Thread] Current Thread [Next in Thread]