mirror of
https://github.com/php/web-master.git
synced 2026-03-25 16:22:15 +01:00
Move everything that should be accessible from the webserver into a public/ directory. Previously the document root was the root of the repository, which is not great.
30 lines
692 B
Plaintext
Executable File
30 lines
692 B
Plaintext
Executable File
<?php
|
|
/*
|
|
This checks for unapproved events, and emails php-webmaster@ if they exist.
|
|
It should be checked weekly (via cron).
|
|
*/
|
|
require dirname(__DIR__).'/include/functions.inc';
|
|
|
|
db_connect();
|
|
|
|
$query = 'SELECT COUNT(*) FROM phpcal WHERE NOT approved';
|
|
$count = db_get_one($query);
|
|
|
|
if ($count > 0) {
|
|
|
|
$subject = "Pending unapproved events notice";
|
|
$message = "
|
|
Greetings PHP Webmasters;
|
|
|
|
There are roughly [$count] unapproved events awaiting moderation. Please check the queue:
|
|
|
|
https://main.php.net/manage/event.php?unapproved=1
|
|
|
|
Thanks!";
|
|
|
|
$headers = "From: php-webmaster@lists.php.net";
|
|
|
|
mail('php-webmaster@lists.php.net', $subject, $message, $headers, "-fnoreply@php.net");
|
|
|
|
}
|