openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit 414e812f479ef6c50d4350316ca1498d154e49a5
parent 546d5f67a6f92047aadeb7871d9532a9a7f144d8
Author: Jan Dankert <develop@jandankert.de>
Date:   Sat, 27 Feb 2021 01:07:14 +0100

Fix: Request-Id may contain '_'.

Diffstat:
Mmodules/cms/action/PageelementAction.class.php | 4++--
Mmodules/cms/action/RequestParams.class.php | 16+++++++++++++++-
Mmodules/cms/action/page/PageAllAction.class.php | 2+-
3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/modules/cms/action/PageelementAction.class.php b/modules/cms/action/PageelementAction.class.php @@ -328,9 +328,9 @@ class PageelementAction extends BaseAction $value->load(); if ( $this->request->has('linkobjectid') ) - $value->linkToObjectId = $this->request->getText('linkobjectid'); + $value->linkToObjectId = $this->request->getText('linkobjectid'); else - $value->text = $this->request->getRaw('text'); + $value->text = $this->request->getRaw('text'); $this->afterSave($value); } diff --git a/modules/cms/action/RequestParams.class.php b/modules/cms/action/RequestParams.class.php @@ -176,7 +176,7 @@ class RequestParams */ public function getId() { - return intval($this->getNumber( self::PARAM_ID )); + return $this->getVar( self::PARAM_ID ,self::FILTER_ALPHANUM ); } @@ -194,6 +194,20 @@ class RequestParams } + /** + * Ermittelt die aktuelle Id aus dem Request.<br> + * Um welche ID es sich handelt, ist abh´┐Żngig von der Action. + * + * @param string $varName name of parameter + * @return Integer + */ + public function getRequiredNumber($varName ) + { + return $this->getRequiredVar( $varName,self::FILTER_NUMBER ); + } + + + public function hasLanguageId() diff --git a/modules/cms/action/page/PageAllAction.class.php b/modules/cms/action/page/PageAllAction.class.php @@ -179,7 +179,7 @@ class PageAllAction extends PageAction implements Method { { - $languageid = $this->request->getRequiredId('languageid'); + $languageid = $this->request->getRequiredNumber('languageid'); $language = new Language($languageid); $language->load();