list-virtual.php: fix unnecessary clause for psql query, that is not needed

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@189 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 17 years ago
parent ade09f577c
commit 0f357e7c97

@ -94,12 +94,7 @@ if ($result['rows'] > 0)
if ($CONF['vacation_control_admin'] == '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.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $fDisplay, $page_size");
if ('pgsql'==$CONF['database_type'])
{
//TODO/FIXME: postgres query needs to be rewrited
$query = "SELECT *,extract(epoch from created) as uts_created,extract(epoch from modified) as uts_modified FROM $table_mailbox WHERE domain='$fDomain' ORDER BY username LIMIT $page_size OFFSET $fDisplay";
}
$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.domain='$fDomain' ORDER BY $table_mailbox.username LIMIT $page_size OFFSET $fDisplay";
}
else
{
@ -118,10 +113,10 @@ if ($result['rows'] > 0)
{
if ('pgsql'==$CONF['database_type'])
{
$row['created']=gmstrftime('%c %Z',$row['uts_created']);
$row['modified']=gmstrftime('%c %Z',$row['uts_modified']);
$row['created']=gmstrftime('%c %Z',strtotime($row['created']));
$row['modified']=gmstrftime('%c %Z',strtotime($row['modified']));
$row['active']=('t'==$row['active']) ? 1 : 0;
$row['v_active'] = 1; // default to off... TODO: 1 is NOT off
$row['v_active'] = 1; // default to off... TODO: 1 is NOT off
if(isset($row['v_active'])) { /* key may not be present in results due to query from above */
$row['v_active']=('t'==$row['v_active']) ? 1 : 0;
}

Loading…
Cancel
Save