commit 93e2a9676375bcfed1cd75963b951f6a8d3e5ea4
parent d544b88b3aa80666d9b69a435f08181c97c1167e
Author: Jan Dankert <devnull@localhost>
Date: Thu, 9 Aug 2012 21:11:54 +0200
Page- und Element-Id kann mit '_' als Trenner zusammen in der Request-Id angegeben werden.
Diffstat:
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/action/PageelementAction.class.php b/action/PageelementAction.class.php
@@ -63,9 +63,19 @@ class PageelementAction extends Action
$this->page = Session::getObject();
- if ( $this->getRequestId() != 0 )
+ $id = $this->getRequestVar('id');
+ $ids = explode('_',$id);
+ if ( count($ids) > 1 )
+ list($pageid,$elementid)= $ids;
+ else
+ {
+ $pageid = $this->getRequestId();
+ $elementid = $this->getRequestVar('elementid');
+ }
+
+ if ( $pageid != 0 )
{
- $this->page = new Page( $this->getRequestId() );
+ $this->page = new Page( $pageid );
$this->page->load();
Session::setObject( $this->page );
}
@@ -74,9 +84,9 @@ class PageelementAction extends Action
$this->page = Session::getObject();
}
- if ( $this->hasRequestVar('elementid') )
+ if ( $elementid != 0 )
{
- $this->element = new Element( $this->getRequestVar('elementid',OR_FILTER_NUMBER) );
+ $this->element = new Element( $elementid );
Session::setElement( $this->element );
}
else