mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
[SearchEngine] Move SearchEngineInetrface::status to SearchEngineInterface::getStatus
This commit is contained in:
@@ -137,7 +137,7 @@ class Dashboard implements ControllerProviderInterface
|
|||||||
'cache_flushed' => $request->query->get('flush_cache') === 'ok',
|
'cache_flushed' => $request->query->get('flush_cache') === 'ok',
|
||||||
'admins' => \User_Adapter::get_sys_admins($app),
|
'admins' => \User_Adapter::get_sys_admins($app),
|
||||||
'email_status' => $emailStatus,
|
'email_status' => $emailStatus,
|
||||||
'search_engine_status' => $app['phraseanet.SE']->status(),
|
'search_engine_status' => $app['phraseanet.SE']->getStatus(),
|
||||||
'php_version_constraints' => \setup::check_php_version(),
|
'php_version_constraints' => \setup::check_php_version(),
|
||||||
'writability_constraints' => \setup::check_writability($app['phraseanet.registry']),
|
'writability_constraints' => \setup::check_writability($app['phraseanet.registry']),
|
||||||
'binaries_constraints' => \setup::check_binaries($app['phraseanet.registry']),
|
'binaries_constraints' => \setup::check_binaries($app['phraseanet.registry']),
|
||||||
|
@@ -184,7 +184,7 @@ class PhraseaEngine implements SearchEngineInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function status()
|
public function getStatus()
|
||||||
{
|
{
|
||||||
$status = array();
|
$status = array();
|
||||||
foreach (phrasea_info() as $key => $value) {
|
foreach (phrasea_info() as $key => $value) {
|
||||||
|
@@ -35,7 +35,7 @@ interface SearchEngineInterface
|
|||||||
* @return array An array of key/value parameters
|
* @return array An array of key/value parameters
|
||||||
* @throws RuntimeException if something is wrong
|
* @throws RuntimeException if something is wrong
|
||||||
*/
|
*/
|
||||||
public function status();
|
public function getStatus();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ConfigurationPanelInterface
|
* @return ConfigurationPanelInterface
|
||||||
|
@@ -143,7 +143,7 @@ class SphinxSearchEngine implements SearchEngineInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function status()
|
public function getStatus()
|
||||||
{
|
{
|
||||||
if (false === $this->sphinx->Status()) {
|
if (false === $this->sphinx->Status()) {
|
||||||
throw new RuntimeException(_('Sphinx server is offline'));
|
throw new RuntimeException(_('Sphinx server is offline'));
|
||||||
|
@@ -325,7 +325,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
protected function get_gv_info(Application $app)
|
protected function get_gv_info(Application $app)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$SEStatus = $app['phraseanet.SE']->status();
|
$SEStatus = $app['phraseanet.SE']->getStatus();
|
||||||
} catch (\RuntimeException $e) {
|
} catch (\RuntimeException $e) {
|
||||||
$SEStatus = array('error' => $e->getMessage());
|
$SEStatus = array('error' => $e->getMessage());
|
||||||
}
|
}
|
||||||
|
@@ -503,7 +503,7 @@ abstract class SearchEngineAbstractTest extends \PhraseanetPHPUnitAuthenticatedA
|
|||||||
|
|
||||||
public function testStatus()
|
public function testStatus()
|
||||||
{
|
{
|
||||||
foreach (self::$searchEngine->status() as $StatusKeyValue) {
|
foreach (self::$searchEngine->getStatus() as $StatusKeyValue) {
|
||||||
$this->assertTrue(is_array($StatusKeyValue));
|
$this->assertTrue(is_array($StatusKeyValue));
|
||||||
$this->assertTrue(is_scalar($StatusKeyValue[0]));
|
$this->assertTrue(is_scalar($StatusKeyValue[0]));
|
||||||
$this->assertTrue(is_scalar($StatusKeyValue[1]));
|
$this->assertTrue(is_scalar($StatusKeyValue[1]));
|
||||||
|
Reference in New Issue
Block a user