# HG changeset patch # User Dan # Date 1228016680 18000 # Node ID 6b79a49f85f0dda4024f142b74094bc502456055 # Parent 7ba7b85e119500ec05c321c3514afc77e9417f60 Added additionalwhere option (it was already documented) to custom search API diff -r 7ba7b85e1195 -r 6b79a49f85f0 includes/search.php --- a/includes/search.php Sat Nov 29 00:38:35 2008 -0500 +++ b/includes/search.php Sat Nov 29 22:44:40 2008 -0500 @@ -1002,6 +1002,8 @@ if ( isset($options['additionalcolumns']) ) $columns .= ', ' . implode(', ', $options['additionalcolumns']); + $additionalwhere = ( isset($options['additionalwhere']) ) ? $options['additionalwhere'] : ''; + $sql = "SELECT $columns FROM " . table_prefix . "{$options['table']} WHERE ( $where ) $additionalwhere;"; if ( !($q = $db->sql_unbuffered_query($sql)) )