Merge post-release fixes from trunk in preperation for 0.3.1. This covers r611:619
This commit is contained in:
+24
-6
@@ -621,9 +621,19 @@ fi
|
||||
# import libraries
|
||||
|
||||
ACX_CLUCENE()
|
||||
if test "x$CLUCENE_LIBS" = "x"; then
|
||||
case "x$CLUCENE_LIBS" in
|
||||
x)
|
||||
info_clucene="import"
|
||||
;;
|
||||
*import*)
|
||||
info_clucene="import"
|
||||
;;
|
||||
*)
|
||||
info_clucene="system"
|
||||
;;
|
||||
esac
|
||||
if test "x$info_clucene" = "ximport"; then
|
||||
AC_MSG_RESULT(Using imported CLucene)
|
||||
info_clucene="import"
|
||||
AC_CONFIG_SUBDIRS([import/clucene])
|
||||
AC_SUBST(CLUCENE_BONGO_API, "1")
|
||||
AC_SUBST(CLUCENE_LIBS, "\$(top_srcdir)/import/clucene/src/libclucene.la")
|
||||
@@ -633,19 +643,27 @@ else
|
||||
AC_MSG_ERROR([Compiling against CLucene system libraries on x86_64 is known to be buggy. Recommend you use --with-clucene=import/clucene])
|
||||
fi
|
||||
AC_MSG_RESULT(Using system CLucene)
|
||||
info_clucene="system"
|
||||
fi
|
||||
|
||||
AC_CHECK_SQLITE3()
|
||||
if test "x$SQLITE_LIBS" = "x"; then
|
||||
case "x$SQLITE_LIBS" in
|
||||
x)
|
||||
info_sqlite="import"
|
||||
;;
|
||||
*import*)
|
||||
info_sqlite="import"
|
||||
;;
|
||||
*)
|
||||
info_sqlite="system"
|
||||
;;
|
||||
esac
|
||||
if test "x$info_sqlite" = "ximport"; then
|
||||
AC_MSG_RESULT(Using imported SQLite)
|
||||
info_sqlite="import"
|
||||
AC_CONFIG_SUBDIRS([import/sqlite3])
|
||||
AC_SUBST(SQLITE_CFLAGS, "-I\$(top_srcdir)/import/sqlite3")
|
||||
AC_SUBST(SQLITE_LIBS, "\$(top_srcdir)/import/sqlite3/libbongosqlite3.la")
|
||||
else
|
||||
AC_MSG_RESULT(Using system SQLite)
|
||||
info_sqlite="system"
|
||||
fi
|
||||
|
||||
info_libical="import"
|
||||
|
||||
@@ -223,11 +223,19 @@ StoreCommandSEARCH(StoreClient *client, uint64_t guid, StoreSearchInfo *query)
|
||||
goto finish;
|
||||
case 1:
|
||||
if (!STORE_IS_FOLDER(child.type)) {
|
||||
FindPathToDocument(client, child.collection, child.guid, path, sizeof(path));
|
||||
f = fopen(path, "rb");
|
||||
if (!f) {
|
||||
ccode = ConnWriteStr(client->conn, MSG4224CANTREAD);
|
||||
goto finish;
|
||||
}
|
||||
ccode = SearchDocument(client, &child, query, f);
|
||||
fclose(f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
ccode = ConnWriteStr(client->conn, MSG1000OK);
|
||||
|
||||
finish:
|
||||
if (stmt) DStoreStmtEnd(client->handle, stmt);
|
||||
|
||||
@@ -157,14 +157,14 @@ class AgentHandler(HawkeyeHandler):
|
||||
# It's a hostlist, and arraytype is the default port
|
||||
# Check if value has port and/or weighting
|
||||
defaultweight = 1
|
||||
defultport = arraytype
|
||||
|
||||
defaultport = arraytype
|
||||
|
||||
if dobj.count(':') == 1:
|
||||
# Port and hostname
|
||||
dobj = dobj + ":" + defaultweight
|
||||
elif dobj.count(':') == 0:
|
||||
# Only hostname
|
||||
dobj = dobj + ":" + defaultport + ":" + defaultweight
|
||||
dobj = dobj + ":" + str(defaultport) + ":" + str(defaultweight)
|
||||
|
||||
# Otherwise, type was string (default).
|
||||
|
||||
@@ -215,11 +215,7 @@ class AgentHandler(HawkeyeHandler):
|
||||
nkey["revertbox"] = key + "-normal"
|
||||
nkey["revertjs"] = "$('" + nkey["revertbox"] + "').hide(); $('" + nkey["selectorid"] + "').show();"
|
||||
|
||||
strthingy = ""
|
||||
for value in config[key]:
|
||||
strthingy += value + ","
|
||||
|
||||
nkey["strvalue"] = strthingy
|
||||
nkey["strvalue"] = ','.join(config[key])
|
||||
|
||||
rkeys.append(nkey)
|
||||
|
||||
|
||||
@@ -95,6 +95,20 @@ class AliasHandler(HawkeyeHandler):
|
||||
else:
|
||||
self.SetVariable("domainwide", None)
|
||||
|
||||
# handle the email->username mapping config
|
||||
mapping_value = 0
|
||||
if data.has_key("username-mapping"):
|
||||
mapping_value = int(data["username-mapping"])
|
||||
if mapping_value < 0 or mapping_value > 2:
|
||||
mapping_value = 0
|
||||
self.SetVariable("username-mapping", mapping_value)
|
||||
for i in [0, 1, 2]:
|
||||
select = "username-mapping-%d" % i
|
||||
if i == mapping_value:
|
||||
self.SetVariable(select, "selected")
|
||||
else:
|
||||
self.SetVariable(select, None)
|
||||
|
||||
self.SetVariable("useraliasestxt", aliases_txt)
|
||||
self.SetVariable("useraliases", tpl_aliases)
|
||||
self.SetVariable("domainalias", domainalias)
|
||||
@@ -134,6 +148,9 @@ class AliasHandler(HawkeyeHandler):
|
||||
elif key == "domainalias":
|
||||
# Actual domain alias val
|
||||
config["domainalias"] = value
|
||||
elif key == "username-mapping":
|
||||
# Mapping scheme wanted
|
||||
config["username-mapping"] = int(value)
|
||||
elif key == "useralias":
|
||||
# User aliases
|
||||
# Split this, and set array as value.
|
||||
|
||||
@@ -47,6 +47,16 @@
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 16px;">Default address to username mapping</td>
|
||||
<td>
|
||||
<select name="username-mapping">
|
||||
<option value="0" tal:attributes="selected username-mapping-0">Local part (before @) is the username</option>
|
||||
<option value="1" tal:attributes="selected username-mapping-1">Full e-mail address is the username</option>
|
||||
<option value="2" tal:attributes="selected username-mapping-2">Domain part (after @) is the username</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user