All pastes #916566 Raw Edit

Stuff

public php v1 · immutable
#916566 ·published 2008-02-24 19:30 UTC
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';	}}?>