コード例 #1
0
ファイル: sphinx.php プロジェクト: mover5/imobackup
 /**
  * Constructor
  * 
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     /* Hard limit - not used in Sphinx but may need to revisit if we bust IN()s */
     //IPSSearchRegistry::set('set.hardLimit', ( ipsRegistry::$settings['search_hardlimit'] ) ? ipsRegistry::$settings['search_hardlimit'] : 200 );
     /* Get class forums, used for displaying forum names on results */
     if (ipsRegistry::isClassLoaded('class_forums') !== TRUE) {
         $classToLoad = IPSLib::loadLibrary(IPSLib::getAppDir('forums') . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums');
         ipsRegistry::setClass('class_forums', new $classToLoad(ipsRegistry::instance()));
         ipsRegistry::getClass('class_forums')->strip_invisible = 1;
         ipsRegistry::getClass('class_forums')->forumsInit();
     }
     /* Get live or archive */
     $this->searchArchives = ipsRegistry::$request['search_app_filters']['forums']['liveOrArchive'] == 'archive' ? true : false;
     if ($this->searchArchives) {
         /* Load up archive class */
         $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/classes/archive/reader.php', 'classes_archive_reader');
         $this->archiveReader = new $classToLoad();
         $this->archiveReader->setApp('forums');
         $this->table = $this->archiveReader->getFields();
         $this->table['_table_'] = 'forums_archive_posts';
         $this->table['_prefix_'] = 'p.archive_';
         $this->table['forums_search_posts_main'] = 'forums_search_archive_main';
         $this->table['forums_search_posts_delta'] = 'forums_search_archive_delta';
         /* disable max days search */
         $this->settings['search_ucontent_days'] = 0;
     } else {
         $this->table = array('_table_' => 'posts', '_prefix_' => 'p.', 'pid' => 'pid', 'author_id' => 'author_id', 'author_name' => 'author_name', 'ip_address' => 'ip_address', 'post_date' => 'post_date', 'post' => 'post', 'queued' => 'queued', 'topic_id' => 'topic_id', 'new_topic' => 'new_topic', 'post_bwoptions' => 'post_bwoptions', 'post_key' => 'post_key', 'post_htmlstate' => 'post_htmlstate', 'use_sig' => 'use_sig', 'use_emo' => 'use_emo', 'append_edit' => 'append_edit', 'edit_time' => 'edit_time', 'edit_name' => 'edit_name', 'post_edit_reason' => 'post_edit_reason', 'forums_search_posts_main' => 'forums_search_posts_main', 'forums_search_posts_delta' => 'forums_search_posts_delta');
     }
     parent::__construct($registry);
 }
コード例 #2
0
ファイル: sql.php プロジェクト: Advanture/Online-RolePlay
 /**
  * Constructor
  *
  * @param	object	ipsRegistry reference
  * @return	@e void
  */
 public function __construct(ipsRegistry $registry)
 {
     parent::__construct($registry);
 }