Skip to content

Conversation

@mambax7
Copy link
Collaborator

@mambax7 mambax7 commented Aug 18, 2025

No description provided.

@mambax7 mambax7 requested a review from Copilot August 18, 2025 09:42

This comment was marked as outdated.

The method setErrors() does not exist on null.
It seems like $pwd can also be of type null
@mambax7 mambax7 requested a review from Copilot August 18, 2025 12:44

This comment was marked as outdated.

@mambax7 mambax7 requested a review from Copilot August 18, 2025 16:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates copyright and documentation across the XOOPS project. The main purpose is to standardize copyright notices to include the full date range "2000-2025" and update the URL format to use HTTPS consistently. Additionally, PhpDoc type annotations are being improved throughout the codebase.

Key changes include:

  • Updated copyright notices from "XOOPS Project https://xoops.org/" to "2000-2025 XOOPS Project (https://xoops.org)"
  • Replaced simple exit statements with proper exception throwing for security checks
  • Enhanced PhpDoc type annotations for better code documentation

Reviewed Changes

Copilot reviewed 294 out of 304 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
htdocs/xoops_lib/modules/protector/admin/index.php Updated copyright notice format
htdocs/themes/xbootstrap5/theme_autorun.php Enhanced template initialization and added global variable handling
htdocs/themes/xbootstrap5/theme.tpl Reorganized JavaScript loading order and added proper commenting
htdocs/themes/xbootstrap5/modules/system/system_comment.tpl Added default filters to prevent undefined variable warnings
htdocs/modules/system/* Updated copyright notices and improved PhpDoc annotations across system module files
htdocs/class/* Replaced exit statements with RuntimeException throws and updated copyright notices
htdocs/include/* Updated copyright notices and improved security checks
htdocs/kernel/* Enhanced PhpDoc type annotations and updated copyright notices

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

include_once __DIR__ . '/XoopsFormRendererBootstrap4.php';
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());
include_once __DIR__ . '/XoopsFormRendererBootstrap5.php';
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap5());
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The file path references 'XoopsFormRendererBootstrap5.php' but this file may not exist in the current directory. The previous version referenced 'XoopsFormRendererBootstrap4.php'. Ensure the Bootstrap5 renderer file exists before making this change.

Suggested change
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap5());
include_once __DIR__ . '/XoopsFormRendererBootstrap4.php';
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());

Copilot uses AI. Check for mistakes.

<!-- 4. Your custom scripts (js.js etc.) -->

<script src="<{xoImgUrl}>js/bootstrap.bundle.min.js"></script>
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

Bootstrap is being loaded twice - once commented out at line 104 and again at line 115. This could cause conflicts or performance issues. Remove one of the duplicate script tags.

Copilot uses AI. Check for mistakes.

$time = time();
if (!isset($_SESSION['XoopsEmotions']) && (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) {
if (!isset($_SESSION['XoopsEmotions']) || (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) {
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The logical operator was changed from && to ||, which changes the condition logic. This could cause the session to be regenerated incorrectly. The original logic seems more appropriate: regenerate only when both conditions are met (not set AND expired).

Suggested change
if (!isset($_SESSION['XoopsEmotions']) || (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) {
if (!isset($_SESSION['XoopsEmotions']) && (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) {

Copilot uses AI. Check for mistakes.
* Define XOOPS version
*/
define('XOOPS_VERSION', 'XOOPS 2.5.12-Beta7');
define('XOOPS_VERSION', 'XOOPS 2.5.12-Beta8');
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The version number has been incremented from Beta7 to Beta8. Ensure this version bump is intentional and coordinated with the release process.

Copilot uses AI. Check for mistakes.


$imgcat_id = Request::getInt('imgcat_id', 0, 'POST');
$imgcat = $imgcat_handler->get($imgcat_id);
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The variable $imgcat_id is being retrieved but was likely defined elsewhere in the original code. Adding this line without removing the original declaration could cause variable redefinition or unexpected behavior.

Suggested change
$imgcat = $imgcat_handler->get($imgcat_id);
$imgcat_id_post = Request::getInt('imgcat_id', 0, 'POST');
$imgcat = $imgcat_handler->get($imgcat_id_post);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant