File modules/cms/action/project/ProjectCopyAction.class.php
Last commit: Sat Oct 17 02:16:28 2026 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths.
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 11 12 public function post() { 13 $db = DB::get(); 14 $this->setTemplateVar( 'dbid',$db->id ); 15 16 $conf = Configuration::rawConfig(); 17 $dbids = array(); 18 19 foreach( $conf['database'] as $dbname=>$dbconf ) 20 { 21 if ( is_array($dbconf) && $dbconf['enabled']) 22 $dbids[$dbname] = $dbconf['description']; 23 } 24 $this->setTemplateVar( 'dbids',$dbids ); 25 26 27 if ( $this->request->isTrue('ok') ) 28 { 29 $this->project->export( $this->request->getDatabaseId() ); 30 31 $this->addNoticeFor($this->project,Messages::DONE); 32 } 33 } 34 }
Downloadmodules/cms/action/project/ProjectCopyAction.class.php
History Sat, 17 Oct 2026 02:16:28 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths. 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.