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.

Ticket #1068: plugins-history-time.diff

File plugins-history-time.diff, 1.0 KB (added by catsoup, 11 years ago)
  • lib/jelix/plugins/coord/history/history.coord.php

    diff -r 1f4e24bb806d lib/jelix/plugins/coord/history/history.coord.php
    a b  
    1717
    1818    function __construct ($conf){
    1919        $this->config = $conf;
    20         $stn = $this->config['session_time_name'];
    21        
    22         if ($this->config['time']) {
    23             if (!isset($_SESSION[$stn]))
    24                 $_SESSION[$stn] = microtime(true);
    25         } else if (isset($_SESSION[$stn])) {
    26             unset($_SESSION[$stn]);
    27         }
    2820    }
    2921
    3022    public function beforeAction ($params) {
     
    6052                array_shift($history);
    6153            }
    6254        }
     55       
     56        if ($this->config['time']) {
     57            if (!isset($_SESSION[$this->config['session_time_name']]))
     58                $_SESSION[$this->config['session_time_name']] = microtime(true);
     59        }
    6360    }
    6461
    6562    public function isLast($action, $params = NULL) {