Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion class/Common/VersionChecks.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ public static function checkVerXoops(\XoopsModule $module = null, string $requir
* @param \XoopsModule|null $module
* @return bool true if meets requirements, false if not
*/
public static function checkVerPhp(\XoopsModule $module = null): bool
public static function checkVerPhp(?\XoopsModule $module = null): bool
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
if (null === $module) {
$module = \XoopsModule::getByDirname($moduleDirName);
}
\xoops_loadLanguage('admin', $moduleDirName);
\xoops_loadLanguage('common', $moduleDirName);
// check for minimum PHP version
$success = true;

Expand Down
2 changes: 2 additions & 0 deletions language/english/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@
//Latest Version Check
\define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: ');
\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_XOOPS', 'You need minimul version %s (your current version is %s)');
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a spelling error in the existing ERROR_BAD_XOOPS definition. The word "minimul" should be "minimum".

Suggested change
\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_XOOPS', 'You need minimul version %s (your current version is %s)');
\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_XOOPS', 'You need minimum version %s (your current version is %s)');

Copilot uses AI. Check for mistakes.

\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
2 changes: 2 additions & 0 deletions language/german/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@
//Latest Version Check
\define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'Neue Version: ');
\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_XOOPS', 'Sie benötigen mindestens Version %s (Ihre derzeitige Version ist %s)');

\define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_PHP', 'Dieses Modul benötigt PHP Version %s+ (%s installiert)');