@ -89,23 +89,14 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
}
/*
*/
if ($CONF['vacation_control_admin'] == 'YES')
if ($CONF['vacation_control_admin'] == 'YES' && $CONF['vacation'] == 'YES')
{
$query = ("SELECT $table_mailbox.*, $table_vacation.active AS v_active FROM $table_mailbox LEFT JOIN $table_vacation ON $table_mailbox.username=$table_vacation.email WHERE $table_mailbox.username LIKE '%$fSearch%' OR $table_mailbox.name LIKE '%$fSearch%' ORDER BY $table_mailbox.username");
# TODO: special query for pgsql needed?
echo $query;
}
else
{
$query = "SELECT * FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
/* TODO: special query for pgsql really needed?
if ('pgsql'==$CONF['database_type'])
{
$query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE username LIKE '%$fSearch%' OR name LIKE '%$fSearch%' ORDER BY username";
}
*/
}
$result = db_query ($query);
@ -117,15 +108,9 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")