Objects should set class variables and call create() instead of passing the parameters into the

create() function.
This commit is contained in:
Chris Morgan
2007-04-21 02:30:22 +00:00
committed by WineHQ
parent 96bfe05734
commit cf9cba4093
5 changed files with 47 additions and 21 deletions

View File

@@ -27,8 +27,14 @@ if(!$_SESSION['current']->isLoggedIn())
// the user submitted his comment
if(!empty($aClean['sBody']))
{
// create a new comment
$oComment = new Comment();
$oComment->create($aClean['sSubject'], $aClean['sBody'], $aClean['iThread'], $aClean['iVersionId']);
$oComment->sSubject = $aClean['sSubject'];
$oComment->sBody = $aClean['sBody'];
$oComment->iParentId = $aClean['iThread'];
$oComment->iVersionId = $aClean['iVersionId'];
$oComment->create();
$oVersion = new version($oComment->iVersionId);
util_redirect_and_exit($oVersion->objectMakeUrl());
// let's show the comment form