diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php index ee8e61c421..966e37f9bb 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php @@ -97,41 +97,41 @@ class QueryController extends Controller } for ($i = 1; ($i <= 4 && (($i <= $npages) === true)); $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } if ($npages > 4) $string .= ""; - $string .= ""; + $string .= ''; } else { $start = $npages - 4; if (($start) > 0){ - $string .= ""; - $string .= ""; + $string .= ''; + $string .= ''; }else $start = 1; for ($i = ($start); $i <= $npages; $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } if($page < $npages){ $string .= ""; } } } else { - $string .= ""; + $string .= ''; for ($i = ($page - 2); $i <= ($page + 2); $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } - $string .= ""; + $string .= ''; } } $string .= '
'; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php index be23d9ba4f..01e20fbf6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php @@ -76,14 +76,7 @@ class RootController extends Controller $thjslist = ""; - $queries_topics = ''; - $conf = $this->getConf(); - if ($conf->get(['registry', 'classic', 'render-topics']) == 'popups') { - $queries_topics = \queries::dropdown_topics($this->app['translator'], $this->app['locale']); - } elseif ($conf->get(['registry', 'classic', 'render-topics']) == 'tree') { - $queries_topics = \queries::tree_topics($this->app['locale']); - } $sbas = $bas2sbas = []; @@ -130,9 +123,7 @@ class RootController extends Controller 'feeds' => $feeds, 'aggregate' => $aggregate, 'GV_google_api' => $conf->get(['registry', 'webservices', 'google-charts-enabled']), - 'queries_topics' => $queries_topics, 'search_status' => \databox_status::getSearchStatus($this->app), - 'queries_history' => \queries::history($this->app, $user->getId()), 'thesau_js_list' => $thjslist, 'thesau_json_sbas' => json_encode($sbas), 'thesau_json_bas2sbas' => json_encode($bas2sbas), diff --git a/lib/classes/queries.php b/lib/classes/queries.php deleted file mode 100644 index 66ef36abfd..0000000000 --- a/lib/classes/queries.php +++ /dev/null @@ -1,286 +0,0 @@ -display->css; - } - - $out .= ''; - - $out .='
-
'; - - if ($sxTopics) { - $defaultview = mb_strtolower($sxTopics->display->defaultview); - if ( ! $defaultview) - $defaultview = 'static'; - $out .= ( "\n"); - } - - $out .= '
-
'; - - return $out; - } - - public static function topics_exists($I18n) - { - if (file_exists(__DIR__ . '/../../config/topics/topics_' . $I18n . '.xml')) { - return true; - } - - if (file_exists(__DIR__ . '/../../config/topics/topics.xml')) { - return true; - } - - return false; - } - - public static function dropdown_topics(TranslatorInterface $translator, $I18n) - { - $out = ''; - - $xmlTopics = ''; - $sxTopics = null; - - if (file_exists(__DIR__ . '/../../config/topics/topics_' . $I18n . '.xml')) - $xmlTopics = __DIR__ . '/../../config/topics/topics_' . $I18n . '.xml'; - - if ($xmlTopics == '') { - if (file_exists(__DIR__ . '/../../config/topics/topics.xml')) { - $xmlTopics = __DIR__ . '/../../config/topics/topics.xml'; - } - } - - if ($xmlTopics == '') { - return ''; - } - - $jsTopics = 'null'; - $maxdepth = 0; - if (false !== $sxTopics = simplexml_load_file($xmlTopics)) { - $jsTopics = self::topicsAsJS($sxTopics->topics, 0, $maxdepth); - } - - $out .= ' '; - - $out .= '
-
-
- - - - -
' . $translator->trans('boutton::chercher') . ' : -
- ' . $translator->trans('client::recherche: dans les categories') . '
'; - - for ($i = 0; $i <= $maxdepth; $i ++) { - $out .= '

- -

'; - } - $out .= '
- -
-
-
-
- '; - - return $out; - } - - public static function history(Application $app, $usrId) - { - $history = '