Bug 505296 - adding an email if we flag soemthing for legal.
authorToby Elliott <telliott@mozilla.com>
Tue, 21 Jul 2009 16:24:13 -0700
changeset 1079 54990b3682a6169bb78b22142543e7b306d5751d
parent 1078 b1b04457c87d2d719a665b8924c05b19bdc7f1fe
child 1080 706c4f7b7f97557197d32f8549db5fa15d55e0bd
push id696
push usertelliott@mozilla.com
push dateTue, 21 Jul 2009 23:38:42 +0000
bugs505296
Bug 505296 - adding an email if we flag soemthing for legal.
server/admin/pending.php
--- a/server/admin/pending.php
+++ b/server/admin/pending.php
@@ -37,16 +37,33 @@
 #
 # ***** END LICENSE BLOCK *****
 	
 	require_once '../lib/personas_constants.php';
 	require_once '../lib/personas_functions.php';
 	require_once '../lib/storage.php';
 	require_once '../lib/user.php';
 
+	function send_legal_email($address, $name)
+	{
+		$message = "Thanks for submitting your Persona '$name'. We just wanted to let you know that your persona has been flagged for more detailed review, and this may delay the decision. Thanks for your patience.\n\n"; 
+		$message .= "We appreciate your involvement in the Personas community and encourage you to create another design that fits our Terms of Service (http://www.getpersonas.com/upload).\n\n";
+		$message .= "Also, you are able to use apply any design you like on your own computer. Here is how:\n\n";
+		$message .= "1. If you have Personas installed, click on the little fox on the bottom left of your computer screen.\n\n";
+		$message .= "2. Click on \"Preferences\" and ensure the box \"Show Custom Persona in Menu\" is checked and close the box.\n\n";
+		$message .= "3. Click on the little fox again. Mouse over \"Custom\" in the menu and to the right find and click \"Edit\".\n\n";
+		$message .= "This will take you to a custom persona interface that will let you design any persona you like for your own computer. Thank you again for being a part of our community.\n\n";
+		$message .= "If you have any questions or want more information, please stop by the Persona message boards and tell us what's on your mind.\n\n";
+		$message .= "Best Wishes,\n";
+		$message .= "The Personas Team\n";
+		
+		$header = "From: personas@mozilla.com\r\n";
+		return mail($address, 'A problem with your Persona submission', $message, $header);
+	}
+	
 	function send_problem_email($address, $reason, $name)
 	{
 		$message = "Thanks for submitting your Persona '$name'. Unfortunately, we cannot add your Persona because of the following reason: $reason.\n\n"; 
 		$message .= "We appreciate your involvement in the Personas community and encourage you to create another design that fits our Terms of Service (http://www.getpersonas.com/upload).\n\n";
 		$message .= "Also, you are able to use apply any design you like on your own computer. Here is how:\n\n";
 		$message .= "1. If you have Personas installed, click on the little fox on the bottom left of your computer screen.\n\n";
 		$message .= "2. Click on \"Preferences\" and ensure the box \"Show Custom Persona in Menu\" is checked and close the box.\n\n";
 		$message .= "3. Click on the little fox again. Mouse over \"Custom\" in the menu and to the right find and click \"Edit\".\n\n";
@@ -161,16 +178,17 @@
 				$db->reject_persona($persona['id']);
 				send_problem_email($user->get_email($persona['author']), $reason, $persona['name']);
 				$db->log_action($user->get_username(), $persona['id'], "Rejected - Identifiable Photo");
 				$id = null;
 				break;				
 			case 'flagforlegal':
 				$db->flag_persona_for_legal($persona['id']);
 				$db->log_action($user->get_username(), $persona['id'], "Flagged for Legal");
+				send_legal_email($user->get_email($persona['author']), $persona['name']);
 				$id = null;
 				break;				
 			case 'reject':
 				$db->reject_persona($persona['id']);
 				send_problem_email($user->get_email($persona['author']), $_GET['reason'], $persona['name']);
 				$db->log_action($user->get_username(), $persona['id'], "Rejected - " . $_GET['reason']);
 				$id = null;
 				break;