[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" ); 4 lt_include( PLOG_CLASS_PATH."class/view/admin/adminsiteblogslistview.class.php" ); 5 lt_include( PLOG_CLASS_PATH."class/view/admin/admineditsiteblogview.class.php" ); 6 lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" ); 7 lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" ); 8 9 /** 10 * \ingroup Action 11 * @private 12 * 13 * Action that shows a form to change the settings of a blog. 14 */ 15 class AdminResendConfirmationAction extends AdminAction 16 { 17 18 var $_editBlogId; 19 20 /** 21 * Constructor. If nothing else, it also has to call the constructor of the parent 22 * class, BlogAction with the same parameters 23 */ 24 function AdminResendConfirmationAction( $actionInfo, $request ) 25 { 26 $this->AdminAction( $actionInfo, $request ); 27 28 // data validation 29 $this->registerFieldValidator( "blogId", new IntegerValidator()); 30 $view = new AdminSiteBlogsListView( $this->_blogInfo ); 31 $view->setErrorMessage( $this->_locale->tr("error_incorrect_blog_id" )); 32 $this->setValidationErrorView( $view ); 33 } 34 35 /** 36 * Carries out the specified action 37 */ 38 function perform() 39 { 40 // get the blog and its settings 41 $this->_editBlogId = $this->_request->getValue( "blogId" ); 42 $blogs = new Blogs(); 43 $blogInfo = $blogs->getBlogInfo( $this->_editBlogId); 44 45 if( !$blogInfo ) { 46 $this->_view = new AdminSiteBlogsListView( $this->_blogInfo ); 47 $this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_blog_id" )); 48 $this->setCommonData(); 49 return false; 50 } 51 52 $this->notifyEvent( EVENT_BLOG_LOADED, Array( "blog" => &$blogInfo )); 53 54 // now that we have the right blog loaded, regenerate the confirmation email 55 lt_include( PLOG_CLASS_PATH."class/summary/mail/summarymailer.class.php" ); 56 57 // load the blog owner 58 $blogOwner = $blogInfo->getOwnerInfo(); 59 // generate and send the right link 60 SummaryMailer::sendConfirmationEmail( $blogOwner->getUsername()); 61 // print a confirmation message 62 $this->_view = new AdminSiteBlogsListView( $this->_blogInfo ); 63 $this->_view->setSuccessMessage( $this->_locale->tr( "confirmation_message_resent_ok" )); 64 $this->setCommonData(); 65 66 // better to return true if everything fine 67 return true; 68 } 69 } 70 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |