From 63535f566e2fbe9244fd3e50b9c8d1281b822fc0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 Jul 2005 05:40:34 +0000 Subject: r8481: switched ldb ejs called over to an OO interface, so you do: var ldb = ldb_init(); res = ldb.search(dbfile, "(objectClass=user)"); you can also do: ldbSearch = ldb.search; res = ldbSearch(dbfile, "(objectClass=user)"); if you want the old interface (ie. you can use this to import functions into the global or local namespace). (This used to be commit 3093057d9735cbb62f57e7159264d5a28b85320f) --- swat/esptest/ldb.esp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'swat/esptest') diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp index 385a8918c6..be894a1ea9 100644 --- a/swat/esptest/ldb.esp +++ b/swat/esptest/ldb.esp @@ -7,8 +7,9 @@ <% var dbfile = lpGet("sam database"); var attrs = new Array("name", "dnsDomain", "objectSid", "dn"); +var ldb = ldb_init(); -res = ldbSearch(dbfile, "(objectClass=domain)", attrs); +res = ldb.search(dbfile, "(objectClass=domain)", attrs); multi_table(res, "dn"); %> @@ -17,14 +18,14 @@ multi_table(res, "dn"); <% var dbfile = lpGet("sam database"); -res = ldbSearch(dbfile, "(objectClass=user)"); +res = ldb.search(dbfile, "(objectClass=user)"); multi_table(res, "dn"); %>

A search with bad arguments

<% -res = ldbSearch("foo"); +res = ldb.search("foo"); %> all done -- cgit