Small bugfixes
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 19 Jun 2008 15:24:30 +0000 (15:24 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 19 Jun 2008 15:24:30 +0000 (15:24 +0000)
includes/ui/ui_lists.inc

index 375498d0f2bc9a367d3bda4921dcbb64ee2f6050..6766415e767ac7a131078802d159e597561812db 100644 (file)
@@ -101,10 +101,10 @@ $opts = array(            // default options
                        $Ajax->activate($name);
        }
        if ($txt == '') {
-               if ($spec_option === false)
-               $limit = ' LIMIT 1';
+               if ($spec_option === false && $selected_id==null)
+                 $limit = ' LIMIT 1';
                else
-               $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
+                 $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'";
        }
        else
                if ($txt != '*') {