Changeset View
Changeset View
Standalone View
Standalone View
modules/custom/install.php
Show All 10 Lines | |||||
require_once FULL_PATH . '/core/install/install_toolkit.php'; | require_once FULL_PATH . '/core/install/install_toolkit.php'; | ||||
$constants_file = FULL_PATH . '/' . $module_folder . '/constants.php'; | $constants_file = FULL_PATH . '/' . $module_folder . '/constants.php'; | ||||
if ( file_exists($constants_file) ) { | if ( file_exists($constants_file) ) { | ||||
require_once $constants_file; | require_once $constants_file; | ||||
} | } | ||||
$toolkit = new kInstallToolkit(); | $toolkit = new kInstallToolkit(); | ||||
alex: NOTE: Repeat for other `install.php` files.
Please revert these changes. | |||||
} | } | ||||
else { | else { | ||||
// install, using installation wizard | // install, using installation wizard | ||||
$toolkit =& $this->toolkit; | $toolkit =& $this->toolkit; | ||||
/* @var $toolkit kInstallToolkit */ | /* @var $toolkit kInstallToolkit */ | ||||
} | } | ||||
$application =& kApplication::Instance(); | $application =& kApplication::Instance(); | ||||
$application->Init(); | $application->Init(); | ||||
if ( $application->RecallVar('user_id') != USER_ROOT ) { | if ( $application->RecallVar('user_id') != USER_ROOT ) { | ||||
die('restricted access!'); | die('restricted access!'); | ||||
} | } | ||||
$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); | $toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); | ||||
$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql'); | $toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql'); | ||||
$toolkit->ImportLanguage('/' . $module_folder . '/install/english'); | $toolkit->ImportLanguage('/' . $module_folder . '/install/english', isset($constants_file)); | ||||
Not Done ReplyNOTE: Repeat for other install.php files.
Specify isset($constants_file) as 2nd argument. This straightforward way. In your version you're specifying a flag to kInstallToolkit class, that it will use in non obvious way when ImportLanguage method would be called from it. alex: NOTE: Repeat for other `install.php` files.
Specify `isset($constants_file)` as 2nd argument. | |||||
$toolkit->finalizeModuleInstall($module_folder, false); | $toolkit->finalizeModuleInstall($module_folder, false); | ||||
No newline at end of file |
Please revert these changes.