Skip to content

Conversation

@simonLeary42
Copy link
Collaborator

@simonLeary42 simonLeary42 commented Dec 11, 2025

PI search still works:
image

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 introduces a new centralized getQueryParameter function in the UnityHTTPD class to standardize access to $_GET parameters across the codebase, replacing direct $_GET array access and manual validation checks with a consistent API.

  • Added UnityHTTPD::getQueryParameter() method with optional parameter validation
  • Refactored 6 PHP files to use the new function instead of direct $_GET access
  • Corrected an unrelated method call from UnitySite::errorLog to UnityHTTPD::errorLog

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/lib/UnityHTTPD.php Adds new getQueryParameter() method to centralize $_GET parameter access with built-in validation
webroot/panel/modal/pi_search.php Replaces direct $_GET["search"] access with getQueryParameter() call; corrects UnitySite::errorLog to UnityHTTPD::errorLog
webroot/panel/ajax/get_group_members.php Replaces manual validation and $_GET["gid"] access with getQueryParameter() call
webroot/js/ajax/ssh_generate.php Replaces optional $_GET["type"] check with getQueryParameter() using non-throwing parameter
webroot/api/content/index.php Replaces manual validation for both line_wrap and content_name parameters with getQueryParameter() calls
webroot/admin/ajax/get_page_contents.php Replaces manual validation and $_GET["pageid"] access with getQueryParameter() call
webroot/admin/ajax/get_group_members.php Replaces manual validation and $_GET["gid"] access with getQueryParameter() call

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simonLeary42 simonLeary42 mentioned this pull request Dec 12, 2025
6 tasks
@simonLeary42 simonLeary42 marked this pull request as ready for review December 12, 2025 15:55
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.

2 participants