Basically just comment out the stuff that purposely breaks namespaces:
diff --git a/TitleKey_body.php b/TitleKey_body.php
index 63cf769..b0b7b87 100644
--- a/TitleKey_body.php
+++ b/TitleKey_body.php
@@ -140,10 +140,10 @@ class TitleKey {
}
static function prefixSearch( $namespaces, $search, $limit, $offset ) {
- $ns = array_shift( $namespaces ); // support only one namespace
- if( in_array( NS_MAIN, $namespaces ) )
- $ns = NS_MAIN; // if searching on many always default to main
-
+# $ns = array_shift( $namespaces ); // support only one namespace
+# if( in_array( NS_MAIN, $namespaces ) )
+# $ns = NS_MAIN; // if searching on many always default to main
+ $ns = $namespaces;
$key = self::normalize( $search );
$dbr = wfGetDB( DB_SLAVE );