SF.net SVN: postfixadmin: [189] trunk/list-virtual.php
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-11-04 19:14:26
|
Revision: 189 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=189&view=rev Author: GingerDog Date: 2007-11-04 11:13:42 -0800 (Sun, 04 Nov 2007) Log Message: ----------- list-virtual.php: fix unnecessary clause for psql query, that is not needed Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-11-04 16:46:43 UTC (rev 188) +++ trunk/list-virtual.php 2007-11-04 19:13:42 UTC (rev 189) @@ -94,12 +94,7 @@ 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 ('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; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |