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

Last commit: Wed Mar 9 13:28:52 2022 +0100	dankert	Refactoring: Checkbox values are always sent to the server. In the actions we must test the value with 'isTrue()'
1 <?php 2 namespace cms\action\project; 3 use cms\action\Method; 4 use cms\action\ProjectAction; 5 use cms\base\Configuration; 6 use cms\base\DB; 7 use language\Messages; 8 9 class ProjectCopyAction extends ProjectAction implements Method { 10 public function view() { 11 } 12 13 public function post() { 14 $db = DB::get(); 15 $this->setTemplateVar( 'dbid',$db->id ); 16 17 $conf = Configuration::rawConfig(); 18 $dbids = array(); 19 20 foreach( $conf['database'] as $dbname=>$dbconf ) 21 { 22 if ( is_array($dbconf) && $dbconf['enabled']) 23 $dbids[$dbname] = $dbconf['description']; 24 } 25 $this->setTemplateVar( 'dbids',$dbids ); 26 27 28 if ( $this->request->isTrue('ok') ) 29 { 30 $this->project->export( $this->request->getDatabaseId() ); 31 32 $this->addNoticeFor($this->project,Messages::DONE); 33 } 34 } 35 }
Download modules/cms/action/project/ProjectCopyAction.class.php
History Wed, 9 Mar 2022 13:28:52 +0100 dankert Refactoring: Checkbox values are always sent to the server. In the actions we must test the value with 'isTrue()' Thu, 11 Mar 2021 00:01:47 +0100 Jan Dankert Refactoring: Cleaned the Request params. 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 14:49:58 +0100 Jan Dankert Fix: Action::addNotice() is replaced by Action::addNoticeFor() Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.