mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1929 add parameter search on pwg.categories.getList (and use it)
This commit is contained in:
@@ -23,6 +23,7 @@ function linked_albums_search(searchText) {
|
||||
cat_id: 0,
|
||||
recursive: true,
|
||||
fullname: true,
|
||||
search: searchText,
|
||||
}
|
||||
} else {
|
||||
api_params = {
|
||||
@@ -64,4 +65,4 @@ function linked_albums_search(searchText) {
|
||||
console.log(e.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,16 @@ SELECT
|
||||
FROM '. CATEGORIES_TABLE .'
|
||||
'.$join_type.' JOIN '. USER_CACHE_CATEGORIES_TABLE .'
|
||||
ON id=cat_id AND user_id='.$join_user.'
|
||||
WHERE '. implode("\n AND ", $where) .'
|
||||
WHERE '. implode("\n AND ", $where);
|
||||
|
||||
if (isset($params["search"]) and $params['search'] != "")
|
||||
{
|
||||
$query .= '
|
||||
AND name LIKE \'%'.pwg_db_real_escape_string($params["search"]).'%\'
|
||||
LIMIT '.$conf["linked_album_search_limit"];
|
||||
}
|
||||
|
||||
$query.= '
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user