rendered paste body<?php// +---------------------------------------------------------------------------+// | Ten plik jest częściÄ… aplikacji Sheep. |// | Copyright (c) 2006 Ĺukasz Dywicki. |// | Stworzono w opartciu o framework Agavi 0.11, Copyright (c) 2003-2006 the | // | Agavi Project |// | |// | Licencja: zakaz redystrybucji, powielania, usuwania informacji o autorze. |// +---------------------------------------------------------------------------+class Position_AddAction extends AgaviAction { public function executeWrite(AgaviParameterHolder $parameters) { $con = Propel::getConnection(); $con->setAutoCommit(false); try { $request = $this->getContext()->getRequest(); $helper = new PropelHelper($this->getContext(), $parameters); $mark = new WaterMarkPosition(); $helper->watchForVariables($mark); $mark->save(); $con->commit(); return 'Success'; } catch(PropelException $e) { $request->setError('water_mark_position_name', $e->getMessage()); } $con->rollback(); return 'Input'; } public function getDefaultViewName() { return 'Input'; } public function isSecure() { return true; } public function handleWriteError(AgaviParameterHolder $parameters) { return 'Input'; } public function getCredentials() { return 'Position.Add'; }}?>