Development

Changeset 6943

You must first sign up to be able to contribute.

Changeset 6943

Show
Ignore:
Timestamp:
01/05/08 13:36:48 (11 months ago)
Author:
xavier
Message:

sfPropelActAsCommentableBehaviorPlugin: fixed bug : when saving a comment from the admin panel, the author id was set to 0 even if the field was let empty.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelActAsCommentableBehaviorPlugin/trunk/modules/sfCommentAdmin/actions/actions.class.php

    r5290 r6943  
    1010 */ 
    1111class sfCommentAdminActions extends autoSfCommentAdminActions 
    12 {  
     12
     13  protected function updatesfCommentFromRequest() 
     14  { 
     15    parent::updatesfCommentFromRequest(); 
     16    $sf_comment = $this->getRequestParameter('sf_comment'); 
     17 
     18    if (isset($sf_comment['author_id']) && $sf_comment['author_id'] == '') 
     19    { 
     20      $this->sf_comment->setAuthorId(null); 
     21    } 
     22  } 
    1323}