Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in updates XML always resulted in an error #203

Closed
joomlapl-bot opened this issue Jun 28, 2022 · 0 comments
Closed

in updates XML always resulted in an error #203

joomlapl-bot opened this issue Jun 28, 2022 · 0 comments

Comments

@joomlapl-bot
Copy link
Collaborator

PR w związku ze zmianą oryginału joomla/joomla-cms#38121 Poniżej zmiany w oryginale:

Click to expand the diff!
diff --git a/administrator/language/en-GB/lib_joomla.ini b/administrator/language/en-GB/lib_joomla.ini
index 178145886bce..e424927663bd 100644
--- a/administrator/language/en-GB/lib_joomla.ini
+++ b/administrator/language/en-GB/lib_joomla.ini
@@ -758,3 +758,11 @@ JLIB_SIZE_PB="PiB"
 JLIB_SIZE_EB="EiB"
 JLIB_SIZE_ZB="ZiB"
 JLIB_SIZE_YB="YiB"
+
+; Database server technology types in human readable terms. Used in the Updater package.
+JLIB_DB_SERVER_TYPE_MARIADB="MariaDB"
+JLIB_DB_SERVER_TYPE_MSSQL="Microsoft SQL Server"
+JLIB_DB_SERVER_TYPE_MYSQL="MySQL"
+JLIB_DB_SERVER_TYPE_ORACLE="Oracle"
+JLIB_DB_SERVER_TYPE_POSTGRESQL="PostgreSQL"
+JLIB_DB_SERVER_TYPE_SQLITE="SQLite"
diff --git a/libraries/src/Updater/Adapter/ExtensionAdapter.php b/libraries/src/Updater/Adapter/ExtensionAdapter.php
index 59740ab424bc..f84302bdafff 100644
--- a/libraries/src/Updater/Adapter/ExtensionAdapter.php
+++ b/libraries/src/Updater/Adapter/ExtensionAdapter.php
@@ -155,10 +155,13 @@ protected function _endElement($parser, $name)
 							}
 						}
 
+						// $supportedDbs has uppercase keys because they are XML attribute names
+						$dbTypeUcase = strtoupper($dbType);
+
 						// Do we have an entry for the database?
-						if (\array_key_exists($dbType, $supportedDbs))
+						if (\array_key_exists($dbTypeUcase, $supportedDbs))
 						{
-							$minimumVersion = $supportedDbs[$dbType];
+							$minimumVersion = $supportedDbs[$dbTypeUcase];
 							$dbMatch        = version_compare($dbVersion, $minimumVersion, '>=');
 
 							if (!$dbMatch)
@@ -168,7 +171,7 @@ protected function _endElement($parser, $name)
 									'JLIB_INSTALLER_AVAILABLE_UPDATE_DB_MINIMUM',
 									$this->currentUpdate->name,
 									$this->currentUpdate->version,
-									Text::_($db->name),
+									Text::_('JLIB_DB_SERVER_TYPE_' . $dbTypeUcase),
 									$dbVersion,
 									$minimumVersion
 								);
@@ -183,7 +186,7 @@ protected function _endElement($parser, $name)
 								'JLIB_INSTALLER_AVAILABLE_UPDATE_DB_TYPE',
 								$this->currentUpdate->name,
 								$this->currentUpdate->version,
-								Text::_($db->name)
+								Text::_('JLIB_DB_SERVER_TYPE_' . $dbTypeUcase)
 							);
 
 							Factory::getApplication()->enqueueMessage($dbMsg, 'warning');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants