#5141 - Unit test find_broken_screen_links: Complains about using _SELF for zone in build_url when using _SELF in page
| Identifier | #5141 |
|---|---|
| Issue type | Trivial issue (does not break functionality) |
| Title | Unit test find_broken_screen_links: Complains about using _SELF for zone in build_url when using _SELF in page |
| Status | Closed (rejected) |
| Handling member | Chris Graham |
| Addon | General / Uncategorised |
| Description | find_broken_screen_links complains about using _SELF for the zone parameter in build_url. While it's good to check against that, I think it's fine to use _SELF for the zone if the page is also _SELF. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
diff --git a/adminzone/pages/modules/admin_points.php b/adminzone/pages/modules/admin_points.php
index 7ee98df397..687fcdce8f 100644
--- a/adminzone/pages/modules/admin_points.php
+++ b/adminzone/pages/modules/admin_points.php
@@ -332,7 +332,7 @@ class Module_admin_points
foreach ($rows as $myrow) {
$date = get_timezoned_date_time($myrow['date_and_time'], false);
$reason = get_translated_tempcode('points_ledger', $myrow, 'reason');
- $_date = hyperlink(build_url(['page' => '_SELF', 'type' => 'view', 'id' => $myrow['id']], get_module_zone('admin_points')), $date, false, true);
+ $_date = hyperlink(build_url(['page' => '_SELF', 'type' => 'view', 'id' => $myrow['id']], '_SELF'), $date, false, true);
if (is_guest($myrow['recipient_id'])) {
$to = do_lang_tempcode('USER_SYSTEM');
diff --git a/cms/pages/modules/filedump.php b/cms/pages/modules/filedump.php
index e4bbdebcff..212558d42e 100644
--- a/cms/pages/modules/filedump.php
+++ b/cms/pages/modules/filedump.php
@@ -286,7 +286,7 @@ class Module_filedump
$subpath = $this->subpath;
if (!file_exists(get_custom_file_base() . '/uploads/filedump' . $subpath)) {
- $_url = build_url(['page' => '_SELF', 'subpath' => '/'], get_module_zone('filedump'));
+ $_url = build_url(['page' => '_SELF', 'subpath' => '/'], '_SELF');
return redirect_screen($this->title, $_url, do_lang_tempcode('DIRECTORY_NOT_FOUND', escape_html($subpath)));
}