Browse Source

Add "default_glossary_view" setting see BT#13077

jmontoyaa 7 years ago
parent
commit
c924845041
1 changed files with 5 additions and 1 deletions
  1. 5 1
      main/glossary/index.php

+ 5 - 1
main/glossary/index.php

@@ -371,8 +371,12 @@ switch ($action) {
             Session::write('glossary_view', $_GET['view']);
         } else {
             $view = Session::read('glossary_view');
+            $defaultView = api_get_configuration_value('default_glossary_view');
+            if (empty($defaultView)) {
+                $defaultView = 'table';
+            }
             if (empty($view)) {
-                Session::write('glossary_view', 'table');
+                Session::write('glossary_view', $defaultView);
             }
         }
         header('Location: '.$currentUrl);