/** * declare a plugins directory * @param string $path a path. it could contains aliases like 'app:', 'lib:' or 'module:' * @since 1.4 */ function declarePluginsPath($path) { if (preg_match('@^module:([^/]+)(/.*)?$@', $path, $m)) { if (!isset($m[2])) { $path .= '/plugins'; } else { if (strlen($m[2]) == 1) { $path .= 'plugins'; } } } $pluginsPath = $this->config->getValue('pluginsPath'); $list = preg_split('/ *, */', $pluginsPath); $path = rtrim($path, '/'); foreach ($list as $p) { if (preg_match('@^module:([^/]+)(/.*)?$@', $p, $m)) { if (!isset($m[2])) { $p .= '/plugins'; } else { if (strlen($m[2]) == 1) { $p .= 'plugins'; } } } if (rtrim($p, '/') == $path) { return; } } $pluginsPath .= ',' . $path; $this->config->setValue('pluginsPath', $pluginsPath); }
protected function expandPath($path) { if (strpos($path, 'www:') === 0) { $path = str_replace('www:', jApp::wwwPath(), $path); } elseif (strpos($path, 'jelixwww:') === 0) { $p = $this->config->getValue('jelixWWWPath', 'urlengine'); if (substr($p, -1) != '/') { $p .= '/'; } $path = str_replace('jelixwww:', jApp::wwwPath($p), $path); } elseif (strpos($path, 'config:') === 0) { $path = str_replace('config:', jApp::configPath(), $path); } elseif (strpos($path, 'epconfig:') === 0) { $p = dirname(jApp::configPath($this->entryPoint->configFile)); $path = str_replace('epconfig:', $p . '/', $path); } return $path; }
public function run() { $this->loadAppConfig(); $entrypoint = $this->getParam('entrypoint'); if (($p = strpos($entrypoint, '.php')) !== false) { $entrypoint = substr($entrypoint, 0, $p); } $ep = $this->getEntryPointInfo($entrypoint); if ($ep == null) { try { $cmd = JelixScript::getCommand('createentrypoint', $this->config); $cmd->initOptParam(array(), array('name' => $entrypoint)); $cmd->run(); $this->projectXml = null; $ep = $this->getEntryPointInfo($entrypoint); } catch (Exception $e) { throw new Exception("The entrypoint has not been created because of this error: " . $e->getMessage() . ". No other files have been created.\n"); } } $installConfig = new jIniFileModifier(jApp::configPath('installer.ini.php')); $inifile = new jIniMultiFilesModifier(jApp::configPath('defaultconfig.ini.php'), jApp::configPath($ep['config'])); $params = array(); $this->createFile(jApp::appPath('responses/adminHtmlResponse.class.php'), 'responses/adminHtmlResponse.class.php.tpl', $params); $this->createFile(jApp::appPath('responses/adminLoginHtmlResponse.class.php'), 'responses/adminLoginHtmlResponse.class.php.tpl', $params); $inifile->setValue('html', 'adminHtmlResponse', 'responses'); $inifile->setValue('htmlauth', 'adminLoginHtmlResponse', 'responses'); $inifile->setValue('startModule', 'master_admin'); $inifile->setValue('startAction', 'default:index'); $modulePath = $inifile->getValue("modulesPath", 0, null, true); if (strpos($modulePath, 'lib:jelix-admin-modules') === false) { // we set it on defaultconfig.ini.php, so if the url engine is "significant" // it could know the admin modules during the parsing of modules $inifile->setValue('modulesPath', 'lib:jelix-admin-modules/,' . $modulePath, 0, null, true); } $installConfig->setValue('jacldb.installed', '0', $entrypoint); $inifile->setValue('jacldb.access', '0', 'modules'); $installConfig->setValue('junittests.installed', '0', $entrypoint); $inifile->setValue('junittests.access', '0', 'modules'); $installConfig->setValue('jWSDL.installed', '0', $entrypoint); $inifile->setValue('jWSDL.access', '0', 'modules'); $urlconf = $inifile->getValue($entrypoint, 'simple_urlengine_entrypoints', null, true); if ($urlconf === null || $urlconf == '') { // in defaultconfig $inifile->setValue($entrypoint, 'jacl2db_admin~*@classic, jauthdb_admin~*@classic, master_admin~*@classic', 'simple_urlengine_entrypoints', null, true); // in the config of the entry point $inifile->setValue($entrypoint, 'jacl2db~*@classic, jauth~*@classic, jacl2db_admin~*@classic, jauthdb_admin~*@classic, master_admin~*@classic', 'simple_urlengine_entrypoints'); } else { $urlconf2 = $inifile->getValue($entrypoint, 'simple_urlengine_entrypoints'); if (strpos($urlconf, 'jacl2db_admin~*@classic') === false) { $urlconf .= ',jacl2db_admin~*@classic'; } if (strpos($urlconf, 'jauthdb_admin~*@classic') === false) { $urlconf .= ',jauthdb_admin~*@classic'; } if (strpos($urlconf, 'master_admin~*@classic') === false) { $urlconf .= ',master_admin~*@classic'; } if (strpos($urlconf2, 'jacl2db_admin~*@classic') === false) { $urlconf2 .= ',jacl2db_admin~*@classic'; } if (strpos($urlconf2, 'jauthdb_admin~*@classic') === false) { $urlconf2 .= ',jauthdb_admin~*@classic'; } if (strpos($urlconf2, 'master_admin~*@classic') === false) { $urlconf2 .= ',master_admin~*@classic'; } if (strpos($urlconf2, 'jacl2db~*@classic') === false) { $urlconf2 .= ',jacl2db~*@classic'; } if (strpos($urlconf2, 'jauth~*@classic') === false) { $urlconf2 .= ',jauth~*@classic'; } $inifile->setValue($entrypoint, $urlconf, 'simple_urlengine_entrypoints', null, true); $inifile->setValue($entrypoint, $urlconf2, 'simple_urlengine_entrypoints'); } if (null == $inifile->getValue($entrypoint, 'basic_significant_urlengine_entrypoints', null, true)) { $inifile->setValue($entrypoint, '1', 'basic_significant_urlengine_entrypoints', null, true); } $inifile->save(); require_once JELIX_LIB_PATH . 'installer/jInstaller.class.php'; $verbose = $this->getOption("-v"); $reporter = new textInstallReporter($verbose ? 'notice' : 'warning'); $installer = new jInstaller($reporter); $installer->installModules(array('master_admin'), $entrypoint . '.php'); $authini = new jIniFileModifier(jApp::configPath($entrypoint . '/auth.coord.ini.php')); $authini->setValue('after_login', 'master_admin~default:index'); $authini->setValue('timeout', '30'); $authini->save(); $profile = $this->getOption('-profile'); if (!$this->getOption('-noauthdb')) { if ($profile != '') { $authini->setValue('profile', $profile, 'Db'); } $authini->save(); $installer->setModuleParameters('jauthdb', array('defaultuser' => true)); $installer->installModules(array('jauthdb', 'jauthdb_admin'), $entrypoint . '.php'); } else { $installConfig->setValue('jauthdb_admin.installed', '0', $entrypoint); $installConfig->save(); $inifile->setValue('jauthdb_admin.access', '0', 'modules'); $inifile->save(); } if (!$this->getOption('-noacl2db')) { if ($profile != '') { $dbini = new jIniFileModifier(jApp::configPath('profiles.ini.php')); $dbini->setValue('jacl2_profile', $profile, 'jdb'); $dbini->save(); } $installer = new jInstaller($reporter); $installer->setModuleParameters('jacl2db', array('defaultuser' => true)); $installer->installModules(array('jacl2db', 'jacl2db_admin'), $entrypoint . '.php'); } else { $installConfig->setValue('jacl2db_admin.installed', '0', $entrypoint); $installConfig->save(); $inifile->setValue('jacl2db_admin.access', '0', 'modules'); $inifile->save(); } }
public function run() { jxs_init_jelix_env(); $entrypoint = $this->getParam('entrypoint'); if (!file_exists(JELIX_APP_WWW_PATH . $entrypoint . '.php')) { try { $cmd = jxs_load_command('createentrypoint'); $cmd->init(array(), array('name' => $entrypoint)); $cmd->run(); } catch (Exception $e) { echo "The entrypoint has not been created because of this error: " . $e->getMessage() . ". No other files have been created.\n"; } } $inifile = new jIniMultiFilesModifier(JELIX_APP_CONFIG_PATH . 'defaultconfig.ini.php', JELIX_APP_CONFIG_PATH . $entrypoint . '/config.ini.php'); $inifile->setValue('html', 'adminHtmlResponse', 'responses'); $inifile->setValue('htmlauth', 'adminLoginHtmlResponse', 'responses'); $inifile->setValue('auth', $entrypoint . '/auth.coord.ini.php', 'coordplugins'); $inifile->setValue('jacl2', $entrypoint . '/jacl2.coord.ini.php', 'coordplugins'); $inifile->setValue('startModule', 'master_admin'); $inifile->setValue('startAction', 'default:index'); $modulePath = $inifile->getValue("modulesPath"); if (strpos($modulePath, 'lib:jelix-admin-modules') === false) { $inifile->setValue('modulesPath', 'lib:jelix-admin-modules/,' . $modulePath); } $inifile->setValue('driver', 'db', 'acl2'); $urlconf = $inifile->getValue($entrypoint, 'simple_urlengine_entrypoints', null, true); if ($urlconf === null || $urlconf == '') { // in defaultconfig $inifile->setValue($entrypoint, 'jacl2db_admin~*@classic, jauthdb_admin~*@classic, master_admin~*@classic', 'simple_urlengine_entrypoints', null, true); // in the config of the entry point $inifile->setValue($entrypoint, 'jacl2db~*@classic, jauth~*@classic, jacl2db_admin~*@classic, jauthdb_admin~*@classic, master_admin~*@classic', 'simple_urlengine_entrypoints'); } else { $urlconf2 = $inifile->getValue($entrypoint, 'simple_urlengine_entrypoints'); if (strpos($urlconf, 'jacl2db_admin~*@classic') === false) { $urlconf .= ',jacl2db_admin~*@classic'; } if (strpos($urlconf, 'jauthdb_admin~*@classic') === false) { $urlconf .= ',jauthdb_admin~*@classic'; } if (strpos($urlconf, 'master_admin~*@classic') === false) { $urlconf .= ',master_admin~*@classic'; } if (strpos($urlconf2, 'jacl2db_admin~*@classic') === false) { $urlconf2 .= ',jacl2db_admin~*@classic'; } if (strpos($urlconf2, 'jauthdb_admin~*@classic') === false) { $urlconf2 .= ',jauthdb_admin~*@classic'; } if (strpos($urlconf2, 'master_admin~*@classic') === false) { $urlconf2 .= ',master_admin~*@classic'; } if (strpos($urlconf2, 'jacl2db~*@classic') === false) { $urlconf2 .= ',jacl2db~*@classic'; } if (strpos($urlconf2, 'jauth~*@classic') === false) { $urlconf2 .= ',jauth~*@classic'; } $inifile->setValue($entrypoint, $urlconf, 'simple_urlengine_entrypoints', null, true); $inifile->setValue($entrypoint, $urlconf2, 'simple_urlengine_entrypoints'); } if (null == $inifile->getValue($entrypoint, 'basic_significant_urlengine_entrypoints', null, true)) { $inifile->setValue($entrypoint, '1', 'basic_significant_urlengine_entrypoints', null, true); } $params = array(); $this->createFile(JELIX_APP_PATH . 'responses/adminHtmlResponse.class.php', 'responses/adminHtmlResponse.class.php.tpl', $params); $this->createFile(JELIX_APP_PATH . 'responses/adminLoginHtmlResponse.class.php', 'responses/adminLoginHtmlResponse.class.php.tpl', $params); $this->createFile(JELIX_APP_PATH . 'var/config/' . $entrypoint . '/auth.coord.ini.php', 'var/config/auth.coord.ini.php.tpl', $params); $this->createFile(JELIX_APP_PATH . 'var/config/' . $entrypoint . '/jacl2.coord.ini.php', 'var/config/jacl2.coord.ini.php.tpl', $params); $authini = new jIniFileModifier(JELIX_APP_CONFIG_PATH . $entrypoint . '/auth.coord.ini.php'); $authini->setValue('after_login', 'master_admin~default:index'); $authini->setValue('timeout', '30'); $profile = $this->getOption('-profile'); if (!$this->getOption('-noauthdb')) { $authini->setValue('dao', 'jauth~jelixuser', 'Db'); $authini->setValue('form', 'jauthdb_admin~jelixuser', 'Db'); if ($profile != '') { $authini->setValue('profile', $profile, 'Db'); } $tools = jDb::getTools($profile); $db = jDb::getConnection($profile); $path = JELIX_LIB_PATH . 'core-modules/jelix/install/sql/'; if (file_exists($path . 'install_jauth.schema.' . $db->dbms . '.sql')) { try { $tools->execSQLScript($path . 'install_jauth.schema.' . $db->dbms . '.sql'); $rs = $db->query("SELECT usr_login FROM jlx_user WHERE usr_login='******'"); if (!$rs || !$rs->fetch()) { $db->exec("INSERT INTO jlx_user (usr_login , usr_password , usr_email) VALUES ('admin', '" . md5('admin') . "', '*****@*****.**')"); } $rs = null; } catch (Exception $e) { echo "An error has occured during the execution of SQL script to install jAuth: " . $e->getMessage() . "\n"; } } else { echo "Tables and datas for jAuth.db couldn't be created because SQL scripts are not available for the database declared in the profile.\nYou should initialize the database by hand.\n"; } } else { $inifile->setValue('unusedModules', $inifile->getValue('unusedModules') . ', jauthdb_admin'); } if (!$this->getOption('-noacl2db')) { $tools = jDb::getTools($profile); $db = jDb::getConnection($profile); $path = JELIX_LIB_PATH . 'core-modules/jelix/install/sql/'; $tables = $tools->getTableList(); if (in_array('jacl2_rights', $tables)) { ob_start(); try { $cmd = jxs_load_command('acl2group'); $cmd->init(array(), array('action' => 'createuser', '...' => array('admin'))); $cmd->run(); } catch (Exception $e) { } try { $cmd = jxs_load_command('acl2group'); $cmd->init(array(), array('action' => 'adduser', '...' => array('admins', 'admin'))); $cmd->run(); } catch (Exception $e) { } $subjects = array('auth.users.list' => 'jelix~auth.acl.users.list', 'auth.users.view' => 'jelix~auth.acl.users.view', 'auth.users.modify' => 'jelix~auth.acl.users.modify', 'auth.users.create' => 'jelix~auth.acl.users.create', 'auth.users.delete' => 'jelix~auth.acl.users.delete', 'auth.users.change.password' => 'jelix~auth.acl.users.change.password', 'auth.user.view' => 'jelix~auth.acl.user.view', 'auth.user.modify' => 'jelix~auth.acl.user.modify', 'auth.user.change.password' => 'jelix~auth.acl.user.change.password'); foreach ($subjects as $subject => $label) { try { $cmd = jxs_load_command('acl2right'); $cmd->init(array(), array('action' => 'subject_create', '...' => array($subject, $label))); $cmd->run(); } catch (Exception $e) { } } $rights = array(array('auth.users.list', 'admins'), array('auth.users.view', 'admins'), array('auth.users.modify', 'admins'), array('auth.users.create', 'admins'), array('auth.users.delete', 'admins'), array('auth.users.change.password', 'admins'), array('auth.user.view', 'admins'), array('auth.user.modify', 'admins'), array('auth.user.change.password', 'admins'), array('auth.user.view', 'users'), array('auth.user.modify', 'users'), array('auth.user.change.password', 'users')); foreach ($rights as $right) { try { $cmd = jxs_load_command('acl2right'); $cmd->init(array(), array('action' => 'add', '...' => array($right[1], $right[0]))); $cmd->run(); } catch (Exception $e) { } } ob_end_clean(); } else { if (file_exists($path . 'install_jauth.schema.' . $db->dbms . '.sql')) { try { $tools->execSQLScript($path . 'install_jacl2.schema.' . $db->dbms . '.sql'); $tools->execSQLScript($path . 'install_jacl2.data.' . $db->dbms . '.sql'); } catch (Exception $e) { echo "An error has occured during the execution of SQL script to install jAcl2.db: " . $e->getMessage() . "\n"; } } else { echo "Tables and datas for jAcl2.db couldn't be created because SQL scripts are not available for the database declared in the profile.\nYou should initialize the database by hand.\n"; } } } else { $inifile->setValue('unusedModules', $inifile->getValue('unusedModules') . ', jacl2db_admin'); } $authini->save(); $inifile->save(); }
public function run() { jxs_init_jelix_env(); $type = $this->getOption('-type'); if (!$type) { $type = 'classic'; } if (!in_array($type, array('classic', 'jsonrpc', 'xmlrpc', 'rdf', 'soap', 'cmdline'))) { throw new Exception("invalid type"); } if ($type == 'classic') { $type = 'index'; } $name = $this->getParam('name'); $inifile = new jIniMultiFilesModifier(JELIX_APP_CONFIG_PATH . 'defaultconfig.ini.php', JELIX_APP_CONFIG_PATH . 'index/config.ini.php'); $param = array(); $param['modulename'] = $inifile->getValue('startModule'); if ($type == 'cmdline') { if (file_exists(JELIX_APP_CMD_PATH . $name . '.php')) { throw new Exception("the entry point already exists"); } if (!file_exists(JELIX_APP_PATH . 'application-cli.init.php')) { $this->createDir(substr(JELIX_APP_TEMP_PATH, -1) . '-cli'); $param2['rp_temp'] = jxs_getRelativePath(JELIX_APP_PATH, substr(JELIX_APP_TEMP_PATH, 0, -1) . '-cli', true); $param2['rp_var'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_VAR_PATH, true); $param2['rp_log'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_LOG_PATH, true); $param2['rp_conf'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_CONFIG_PATH, true); $param2['rp_www'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_WWW_PATH, true); $param2['rp_cmd'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_CMD_PATH, true); $param2['rp_jelix'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_LIB_PATH, true); $param2['rp_app'] = jxs_getRelativePath(JELIX_APP_WWW_PATH, JELIX_APP_PATH, true); $param2['php_rp_temp'] = $this->convertRp($param2['rp_temp']); $param2['php_rp_var'] = $this->convertRp($param2['rp_var']); $param2['php_rp_log'] = $this->convertRp($param2['rp_log']); $param2['php_rp_conf'] = $this->convertRp($param2['rp_conf']); $param2['php_rp_www'] = $this->convertRp($param2['rp_www']); $param2['php_rp_cmd'] = $this->convertRp($param2['rp_cmd']); $this->createFile(JELIX_APP_PATH . 'application-cli.init.php', 'application.init.php.tpl', $param2); } $this->createDir(JELIX_APP_CONFIG_PATH . 'cmdline'); $this->createDir(JELIX_APP_CMD_PATH); $this->createFile(JELIX_APP_CONFIG_PATH . 'cmdline/' . $name . '.ini.php', 'var/config/cmdline/config.ini.php.tpl', $param); $param['rp_cmd'] = jxs_getRelativePath(JELIX_APP_CMD_PATH, JELIX_APP_PATH, true); $param['config_file'] = 'cmdline/' . $name . '.ini.php'; $this->createFile(JELIX_APP_CMD_PATH . $name . '.php', 'scripts/cmdline.php.tpl', $param); return; } if (file_exists(JELIX_APP_WWW_PATH . $name . '.php')) { throw new Exception("the entry point already exists"); } $param['rp_app'] = jxs_getRelativePath(JELIX_APP_WWW_PATH, JELIX_APP_PATH, true); $param['config_file'] = $name . '/config.ini.php'; $this->createDir(JELIX_APP_CONFIG_PATH . $name); $this->createFile(JELIX_APP_CONFIG_PATH . $name . '/config.ini.php', 'var/config/index/config.ini.php.tpl', $param); $this->createFile(JELIX_APP_WWW_PATH . $name . '.php', 'www/' . $type . '.php.tpl', $param); $inifile = new jIniFileModifier(JELIX_APP_CONFIG_PATH . 'defaultconfig.ini.php'); if (null === $inifile->getValue($name, 'simple_urlengine_entrypoints')) { $inifile->setValue($name, '', 'simple_urlengine_entrypoints'); } if (null === $inifile->getValue($name, 'basic_significant_urlengine_entrypoints')) { $inifile->setValue($name, '1', 'basic_significant_urlengine_entrypoints'); } $doc = new DOMDocument(); if (!$doc->load(JELIX_APP_PATH . 'project.xml')) { throw new Exception("cannot load project.xml"); } if ($doc->documentElement->namespaceURI != JELIX_NAMESPACE_BASE . 'project/1.0') { throw new Exception("bad namespace in project.xml"); } $elem = $doc->createElementNS(JELIX_NAMESPACE_BASE . 'project/1.0', 'entry'); $elem->setAttribute("file", $name . ".php"); $elem->setAttribute("config", $name . "/config.ini.php"); $ep = $doc->documentElement->getElementsByTagName("entrypoints"); if (!$ep->length) { $ep = $doc->createElementNS(JELIX_NAMESPACE_BASE . 'project/1.0', 'entrypoints'); $doc->documentElement->appendChild($ep); $ep->appendChild($elem); } else { $ep->item(0)->appendChild($elem); } $doc->save(JELIX_APP_PATH . 'project.xml'); }
public function run() { // retrieve the type of entry point we want to create $type = $this->getOption('-type'); if (!$type) { $type = 'classic'; } else { if (!in_array($type, array('classic', 'jsonrpc', 'xmlrpc', 'rdf', 'soap', 'cmdline'))) { throw new Exception("invalid type"); } } // retrieve the name of the entry point $name = $this->getParam('name'); if (preg_match('/(.*)\\.php$/', $name, $m)) { $name = $m[1]; } // the full path of the entry point if ($type == 'cmdline') { $entryPointFullPath = jApp::scriptsPath($name . '.php'); $entryPointTemplate = 'scripts/cmdline.php.tpl'; } else { $entryPointFullPath = jApp::wwwPath($name . '.php'); $entryPointTemplate = 'www/' . ($type == 'classic' ? 'index' : $type) . '.php.tpl'; } if (file_exists($entryPointFullPath)) { throw new Exception("the entry point already exists"); } $entryPointDir = dirname($entryPointFullPath) . '/'; $this->loadProjectXml(); // retrieve the config file name $configFile = $this->getParam('config'); if ($configFile == null) { if ($type == 'cmdline') { $configFile = 'cmdline/' . $name . '.ini.php'; } else { $configFile = $name . '/config.ini.php'; } } // let's create the config file if needed $configFilePath = jApp::configPath($configFile); if (!file_exists($configFilePath)) { $this->createDir(dirname($configFilePath)); // the file doesn't exists // if there is a -copy-config parameter, we copy this file $originalConfig = $this->getOption('-copy-config'); if ($originalConfig) { if (!file_exists(jApp::configPath($originalConfig))) { throw new Exception("unknown original configuration file"); } file_put_contents($configFilePath, file_get_contents(jApp::configPath($originalConfig))); } else { // else we create a new config file, with the startmodule of the default // config as a module name. $defaultConfig = parse_ini_file(jApp::configPath('defaultconfig.ini.php'), true); $param = array(); if (isset($defaultConfig['startModule'])) { $param['modulename'] = $defaultConfig['startModule']; } else { $param['modulename'] = 'jelix'; } $this->createFile($configFilePath, 'var/config/index/config.ini.php.tpl', $param); } } require_once JELIX_LIB_PATH . 'utils/jIniMultiFilesModifier.class.php'; $inifile = new jIniMultiFilesModifier(jApp::configPath('defaultconfig.ini.php'), $configFilePath); $param = array(); $param['modulename'] = $inifile->getValue('startModule'); // creation of the entry point $this->createDir($entryPointDir); $param['rp_app'] = $this->getRelativePath($entryPointDir, jApp::appPath()); $param['config_file'] = $configFile; $this->createFile($entryPointFullPath, $entryPointTemplate, $param); if ($type != 'cmdline') { if (null === $inifile->getValue($name, 'simple_urlengine_entrypoints', null, true)) { $inifile->setValue($name, '', 'simple_urlengine_entrypoints', null, true); } if (null === $inifile->getValue($name, 'basic_significant_urlengine_entrypoints', null, true)) { $inifile->setValue($name, '1', 'basic_significant_urlengine_entrypoints', null, true); } $inifile->save(); } $this->updateProjectXml($name . ".php", $configFile, $type); require_once JELIX_LIB_PATH . 'installer/jInstaller.class.php'; $installer = new jInstaller(new textInstallReporter('warning')); $installer->installEntryPoint($name . ".php"); }