Example #1
0
 /**
  * Load search component classes.
  */
 protected function load_search_component()
 {
     if (!class_exists('\\phpbb_ezcomponents_loader')) {
         require $this->ext_root_path . 'includes/library/ezcomponents/loader.' . $this->php_ext;
     }
     \phpbb_ezcomponents_loader::load_component('search');
 }
Example #2
0
 public function extract($archive, $target, $check_minimum_directory = true)
 {
     if (!file_exists($archive)) {
         trigger_error(sprintf(phpbb::$user->lang['FILE_NOT_EXIST'], basename($archive)));
     }
     // Some simple file protection to prevent getting out of the titania root
     if ($check_minimum_directory) {
         if (!$this->check_filesystem_path($archive)) {
             return false;
         }
         if (!$this->check_filesystem_path($target)) {
             return false;
         }
     }
     // Clear out old stuff if there is anything here...
     $this->rmdir_recursive($target);
     // Using the phpBB ezcomponents loader
     titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
     phpbb_ezcomponents_loader::load_component('archive');
     // ezcomponents archive handler
     $ezcarchive = ezcArchive::open($archive, ezcArchive::ZIP);
     $ezcarchive->extract($target);
     $ezcarchive->close();
 }
Example #3
0
*
*/
/**
* @ignore
*/
if (!defined('IN_TITANIA')) {
    exit;
}
// Include library in include path (for Zend)
if (titania::$config->search_backend == 'zend') {
    set_include_path(get_include_path() . PATH_SEPARATOR . realpath(TITANIA_ROOT . 'includes/library/'));
    titania::_include('library/Zend/Search/Lucene', false, 'Zend_Search_Lucene');
}
// Using the phpBB ezcomponents loader
titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
phpbb_ezcomponents_loader::load_component('search');
class titania_search
{
    /**
     * Path to store (for the Zend Search index files)
     */
    const store_path = 'store/search/';
    /**
     * Holds the indexer
     */
    private static $index = false;
    /**
     * Forcefully set the indexer to not index anything
     *
     * @var bool
     */