Ejemplo n.º 1
0
 function settings()
 {
     $return = parent::settings();
     if ($this->getParam('type') == 'set') {
         //save settings
         require_once $this->getApplicationPath() . '/application/DB.php';
         require_once $this->getApplicationPath() . '/application/models/CopyExportImport.php';
         $generator = \Application\models\CopyGenerator::factory();
         $generator->generate();
     }
     return $return;
 }
Ejemplo n.º 2
0
 /**
  * generate copy file
  */
 public function generateAction()
 {
     $this->setNoRender();
     if (!$this->view->userIsAdmin) {
         throw new Exception("User must be an admin");
     }
     $generator = CopyGenerator::factory();
     $generator->generate();
     return 'success';
     //        $copyExportImport->generate();
 }
Ejemplo n.º 3
0
 public static function copyData($locale = 'en_US')
 {
     require_once APPLICATION_PATH . '/models/CopyExportImport.php';
     $url = \Application\models\CopyGenerator::factory()->getCopyUrl($locale);
     echo H::js($url);
 }