Skip to content

Commit

Permalink
Merge pull request #159 from audetv/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
audetv authored Apr 28, 2023
2 parents 72776d5 + de98196 commit 612e7dc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 271 deletions.
4 changes: 1 addition & 3 deletions app/common/config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
],
],
'feature-toggle' => [
'features' => [
'SEARCH_FIX_DATE' => false,
],
'features' => [],
],
'indexes' => [
'common' => 'questions',
Expand Down
19 changes: 1 addition & 18 deletions app/frontend/controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace frontend\controllers;

use App\Contact\Http\Action\V1\Contact\ContactAction;
use App\FeatureToggle\FeatureFlag;
use App\forms\SearchForm;
use App\Question\Entity\Statistic\QuestionStatsRepository;
use App\Search\Http\Action\V1\SearchSettings\ToggleAction;
Expand All @@ -20,21 +19,18 @@ class SiteController extends Controller
{
private ManticoreService $service;
private QuestionStatsRepository $questionStatsRepository;
private FeatureFlag $flag;

public function __construct(
$id,
$module,
ManticoreService $service,
QuestionStatsRepository $questionStatsRepository,
FeatureFlag $flag,
$config = []
)
{
parent::__construct($id, $module, $config);
$this->service = $service;
$this->questionStatsRepository = $questionStatsRepository;
$this->flag = $flag;
}

/**
Expand Down Expand Up @@ -91,7 +87,7 @@ public function actions(): array
*
* @return string
*/
public function actionIndex($feature = null): string
public function actionIndex(): string
{
$this->layout = 'search';
$results = null;
Expand All @@ -106,19 +102,6 @@ public function actionIndex($feature = null): string
Yii::$app->session->setFlash('error', $e->getMessage());
}

foreach ($this->flag->features as $key => $value) {
if ($feature === $key) {
$this->flag->enable($key);
}
}

if ($this->flag->isEnabled('SEARCH_FIX_DATE')) {
return $this->render('feature/fix-index', [
'results' => $results ?? null,
'model' => $form,
]);
}

return $this->render('index', [
'results' => $results ?? null,
'model' => $form,
Expand Down
249 changes: 0 additions & 249 deletions app/frontend/views/site/feature/fix-index.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/helpers/VersionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VersionHelper
*/
public static function version(): string
{
$version = 'v0.4.0';
$version = 'v0.5.0';
return Html::a($version, 'https://github.com/audetv/fct-search/releases/latest', ['target' => '_blank']);
}
}

0 comments on commit 612e7dc

Please sign in to comment.