Dotclear


Ignore:
Timestamp:
09/20/13 18:10:13 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
default
Message:

Revamp plugin maintenance, step 4, add user prefs (without translation), wait for boss, addresses #999

Location:
plugins/maintenance/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/maintenance/inc/class.dc.maintenance.php

    r1955 r1969  
    230230 
    231231     /** 
    232       * Get expired task. 
     232      * Get expired tasks. 
    233233      * 
    234234      * @return     <b>array</b>   Array of expired Task ID / date 
     
    246246               // Check if task exists 
    247247               if (($task = $this->getTask($rs->log_msg)) !== null) { 
    248                     // Check if tasks expired 
    249                     if (strtotime($rs->log_dt) + $task->ts() < time()) { 
     248                    // Check if remider is used and tasks expired 
     249                    if ($task->ts() && strtotime($rs->log_dt) + $task->ts() < time()) { 
    250250                         $logs[$rs->log_msg] = $rs->log_dt; 
    251251                    } 
  • plugins/maintenance/inc/class.dc.maintenance.task.php

    r1959 r1969  
    6363               $this->success = __('Task successfully executed.'); 
    6464          } 
     65 
     66          $core->auth->user_prefs->addWorkspace('maintenance'); 
     67          $ts = $core->auth->user_prefs->maintenance->get('ts_'.$this->id); 
     68           
     69          $this->ts = abs((integer) $ts); 
    6570     } 
    6671 
     
    9398     public function ts() 
    9499     { 
    95           return abs((integer) $this->ts); 
     100          return $this->ts === false ? false : abs((integer) $this->ts); 
    96101     } 
    97102 
Note: See TracChangeset for help on using the changeset viewer.

Sites map