ProjectMaintenanceAction.class.php (716B)
1 <?php 2 namespace cms\action\project; 3 use cms\action\Method; 4 use cms\action\ProjectAction; 5 use language\Messages; 6 7 class ProjectMaintenanceAction extends ProjectAction implements Method { 8 public function view() { 9 } 10 public function post() { 11 switch( $this->request->getText('type') ) 12 { 13 case 'check_files': 14 // Konsistenzprüfungen 15 $log = $this->project->checkLostFiles(); 16 17 $this->addNoticeFor($this->project,Messages::DONE, [], implode("\n",$log) ); 18 break; 19 20 case 'check_limit': 21 // Alte Versionen löschen. 22 $this->project->checkLimit(); 23 $this->addNoticeFor($this->project,Messages::DONE); 24 break; 25 26 default: 27 $this->addValidationError('type'); 28 } 29 } 30 }