r4237 bugfix: issues reported in #401
authorAaron Dummer <aaron@dummer.info>
Fri, 18 Feb 2011 00:03:13 +0000 (00:03 +0000)
committerAaron Dummer <aaron@dummer.info>
Fri, 18 Feb 2011 00:03:13 +0000 (00:03 +0000)
getAccountSearchResult(): initialize array
renderHistory(): incorrect column count

wwwroot/inc/database.php
wwwroot/inc/interface.php

index 810a171..8d83c85 100644 (file)
@@ -1786,6 +1786,7 @@ function getAccountSearchResult ($terms)
                'user_name'
        );
        // Merge it together, if duplicates persist, byUsername wins
+       $ret = array();
        foreach (array ($byRealname, $byUsername) as $array)
                foreach ($array as $user)
                {
index 0b5ad0e..37bc54f 100644 (file)
@@ -2254,7 +2254,7 @@ function renderHistory ($object_type, $object_id)
                                "from RackObjectHistory inner join Dictionary on objtype_id = dict_key join Chapter on Dictionary.chapter_id = Chapter.id " .
                                "where Chapter.name = 'RackObjectType' and RackObjectHistory.id=? order by ctime";
                        $header = '<tr><th>change time</th><th>author</th><th>common name</th><th>visible label</th><th>asset no</th><th>has problems?</th><th>object type</th><th>comment</th></tr>';
-                       $extra = 8;
+                       $extra = 7;
                        break;
                default:
                        throw new InvalidArgException ('object_type', $object_type);