diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 74dead2df..fbc15967d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,10 +2,31 @@ ## Release 4.10 - 2026-05-12 -### Update +Der neue Release bringt insbesondere Veränderungen bei der Sprachverwaltung und +den Optionen, die in der Administration editierbar sind. + +### Update auf OPUS 4.10 + +Das Updateskript, `bin/update.sh`, muss ausgeführt werden, da es Änderungen an +der Datenbank und weitere Updateschritte gibt. + +- Tabelle `configuration` wird angelegt +- Tabelle `languages` wird entfernt +- Konfiguration in `config.xml` with in die Datenbank übertragen und die + Datei optional gelöscht +- Aktive Sprachen werden in neue Konfigurationsoptionen übernommen -Das Updateskript muss ausgeführt werden, da es Änderungen an der Datenbank und -zusätzliche Updateschritte gibt. +### Sprachverwaltung + +Die Sprachverwaltung wurde aus der Administration entfernt. Dafür werden jetzt +485 ISO 639 Sprachen im Standard unterstützt. Welche Sprachen in den Formularen +zur Auswahl stehen sollen, lässt sich über Optionen einstellen. + +Mehr dazu findet sich im OPUS 4 Handbuch unter +https://www.opus-repository.org/userdoc/admin/languages.html + +Beim Update werden die aktiven Sprachen automatisch in die neue Konfiguration +übernommen. ### Konfiguration @@ -18,8 +39,6 @@ Die editierbaren Optionen werden nun in `application/configs/options.yml` definiert. Generell kann die Liste lokal erweitert werden. Im Standard werden im Laufe der Zeit mehr Optionen in der Weboberfläche verfügbar gemacht werden. -TODO Link to documentation - ### RSS-Links RSS-Links können nun ausgeblendet werden. Sie werden automatisch ausgeblendet, diff --git a/application/configs/application.ini b/application/configs/application.ini index 9a5515e18..98c5f7dc9 100644 --- a/application/configs/application.ini +++ b/application/configs/application.ini @@ -61,7 +61,11 @@ db.debug = 0 ; LOCALE SETTINGS resources.locale.default = 'de' -; SUPPORTED LANGUAGES +; Languages selectable for documents +i18n.languages.active = deu, eng, fra, rus, spa, mul +i18n.languages.sortByName = 0 + +; SUPPORTED USER INTERFACE LANGUAGES supportedLanguages = de,en ;GENERAL SETTINGS diff --git a/application/configs/navigationModules.xml b/application/configs/navigationModules.xml index 9f00eac02..ce1a1cf7c 100644 --- a/application/configs/navigationModules.xml +++ b/application/configs/navigationModules.xml @@ -364,50 +364,6 @@ - - mvc - - admin_title_languages_description - group-cafelatte - admin - language - index - languages - - - mvc - - admin - language - show - - - - mvc - - admin - language - new - - - - mvc - - admin - language - edit - - - - mvc - - admin - language - delete - - - - mvc diff --git a/application/configs/options.yml b/application/configs/options.yml index 4652309ad..b4c1e7851 100644 --- a/application/configs/options.yml +++ b/application/configs/options.yml @@ -1,3 +1,28 @@ +# +# Defines options available in administration user interface (Settings->Options). +# +# The 'type' defines how the option appears in the form. Supported types are +# - string (default) +# - int +# - bool +# +# The 'section' allows grouping options. The names are arbitrary and are used as section +# labels if no translations for the section exist. +# +# 'options' can be used to pass additional options to the form element, for +# instance to increase the size. +# +# The translation keys for options use the following patterns: +# - admin_config_section_SECTIONNAME +# - admin_config_OPTIONKEY +# - admin_config_OPTIONKEY_description +# +# For instance: +# - admin_config_section_languages +# - admin_config_i18n.languages.active +# - admin_config_i18n.languages.active_description +# + searchengine.solr.parameterDefaults.rows: type: int section: searching @@ -7,3 +32,13 @@ searchengine.solr.parameterDefaults.rows: browsing.series.sortByTitle: type: bool section: browsing + +i18n.languages.active: + type: string + section: languages + options: + size: 60 + +i18n.languages.sortByName: + type: bool + section: languages diff --git a/composer.json b/composer.json index 2de75308e..3aa80256f 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "ext-yaml": "*", "opus4/zf1-future": "1.25.*", "jpgraph/jpgraph": "dev-master", - "opus4-repo/opus4-common": "^4.9", - "opus4-repo/framework": "dev-master as 4.10", + "opus4-repo/opus4-common": "dev-master as 4.10", + "opus4-repo/framework": "dev-lang407 as 4.10", "opus4-repo/search": "^4.9", "opus4-repo/opus4-bibtex": "^4.9", "opus4-repo/opus4-import": "^4.9", @@ -34,6 +34,7 @@ "opus4-repo/opus4-sword": "^4.9", "opus4-repo/opus4-app-common": "dev-main as 4.10", "opus4-repo/opus4-deepgreen": "^4.9", + "opus4-repo/opus4-i18n": "dev-main as 4.10", "components/jquery": "3.4.*", "components/jqueryui": "1.12.*", "oomphinc/composer-installers-extender": "^2.0", diff --git a/db/masterdata/002_create_languages.sql b/db/masterdata/002_create_languages.sql deleted file mode 100644 index 6f44a3bd6..000000000 --- a/db/masterdata/002_create_languages.sql +++ /dev/null @@ -1,44 +0,0 @@ --- MySQL dump 10.11 --- --- Server version 5.0.67-0ubuntu6 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Dumping data for table `languages` --- Based on http://sil.org/iso639-3/iso-639-3_20090210.tab --- - -LOCK TABLES `languages` WRITE; -/*!40000 ALTER TABLE `languages` DISABLE KEYS */; -INSERT INTO `languages` (`id`, `part2_b`, `part2_t`, `part1`, `scope`, `type`, `ref_name`, `comment`, `active`) VALUES -('1','ger','deu','de','I','L','German','',1), -('2','eng','eng','en','I','L','English','',1), -('3','ita','ita','it','I','L','Italian','',0), -('4','fre','fra','fr','I','L','French','',1), -('5','por','por','pt','I','L','Portuguese','',0), -('6','rus','rus','ru','I','L','Russian','',1), -('7','spa','spa','es','I','L','Spanish','',1), -('8','mul','mul','','I','L','Multiple languages','',1); -/*!40000 ALTER TABLE `languages` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2009-04-09 8:56:35 diff --git a/db/masterdata/022-set-opus-version.sql b/db/masterdata/022-set-opus-version.sql index 9c81e0eb0..d2316260f 100644 --- a/db/masterdata/022-set-opus-version.sql +++ b/db/masterdata/022-set-opus-version.sql @@ -11,7 +11,7 @@ START TRANSACTION; -- Set internal OPUS version (for controlling updates) TRUNCATE TABLE `opus_version`; -INSERT INTO `opus_version` (`version`) VALUES (21); +INSERT INTO `opus_version` (`version`) VALUES (22); COMMIT; diff --git a/library/Application/Controller/Action/Helper/Translation.php b/library/Application/Controller/Action/Helper/Translation.php index 17574d8c8..b92a9940c 100644 --- a/library/Application/Controller/Action/Helper/Translation.php +++ b/library/Application/Controller/Action/Helper/Translation.php @@ -31,7 +31,6 @@ use Opus\Common\Enrichment; use Opus\Document; -use Opus\Language; /** * Helper for handling translations. @@ -103,12 +102,7 @@ public function getKeyForField($modelName, $fieldName) $translationKey = $this->normalizeModelName($modelName) . '_' . $fieldName; return preg_replace('/Opus_Common_/', 'Opus_', $translationKey); // TODO LAMINAS fix keys } else { - switch ($modelName) { - case Language::class: - return $this->normalizeModelName($modelName) . '_' . $fieldName; - default: - return $fieldName; - } + return $fieldName; } } diff --git a/library/Application/Form/Element/Language.php b/library/Application/Form/Element/Language.php index acfe7e09f..bd65e7383 100644 --- a/library/Application/Form/Element/Language.php +++ b/library/Application/Form/Element/Language.php @@ -29,7 +29,10 @@ * @license http://www.gnu.org/licenses/gpl.html General Public License */ -use Opus\Common\Language; +use Opus\App\Common\Configuration; +use Opus\Common\Log; +use Opus\I18n\I18nException; +use Opus\I18n\Languages; /** * TODO override setLabel for more robust translation @@ -52,6 +55,23 @@ public function init() } } + /** + * @param string|null $value + * @return void + */ + public function setValue($value) + { + if ($value !== null) { + $language = Languages::getLanguage($value); + + if (null !== $language) { + $value = $language->getId(); + } + } + + parent::setValue($value); + } + /** * @return array */ @@ -65,15 +85,68 @@ public static function getLanguageList() /** * Setup language list. + * + * TODO reduce responsibilities of this function */ public static function initLanguageList() { + $config = Configuration::getInstance()->getConfig(); + + if (! isset($config->i18n->languages->active)) { + throw new Exception('no active languages configured'); + } + + $optionValue = $config->i18n->languages->active; + + if (strlen(trim($optionValue)) > 0) { + // Use configured languages + $activeLanguages = explode(',', $optionValue); + } else { + // Use all languages + $helper = new Languages(); + $activeLanguages = array_keys($helper->getAllAsArray()); + } + + $activeLanguages = array_filter($activeLanguages, function ($lang) { + return ! empty($lang); + }); + + if (isset($config->i18n->languages->local)) { + $localLanguages = $config->i18n->languages->local->toArray(); + $languages = new Languages(); + try { + $languages->addLanguages($localLanguages); + } catch (I18nException $ex) { + Log::get()->err('Error loading local languages: ' . $ex->getMessage()); + } + } + $translate = Application_Translate::getInstance(); + $locale = $translate->getLocale(); + $languages = []; - foreach (Language::getAllActiveTable() as $languageRow) { - $langId = $languageRow['part2_t']; - $languages[$langId] = $translate->translateLanguage($langId); + + foreach ($activeLanguages as $lang) { + $part2b = trim($lang); + $language = Languages::getLanguage($part2b); + + if ($language === null) { + Log::get()->err("Language '{$part2b}' not found"); + continue; + } + + $langId = $language->getPart2t(); + $translation = $language->getDisplayName($locale); + + // TODO support local translations + + $languages[$langId] = $translation; } + + if (isset($config->i18n->languages->sortByName) && filter_var($config->i18n->languages->sortByName, FILTER_VALIDATE_BOOLEAN)) { + asort($languages); + } + self::$languageList = $languages; } } diff --git a/library/Application/Form/Element/LanguageType.php b/library/Application/Form/Element/LanguageType.php deleted file mode 100644 index b00fafcea..000000000 --- a/library/Application/Form/Element/LanguageType.php +++ /dev/null @@ -1,44 +0,0 @@ -addMultiOption($value, 'Opus_Language_Type_Value_' . $value); - } - } -} diff --git a/library/Application/Security/AclProvider.php b/library/Application/Security/AclProvider.php index 678ba3519..3d7256192 100644 --- a/library/Application/Security/AclProvider.php +++ b/library/Application/Security/AclProvider.php @@ -65,7 +65,6 @@ class Application_Security_AclProvider 'licences', 'collections', 'series', - 'languages', 'statistics', 'institutions', 'enrichments', diff --git a/library/Application/View/Helper/DocumentAbstract.php b/library/Application/View/Helper/DocumentAbstract.php index 75b534ea7..5a0ba612b 100644 --- a/library/Application/View/Helper/DocumentAbstract.php +++ b/library/Application/View/Helper/DocumentAbstract.php @@ -30,7 +30,7 @@ */ use Opus\Common\DocumentInterface; -use Opus\Common\Language; +use Opus\I18n\Languages; /** * Helper for printing the abstract of a OPUS document. @@ -48,7 +48,7 @@ class Application_View_Helper_DocumentAbstract extends Application_View_Helper_D public function documentAbstract($document = null) { if ($this->isPreferUserInterfaceLanguage()) { - $language = Language::getPart2tForPart1(Application_Translate::getInstance()->getLocale()); + $language = Languages::getPart2t(Application_Translate::getInstance()->getLocale()); $abstract = $document->getMainAbstract($language); } else { diff --git a/library/Application/View/Helper/DocumentTitle.php b/library/Application/View/Helper/DocumentTitle.php index e62177eed..9672553d8 100644 --- a/library/Application/View/Helper/DocumentTitle.php +++ b/library/Application/View/Helper/DocumentTitle.php @@ -30,7 +30,7 @@ */ use Opus\Common\DocumentInterface; -use Opus\Common\Language; +use Opus\I18n\Languages; /** * Helper for printing the title of a OPUS document. @@ -55,7 +55,7 @@ class Application_View_Helper_DocumentTitle extends Application_View_Helper_Docu public function documentTitle($document = null) { if ($this->isPreferUserInterfaceLanguage()) { - $language = Language::getPart2tForPart1(Application_Translate::getInstance()->getLocale()); + $language = Languages::getPart2t(Application_Translate::getInstance()->getLocale()); $title = $document->getMainTitle($language); } else { diff --git a/library/Application/View/Helper/LanguageWebForm.php b/library/Application/View/Helper/LanguageWebForm.php index 2bad888c3..a102ee810 100644 --- a/library/Application/View/Helper/LanguageWebForm.php +++ b/library/Application/View/Helper/LanguageWebForm.php @@ -29,7 +29,7 @@ * @license http://www.gnu.org/licenses/gpl.html General Public License */ -use Opus\Common\Language; +use Opus\I18n\Languages; /** * View helper for tranform long language form in short language form (Part2 in Part1). @@ -55,8 +55,7 @@ class Application_View_Helper_LanguageWebForm extends Zend_View_Helper_Abstract public function languageWebForm($value) { if (! array_key_exists($value, $this->langCache)) { - $lang = Language::getPropertiesByPart2T($value); - $this->langCache[$value] = $lang['part1']; + $this->langCache[$value] = Languages::getPart1($value); } return $this->langCache[$value]; } diff --git a/modules/admin/controllers/LanguageController.php b/modules/admin/controllers/LanguageController.php deleted file mode 100644 index 52e7238ea..000000000 --- a/modules/admin/controllers/LanguageController.php +++ /dev/null @@ -1,57 +0,0 @@ -setFormClass(Admin_Form_Language::class); - parent::init(); - } - - /** - * @param LanguageInterface $model - * @return bool - */ - public function isDeletable($model) - { - return ! $model->isUsed(); - } -} diff --git a/modules/admin/forms/Configuration.php b/modules/admin/forms/Configuration.php index 8d850fa7b..3fb9d6375 100644 --- a/modules/admin/forms/Configuration.php +++ b/modules/admin/forms/Configuration.php @@ -129,7 +129,7 @@ public function updateModel($config) if (is_array($value)) { $value = implode(',', $value); } - if (strlen(trim($value)) === 0) { + if ($value !== null && strlen(trim($value)) === 0) { $value = null; } diff --git a/modules/admin/forms/Document/Tags.php b/modules/admin/forms/Document/Tags.php index b7ba242b5..e6ba9093c 100644 --- a/modules/admin/forms/Document/Tags.php +++ b/modules/admin/forms/Document/Tags.php @@ -30,7 +30,7 @@ */ use Opus\Common\DocumentInterface; -use Opus\Common\Language; +use Opus\I18m\Languages; /** * Unterformular fuer GND Subjects im Metadaten-Formular. @@ -186,7 +186,7 @@ public function processPost($data, $context) $lang = $data[self::ELEMENT_LANGUAGE]; if ($lang === null) { $translate = Application_Translate::getInstance(); - $lang = Language::getPart2tForPart1($translate->getLocale()); + $lang = Languages::getPart2t($translate->getLocale()); } $this->addMultipleSubjectsFromString($data[self::ELEMENT_SUBJECTS], $lang); return Admin_Form_Document::RESULT_SHOW; diff --git a/modules/admin/forms/Language.php b/modules/admin/forms/Language.php deleted file mode 100644 index b7519298a..000000000 --- a/modules/admin/forms/Language.php +++ /dev/null @@ -1,95 +0,0 @@ -setRemoveEmptyCheckbox(false); - $this->setLabelPrefix('Opus_Language_'); - $this->setUseNameAsLabel(true); - $this->setModelClass(Language::class); - - $this->addElement('checkbox', self::ELEMENT_ACTIVE); - $this->addElement('text', self::ELEMENT_REFNAME, ['required' => true]); - $this->addElement('text', self::ELEMENT_PART2T, ['required' => true]); - $this->addElement('text', self::ELEMENT_PART2B); - $this->addElement('text', self::ELEMENT_PART1); - $this->addElement('LanguageScope', self::ELEMENT_SCOPE); - $this->addElement('LanguageType', self::ELEMENT_TYPE); - $this->addElement('text', self::ELEMENT_COMMENT); - } - - /** - * @param LanguageInterface $language - */ - public function populateFromModel($language) - { - $this->getElement(self::ELEMENT_MODEL_ID)->setValue($language->getId()); - $this->getElement(self::ELEMENT_ACTIVE)->setValue($language->getActive()); - $this->getElement(self::ELEMENT_PART2B)->setValue($language->getPart2B()); - $this->getElement(self::ELEMENT_PART2T)->setValue($language->getPart2T()); - $this->getElement(self::ELEMENT_PART1)->setValue($language->getPart1()); - $this->getElement(self::ELEMENT_SCOPE)->setValue($language->getScope()); - $this->getElement(self::ELEMENT_TYPE)->setValue($language->getType()); - $this->getElement(self::ELEMENT_REFNAME)->setValue($language->getRefName()); - $this->getElement(self::ELEMENT_COMMENT)->setValue($language->getComment()); - } - - /** - * @param LanguageInterface $language - */ - public function updateModel($language) - { - $language->setActive($this->getElementValue(self::ELEMENT_ACTIVE)); - $language->setPart2B($this->getElementValue(self::ELEMENT_PART2B)); - $language->setPart2T($this->getElementValue(self::ELEMENT_PART2T)); - $language->setPart1($this->getElementValue(self::ELEMENT_PART1)); - $language->setScope($this->getElementValue(self::ELEMENT_SCOPE)); - $language->setType($this->getElementValue(self::ELEMENT_TYPE)); - $language->setRefName($this->getElementValue(self::ELEMENT_REFNAME)); - $language->setComment($this->getElementValue(self::ELEMENT_COMMENT)); - } -} diff --git a/modules/admin/language/config.tmx b/modules/admin/language/config.tmx index 1211c5130..0ca26d1ca 100644 --- a/modules/admin/language/config.tmx +++ b/modules/admin/language/config.tmx @@ -49,7 +49,7 @@ Browsing - Browsing + Browsen @@ -116,6 +116,33 @@ + + + Selectable languages + + + Auswählbare Sprachen + + + + + + Languages selectable for a document (ISO 639). + + + Sprachen, die für ein Dokument auswählbar sind (ISO 639). + + + + + + Sort alphabetical + + + Alphabetisch sortieren + + + diff --git a/modules/admin/language/language.tmx b/modules/admin/language/language.tmx deleted file mode 100644 index 9e8f4e1aa..000000000 --- a/modules/admin/language/language.tmx +++ /dev/null @@ -1,138 +0,0 @@ - - - - -
-
- - - - - - 639-2 Identifier (bibliographic code) - - - 639-2 Bezeichner (bibliografischer Code) - - - - - - 639-2 Identifier (terminology code) - - - 639-2 Bezeichner (Terminologie-Code) - - - - - - 639-1 identifier - - - 639-1 Bezeichnung - - - - - - Scope - - - Umfang - - - - - - Type - - - Typ - - - - - - Language Name - - - Sprache - - - - - - Comment - - - Kommentar - - - - - - Active - - - Aktiv - - - - - - Store Data - - - Daten abspeichern - - - - - - Edit Language - - - Sprache ändern - - - - - - New Language - - - Neue Sprache - - - - - - Admin Languages - - - Sprachen verwalten - - - - - - Show Language - - - Sprache anzeigen - - - - - - Delete Language - - - Sprache löschen - - - - - -
diff --git a/modules/admin/language/resources.tmx b/modules/admin/language/resources.tmx index d2edd47f6..e33e644b7 100644 --- a/modules/admin/language/resources.tmx +++ b/modules/admin/language/resources.tmx @@ -34,15 +34,6 @@ - - - Manage languages - - - Sprachen verwalten - - - Manage licences diff --git a/modules/default/language/fieldvalues.tmx b/modules/default/language/fieldvalues.tmx index 3b9c85651..47f4e9fc1 100644 --- a/modules/default/language/fieldvalues.tmx +++ b/modules/default/language/fieldvalues.tmx @@ -698,105 +698,6 @@ - - - - - - - - - - - - - - Individual - - - Individuell - - - - - - Macrolanguage - - - Macrosprache - - - - - - Special - - - Spezial - - - - - - - - - - - - - - - - - Ancient - - - Antik - - - - - - Constructed - - - Konstruiert - - - - - - Extinct - - - Ausgestorben - - - - - - Historical - - - Historisch - - - - - - Living - - - Lebend - - - - - - Special - - - Spezial - - - NULL diff --git a/modules/oai/models/DefaultServer.php b/modules/oai/models/DefaultServer.php index 501d71760..f9f03a2f0 100644 --- a/modules/oai/models/DefaultServer.php +++ b/modules/oai/models/DefaultServer.php @@ -335,7 +335,10 @@ protected function handleRequestIntern($oaiRequest, $requestUri) */ protected function setupProcessor() { - $this->proc->registerPHPFunctions('Opus\Common\Language::getLanguageCode'); + $this->proc->registerPHPFunctions([ + 'Opus\I18n\Languages::getPart1', + 'Opus\I18n\Languages::getPart2b', + ]); Application_Xslt::registerViewHelper($this->proc, $this->getViewHelpers()); $this->proc->setParameter('', 'urnResolverUrl', $this->getConfig()->urn->resolverUrl); $this->proc->setParameter('', 'doiResolverUrl', $this->getConfig()->doi->resolverUrl); diff --git a/modules/oai/views/scripts/index/prefixes/XMetaDissPlus.xslt b/modules/oai/views/scripts/index/prefixes/XMetaDissPlus.xslt index a85b7d963..dc146654e 100644 --- a/modules/oai/views/scripts/index/prefixes/XMetaDissPlus.xslt +++ b/modules/oai/views/scripts/index/prefixes/XMetaDissPlus.xslt @@ -152,7 +152,7 @@ - + @@ -254,7 +254,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -369,7 +369,7 @@ - + diff --git a/modules/oai/views/scripts/index/prefixes/oai_dc.xslt b/modules/oai/views/scripts/index/prefixes/oai_dc.xslt index b47c5d058..7a2d4a415 100644 --- a/modules/oai/views/scripts/index/prefixes/oai_dc.xslt +++ b/modules/oai/views/scripts/index/prefixes/oai_dc.xslt @@ -138,7 +138,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -218,7 +218,7 @@ - + @@ -362,7 +362,7 @@ - + diff --git a/scripts/update/021-Move-config-xml-to-db.php b/scripts/update/021-Move-config-xml-to-db.php index 1e1cd8c32..6fd9cbf53 100755 --- a/scripts/update/021-Move-config-xml-to-db.php +++ b/scripts/update/021-Move-config-xml-to-db.php @@ -53,7 +53,7 @@ // Import options from config.xml $config = new Zend_Config_Xml($configPath); $configDatabase = new Configuration(); -$configDatabase->import($config, true); +$configDatabase->import($config, false); // No reset because `MigrateLanguages` schema update creates options // Show imported options $imported = $configDatabase->getConfig(); diff --git a/library/Application/Form/Element/LanguageScope.php b/scripts/update/022-Remove-resource_languages.php old mode 100644 new mode 100755 similarity index 78% rename from library/Application/Form/Element/LanguageScope.php rename to scripts/update/022-Remove-resource_languages.php index faae0a3f3..44a261f6f --- a/library/Application/Form/Element/LanguageScope.php +++ b/scripts/update/022-Remove-resource_languages.php @@ -25,20 +25,21 @@ * along with OPUS; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @copyright Copyright (c) 2008, OPUS 4 development team + * @copyright Copyright (c) 2026, OPUS 4 development team * @license http://www.gnu.org/licenses/gpl.html General Public License */ -class Application_Form_Element_LanguageScope extends Application_Form_Element_SelectWithNull -{ - public function init() - { - parent::init(); +require_once dirname(__FILE__) . '/../common/update.php'; - $values = ['Null', 'I', 'M', 'S']; +use Opus\SecurityStorage; +use Symfony\Component\Console\Output\ConsoleOutput; - foreach ($values as $value) { - $this->addMultiOption($value, 'Opus_Language_Scope_Value_' . $value); - } - } -} +$output = new ConsoleOutput(); + +$output->writeln(''); +$output->write('Removing \'resource_languages\' from role permissions...'); + +$security = new SecurityStorage(); +$security->removeResource('resource_languages'); + +$output->writeln(' done'); diff --git a/tests/library/Application/Controller/Action/Helper/TranslationTest.php b/tests/library/Application/Controller/Action/Helper/TranslationTest.php index b5e890a27..befa9ffdd 100644 --- a/tests/library/Application/Controller/Action/Helper/TranslationTest.php +++ b/tests/library/Application/Controller/Action/Helper/TranslationTest.php @@ -30,7 +30,6 @@ */ use Opus\Common\Identifier; -use Opus\Common\Language; use Opus\Common\Model\ModelException; use Opus\Common\Note; use Opus\Common\Person; @@ -281,14 +280,4 @@ public function testTranslationOfOpusEnrichmentFields($className) ); } } - - public function testTranslationOfLanguages() - { - $languages = Language::getAll(); - - foreach ($languages as $language) { - $key = $language->getPart2T(); - $this->assertNotEquals($key, $this->translate->translateLanguage($key)); - } - } } diff --git a/tests/library/Application/Form/Element/LanguageScopeTest.php b/tests/library/Application/Form/Element/LanguageScopeTest.php deleted file mode 100644 index 0b495cacb..000000000 --- a/tests/library/Application/Form/Element/LanguageScopeTest.php +++ /dev/null @@ -1,83 +0,0 @@ -keys = ['Null', 'I', 'M', 'S']; - - $this->formElementClass = 'Application_Form_Element_LanguageScope'; - $this->expectedDecorators = [ - 'ViewHelper', - 'Errors', - 'Description', - 'ElementHtmlTag', - 'LabelNotEmpty', - 'dataWrapper', - 'ElementHint', - ]; - $this->expectedDecoratorCount = count($this->expectedDecorators); - $this->staticViewHelper = 'viewFormSelect'; - parent::setUp(); - } - - public function testOptions() - { - $element = $this->getElement(); - - $options = $element->getMultiOptions(); - - $this->assertEquals(count($this->keys), count($options)); - - foreach ($this->keys as $key) { - $this->assertTrue(array_key_exists($key, $options), "Key '$key' is missing."); - } - } - - public function testOptionsTranslated() - { - $translator = Application_Translate::getInstance(); - - foreach ($this->keys as $key) { - $this->assertTrue( - $translator->isTranslated('Opus_Language_Scope_Value_' . $key), - "Key '$key' not translated." - ); - } - } -} diff --git a/tests/library/Application/Form/Element/LanguageTest.php b/tests/library/Application/Form/Element/LanguageTest.php index 31a4b9f4f..68c6e1b25 100644 --- a/tests/library/Application/Form/Element/LanguageTest.php +++ b/tests/library/Application/Form/Element/LanguageTest.php @@ -95,6 +95,13 @@ public function testValidation() $this->assertTrue($element->isValid('deu')); } + public function testAutoMapValueToLanguageId() + { + $element = $this->getElement(); + $element->setValue('ger'); + $this->assertEquals('deu', $element->getValue()); + } + public function testUnknownLanguage() { $this->markTestIncomplete(); diff --git a/tests/library/Application/Form/Element/LanguageTypeTest.php b/tests/library/Application/Form/Element/LanguageTypeTest.php deleted file mode 100644 index b71d49e30..000000000 --- a/tests/library/Application/Form/Element/LanguageTypeTest.php +++ /dev/null @@ -1,79 +0,0 @@ -keys = ['Null', 'A', 'C', 'E', 'H', 'L', 'S']; - $this->formElementClass = 'Application_Form_Element_LanguageType'; - $this->expectedDecorators = [ - 'ViewHelper', - 'Errors', - 'Description', - 'ElementHtmlTag', - 'LabelNotEmpty', - 'dataWrapper', - 'ElementHint', - ]; - $this->expectedDecoratorCount = count($this->expectedDecorators); - $this->staticViewHelper = 'viewFormSelect'; - parent::setUp(); - } - - public function testOptions() - { - $element = $this->getElement(); - - $options = $element->getMultiOptions(); - - $this->assertEquals(count($this->keys), count($options)); - - foreach ($this->keys as $key) { - $this->assertTrue(array_key_exists($key, $options), "Key '$key' is missing."); - } - } - - public function testOptionsTranslated() - { - $translator = Application_Translate::getInstance(); - - foreach ($this->keys as $key) { - $this->assertTrue($translator->isTranslated('Opus_Language_Type_Value_' . $key)); - } - } -} diff --git a/tests/library/Application/Security/AccessTest.php b/tests/library/Application/Security/AccessTest.php index 4c2a385ab..842c09b54 100644 --- a/tests/library/Application/Security/AccessTest.php +++ b/tests/library/Application/Security/AccessTest.php @@ -57,7 +57,6 @@ public function testLicenceAdminMenuFiltering() $this->assertNotQuery('//a[@href="/review"]'); $this->assertNotQuery('//a[@href="/admin/collectionroles"]'); $this->assertNotQuery('//a[@href="/admin/series"]'); - $this->assertNotQuery('//a[@href="/admin/language"]'); $this->assertNotQuery('//a[@href="/admin/index/security"]'); $this->assertNotQuery('//a[@href="/admin/dnbinstitute"]'); } diff --git a/tests/modules/MainMenuTest.php b/tests/modules/MainMenuTest.php index 3077d9049..668676270 100644 --- a/tests/modules/MainMenuTest.php +++ b/tests/modules/MainMenuTest.php @@ -78,7 +78,6 @@ public function testAdminControllerIndexPages() "/admin/collectionroles", "/admin/series", "/admin/security", - "/admin/language", "/admin/statistic", "/admin/oailink", "/admin/dnbinstitute", diff --git a/tests/modules/admin/controllers/DnbinstituteControllerTest.php b/tests/modules/admin/controllers/DnbinstituteControllerTest.php index beb251f73..bfe098340 100644 --- a/tests/modules/admin/controllers/DnbinstituteControllerTest.php +++ b/tests/modules/admin/controllers/DnbinstituteControllerTest.php @@ -342,7 +342,7 @@ public function testUserAccessToInstituteWithoutInstituteRights() $testRole = UserRole::new(); $testRole->setName('TestRole'); $testRole->appendAccessModule('admin'); - $testRole->appendAccessModule('resource_languages'); + $testRole->appendAccessModule('resource_collections'); $this->roleId = $testRole->store(); $userAccount = Account::new(); diff --git a/tests/modules/admin/controllers/LanguageControllerTest.php b/tests/modules/admin/controllers/LanguageControllerTest.php deleted file mode 100644 index ddd306b9d..000000000 --- a/tests/modules/admin/controllers/LanguageControllerTest.php +++ /dev/null @@ -1,295 +0,0 @@ -setController('language'); - parent::setUp(); - } - - /** - * @return LanguageInterface[] - */ - public function getModels() - { - return Language::getAll(); - } - - public function testShowAction() - { - $this->createsModels = true; - - $language = Language::new(); - - $language->setActive(true); - $language->setRefName('German'); - $language->setPart2T('deu'); - $language->setPart2B('ger'); - $language->setPart1('de'); - $language->setScope('I'); - $language->setType('L'); - $language->setComment('test comment'); - - $modelId = $language->store(); - - $this->dispatch('/admin/language/show/id/' . $modelId); - - $model = Language::get($modelId); - $model->delete(); - - $this->assertResponseCode(200); - $this->assertController('language'); - $this->assertAction('show'); - - $this->assertQueryContentRegex('div#Active', '/Yes|Ja/'); - $this->assertQueryContentContains('div#RefName', 'German'); - $this->assertQueryContentContains('div#Part2T', 'deu'); - $this->assertQueryContentContains('div#Part2B', 'ger'); - $this->assertQueryContentContains('div#Part1', 'de'); - $this->assertQueryContentRegex('div#Scope', '/Individual|Individuell/'); - $this->assertQueryContentRegex('div#Type', '/Living|Lebend/'); - $this->assertQueryContentContains('div#Comment', 'test comment'); - - // TODO $this->validateXHTML(); - } - - /** - * Test, ob Active Status für Wert false (0) angezeigt wird. - */ - public function testShowActiveValueForInactiveLicence() - { - $this->dispatch('/admin/language/show/id/3'); // Italian (3) is disabled - $this->assertResponseCode(200); - $this->assertController('language'); - $this->assertAction('show'); - - $this->assertQueryContentRegex('div#Active', '/No|Nein/'); - } - - public function testNewActionSave() - { - $this->createsModels = true; - - $post = [ - 'Active' => '1', - 'RefName' => 'German', - 'Part2T' => 'deu', - 'Part2B' => 'ger', - 'Part1' => 'de', - 'Scope' => 'I', - 'Type' => 'L', - 'Comment' => 'test comment', - 'Save' => 'Speichern', - ]; - - $this->getRequest()->setPost($post)->setMethod('POST'); - - $this->dispatch('/admin/language/new'); - - $this->assertRedirect('Should be a redirect to show action.'); - $this->assertRedirectRegex('/^\/admin\/language\/show/'); // Regex weil danach noch '/id/xxx' kommt - $this->verifyFlashMessage('controller_crud_save_success', self::MESSAGE_LEVEL_NOTICE); - - // Neue Lizenz anzeigen - $location = $this->getLocation(); - - $this->resetRequest(); - $this->resetResponse(); - - $this->dispatch($location); - $this->assertResponseCode(200); - - $this->assertQueryContentRegex('div#Active', '/Yes|Ja/'); - $this->assertQueryContentContains('div#RefName', 'German'); - $this->assertQueryContentContains('div#Part2T', 'deu'); - $this->assertQueryContentContains('div#Part2B', 'ger'); - $this->assertQueryContentContains('div#Part1', 'de'); - $this->assertQueryContentRegex('div#Scope', '/Individual|Individuell/'); - $this->assertQueryContentRegex('div#Type', '/Living|Lebend/'); - $this->assertQueryContentContains('div#Comment', 'test comment'); - } - - public function testNewActionCancel() - { - $this->createsModels = true; - - $modelCount = count($this->getModels()); - - $post = [ - 'RefName' => 'TestGerman', - 'Part2T' => 'tge', - 'Cancel' => 'Abbrechen', - ]; - - $this->getRequest()->setPost($post)->setMethod('POST'); - - $this->dispatch('/admin/language/new'); - - $this->assertRedirectTo('/admin/language', 'Should be a redirect to index action.'); - - $this->assertEquals( - $modelCount, - count(Language::getAll()), - 'Es sollte keine neue Sprache geben.' - ); - } - - /** - * Tests 'edit' action. - */ - public function testEditActionShowForm() - { - $this->dispatch('/admin/language/edit/id/3'); - $this->assertResponseCode(200); - $this->assertController('language'); - $this->assertAction('edit'); - - $this->assertQueryContentContains('div#RefName-element', 'Italian'); - $this->assertQuery('li.save-element'); - $this->assertQuery('li.cancel-element'); - $this->assertQueryCount('input#Id', 1); - } - - public function testEditActionSave() - { - $this->createsModels = true; - - $model = Language::new(); - - $model->setRefName('Test'); - $model->setPart2T('tst'); - - $modelId = $model->store(); - - $this->getRequest()->setMethod('POST')->setPost([ - 'Id' => $modelId, - 'Active' => '1', - 'RefName' => 'RefNameModified', - 'Part2T' => 'n2t', - 'Part2B' => 'tet', - 'Part1' => 'us', - 'Scope' => 'I', - 'Type' => 'L', - 'Comment' => 'test comment', - 'Save' => 'Speichern', - ]); - - $this->dispatch('/admin/language/edit'); - $this->assertRedirectTo('/admin/language/show/id/' . $modelId); - $this->verifyFlashMessage('controller_crud_save_success', self::MESSAGE_LEVEL_NOTICE); - - $model = Language::get($modelId); - - $this->assertEquals(1, $model->getActive()); - $this->assertEquals('RefNameModified', $model->getRefName()); - $this->assertEquals('n2t', $model->getPart2T()); - $this->assertEquals('tet', $model->getPart2B()); - $this->assertEquals('us', $model->getPart1()); - $this->assertEquals('I', $model->getScope()); - $this->assertEquals('L', $model->getType()); - $this->assertEquals('test comment', $model->getComment()); - } - - public function testEditActionCancel() - { - $this->createsModels = true; - - $model = Language::new(); - - $model->setRefName('Test'); - $model->setPart2T('tst'); - - $modelId = $model->store(); - - $this->getRequest()->setMethod('POST')->setPost([ - 'Id' => $modelId, - 'RefName' => 'RefNameModified', - 'Part2T' => 'tes', - 'Cancel' => 'Abbrechen', - ]); - - $this->dispatch('/admin/language/edit'); - $this->assertRedirectTo('/admin/language'); - - $model = Language::get($modelId); - - $this->assertEquals('Test', $model->getRefName()); - } - - public function testDeleteActionShowForm() - { - $this->useEnglish(); - - $this->dispatch('/admin/language/delete/id/3'); - - $this->assertQueryContentContains('legend', 'Delete Language'); - $this->assertQueryContentContains('span.displayname', 'Italian'); - $this->assertQuery('input#ConfirmYes'); - $this->assertQuery('input#ConfirmNo'); - } - - /** - * @return int - */ - public function createNewModel() - { - $model = Language::new(); - - $model->setRefName('TestLang'); - $model->setPart2T('lan'); - - return $model->store(); - } - - /** - * @param int $identifier - * @return LanguageInterface - * @throws NotFoundException - */ - public function getModel($identifier) - { - return Language::get($identifier); - } -} diff --git a/tests/modules/admin/forms/LanguageTest.php b/tests/modules/admin/forms/LanguageTest.php deleted file mode 100644 index 20094f569..000000000 --- a/tests/modules/admin/forms/LanguageTest.php +++ /dev/null @@ -1,175 +0,0 @@ -assertEquals(11, count($form->getElements())); - - $this->assertNotNull($form->getElement('Active')); - $this->assertNotNull($form->getElement('Part2B')); - $this->assertNotNull($form->getElement('Part2T')); - $this->assertNotNull($form->getElement('Part1')); - $this->assertNotNull($form->getElement('RefName')); - $this->assertNotNull($form->getElement('Comment')); - $this->assertNotNull($form->getElement('Scope')); - $this->assertNotNull($form->getElement('Type')); - - $this->assertNotNull($form->getElement('Save')); - $this->assertNotNull($form->getElement('Cancel')); - $this->assertNotNull($form->getElement('Id')); - } - - public function testPopulateFromModel() - { - $form = new Admin_Form_Language(); - - $language = Language::new(); - $language->setActive(true); - $language->setPart2B('ger'); - $language->setPart2T('deu'); - $language->setRefName('German'); - $language->setPart1('de'); - $language->setScope('M'); - $language->setType('H'); - $language->setComment('test comment'); - - $form->populateFromModel($language); - - $this->assertEquals(1, $form->getElement('Active')->getValue()); - $this->assertEquals('ger', $form->getElement('Part2B')->getValue()); - $this->assertEquals('deu', $form->getElement('Part2T')->getValue()); - $this->assertEquals('de', $form->getElement('Part1')->getValue()); - $this->assertEquals('German', $form->getElement('RefName')->getValue()); - $this->assertEquals('test comment', $form->getElement('Comment')->getValue()); - $this->assertEquals('M', $form->getElement('Scope')->getValue()); - $this->assertEquals('H', $form->getElement('Type')->getValue()); - $this->assertNull($form->getElement('Id')->getValue()); - } - - public function testPopulateFromModelWithId() - { - $form = new Admin_Form_Language(); - - $language = Language::get(2); - - $form->populateFromModel($language); - - $this->assertEquals(2, $form->getElement('Id')->getValue()); - } - - public function testUpdateModel() - { - $form = new Admin_Form_Language(); - - $form->getElement('Id')->setValue(99); - $form->getElement('Active')->setChecked(true); - $form->getElement('RefName')->setValue('German'); - $form->getElement('Part2B')->setValue('ger'); - $form->getElement('Part2T')->setValue('deu'); - $form->getElement('Part1')->setValue('de'); - $form->getElement('Comment')->setValue('Deutsch'); - $form->getElement('Scope')->setValue('I'); - $form->getElement('Type')->setValue('L'); - - $language = Language::new(); - - $form->updateModel($language); - - $this->assertNull($language->getId()); - $this->assertEquals(1, $language->getActive()); - $this->assertEquals('German', $language->getRefName()); - $this->assertEquals('ger', $language->getPart2B()); - $this->assertEquals('deu', $language->getPart2T()); - $this->assertEquals('de', $language->getPart1()); - $this->assertEquals('Deutsch', $language->getComment()); - $this->assertEquals('I', $language->getScope()); - $this->assertEquals('L', $language->getType()); - } - - public function testValidationEmptyPost() - { - $form = new Admin_Form_Language(); - - $this->assertFalse($form->isValid([])); - - $this->assertContains('isEmpty', $form->getErrors('RefName')); - $this->assertContains('isEmpty', $form->getErrors('Part2T')); - } - - public function testValidationEmptyFields() - { - $form = new Admin_Form_Language(); - - $this->assertFalse($form->isValid([ - 'RefName' => ' ', - 'Part2T' => ' ', - ])); - - $this->assertContains('isEmpty', $form->getErrors('RefName')); - $this->assertContains('isEmpty', $form->getErrors('Part2T')); - } - - public function testValidationInvalidValues() - { - $form = new Admin_Form_Language(); - - $this->assertFalse($form->isValid([ - 'RefName' => 'German', - 'Part2T' => 'deu', - 'Scope' => 'X', - 'Type' => 'Y', - ])); - - $this->assertNotContains('isEmpty', $form->getErrors('RefName')); - $this->assertNotContains('isEmpty', $form->getErrors('Part2T')); - $this->assertContains('notInArray', $form->getErrors('Scope')); - $this->assertContains('notInArray', $form->getErrors('Type')); - } - - public function testValidationTrue() - { - $form = new Admin_Form_Language(); - - $this->assertTrue($form->isValid([ - 'RefName' => 'German', - 'Part2T' => 'deu', - ])); - } -} diff --git a/tests/modules/admin/models/OptionsTest.php b/tests/modules/admin/models/OptionsTest.php index aaa63be32..d992c8a6a 100644 --- a/tests/modules/admin/models/OptionsTest.php +++ b/tests/modules/admin/models/OptionsTest.php @@ -46,7 +46,7 @@ public function testGetOptions() $options = $this->model->getOptions(); $this->assertIsArray($options); - $this->assertCount(2, $options); + $this->assertCount(4, $options); foreach ($options as $name => $option) { $this->assertInstanceOf(Admin_Model_Option::class, $option); diff --git a/tests/security/AdministratorRoleTest.php b/tests/security/AdministratorRoleTest.php index 41e6e3c90..9023202bb 100644 --- a/tests/security/AdministratorRoleTest.php +++ b/tests/security/AdministratorRoleTest.php @@ -62,7 +62,6 @@ public function testAdministratorRoleHasSuperPrivileges() $this->assertQuery('//a[@href="/admin/index/security"]'); $this->assertQuery('//a[@href="/admin/collectionroles"]'); $this->assertQuery('//a[@href="/admin/series"]'); - $this->assertQuery('//a[@href="/admin/language"]'); $this->assertQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertQuery('//a[@href="/admin/index/info"]'); $this->assertQuery('//a[@href="/review"]'); diff --git a/tests/security/CollectionsAdminTest.php b/tests/security/CollectionsAdminTest.php index d2b9cf387..17dd48133 100644 --- a/tests/security/CollectionsAdminTest.php +++ b/tests/security/CollectionsAdminTest.php @@ -63,7 +63,6 @@ public function testAdminMenuFiltering() $this->assertNotQuery('//a[@href="/admin/index/security"]'); $this->assertQuery('//a[@href="/admin/collectionroles"]'); $this->assertNotQuery('//a[@href="/admin/series"]'); - $this->assertNotQuery('//a[@href="/admin/language"]'); $this->assertNotQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertNotQuery('//a[@href="/review"]'); $this->assertNotQuery('//a[@href="/admin/index/setup"]'); diff --git a/tests/security/DocumentsAdminTest.php b/tests/security/DocumentsAdminTest.php index a920ce4e6..dc5473f39 100644 --- a/tests/security/DocumentsAdminTest.php +++ b/tests/security/DocumentsAdminTest.php @@ -64,7 +64,6 @@ public function testAdminMenuFiltering() $this->assertNotQuery('//a[@href="/admin/index/security"]'); $this->assertNotQuery('//a[@href="/admin/collectionroles"]'); $this->assertNotQuery('//a[@href="/admin/series"]'); - $this->assertNotQuery('//a[@href="/admin/language"]'); $this->assertNotQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertNotQuery('//a[@href="/admin/index/setup"]'); $this->assertNotQuery('//a[@href="/review"]'); diff --git a/tests/security/FullAdminTest.php b/tests/security/FullAdminTest.php index 091ef8b3c..969ecede0 100644 --- a/tests/security/FullAdminTest.php +++ b/tests/security/FullAdminTest.php @@ -63,7 +63,6 @@ public function testAdminMenuFiltering() $this->assertQuery('//a[@href="/admin/index/security"]'); $this->assertQuery('//a[@href="/admin/collectionroles"]'); $this->assertQuery('//a[@href="/admin/series"]'); - $this->assertQuery('//a[@href="/admin/language"]'); $this->assertQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertQuery('//a[@href="/admin/index/info"]'); $this->assertNotQuery('//a[@href="/review"]'); diff --git a/tests/security/FullAndPartialAdminTest.php b/tests/security/FullAndPartialAdminTest.php index 28d946ea2..e7474b9b8 100644 --- a/tests/security/FullAndPartialAdminTest.php +++ b/tests/security/FullAndPartialAdminTest.php @@ -63,7 +63,6 @@ public function testAdminMenuFiltering() $this->assertQuery('//a[@href="/admin/index/security"]'); $this->assertQuery('//a[@href="/admin/collectionroles"]'); $this->assertQuery('//a[@href="/admin/series"]'); - $this->assertQuery('//a[@href="/admin/language"]'); $this->assertQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertQuery('//a[@href="/admin/index/info"]'); $this->assertQuery('//a[@href="/admin/index/setup"]'); diff --git a/tests/security/LicencesAdminTest.php b/tests/security/LicencesAdminTest.php index 70b6e6ed8..97a97c8c4 100644 --- a/tests/security/LicencesAdminTest.php +++ b/tests/security/LicencesAdminTest.php @@ -63,7 +63,6 @@ public function testAdminMenuFiltering() $this->assertNotQuery('//a[@href="/admin/index/security"]'); $this->assertNotQuery('//a[@href="/admin/collectionroles"]'); $this->assertNotQuery('//a[@href="/admin/series"]'); - $this->assertNotQuery('//a[@href="/admin/language"]'); $this->assertNotQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertNotQuery('//a[@href="/admin/index/setup"]'); $this->assertNotQuery('//a[@href="/review"]'); diff --git a/tests/security/SecurityAdminTest.php b/tests/security/SecurityAdminTest.php index 2260573e1..8ad0b7bf5 100644 --- a/tests/security/SecurityAdminTest.php +++ b/tests/security/SecurityAdminTest.php @@ -62,7 +62,6 @@ public function testAdminMenuFiltering() $this->assertNotQuery('//a[@href="/admin/documents"]'); $this->assertNotQuery('//a[@href="/admin/licence"]'); $this->assertNotQuery('//a[@href="/admin/series"]'); - $this->assertNotQuery('//a[@href="/admin/language"]'); $this->assertNotQuery('//a[@href="/admin/dnbinstitute"]'); $this->assertQuery('//a[@href="/admin/index/info"]'); // Untermenü für Informationen $this->assertNotQuery('//a[@href="/review"]'); diff --git a/tests/support/AccessModuleAdminOneResourceOnlyTest.php b/tests/support/AccessModuleAdminOneResourceOnlyTest.php index cb1eb2201..fdbeaf96b 100644 --- a/tests/support/AccessModuleAdminOneResourceOnlyTest.php +++ b/tests/support/AccessModuleAdminOneResourceOnlyTest.php @@ -90,7 +90,6 @@ public function testAdminMenuFiltering() $this->assertElement('//a[@href="/admin/index/security"]', false); $this->assertElement('//a[@href="/admin/collectionroles"]', false); $this->assertElement('//a[@href="/admin/series"]', false); - $this->assertElement('//a[@href="/admin/language"]', false); $this->assertElement('//a[@href="/admin/dnbinstitute"]', false); $this->assertElement('//a[@href="/admin/index/setup"]', $this->acls['module_setup']); $this->assertElement('//a[@href="/review"]', false); diff --git a/tests/support/AccessModuleSetupAndAdminTest.php b/tests/support/AccessModuleSetupAndAdminTest.php index 913771298..245b0b2a5 100644 --- a/tests/support/AccessModuleSetupAndAdminTest.php +++ b/tests/support/AccessModuleSetupAndAdminTest.php @@ -92,7 +92,6 @@ public function testAdminMenuFiltering() $this->assertElement('//a[@href="/admin/index/security"]', $this->acls['module_admin']); $this->assertElement('//a[@href="/admin/collectionroles"]', $this->acls['module_admin']); $this->assertElement('//a[@href="/admin/series"]', $this->acls['module_admin']); - $this->assertElement('//a[@href="/admin/language"]', $this->acls['module_admin']); $this->assertElement('//a[@href="/admin/dnbinstitute"]', $this->acls['module_admin']); $this->assertElement('//a[@href="/admin/index/info"]', $this->acls['module_admin']); $this->assertElement('//a[@href="/admin/index/setup"]', $this->acls['module_admin']);