public function newAction() { $userInfo = Zend_Auth::getInstance()->getStorage()->read(); if (!$this->isAuthorized(-1)) { // TODO: this header call does not actually print any error message header("Status: 401 Not Authorized"); return; } $webstream = new CcWebstream(); //we're not saving this primary key in the DB so it's OK to be -1 $webstream->setDbId(-1); $webstream->setDbName(_("Untitled Webstream")); $webstream->setDbDescription(""); $webstream->setDbUrl("http://"); $webstream->setDbLength("00:30:00"); $webstream->setDbName(_("Untitled Webstream")); $webstream->setDbCreatorId($userInfo->id); $webstream->setDbUtime(new DateTime("now", new DateTimeZone('UTC'))); $webstream->setDbMtime(new DateTime("now", new DateTimeZone('UTC'))); //clear the session in case an old playlist was open: CC-4196 Application_Model_Library::changePlaylist(null, null); $this->view->obj = new Application_Model_Webstream($webstream); $this->view->action = "new"; $this->view->html = $this->view->render('webstream/webstream.phtml'); }