openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5f4f776071b203bb90a956c7790786bb608a2d23
parent 4395f14e70a15b3008e74bce872feb99dd68a18d
Author: dankert <devnull@localhost>
Date:   Fri,  9 Nov 2007 21:41:51 +0100

Hinweismeldungen setzen.

Diffstat:
actionClasses/ObjectAction.class.php | 35+++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/actionClasses/ObjectAction.class.php b/actionClasses/ObjectAction.class.php @@ -20,6 +20,9 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ +// Revision 1.8 2007-11-09 20:41:51 dankert +// Hinweismeldungen setzen. +// // Revision 1.7 2007-10-29 23:29:17 dankert // Konstanten f?r Request-Variablen. // @@ -105,12 +108,32 @@ class ObjectAction extends Action switch( $this->getRequestVar('type') ) { case 'user': - $acl->userid = $this->getRequestVar('userid' ); + $acl->userid = $this->getRequestVar('userid' ); + + if ( $acl->userid <= 0 ) + { + $this->addValidationError('type' ); + $this->addValidationError('userid',''); + $this->callSubAction('aclform'); + return; + } break; case 'group': - $acl->groupid = $this->getRequestVar('groupid'); + $acl->groupid = $this->getRequestVar('groupid'); + if ( $acl->groupid <= 0 ) + { + $this->addValidationError('type' ); + $this->addValidationError('groupid',''); + $this->callSubAction('aclform'); + return; + } + break; + case 'all': break; default: + $this->addValidationError('type'); + $this->callSubAction('aclform'); + return; } $acl->languageid = $this->getRequestVar(REQ_PARAM_LANGUAGE_ID); @@ -127,7 +150,9 @@ class ObjectAction extends Action $acl->grant = ( $this->hasRequestVar('grant' ) ); $acl->transmit = ( $this->hasRequestVar('transmit' ) ); - $acl->add(); + $acl->add(); + + $this->addNotice('','','ADDED',OR_NOTICE_OK); } @@ -208,6 +233,8 @@ class ObjectAction extends Action if ( !$o->hasRight( ACL_GRANT ) ) die('ehm?'); // Da wollte uns wohl einer vereimern. - $acl->delete(); // Weg mit der ACL + $acl->delete(); // Weg mit der ACL + + $this->addNotice('','','DELETED',OR_NOTICE_OK); } } \ No newline at end of file