openrat-cms

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

commit 93f7b837f8b72b3a686301fbb9426dd4c816266e
parent a40f30f0fe5418e202f4891fb87c6780079be14c
Author: dankert <devnull@localhost>
Date:   Fri, 19 Mar 2010 23:52:21 +0100

Konstanten für Request-Filter benutzen.

Diffstat:
actionClasses/ElementAction.class.php | 4++--
actionClasses/FilebrowserAction.class.php | 4++--
actionClasses/FolderAction.class.php | 4++--
actionClasses/IndexAction.class.php | 8++++----
actionClasses/ProfileAction.class.php | 4++--
actionClasses/TemplateAction.class.php | 2+-
6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/actionClasses/ElementAction.class.php b/actionClasses/ElementAction.class.php @@ -51,7 +51,7 @@ class ElementAction extends Action */ function savename() { - $this->element->name = $this->getRequestVar('name' ,'alphanum'); + $this->element->name = $this->getRequestVar('name' ,OR_FILTER_ALPHANUM); $this->element->desc = $this->getRequestVar('description','all' ); $this->element->save(); @@ -598,7 +598,7 @@ class ElementAction extends Action if ( $this->hasRequestVar('default_longtext')) $this->element->defaultText = $this->getRequestVar('default_longtext','text'); else - $this->element->defaultText = $this->getRequestVar('default_text','alphanum'); + $this->element->defaultText = $this->getRequestVar('default_text',OR_FILTER_ALPHANUM); $this->element->wiki = in_array('wiki',explode(',',$this->getRequestVar('format'))); $this->element->html = in_array('html',explode(',',$this->getRequestVar('format'))); $this->element->withIcon = $this->getRequestVar('with_icon') != ''; diff --git a/actionClasses/FilebrowserAction.class.php b/actionClasses/FilebrowserAction.class.php @@ -103,7 +103,7 @@ class FilebrowserAction extends ObjectAction $newUrl = str_replace('&amp;','&',Html::url('file','show',$newId,array('oid'=>'__OID__'.$newId.'__'))); echo '<script type="text/javascript">' ; - echo 'window.parent.CKEDITOR.tools.callFunction('.$this->getRequestVar('CKEditorFuncNum','123').",'".$newUrl."','');</script>"; + echo 'window.parent.CKEDITOR.tools.callFunction('.$this->getRequestVar('CKEditorFuncNum',OR_FILTER_NUMBER).",'".$newUrl."','');</script>"; echo '</script>' ; echo 'OK' ; } @@ -114,7 +114,7 @@ class FilebrowserAction extends ObjectAction function browse() { global $conf_php; - $funcNum = $this->getRequestVar('CKEditorFuncNum','123'); + $funcNum = $this->getRequestVar('CKEditorFuncNum',OR_FILTER_NUMBER); if ( ! $this->folder->isRoot ) $this->setTemplateVar('up_url',Html::url('filebrowser','browse',$this->folder->parentid,array('CKEditorFuncNum'=>$funcNum))); diff --git a/actionClasses/FolderAction.class.php b/actionClasses/FolderAction.class.php @@ -335,7 +335,7 @@ class FolderAction extends ObjectAction if ( $this->getRequestVar('name') != '' ) $this->folder->name = $this->getRequestVar('name' ,'full'); elseif ($this->getRequestVar('filename') != '' ) - $this->folder->name = $this->getRequestVar('filename','alphanum'); + $this->folder->name = $this->getRequestVar('filename',OR_FILTER_ALPHANUM); else { $this->addValidationError('name'); @@ -344,7 +344,7 @@ class FolderAction extends ObjectAction return; } - $this->folder->filename = $this->getRequestVar('filename' ,'alphanum'); + $this->folder->filename = $this->getRequestVar('filename' ,OR_FILTER_ALPHANUM); $this->folder->desc = $this->getRequestVar('description','full' ); $this->folder->save(); $this->addNotice($this->folder->getType(),$this->folder->name,'PROP_SAVED','ok'); diff --git a/actionClasses/IndexAction.class.php b/actionClasses/IndexAction.class.php @@ -610,10 +610,10 @@ class IndexAction extends Action die('login disabled'); $openid_user = $this->getRequestVar('openid_url' ); - $loginName = $this->getRequestVar('login_name' ,'alphanum'); - $loginPassword = $this->getRequestVar('login_password','alphanum'); - $newPassword1 = $this->getRequestVar('password1' ,'alphanum'); - $newPassword2 = $this->getRequestVar('password2' ,'alphanum'); + $loginName = $this->getRequestVar('login_name' ,OR_FILTER_ALPHANUM); + $loginPassword = $this->getRequestVar('login_password',OR_FILTER_ALPHANUM); + $newPassword1 = $this->getRequestVar('password1' ,OR_FILTER_ALPHANUM); + $newPassword2 = $this->getRequestVar('password2' ,OR_FILTER_ALPHANUM); // Cookie setzen setcookie('or_username',$loginName,time()+(60*60*24*30*12*2) ); diff --git a/actionClasses/ProfileAction.class.php b/actionClasses/ProfileAction.class.php @@ -108,8 +108,8 @@ class ProfileAction extends Action if ( $this->hasRequestVar($name)) { // Cookie setzen - setcookie('or_'.$name,$this->getRequestVar($name,'alphanum'),time()+(60*60*24*30*12*2)); - $_COOKIE['or_'.$name] = $this->getRequestVar($name,'alphanum'); + setcookie('or_'.$name,$this->getRequestVar($name,OR_FILTER_ALPHANUM),time()+(60*60*24*30*12*2)); + $_COOKIE['or_'.$name] = $this->getRequestVar($name,OR_FILTER_ALPHANUM); } else { diff --git a/actionClasses/TemplateAction.class.php b/actionClasses/TemplateAction.class.php @@ -219,7 +219,7 @@ class TemplateAction extends Action function addelement() { - $name = $this->getRequestVar('name','alphanum'); + $name = $this->getRequestVar('name',OR_FILTER_ALPHANUM); if ( empty($name) ) { $this->addValidationError('name');