r1508 + fix getResidentRacksData() return value
authorDenis Ovsienko <infrastation@yandex.ru>
Sun, 13 Jan 2008 15:24:17 +0000 (15:24 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Sun, 13 Jan 2008 15:24:17 +0000 (15:24 +0000)
inc/database.php

index 7919662..b4519c6 100644 (file)
@@ -667,8 +667,9 @@ function getResidentRacksData ($object_id = 0, $fetch_rackdata = TRUE)
                return;
        }
        $rows = $result->fetchAll (PDO::FETCH_NUM);
-print_r($rows);
        $result->closeCursor();
+       if (!$fetch_rackdata)
+               return $rows[0];
        $ret = array();
        foreach ($rows as $row)
        {