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

@@ -9,11 +9,15 @@ require_once(BASE."include/user.php");
*/
class Comment {
var $iCommentId;
// variables necessary for creating a comment
var $iParentId;
var $iAppId;
var $iVersionId;
var $sSubject;
var $sBody;
var $iVersionId;
var $iAppId;
var $sDateCreated;
var $sHostname;
var $oOwner;
@@ -55,7 +59,8 @@ class Comment {
{
$hResult = query_parameters("INSERT INTO appComments (parentId, versionId, subject, ".
"body, userId, time, hostname) VALUES ('?', '?', '?', '?', '?', ?, '?')",
$iParentId, $iVersionId, $sSubject, $sBody, $_SESSION['current']->iUserId,
$iParentId, $iVersionId, $sSubject, $sBody,
$_SESSION['current']->iUserId,
"NOW()", get_remote());
if($hResult)