function init() { require 'lib.searchengine.php'; $oPlugin = new PPluginDir(dirname(__FILE__)); $oConfigFile =& $oPlugin->oConfig; $bActivate = $oConfigFile->getDirectParam('ACTIVATE'); if ($bActivate !== "true") { return setError(_('Please check your configuration. You must activate it befor try to index the content')); } if (!createBase()) { return false; } if (!synchroBase()) { return false; } echo gettext('Data base has been populated successfully'); return true; }
<?php include '../../../core/config.inc.php'; require_once SITE_PATH . '/core/lib/pfile.php'; require_once SITE_PATH . '/core/lib/ppage.php'; require SITE_PATH . '/core/lib/localization.php'; //the config file $oCurrentFile = new PFile(__FILE__); require_once $oCurrentFile->getParentPath() . SLASH . 'lib.searchengine.php'; if (!synchroBase()) { printError(); } else { echo 'All rights !!'; }