diff --git a/README.md b/README.md index e4d4099..12a3ebb 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych. ## Instalacja -W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.42.7). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.42.8). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.42.8.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.42.8.sql new file mode 100644 index 0000000..3bd7f52 --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.42.8.sql @@ -0,0 +1 @@ +-- No database changes required for version 1.42.8. diff --git a/administrator/components/com_testquestions/src/Controller/ResultController.php b/administrator/components/com_testquestions/src/Controller/ResultController.php index 6ff6064..c60924a 100644 --- a/administrator/components/com_testquestions/src/Controller/ResultController.php +++ b/administrator/components/com_testquestions/src/Controller/ResultController.php @@ -49,7 +49,7 @@ class ResultController extends BaseController } catch (\Throwable $error) { $errorMessage = $error->getMessage(); $message = str_starts_with($errorMessage, 'AI_KEY_EMPTY|') - ? 'Diagnostyka konfiguracji AI (1.42.7): ' . substr($errorMessage, strlen('AI_KEY_EMPTY|')) + ? 'Diagnostyka konfiguracji AI (1.42.8): ' . substr($errorMessage, strlen('AI_KEY_EMPTY|')) : ($errorMessage === 'AI_NOT_CONFIGURED' ? Text::_('COM_TESTQUESTIONS_AI_NOT_CONFIGURED') : Text::sprintf('COM_TESTQUESTIONS_AI_ERROR', $errorMessage)); diff --git a/administrator/components/com_testquestions/src/Field/AiapikeyField.php b/administrator/components/com_testquestions/src/Field/AiapikeyField.php index 5341060..0cc1c93 100644 --- a/administrator/components/com_testquestions/src/Field/AiapikeyField.php +++ b/administrator/components/com_testquestions/src/Field/AiapikeyField.php @@ -4,24 +4,22 @@ namespace Komponent\Component\Testquestions\Administrator\Field; defined('_JEXEC') or die; -use Joomla\CMS\Form\FormField; +use Joomla\CMS\Form\Field\PasswordField; -class AiapikeyField extends FormField +class AiapikeyField extends PasswordField { protected $type = 'Aiapikey'; protected function getInput(): string { $id = htmlspecialchars($this->id, ENT_QUOTES, 'UTF-8'); - $name = htmlspecialchars($this->name, ENT_QUOTES, 'UTF-8'); - $value = htmlspecialchars((string) $this->value, ENT_QUOTES, 'UTF-8'); $length = mb_strlen((string) $this->value); return '
' - . '' + . parent::getInput() . '' . '
' - . 'Zapisany klucz: ' . (int) $length . ' znaków.' + . 'Klucz: ' . (int) $length . ' znaków.' . '