function do_new() { $sName = $this->oValidator->validateEntityName('DocumentType', $_REQUEST['name'], array("redirect_to" => array("main"))); $oDocumentType =& DocumentType::createFromArray(array('name' => $sName)); if (PEAR::isError($oDocumentType)) { $this->errorRedirectToMain(_kt('Could not create document type')); exit(0); } $this->successRedirectTo('edit', _kt('Document type created'), 'fDocumentTypeId=' . $oDocumentType->getId()); exit(0); }