Dotclear


Ignore:
Timestamp:
03/08/18 17:58:39 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Code formatting (PSR-2)

File:
1 edited

Legend:

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

    r2482 r3730  
    1010# 
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    12 if (!defined('DC_RC_PATH')) { return; } 
     12if (!defined('DC_RC_PATH')) {return;} 
    1313 
    1414class dcMaintenanceLogs extends dcMaintenanceTask 
    1515{ 
    16      public static $keep_maintenance_logs = true; 
     16    public static $keep_maintenance_logs = true; 
    1717 
    18      protected $group = 'purge'; 
     18    protected $group = 'purge'; 
    1919 
    20      protected function init() 
    21      { 
    22           $this->task         = __('Delete all logs'); 
    23           $this->success      = __('Logs deleted.'); 
    24           $this->error        = __('Failed to delete logs.'); 
     20    protected function init() 
     21    { 
     22        $this->task    = __('Delete all logs'); 
     23        $this->success = __('Logs deleted.'); 
     24        $this->error   = __('Failed to delete logs.'); 
    2525 
    26           $this->description = __('Logs record all activity and connection to your blog history. Unless you need to keep this history, consider deleting these logs from time to time.'); 
    27      } 
     26        $this->description = __('Logs record all activity and connection to your blog history. Unless you need to keep this history, consider deleting these logs from time to time.'); 
     27    } 
    2828 
    29      public function execute() 
    30      { 
    31           if (dcMaintenanceLogs::$keep_maintenance_logs) { 
    32                $this->core->con->execute( 
    33                     'DELETE FROM '.$this->core->prefix.'log '. 
    34                     "WHERE log_table <> 'maintenance' " 
    35                ); 
    36           } 
    37           else { 
    38                $this->core->log->delLogs(null, true); 
    39           } 
     29    public function execute() 
     30    { 
     31        if (dcMaintenanceLogs::$keep_maintenance_logs) { 
     32            $this->core->con->execute( 
     33                'DELETE FROM ' . $this->core->prefix . 'log ' . 
     34                "WHERE log_table <> 'maintenance' " 
     35            ); 
     36        } else { 
     37            $this->core->log->delLogs(null, true); 
     38        } 
    4039 
    41           return true; 
    42      } 
     40        return true; 
     41    } 
    4342} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map