-
-
Notifications
You must be signed in to change notification settings - Fork 60
PhpDoc #1558
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
base: master
Are you sure you want to change the base?
PhpDoc #1558
Conversation
The method setErrors() does not exist on null. It seems like $pwd can also be of type null
…hrow RuntimeException
There was a problem hiding this 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()); |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
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.
| XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap5()); | |
| include_once __DIR__ . '/XoopsFormRendererBootstrap4.php'; | |
| XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4()); |
|
|
||
| <!-- 4. Your custom scripts (js.js etc.) --> | ||
|
|
||
| <script src="<{xoImgUrl}>js/bootstrap.bundle.min.js"></script> |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
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.
|
|
||
| $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)) { |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
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).
| if (!isset($_SESSION['XoopsEmotions']) || (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) { | |
| if (!isset($_SESSION['XoopsEmotions']) && (isset($_SESSION['XoopsEmotions_expire']) && $_SESSION['XoopsEmotions_expire'] < $time)) { |
| * Define XOOPS version | ||
| */ | ||
| define('XOOPS_VERSION', 'XOOPS 2.5.12-Beta7'); | ||
| define('XOOPS_VERSION', 'XOOPS 2.5.12-Beta8'); |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
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.
|
|
||
|
|
||
| $imgcat_id = Request::getInt('imgcat_id', 0, 'POST'); | ||
| $imgcat = $imgcat_handler->get($imgcat_id); |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
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.
| $imgcat = $imgcat_handler->get($imgcat_id); | |
| $imgcat_id_post = Request::getInt('imgcat_id', 0, 'POST'); | |
| $imgcat = $imgcat_handler->get($imgcat_id_post); |
No description provided.