Skip to content

Commit afcb649

Browse files
author
Mark Randall
committed
Update thanks.php to rely upon return value from require, not a global value.
1 parent 87f4d23 commit afcb649

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

include/historical_mirrors.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$historical_mirrors = [
3+
return [
44
["ARG", "ar2.php.net", "XMundo Hosting Solutions", "http://www.xmundo.net"],
55
["ARM", "am1.php.net", "ARMINCO Global Telecommunications", "http://www.arminco.com/"],
66
["AUS", "au1.php.net", "Melbourne IT Pty Ltd", "https://www.melbourneit.com.au/"],

thanks.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
$_SERVER['BASE_PAGE'] = 'thanks.php';
33
include_once __DIR__ . '/include/prepend.inc';
4-
include_once __DIR__ . '/include/historical_mirrors.inc';
54
site_header("Thanks", ["current" => "community"]);
65
?>
76

@@ -176,7 +175,9 @@
176175
<ul>
177176
<?php
178177
$last_country = '';
179-
foreach ($historical_mirrors as $m) {
178+
179+
$mirrors = require __DIR__ . '/include/historical_mirrors.inc';
180+
foreach ($mirrors as $m) {
180181
?>
181182
<li><?php echo $COUNTRIES[$m[0]]; ?>: <a href='<?php echo $m[3]; ?>'><?php echo $m[2]; ?></a></li>
182183
<?php

0 commit comments

Comments
 (0)