r812: Removing the element idea
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 10 May 2006 02:24:11 +0000 (02:24 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 10 May 2006 02:24:11 +0000 (02:24 +0000)
editreport.php
includes/class_logging.php

index daaaf78068bc9aa9124b4b0265c42d85e48cd7d4..c18dd979a88381d90a429d3f57717a7384fed4e3 100644 (file)
@@ -151,7 +151,7 @@ if ($_POST['do'] == 'update')
        if ($fields = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bugvaluefill WHERE bugid = $bug[bugid]"))
        {
                $nocustomfields = false;
-               $log2->add_data(true, $fields, array('bugid'), true, 'custom', 'custom');
+               $log2->add_data(true, $fields, array('bugid'), true, 'custom');
        }
        
        // -------------------------------------------------------------------
@@ -184,7 +184,6 @@ if ($_POST['do'] == 'update')
        
        $log2->add_data(false, $bugapi->values, $bugfields);
        
-       
        //$bugapi->update();
        
        // -------------------------------------------------------------------
@@ -202,7 +201,7 @@ if ($_POST['do'] == 'update')
                }
        }
        
-       $log2->add_data(false, $hist[1], array('bugid'), true, 'custom', 'custom');
+       $log2->add_data(false, $hist[1], array('bugid'), true, 'custom');
        
        print_r($log2); exit;
        
index 7cc4932cae7ec4e7b89cc658904b4e67b3f76ac3..eca4e4b1287b2eab62b121183e216fe3ef687c74 100644 (file)
@@ -78,7 +78,7 @@ class Logging
        /**
        * Assigns data into the $this->original or $this->modified array based
        * on the passed arrays of information and the fields to add (and what
-       * name to add them under), the element they go into, and any prefix
+       * name to add them under), and any prefix
        *
        * @access       public
        *
@@ -86,10 +86,9 @@ class Logging
        * @param        array   Data array
        * @param        array   List of fields in the data array to add; in format of array('field name' => 'display name', 'display name 2', 'display name 3')
        * @param        bool    If TRUE, then the list of fields is used to exclude, not include
-       * @param        string  Element to add to
        * @param        string  Field prefix
        */
-       function add_data($orig, $data, $fields, $exclude = false, $element = '', $prefix = '')
+       function add_data($orig, $data, $fields, $exclude = false,  $prefix = '')
        {
                $array = ($orig ? 'original' : 'modified');
                $prefix .= '.';
@@ -103,7 +102,7 @@ class Logging
                                        $fname = $fdisplay;
                                }
                                
-                               $this->{$array}["$element"]["$prefix$fdisplay"] = array('name' => $fname, 'value' => $data["$fname"]);
+                               $this->{$array}["$prefix$fdisplay"] = array('name' => $fname, 'value' => $data["$fname"]);
                        }
                }
                else
@@ -112,7 +111,7 @@ class Logging
                        {
                                if (!in_array($fname, $fields))
                                {
-                                       $this->{$array}["$element"]["$prefix$fname"] = array('name' => $fname, 'value' => $value);
+                                       $this->{$array}["$prefix$fname"] = array('name' => $fname, 'value' => $value);
                                }
                        }
                }