Updates for everything done to class_logging.php
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 16 Sep 2008 17:22:26 +0000 (13:22 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 16 Sep 2008 17:22:26 +0000 (13:22 -0400)
attachment.php
editcomment.php
editreport.php
search.php

index 8bdf3452dbea8f47ba0dea265509232d3e38d50a..a46c5d79e58d6229e419ed7b8790b90f86964a68 100755 (executable)
@@ -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]");
        }
index 7fd16a81d345bcc273b4e1a4c55f0f6ffc25a21f..2e2fd4e035eec997afe1335b7c917668cf72797c 100644 (file)
@@ -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]");
        }
index a3fb714fe2a648cb62192ca3cef92577f73c6fd7..2c96b0fb57f11714544a824ac7e2adf17c86fcff 100644 (file)
@@ -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();
        
index ad56a684cbcbbbbb7ad601fc67035b688274b895..6014a6eda4c4a15e0aed4e2418b73341c1ae4a5b 100644 (file)
@@ -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']);