developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#1068 closed bug (fixed)

history function time bugfix

Reported by: catsoup Owned by:
Priority: normal Milestone: Jelix 1.1.6
Component: jelix:plugins Version: 1.1.5
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

For reason, I don't know, the "session_time_name" variable of session is detroyed after it is created in the constructor. So I propose to move the creation of the session variable in the function beforeAction.

I made the patch, tested and ok for 1.1.x and trunk.

To test my patch, patch -p0 didn't work, so I used hg import mypatch.diff to apply the patch and hg revert -r [version] . to come back

(developper wiki may be updated, but don't know if I'm right)

Attachments (1)

plugins-history-time.diff (1.0 KB) - added by catsoup 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by catsoup

comment:1 Changed 11 years ago by catsoup

  • Summary changed from session variable session_time_name not usable to history function time bugfix

comment:2 Changed 11 years ago by catsoup

Memento: With this, we should add to the documentation of the plugin to add unset of the session var in the login:out action.

if(isset($_SESSION[$history->config['session_time_name']])
  unset($_SESSION[$history->config['session_time_name']]);

comment:3 Changed 11 years ago by laurentj

  • Resolution set to fixed
  • review changed from review? to review+
  • Status changed from new to closed

For reason, I don't know, the "session_time_name" variable of session is detroyed after it is created in the constructor.

Yes, because the session is started after the loading of plugins..

fixed. however I kept the old code. just move.

http://bitbucket.org/jelix/jelix-trunk/changeset/9ffb4169618e/ http://bitbucket.org/jelix/jelix-1.1.x/changeset/c5921cb42df9/

Note: See TracTickets for help on using tickets.