Legend:
- Unmodified
- Added
- Removed
-
plugins/maintenance/inc/tasks/class.dc.maintenance.logs.php
r2482 r3730 10 10 # 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 if (!defined('DC_RC_PATH')) { return;}12 if (!defined('DC_RC_PATH')) {return;} 13 13 14 14 class dcMaintenanceLogs extends dcMaintenanceTask 15 15 { 16 16 public static $keep_maintenance_logs = true; 17 17 18 18 protected $group = 'purge'; 19 19 20 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.'); 25 25 26 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 } 28 28 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 } 40 39 41 42 40 return true; 41 } 43 42 }
Note: See TracChangeset
for help on using the changeset viewer.