[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: task 8833 -- proposed steps
From: |
Federico Gimenez Nieto |
Subject: |
Re: task 8833 -- proposed steps |
Date: |
Sat, 15 Nov 2008 14:05:19 +0100 |
Ok, following your indications i think that this would be the steps in
order to send confirmation email to registered but not logged users
which want to add donations to a donation-pledge-group:
1.- Modify the database schema, adding the fields :
R1_DonationMagic (string, default null)
R1_DonationMagicExpire (date, default null)
to the R1_Donations2JobOffersJoins table (could it be better to add a
separate R1_Donations table?)
2.- Modify the current database, adding this modifications
3.- Modify Layer-5__DB_operation/Job_offer.php, addDonation method to
allow inserting registers with the values of R1_DonationMagic and
R1_DonationMagicExpire to R1_Donations2JobOffersJoins table (perhaps
this could be carried by a separate class, if we would had a separate
R1_Donations table)
4.- Modify getEntityId method of Layer-5__DB_operation/Entity.php:
public function getEntityId($email, $requestOperation){
....
if ( $E1_Id )
{
if($requestOperation=='REQUEST_TO_ADD_DONATION_TO_NOTICE')
{
//create magic number and insert register at
R1_Donations2JobOffersJoins with the values for R1_DonationMagic and
R1_DonationMagicExpire
//create the body of the message (including verification link)
and send
}
return $E1_Id;
}
....
}
5.- For verifying the sent mail, add entry point and verification method
to Layer-2__Business_logic/content/forms/Donation_Pledge_Group_form.php
6.- Modify the donations getters to show only verified donations, at
Layer-5__DB_operation/Job_Offer.php in this methods:
getDonators
getDonationsForPledgeGroup
getDonations
7.- Add the cronjob to delete the R1_Donations2JobOffersJoins expired
registers.
What do you think?
Just as a thought, the getEntityId method of
Layer-5__DB_operation/Entity.php cares of matters not only related with
db operations, such as creating and sending emails. Shouldn't this be
carried out by classes at a not so deep layer, for example at Layer2?
Best regards,
Federico
- Re: task 8833 -- proposed steps,
Federico Gimenez Nieto <=
- Re: task 8833 -- proposed steps, Federico Gimenez Nieto, 2008/11/16
- Re: task 8833 -- proposed steps -- improving the design, Davi Leal, 2008/11/16
- Re: task 8833 -- proposed steps -- improving the design, Federico Gimenez Nieto, 2008/11/17
- Re: task 8833 -- improving the design, Davi Leal, 2008/11/17
- Re: task 8833 -- improving the design, Davi Leal, 2008/11/17
- Re: task 8833 -- improving the design, Federico Gimenez Nieto, 2008/11/18
- Re: Improving the design, Davi Leal, 2008/11/18
- Re: Breaking mailing list threads, Davi Leal, 2008/11/17