Thread: 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. |
From: <Gin...@us...> - 2007-11-04 19:22:55
|
Revision: 190 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=190&view=rev Author: GingerDog Date: 2007-11-04 11:22:58 -0800 (Sun, 04 Nov 2007) Log Message: ----------- list-virtual.php: remove unnecessary todo Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-11-04 19:13:42 UTC (rev 189) +++ trunk/list-virtual.php 2007-11-04 19:22:58 UTC (rev 190) @@ -64,9 +64,6 @@ if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[0]; - -if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[1]; # TODO: should never happen?!? ($fDomain should already be filled by the line above) - if (!check_owner(authentication_get_username(), $fDomain)) { # die($PALANG['invalid_parameter']); header("Location: list-domain.php"); # domain not owned by this admin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-11-04 19:34:40
|
Revision: 191 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=191&view=rev Author: GingerDog Date: 2007-11-04 11:34:45 -0800 (Sun, 04 Nov 2007) Log Message: ----------- list-virtual.php: fix logic for display of vacation stuff Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-11-04 19:22:58 UTC (rev 190) +++ trunk/list-virtual.php 2007-11-04 19:34:45 UTC (rev 191) @@ -110,13 +110,14 @@ { if ('pgsql'==$CONF['database_type']) { + //var_dump($row); $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 - 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; + if($row['v_active'] == NULL) { + $row['v_active'] = 'f'; } + $row['v_active']=('t'==$row['v_active']) ? 1 : 0; } $tMailbox[] = $row; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-11-25 00:35:10
|
Revision: 240 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=240&view=rev Author: GingerDog Date: 2007-11-24 16:35:13 -0800 (Sat, 24 Nov 2007) Log Message: ----------- list-virtual.php: fix ticket 1837766 Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-11-21 00:12:37 UTC (rev 239) +++ trunk/list-virtual.php 2007-11-25 00:35:13 UTC (rev 240) @@ -33,6 +33,8 @@ authentication_require_role('admin'); +$SESSID_USERNAME = authentication_get_username(); + if (authentication_has_role('global-admin')) { $list_domains = list_domains (); $is_superadmin = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-12-02 16:54:10
|
Revision: 254 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=254&view=rev Author: GingerDog Date: 2007-12-02 08:54:15 -0800 (Sun, 02 Dec 2007) Log Message: ----------- fix possible XSS hole (security fix) Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-12-02 16:53:56 UTC (rev 253) +++ trunk/list-virtual.php 2007-12-02 16:54:15 UTC (rev 254) @@ -164,7 +164,8 @@ } } - +// this is why we need a proper template layer. +$fDomain = htmlentities($fDomain, ENT_QUOTES); include ("templates/header.php"); include ("templates/menu.php"); include ("templates/list-virtual.php"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2008-01-03 21:50:37
|
Revision: 284 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=284&view=rev Author: GingerDog Date: 2008-01-03 13:50:39 -0800 (Thu, 03 Jan 2008) Log Message: ----------- list-virtual.php: Exit after header redirect Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2007-12-30 20:16:07 UTC (rev 283) +++ trunk/list-virtual.php 2008-01-03 21:50:39 UTC (rev 284) @@ -28,9 +28,9 @@ * fDomain * fDisplay */ - require_once('common.php'); + authentication_require_role('admin'); $SESSID_USERNAME = authentication_get_username(); @@ -69,6 +69,7 @@ if (!check_owner(authentication_get_username(), $fDomain)) { # die($PALANG['invalid_parameter']); header("Location: list-domain.php"); # domain not owned by this admin + exit(0); } $query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $fDisplay, $page_size"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |