Hi Kupo,

maybe I'm doing something wrong,

here is my action, which doesn't work
does it seem correct to you ?

<?php

/**
 * news actions.
 *
 * @package    fermoba
 * @subpackage news
 * @author     Nicolas Binet
 * @version    SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z
nicolas $
 */
class newsActions extends autonewsActions
{
  public function executePublish()
  {
    $this->news = NewsPeer::retrieveByPk($this-
>getRequestParameter('id'));
    $this->forward404Unless($this->news);

    $this->news->getIsPublished()? $this->news->setIsPublished(0) :
$this->news->setIsPublished(1);
    $this->news->save();

    $cacheManager = $this->getContext()->getViewCacheManager();
    $cacheManager->remove('news/list');
    $cacheManager->remove('news/update?id='.$this-
>getRequestParameter('id'));

    $response = $this->getResponse();
    $gmt_mtime = gmdate('D, d M Y H:i:s', time() ) . ' GMT';
    $response->setHttpHeader('no-Last-Modified', $gmt_mtime);

    $this->redirect('news/list');
  }
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to