Index: branches/5.2.x/install.php =================================================================== diff -u -r14690 -r15645 --- branches/5.2.x/install.php (.../install.php) (revision 14690) +++ branches/5.2.x/install.php (.../install.php) (revision 15645) @@ -1,6 +1,6 @@ toolkit; - /* @var $toolkit kInstallToolkit */ - } - $application =& kApplication::Instance(); - $application->Init(); + $toolkit = new kInstallToolkit(); +} +else { + // install, using installation wizard + $toolkit =& $this->toolkit; + /* @var $toolkit kInstallToolkit */ +} - if ($application->RecallVar('user_id') != USER_ROOT) { - die('restricted access!'); - } +$application =& kApplication::Instance(); +$application->Init(); - $category =& $toolkit->createModuleCategory('Directory', 'Link Directory', '#in-link/section_design#', 'in-link/img/menu_links.gif'); +if ( $application->RecallVar('user_id') != USER_ROOT ) { + die('restricted access!'); +} - $toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); - $toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{LinkCatId}', $category->GetID()); - $toolkit->ImportLanguage('/' . $module_folder . '/install/english'); +$category =& $toolkit->createModuleCategory('Directory', 'Link Directory', '#in-link/section_design#', 'in-link/img/menu_links.gif'); - $toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); +$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); +$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{LinkCatId}', $category->GetID()); +$toolkit->ImportLanguage('/' . $module_folder . '/install/english'); - $toolkit->linkCustomFields(basename($module_folder), 'l', 4); // to create Custom Fields for Links - $toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field - $toolkit->setModuleItemTemplate($category, 'l', '#in-link/item_design#'); +$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); - $toolkit->finalizeModuleInstall($module_folder, true); \ No newline at end of file +$toolkit->linkCustomFields(basename($module_folder), 'l', 4); // to create Custom Fields for Links +$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field +$toolkit->setModuleItemTemplate($category, 'l', '#in-link/item_design#'); + +$toolkit->finalizeModuleInstall($module_folder, true);