예제 #1
0
 public function run()
 {
     require_once JELIX_LIB_PATH . 'installer/jInstaller.class.php';
     jAppManager::close();
     if ($this->verbose()) {
         $reporter = new textInstallReporter();
     } else {
         $reporter = new textInstallReporter('error');
     }
     $installer = new jInstaller($reporter);
     $installer->installApplication();
     try {
         jAppManager::clearTemp(jApp::tempBasePath());
     } catch (Exception $e) {
         if ($e->getCode() == 2) {
             echo "Error: bad path in jApp::tempBasePath(), it is equals to '" . jApp::tempBasePath() . "' !!\n";
             echo "       Jelix cannot clear the content of the temp directory.\n";
             echo "       you must clear it your self.\n";
             echo "       Correct the path in the application.init.php or create the directory\n";
         } else {
             echo "Error: " . $e->getMessage();
         }
     }
     jAppManager::open();
 }
예제 #2
0
 public function run()
 {
     jAppManager::close($this->getParam('message', ''));
     if ($this->verbose()) {
         echo "Application is closed.\n";
     }
 }
예제 #3
0
 public function run()
 {
     jAppManager::open();
     if ($this->verbose()) {
         echo "Application is opened.\n";
     }
 }
예제 #4
0
 protected function _execute(InputInterface $input, OutputInterface $output)
 {
     require_once JELIX_LIB_PATH . 'installer/jInstaller.class.php';
     \jAppManager::close();
     $module = $input->getArgument('module');
     if ($this->verbose()) {
         $reporter = new \textInstallReporter();
     } else {
         $reporter = new \textInstallReporter('error');
     }
     $installer = new \jInstaller($reporter);
     if ($this->allEntryPoint) {
         $installer->uninstallModules(array($module));
     } else {
         $installer->uninstallModules(array($module), $this->entryPointName);
     }
     try {
         \jAppManager::clearTemp(\jApp::tempBasePath());
     } catch (\Exception $e) {
         if ($e->getCode() == 2) {
             $output->writeln("Error: bad path in jApp::tempBasePath(), it is equals to '" . jApp::tempBasePath() . "' !!");
             $output->writeln("       Jelix cannot clear the content of the temp directory.");
             $output->writeln("       you must clear it your self.");
             $output->writeln("       Correct the path in application.init.php or create the directory");
         } else {
             $output->writeln("<error>Error: " . $e->getMessage() . "</error>");
         }
     }
     \jAppManager::open();
 }
 public function run()
 {
     require_once JELIX_LIB_PATH . 'installer/jInstaller.class.php';
     jAppManager::close();
     $module = $this->getParam('module');
     $modulesList = $this->getParam('...', array());
     array_unshift($modulesList, $module);
     $parameters = $this->getOption('-p');
     if ($parameters && count($modulesList) > 1) {
         throw new Exception('Parameters are for only one module');
     }
     if ($parameters) {
         $params = explode(';', $parameters);
         $parameters = array();
         foreach ($params as $param) {
             $kp = explode("=", $param);
             if (count($kp) > 1) {
                 $parameters[$kp[0]] = $kp[1];
             } else {
                 $parameters[$kp[0]] = true;
             }
         }
     }
     if ($this->verbose()) {
         $reporter = new textInstallReporter();
     } else {
         $reporter = new textInstallReporter('error');
     }
     $installer = new jInstaller($reporter);
     if ($this->allEntryPoint) {
         if ($parameters) {
             $installer->setModuleParameters($modulesList[0], $parameters);
         }
         $installer->installModules($modulesList);
     } else {
         if ($parameters) {
             $installer->setModuleParameters($modulesList[0], $parameters, $this->entryPointName);
         }
         $installer->installModules($modulesList, $this->entryPointName);
     }
     try {
         jAppManager::clearTemp(jApp::tempBasePath());
     } catch (Exception $e) {
         if ($e->getCode() == 2) {
             echo "Error: bad path in jApp::tempBasePath(), it is equals to '" . jApp::tempBasePath() . "' !!\n";
             echo "       Jelix cannot clear the content of the temp directory.\n";
             echo "       you must clear it your self.\n";
             echo "       Correct the path in application.init.php or create the directory\n";
         } else {
             echo "Error: " . $e->getMessage();
         }
     }
     jAppManager::open();
 }
예제 #6
0
<?php

/**
* @package  jelix
* @subpackage testapp
* @author   Laurent Jouanneau
* @contributor Rahal Aboulfeth
* @copyright 2009-2010 Laurent Jouanneau, 2011 Rahal Aboulfeth
* @link     http://jelix.org
* @licence  http://www.gnu.org/licenses/gpl.html GNU General Public Licence, see LICENCE file
*/
require_once dirname(__FILE__) . '/../application.init.php';
jApp::setEnv('install');
jAppManager::close();
$installer = new jInstaller(new textInstallReporter());
$installer->installApplication();
jAppManager::clearTemp();
jAppManager::open();
예제 #7
0
 public function run()
 {
     jAppManager::close($this->getParam('message', ''));
 }
예제 #8
0
<?php

/**
* @package   lizmap
* @author    3liz
* @copyright 2011 3liz
* @link      http://3liz.com
* @license Mozilla Public License : http://www.mozilla.org/MPL/
*/
require_once __DIR__ . '/../application.init.php';
jApp::setEnv('install');
$installer = new jInstaller(new textInstallReporter());
$installer->installApplication();
try {
    jAppManager::clearTemp();
} catch (Exception $e) {
    echo "WARNING: temporary files cannot be deleted because of this error: " . $e->getMessage() . ".\nWARNING: Delete temp files by hand immediately!\n";
}
예제 #9
0
 public function run()
 {
     jAppManager::open();
 }