diff --git a/setup/ajax.dataloader.php b/setup/ajax.dataloader.php index dcaa60c19..934a633ba 100644 --- a/setup/ajax.dataloader.php +++ b/setup/ajax.dataloader.php @@ -141,31 +141,31 @@ try ini_set('display_errors', true); ini_set('display_startup_errors', true); - $sConfigFile = utils::GetConfigFilePath(); - if (file_exists($sConfigFile) && !is_writable($sConfigFile)) + require_once(APPROOT.'/setup/wizardcontroller.class.inc.php'); + require_once(APPROOT.'/setup/wizardsteps.class.inc.php'); + + $sClass = utils::ReadParam('step_class', ''); + $sState = utils::ReadParam('step_state', ''); + $sActionCode = utils::ReadParam('code', ''); + $aParams = utils::ReadParam('params', array(), false, 'raw_data'); + $oPage = new ajax_page(''); + $oDummyController = new WizardController(''); + if (is_subclass_of($sClass, 'WizardStep')) { - $oPage->error("Error: the configuration file '".$sConfigFile."' already exists and cannot be overwritten."); - $oPage->p("The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '".realpath($sConfigFile)."' can be modified by the web server."); - $oPage->output(); - } - else - { - require_once(APPROOT.'/setup/wizardcontroller.class.inc.php'); - require_once(APPROOT.'/setup/wizardsteps.class.inc.php'); - - $sClass = utils::ReadParam('step_class', ''); - $sState = utils::ReadParam('step_state', ''); - $sActionCode = utils::ReadParam('code', ''); - $aParams = utils::ReadParam('params', array(), false, 'raw_data'); - $oPage = new ajax_page(''); - $oDummyController = new WizardController(''); - if (is_subclass_of($sClass, 'WizardStep')) + $oStep = new $sClass($oDummyController, $sState); + $sConfigFile = utils::GetConfigFilePath(); + if (file_exists($sConfigFile) && !is_writable($sConfigFile) && $oStep->RequiresWritableConfig()) + { + $oPage->error("Error: the configuration file '".$sConfigFile."' already exists and cannot be overwritten."); + $oPage->p("The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '".realpath($sConfigFile)."' can be modified by the web server."); + $oPage->output(); + } + else { - $oStep = new $sClass($oDummyController, $sState); $oStep->AsyncAction($oPage, $sActionCode, $aParams); } - $oPage->output(); } + $oPage->output(); break; ////////////////////////////// diff --git a/setup/applicationinstaller.class.inc.php b/setup/applicationinstaller.class.inc.php index 760f21403..a7eb117c9 100644 --- a/setup/applicationinstaller.class.inc.php +++ b/setup/applicationinstaller.class.inc.php @@ -127,7 +127,7 @@ class ApplicationInstaller $aCopies = $aPreinstall['copies']; $sReport = self::DoCopy($aCopies); - $sReport = "copy disabled..."; + $sReport = "Copying..."; $aResult = array( 'status' => self::OK, @@ -136,7 +136,7 @@ class ApplicationInstaller if (isset($aPreinstall['backup'])) { $aResult['next-step'] = 'backup'; - $aResult['next-step-label'] = 'Backuping the database'; + $aResult['next-step-label'] = 'Performing a backup of the database'; $aResult['percentage-completed'] = 20; } else @@ -224,7 +224,7 @@ class ApplicationInstaller 'status' => self::OK, 'message' => '', 'next-step' => 'after-db-create', - 'next-step-label' => 'Creating Profiles', + 'next-step-label' => 'Creating profiles', 'percentage-completed' => 60, ); break; @@ -260,7 +260,7 @@ class ApplicationInstaller 'status' => self::OK, 'message' => '', 'next-step' => 'sample-data', - 'next-step-label' => 'Loading Sample Data', + 'next-step-label' => 'Loading sample data', 'percentage-completed' => 80, ); @@ -268,7 +268,7 @@ class ApplicationInstaller if (!$bLoadData) { $aResult['next-step'] = 'create-config'; - $aResult['next-step-label'] = 'Creating the Configuration File'; + $aResult['next-step-label'] = 'Creating the configuration File'; } break; @@ -291,7 +291,7 @@ class ApplicationInstaller 'status' => self::INFO, 'message' => 'All data loaded', 'next-step' => 'create-config', - 'next-step-label' => 'Creating the Configuration File', + 'next-step-label' => 'Creating the configuration File', 'percentage-completed' => 99, ); break; @@ -401,7 +401,13 @@ class ApplicationInstaller } $sSourcePath = APPROOT.$sSourceDir; + $aDirsToScan = array($sSourcePath); $sExtensionsPath = APPROOT.$sExtensionDir; + if (is_dir($sExtensionsPath)) + { + // if the extensions dir exists, scan it for additional modules as well + $aDirsToScan[] = $sExtensionsPath; + } $sTargetPath = APPROOT.$sTargetDir; if (!is_dir($sSourcePath)) { @@ -421,7 +427,7 @@ class ApplicationInstaller } } - $oFactory = new ModelFactory(array($sSourcePath, $sExtensionsPath)); + $oFactory = new ModelFactory($aDirsToScan); $aModules = $oFactory->FindModules(); foreach($aModules as $foo => $oModule) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 4758e095b..193604404 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -617,10 +617,10 @@ class SetupUtils $oPage->add('
| '); - $oPage->add(' | |
| '); $oPage->add(' | |
| '); + $oPage->add(' | |
| Use a prefix for the tables: |