openrat-cms

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

commit c42096e86936f55e45d55788c4b533c62d06b71a
parent 3f3131c1a4a8f9c681e06b85e2156d0508870452
Author: dankert <devnull@localhost>
Date:   Sat, 27 Nov 2004 14:10:52 +0100

Korrektur form()

Diffstat:
serviceClasses/Html.class.php | 19++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/serviceClasses/Html.class.php b/serviceClasses/Html.class.php @@ -96,20 +96,29 @@ class Html } if ( $fake_urls ) - return $action.','.$subaction.$id.$urlParameter; + return './'.$action.','.$subaction.$id.$urlParameter; else - return 'do.php'.$urlParameter; + return './'.'do.php'.$urlParameter; } function form( $params ) { - if ( !isset($params['target' ])) $params['target' ] = '_self'; - if ( !isset($params['action' ])) $params['action' ] = ''; + extract( $params ); + + if ( !isset($target) ) $target = '_self'; + if ( !isset($method) ) $method = 'post'; + if ( !isset($name ) ) $name = ''; + + unset( $params['name' ]); + unset( $params['method' ]); + unset( $params['target' ]); + $action = Html::url($params); + if ( !isset($params['subaction'])) $params['subaction'] = ''; if ( !isset($params['id' ])) $params['id' ] = ''; - $text = '<form name="'.$params['name'].'" target="'.$params['target'].'" action="'.Html::url($params).'" method="post" />'."\n"; + $text = '<form name="'.$name.'" target="'.$target.'" action="'.$action.'" method="'.$method.'" />'."\n"; $text.= '<input type="hidden" name="'.session_name().'" value="'.session_id().'" />'."\n"; return $text;