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.vacuum.php

    r2044 r3730  
    1010# 
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    12 if (!defined('DC_RC_PATH')) { return; } 
     12if (!defined('DC_RC_PATH')) {return;} 
    1313 
    1414class dcMaintenanceVacuum extends dcMaintenanceTask 
    1515{ 
    16      protected $group = 'optimize'; 
     16    protected $group = 'optimize'; 
    1717 
    18      protected function init() 
    19      { 
    20           $this->name              = __('Optimise database'); 
    21           $this->task         = __('optimize tables'); 
    22           $this->success           = __('Optimization successful.'); 
    23           $this->error        = __('Failed to optimize tables.'); 
     18    protected function init() 
     19    { 
     20        $this->name    = __('Optimise database'); 
     21        $this->task    = __('optimize tables'); 
     22        $this->success = __('Optimization successful.'); 
     23        $this->error   = __('Failed to optimize tables.'); 
    2424 
    25           $this->description = __("After numerous delete or update operations on Dotclear's database, it gets fragmented. Optimizing will allow to defragment it. It has no incidence on your data's integrity. It is recommended to optimize before any blog export."); 
    26      } 
     25        $this->description = __("After numerous delete or update operations on Dotclear's database, it gets fragmented. Optimizing will allow to defragment it. It has no incidence on your data's integrity. It is recommended to optimize before any blog export."); 
     26    } 
    2727 
    28      public function execute() 
    29      { 
    30           $schema = dbSchema::init($this->core->con); 
     28    public function execute() 
     29    { 
     30        $schema = dbSchema::init($this->core->con); 
    3131 
    32           foreach ($schema->getTables() as $table) 
    33           { 
    34                if (strpos($table, $this->core->prefix) === 0) { 
    35                     $this->core->con->vacuum($table); 
    36                } 
    37           } 
     32        foreach ($schema->getTables() as $table) { 
     33            if (strpos($table, $this->core->prefix) === 0) { 
     34                $this->core->con->vacuum($table); 
     35            } 
     36        } 
    3837 
    39           return true; 
    40      } 
     38        return true; 
     39    } 
    4140} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map