From 4d4c40972826f107bfaeec2a58960460243c169a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 16 Sep 2008 13:22:26 -0400 Subject: [PATCH] Updates for everything done to class_logging.php --- attachment.php | 20 ++++++++++---------- editcomment.php | 10 +++++----- editreport.php | 8 ++++---- search.php | 8 ++++---- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/attachment.php b/attachment.php index 8bdf345..a46c5d7 100755 --- a/attachment.php +++ b/attachment.php @@ -125,11 +125,11 @@ if ($_POST['do'] == 'insert') foreach ($obsoletes as $attachmentid) { $log = new Logging; - $log->set_bugid($bug['bugid']); - $log->set_attachmentid($attachmentid); - $log->add_data(true, array('obsolete' => 0), array('obsolete'), false, 'attachment'); - $log->add_data(false, array('obsolete' => 1), array('obsolete'), false, 'attachment'); - $log->update_history(); + $log->setBugId($bug['bugid']); + $log->setAttachmentId($attachmentid); + $log->addData(true, array('obsolete' => 0), array('obsolete'), false, 'attachment'); + $log->addData(false, array('obsolete' => 1), array('obsolete'), false, 'attachment'); + $log->updateHistory(); } } @@ -219,20 +219,20 @@ if ($_POST['do'] == 'update') else { $log = new Logging(); - $log->set_bugid($bug['bugid']); - $log->set_attachmentid($input->in['attachmentid']); + $log->setBugId($bug['bugid']); + $log->setAttachmentId($input->in['attachmentid']); $attachapi->fetch(); - $log->add_data(true, $attachapi->record, array('attachment'), true, 'attachment'); + $log->addData(true, $attachapi->record, array('attachment'), true, 'attachment'); $attachapi->set('description', $input->in['description']); $attachapi->set('obsolete', $input->in['obsolete']); $attachapi->update(); - $log->add_data(false, $attachapi->values, array('attachment'), true, 'attachment'); + $log->addData(false, $attachapi->values, array('attachment'), true, 'attachment'); - $log->update_history(); + $log->updateHistory(); $message->redirect(T('The attachment was successfully modified.'), "showreport.php?bugid=$bug[bugid]"); } diff --git a/editcomment.php b/editcomment.php index 7fd16a8..2e2fd4e 100644 --- a/editcomment.php +++ b/editcomment.php @@ -141,11 +141,11 @@ if ($_POST['do'] == 'update') // setup logging require_once('./includes/class_logging.php'); $log = new Logging; - $log->set_bugid($bug['bugid']); - $log->set_commentid($comment['commentid']); + $log->setBugId($bug['bugid']); + $log->setCommentId($comment['commentid']); - $log->add_data(true, $commentapi->record, array('comment', 'hidden'), false, 'comment'); - $log->add_data(false, $commentapi->values, array('comment', 'hidden'), false, 'comment'); + $log->addData(true, $commentapi->record, array('comment', 'hidden'), false, 'comment'); + $log->addData(false, $commentapi->values, array('comment', 'hidden'), false, 'comment'); $lastgood = $db->queryFirst(" SELECT comment.* AS comment, user.displayname AS username @@ -163,7 +163,7 @@ if ($_POST['do'] == 'update') WHERE bugid = $bug[bugid]" ); - $log->update_history(); + $log->updateHistory(); $message->redirect(T('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]"); } diff --git a/editreport.php b/editreport.php index a3fb714..2c96b0f 100644 --- a/editreport.php +++ b/editreport.php @@ -50,7 +50,7 @@ if (!check_bug_permissions($bug)) // setup logging require_once('./includes/class_logging.php'); $log = new Logging(); -$log->set_bugid($bug['bugid']); +$log->setBugId($bug['bugid']); $notif = new NotificationCenter(); @@ -93,7 +93,7 @@ if ($_POST['do'] == 'update') $message->errorPermission(); } - $log->add_data(true, $bugapi->record, $log->getCommonFields(), true); + $log->addData(true, $bugapi->record, $log->getCommonFields(), true); // ------------------------------------------------------------------- // handle automations @@ -201,7 +201,7 @@ if ($_POST['do'] == 'update') // handle logging and perform updates $notif->setBugData($bugapi->record, array_merge($bugapi->record, $bugapi->values)); - $log->add_data(false, $bugapi->values, $log->getCommonFields(), true); + $log->addData(false, $bugapi->values, $log->getCommonFields(), true); if (!$message->hasErrors()) { @@ -215,7 +215,7 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // do diff history - $log->update_history(); + $log->updateHistory(); $notif->sendBugChangeNotice(); diff --git a/search.php b/search.php index ad56a68..6014a6e 100644 --- a/search.php +++ b/search.php @@ -542,8 +542,8 @@ if ($_POST['do'] == 'doupdate') $api->values = $bug; $log = new Logging(); - $log->set_bugid($bug['bugid']); - $log->add_data(true, $bug, $log->getCommonFields(), true); + $log->setBugId($bug['bugid']); + $log->addData(true, $bug, $log->getCommonFields(), true); if ($input->in['status'] AND can_perform('canchangestatus', $bug['product'])) { @@ -575,10 +575,10 @@ if ($_POST['do'] == 'doupdate') process_custom_fields($api, $message, false, true); - $log->add_data(false, $api->values, $log->getCommonFields(), true); + $log->addData(false, $api->values, $log->getCommonFields(), true); $api->update(); - $log->update_history(); + $log->updateHistory(); } $message->redirect(T('The specified bugs have been updated and you will now return to your search results.'), 'search.php?searchid=' . $input->in['searchid']); -- 2.22.5