Skip to content
Permalink
Browse files

issue #1 ability to select fields by configuration

  • Loading branch information
plegall committed Dec 2, 2019
1 parent 092d79b commit 26b6d2fdb88f0b0c28d51f0d9e3c46ed1ae6dacb
Showing with 13 additions and 0 deletions.
  1. +13 −0 main.inc.php
@@ -25,6 +25,8 @@
function search_links_init_fake_search()
{
global $conf;
// search.php?mindate=2011-01-15&maxdate=2011-01-31&album=23
//
// what does search.php expects in $_POST ?
@@ -109,6 +111,17 @@ function search_links_init_fake_search()
die("invalid fields");
}
}
elseif (isset($conf['search_links_fields']) and is_array($conf['search_links_fields']))
{
foreach ($conf['search_links_fields'] as $field)
{
$field = trim($field);
if (in_array($field, $basic_fields))
{
$_POST['fields'][] = $field;
}
}
}
else
{
$_POST['fields'] = $basic_fields;

0 comments on commit 26b6d2f

Please sign in to comment.
You can’t perform that action at this time.