WIP more SS4 compatibility fixes
This commit is contained in:
parent
45473db303
commit
19b38e0811
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
namespace FulltextSearch;
|
||||
|
||||
use SilverStripe\View\ViewableData;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*
|
||||
* API very much still in flux.
|
||||
*/
|
||||
use SilverStripe\View\ViewableData;
|
||||
class SearchQuery extends ViewableData
|
||||
{
|
||||
public static $missing = null;
|
||||
|
|
|
@ -12,6 +12,14 @@
|
|||
*
|
||||
* TODO: The way we bind in is awful hacky.
|
||||
*/
|
||||
use SilverStripe\Core\Object;
|
||||
use SilverStripe\Control\RequestFilter;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Control\Session;
|
||||
use SilverStripe\ORM\DataModel;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class SearchUpdater extends Object
|
||||
{
|
||||
/**
|
||||
|
@ -206,12 +214,13 @@ class SearchUpdater extends Object
|
|||
|
||||
class SearchUpdater_BindManipulationCaptureFilter implements RequestFilter
|
||||
{
|
||||
public function preRequest(SS_HTTPRequest $request, Session $session, DataModel $model)
|
||||
|
||||
public function preRequest(HTTPRequest $request, Session $session, DataModel $model)
|
||||
{
|
||||
SearchUpdater::bind_manipulation_capture();
|
||||
}
|
||||
|
||||
public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model)
|
||||
public function postRequest(HTTPRequest $request, HTTPResponse $response, DataModel $model)
|
||||
{
|
||||
/* NOP */
|
||||
}
|
||||
|
|
|
@ -154,9 +154,10 @@ class Solr
|
|||
static $included = false;
|
||||
|
||||
if (!$included) {
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . Director::baseFolder() . '/fulltextsearch/thirdparty/solr-php-client');
|
||||
require_once('Apache/Solr/Service.php');
|
||||
require_once('Apache/Solr/Document.php');
|
||||
$solr_php_path = BASE_PATH . DIRECTORY_SEPARATOR . 'fulltextsearch/thirdparty/solr-php-client';
|
||||
set_include_path($solr_php_path);
|
||||
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Service.php');
|
||||
require_once($solr_php_path . DIRECTORY_SEPARATOR . 'Apache/Solr/Document.php');
|
||||
|
||||
$included = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue