in phpSlash 0.65b1:
when modifying a new story, the page sets the date to a
new date: date("Y-m-d H:i:s");
as if the date have never been set (which is the case
for new stories. These files fixes that 'behavior' to
what it should be:
server uses the $this->template->set_var(array( ...
TIME => Record['time'] ...)); from database in
Story.class, writes it to storyNew.tpl as a hidden
field with name story_time, and storyAdmin.php3 gets
that variable to $HTTP_POST_VARS['time'] = $story_time;
which in turns pass it to Story.class::saveStory();
when modifying a story (and since this variable is not
set when creating a new one, then the date will be
assigned from date("Y-m-d H:i:s"); as expected...
files attached:
Story.class
newStory.tpl
storyAdmin.php3
I also fixed some debugging garbage from login.php3 :-)
so I also included this file
Story.class,newStory.tpl,storyAdmin.php3,login.php3 changes
Logged In: YES
user_id=77269
Luis and Ajay, can this be closed? The template used was
from 0.62? so it didn't have all the fields. A peril of not
releasing often.
Logged In: YES
user_id=239796
Yes it can be closed, as long as HTTP_POST_VARS["time"]
gets the time from newStory.tpl, my storyAdmin.php3 file
has a line like the following in the switch statement:
swicth ($submit) {
case "delete":
...
case "save":
HTTP_POST_VARS["time"] = $time;
// but i guess that's redundant/unnecessary... I have to
try to see what the variable has when this line is not
there since the template I was using was the wrong one
(thanx Joe for pointing that out, I like the idea of
scheduling news for the future!)
Logged In: YES
user_id=239796
yes, close this one; i tested and using the unmodified
storyAdmin.php3 file worked fine ( i used
http://www.latinomixed.com for this test )
Logged In: YES
user_id=19736
Closing bug and labeling it as "Invalid" as it seemsed to be
a template mis-match.