1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Files
archived-web-php/mod.php
Peter Kokot 0f95b8c709 Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-10-17 07:29:46 +02:00

65 lines
1.4 KiB
PHP

<?php
/*
This page supports the PHP.net automoderation system
with enabling users to confirm their emails via the web.
This script only need to run on the primary php.net box.
*/
$_SERVER['BASE_PAGE'] = 'mod.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
site_header("Email confirmation", array("current" => "community"));
// Only run on main php.net box.
if (!is_primary_site()) {
echo <<<ERROR
<h1>Email confirmation failed</h1>
<p class="formerror">
This server is not capable of handling email confirmations.
</p>
ERROR;
site_footer();
exit;
}
// These sites are handled by automoderation
$sites = array("php.net", "lists.php.net");
// Get data from the URL
list($none, $site, $token, $sender) = explode("/", $_SERVER["PATH_INFO"]);
// Error in input data
if ($sender == "" || strlen($token) < 32 || !isset($sites[$site])) {
echo <<<ERROR
<h1>Email confirmation failed</h1>
<p class="formerror">
Sorry, the URL is incomplete. Please verify that you used the
complete URL even if it spans multiple lines.
</p>
ERROR;
}
// Data OK, send confirmation mail
else {
mail(
"confirm@" . $sites[$site],
"confirm",
"[confirm: $token $sender]",
"From: $sender"
);
echo <<<THANKS
<h1>Email confirmation successful</h1>
<p>
Thanks for confirming your email address. No further
action is required on your part.
</p>
THANKS;
}
site_footer();