cvs: phpweb / cvs-php.php php-master-web/entry cvs-account.php

From: Date: Wed, 11 Jun 2008 21:05:25 +0000
Subject: cvs: phpweb / cvs-php.php php-master-web/entry cvs-account.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-1915@lists.php.net to get a copy of this message
bjori Wed Jun 11 21:05:25 2008 UTC Modified files: /php-master-web/entry cvs-account.php /phpweb cvs-php.php Log: Send PEAR CVS account requests to pear-group@ http://cvs.php.net/viewvc.cgi/php-master-web/entry/cvs-account.php?r1=1.15&r2=1.16&diff_format=u Index: php-master-web/entry/cvs-account.php diff -u php-master-web/entry/cvs-account.php:1.15 php-master-web/entry/cvs-account.php:1.16 --- php-master-web/entry/cvs-account.php:1.15 Mon Jun 18 20:35:50 2007 +++ php-master-web/entry/cvs-account.php Wed Jun 11 21:05:24 2008 @@ -2,10 +2,7 @@ require 'email-validation.inc'; -$mailto = 'internals@lists.php.net'; -$failto = 'group@php.net'; - -if (empty($name) || empty($email) || empty($username) || empty($passwd) || empty($note)) +if (empty($name) || empty($email) || empty($username) || empty($passwd) || empty($note) || empty($group)) die("missing some parameters"); // Sophisticated security/spam protection question @@ -13,6 +10,21 @@ die("You did not fill the form out correctly"); } +switch($group) { +case "php": + $mailto = 'internals@lists.php.net'; + $failto = 'group@php.net'; + break; + +case "pear": + $mailto = 'pear-dev@lists.php.net'; + $failto = 'pear-group@php.net'; + break; + +default: + die ("Unknown group"); +} + $username = strtolower($username); # these are reserved account names. some of them (like webmaster and group) @@ -47,7 +59,7 @@ //echo "<!--$query-->\n"; if (@mysql_query($query)) { - $new_id = mysql_insert_id(); + $new_id = mysql_insert_id(); mysql_query("INSERT INTO users_note (userid, note, entered)" ." VALUES ($new_id, '$note', NOW())"); @@ -56,7 +68,10 @@ $from = '"'.stripslashes($name).'" <'.stripslashes($email).">"; - mail($mailto,"CVS Account Request: $username",$msg,"From: $from\r\nMessage-ID: <cvs-account-$new_id@php.net>", "-fnoreply@php.net"); + // The PEAR guys don't want these requests to their -dev@ list, only -group@ + if ($group != "pear") { + mail($mailto,"CVS Account Request: $username",$msg,"From: $from\r\nMessage-ID: <cvs-account-$new_id@php.net>", "-fnoreply@php.net"); + } $msg .= "\n-- \n"; $msg .= "approve: https://master.php.net/manage/users.php?action=approve&id=$new_id\n"; http://cvs.php.net/viewvc.cgi/phpweb/cvs-php.php?r1=1.42&r2=1.43&diff_format=u Index: phpweb/cvs-php.php diff -u phpweb/cvs-php.php:1.42 phpweb/cvs-php.php:1.43 --- phpweb/cvs-php.php:1.42 Sun Jul 15 11:34:20 2007 +++ phpweb/cvs-php.php Wed Jun 11 21:05:25 2008 @@ -1,5 +1,5 @@ <?php -// $Id: cvs-php.php,v 1.42 2007/07/15 11:34:20 bjori Exp $ +// $Id: cvs-php.php,v 1.43 2008/06/11 21:05:25 bjori Exp $ $_SERVER['BASE_PAGE'] = 'cvs-php.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/email-validation.inc'; @@ -62,7 +62,10 @@ $error .= "You must supply a proper email address. "; } if (empty($_POST['yesno']) || $_POST['yesno'] != 'yes') { - $error .= "You did not fill the form out correctly"; + $error .= "You did not fill the form out correctly. "; + } + if (empty($_POST['group']) || !in_array($_POST['group'], array("php", "pear",))) { + $error .= "You did not fill out where to send the request. "; } // Post the request if there is no error @@ -76,6 +79,7 @@ "passwd" => $cleaned['password'], "note" => $cleaned['realpurpose'], "yesno" => $cleaned['yesno'], + "group" => $cleaned['group'], ) ); // Error while posting @@ -354,6 +358,15 @@ <td><input type="text" size="10" name="yesno" class="max" value="no" /></td> </tr> <tr> + <th>Send this request to:</th> + <td> + <select name="group"> + <option value="php" <?php if (!isset($_POST["group"]) || $_POST["group"] == "php") { echo 'selected="selected"'; } ?>>PHP Group</option> + <option value="pear" <?php if (isset($_POST["group"]) && $_POST["group"] == "pear") { echo 'selected="selected"'; } ?>>PEAR Group</option> + </select> + </td> +</tr> +<tr> <th colspan="2"><input type="submit" value="Send Request" /></th> </tr> </table>

« previous php.webmaster (#1915) next »