コード例 #1
0
ファイル: WorldCat.php プロジェクト: bryandease/VuFind-Plus
 /**
  * Initialise the object from the global
  *  search parameters in $_REQUEST.
  *
  * @access  public
  * @return  boolean
  */
 public function init()
 {
     // Call the standard initialization routine in the parent:
     parent::init();
     //********************
     // Check if we have a saved search to restore -- if restored successfully,
     // our work here is done; if there is an error, we should report failure;
     // if restoreSavedSearch returns false, we should proceed as normal.
     $restored = $this->restoreSavedSearch();
     if ($restored === true) {
         return true;
     } else {
         if (PEAR_Singleton::isError($restored)) {
             return false;
         }
     }
     $this->initView();
     $this->initPage();
     $this->initSort();
     // Try to find a basic search first; check for advanced if no basic found.
     if (!$this->initBasicSearch()) {
         $this->initAdvancedSearch();
     }
     return true;
 }
コード例 #2
0
ファイル: Genealogy.php プロジェクト: bryandease/VuFind-Plus
 /**
  * Initialise the object for retrieving advanced
  *   search screen facet data from inside solr.
  *
  * @access  public
  * @return  boolean
  */
 public function initAdvancedFacets()
 {
     // Call the standard initialization routine in the parent:
     parent::init();
     //********************
     // Adjust facet options to use advanced settings
     $this->facetConfig = isset($this->allFacetSettings['Advanced']) ? $this->allFacetSettings['Advanced'] : array();
     $facetLimit = $this->getFacetSetting('Advanced_Settings', 'facet_limit');
     if (is_numeric($facetLimit)) {
         $this->facetLimit = $facetLimit;
     }
     // Spellcheck is not needed for facet data!
     $this->spellcheck = false;
     //********************
     // Basic Search logic
     $this->searchTerms[] = array('index' => $this->defaultIndex, 'lookfor' => "");
     return true;
 }
コード例 #3
0
ファイル: PCI.php プロジェクト: bharatm/NDL-VuFind
 /**
  * Initialise the object from the global
  *  search parameters in $_REQUEST.
  *
  * @return boolean
  * @access public
  */
 public function init()
 {
     global $module;
     global $action;
     // Call the standard initialization routine in the parent:
     parent::init();
     //********************
     // Check if we have a saved search to restore -- if restored successfully,
     // our work here is done; if there is an error, we should report failure;
     // if restoreSavedSearch returns false, we should proceed as normal.
     $restored = $this->restoreSavedSearch();
     if ($restored === true) {
         return true;
     } else {
         if (PEAR::isError($restored)) {
             return false;
         }
     }
     //********************
     // Initialize standard search parameters
     $this->initView();
     $this->initPage();
     $this->initSort();
     $this->initFilters();
     $this->initLimit();
     //********************
     // Basic Search logic
     if ($this->initBasicSearch()) {
         // If we found a basic search, we don't need to do anything further.
     } else {
         if (isset($_REQUEST['tag']) && $module != 'MyResearch') {
             // Tags, just treat them as normal searches for now.
             // The search processer knows what to do with them.
             if ($_REQUEST['tag'] != '') {
                 $this->searchTerms[] = array('index' => 'tag', 'lookfor' => $_REQUEST['tag']);
             }
         } else {
             $this->initAdvancedSearch();
         }
     }
     $this->limit = 10;
 }
コード例 #4
0
ファイル: Solr.php プロジェクト: bryandease/VuFind-Plus
 /**
  * Initialise the object for retrieving dynamic data
  *    for the browse screen to function.
  *
  * We don't know much at this stage, the browse AJAX
  *   calls need to supply the queries and facets.
  *
  * @access  public
  * @return  boolean
  */
 public function initBrowseScreen()
 {
     global $configArray;
     // Call the standard initialization routine in the parent:
     parent::init();
     $this->facetConfig = array();
     // Use the facet limit specified in config.ini (or default to 100):
     $this->facetLimit = isset($configArray['Browse']['result_limit']) ? $configArray['Browse']['result_limit'] : 100;
     // Sorting defaults to off with unlimited facets
     $this->setFacetSortOrder('count');
     // We don't need spell checking
     $this->spellcheck = false;
     //********************
     // Basic Search logic
     $this->searchTerms[] = array('index' => $this->defaultIndex, 'lookfor' => "");
     return true;
 }
コード例 #5
0
ファイル: SolrAuth.php プロジェクト: bharatm/NDL-VuFind
 /**
  * Initialise the object from the global
  *  search parameters in $_REQUEST.
  *
  * @return boolean
  * @access public
  */
 public function init()
 {
     global $module;
     global $action;
     // Call the standard initialization routine in the parent:
     parent::init();
     //********************
     // Check if we have a saved search to restore -- if restored successfully,
     // our work here is done; if there is an error, we should report failure;
     // if restoreSavedSearch returns false, we should proceed as normal.
     $restored = $this->restoreSavedSearch();
     if ($restored === true) {
         return true;
     } else {
         if (PEAR::isError($restored)) {
             return false;
         }
     }
     //********************
     // Initialize standard search parameters
     $this->initView();
     $this->initPage();
     $this->initSort();
     $this->initFilters();
     //********************
     // Basic Search logic
     if ($this->initBasicSearch()) {
         // If we found a basic search, we don't need to do anything further.
     } else {
         $this->initAdvancedSearch();
     }
     // If a query override has been specified, log it here
     if (isset($_REQUEST['q'])) {
         $this->_query = $_REQUEST['q'];
     }
     return true;
 }
コード例 #6
0
ファイル: MetaLib.php プロジェクト: bharatm/NDL-VuFind
 /**
  * Initialise the object from the global
  *  search parameters in $_REQUEST.
  *
  * @return boolean
  * @access public
  */
 public function init()
 {
     // Call the standard initialization routine in the parent:
     parent::init();
     //********************
     // Check if we have a saved search to restore -- if restored successfully,
     // our work here is done; if there is an error, we should report failure;
     // if restoreSavedSearch returns false, we should proceed as normal.
     $restored = $this->restoreSavedSearch();
     if ($restored === true) {
         return true;
     } else {
         if (PEAR::isError($restored)) {
             return false;
         }
     }
     $this->initView();
     $this->initPage();
     $this->initSort();
     $this->initFilters();
     $this->initLimit();
     // Try to find a basic search first; check for advanced if no basic found.
     if (!$this->initBasicSearch()) {
         $this->initAdvancedSearch();
     }
     $this->set = isset($_REQUEST['set']) ? $_REQUEST['set'] : '';
     if (!isset($this->searchSets[$this->set]) && strncmp($this->set, '_ird:', 5) != 0) {
         reset($this->searchSets);
         $this->set = key($this->searchSets);
     }
     return true;
 }
コード例 #7
0
ファイル: SolrReserves.php プロジェクト: bharatm/NDL-VuFind
 /**
  * Initialise the object from the global
  *  search parameters in $_REQUEST.
  *
  * @return boolean
  * @access public
  */
 public function init()
 {
     // Call the standard initialization routine in the parent:
     parent::init();
     $this->initView();
     $this->initPage();
     $this->initSort();
     $this->initFilters();
     //********************
     // Basic Search logic
     return $this->initBasicSearch();
 }