diff --git a/include/prepend.inc b/include/prepend.inc index 2721ba22a..cc2761c18 100644 --- a/include/prepend.inc +++ b/include/prepend.inc @@ -69,7 +69,7 @@ function myphpnet_load() global $MYPHPNET; // Empty the preferences array - $MYPHPNET = array(FALSE, FALSE, "NONE", 0); + $MYPHPNET = array(FALSE, FALSE, "NONE", 0, FALSE); // If we have a cookie, set the values in the array if (!empty($_COOKIE['MYPHPNET'])) { @@ -158,3 +158,19 @@ function myphpnet_save() // Set all the preferred values for a year mirror_setcookie("MYPHPNET", join(",", $MYPHPNET), 60*60*24*365); } + +function myphpnet_setbeta($bool = false) { + global $MYPHPNET; + + $MYPHPNET[4] = (bool)$bool; +} +function myphpnet_beta() { + global $MYPHPNET; + + if (isset($MYPHPNET[4])) { + return $MYPHPNET[4]; + } + + return false; +} + diff --git a/my.php b/my.php index a4c9babeb..529790674 100644 --- a/my.php +++ b/my.php @@ -67,6 +67,10 @@ if (isset($_POST['hidesuggest'])) { myphpnet_hidesuggest($_POST['hidesuggest']); } +if (isset($_POST['beta'])) { + myphpnet_setbeta($_POST['beta']); +} + myphpnet_save(); site_header("My PHP.net"); @@ -269,6 +273,21 @@ foreach ($mirror_sites as $murl => $mdata) { + +
+ php.net is undergoing plastic surgery these days. If you want to see + how the site may look in the feature, you can join our beta program. +
+ +