#5141 - Unit test find_broken_screen_links: Complains about using _SELF for zone in build_url when using _SELF in page

This is a spacer post for a website comment topic. The content this topic relates to: #5141 - Unit test find_broken_screen_links: Complains about using _SELF for zone in build_url when using _SELF in page
The test was fine. There really was an inconsistency. You can use _SELF for page but if so you should also use _SELF for zone.

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)));
}
0 guests and 0 members have recently viewed this.