openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

ProjectAdvancedAction.class.php (757B)


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