File modules/cms/action/project/ProjectPropAction.class.php

Last commit: Sun Mar 14 23:51:49 2021 +0100	Jan Dankert	Refactoring: Using the ValidationException where possible.
1 <?php 2 namespace cms\action\project; 3 use cms\action\Method; 4 use cms\action\ProjectAction; 5 use cms\action\RequestParams; 6 use cms\model\Folder; 7 use language\Messages; 8 9 class ProjectPropAction extends ProjectAction implements Method { 10 public function view() { 11 $extraProperties = array( 12 'rootobjectid' => $this->project->getRootObjectId(), 13 'linksAbsolute' => $this->project->linkAbsolute?'1':'0' 14 ); 15 16 $this->setTemplateVars( $this->project->getProperties() + $extraProperties ); 17 18 } 19 public function post() { 20 21 $this->project->name = $this->request->getRequiredText('name' ); 22 $this->project->url = $this->request->getAlphanum('url' ); 23 $this->project->target_dir = $this->request->getRaw('target_dir' ); 24 $this->project->ftp_url = $this->request->getRaw('ftp_url' ); 25 $this->project->ftp_passive = $this->request->getRaw('ftp_passive' ); 26 $this->project->cmd_after_publish = $this->request->getRaw('cmd_after_publish' ); 27 $this->project->content_negotiation = $this->request->getNumber('content_negotiation' ); 28 $this->project->cut_index = $this->request->getNumber('cut_index' ); 29 $this->project->publishFileExtension = $this->request->getNumber('publishFileExtension' ); 30 $this->project->publishPageExtension = $this->request->getNumber('publishPageExtension' ); 31 $this->project->linkAbsolute = $this->request->getNumber('linksAbsolute' ); 32 33 $this->addNoticeFor($this->project,Messages::SAVED); 34 $this->project->save(); // speichern 35 36 $root = new Folder( $this->project->getRootObjectId() ); 37 $root->setTimestamp(); 38 } 39 }
Download modules/cms/action/project/ProjectPropAction.class.php
History Sun, 14 Mar 2021 23:51:49 +0100 Jan Dankert Refactoring: Using the ValidationException where possible. Wed, 10 Mar 2021 23:51:22 +0100 Jan Dankert Refactoring: Cleaned the Request params. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Thu, 19 Nov 2020 12:36:44 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.