reindent; fix postgres date formatting issue with +01 times

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@630 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 15 years ago
parent 05e832ca8c
commit 125130c1dd

@ -60,14 +60,14 @@ else
}
if (count($list_domains) == 0) {
# die("no domains");
# die("no domains");
header("Location: list-domain.php"); # no domains (for this admin at least) - redirect to domain list
}
if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) if (empty ($fDomain)) $fDomain = $list_domains[0];
if (!check_owner(authentication_get_username(), $fDomain)) {
# die($PALANG['invalid_parameter']);
# die($PALANG['invalid_parameter']);
header("Location: list-domain.php"); # domain not owned by this admin
exit(0);
}
@ -148,7 +148,10 @@ if ($result['rows'] > 0)
{
if ('pgsql'==$CONF['database_type'])
{
$row['modified']=gmstrftime('%c %Z',$row['modified']);
//. at least in my database, $row['modified'] already looks like : 2009-04-11 21:38:10.75586+01,
// while gmstrftime expects an integer value. strtotime seems happy though.
//$row['modified']=gmstrftime('%c %Z',$row['modified']);
$row['modified'] = date('Y-m-d H:i', strtotime($row['modified']));
$row['active']=('t'==$row['active']) ? 1 : 0;
}
@ -186,9 +189,9 @@ if ($result['rows'] > 0)
{
if ('pgsql'==$CONF['database_type'])
{
//var_dump($row);
$row['created']=gmstrftime('%c %Z',strtotime($row['created']));
$row['modified']=gmstrftime('%c %Z',strtotime($row['modified']));
// XXX
$row['modified'] = date('Y-m-d H:i', strtotime($row['modified']));
$row['created'] = date('Y-m-d H:i', strtotime($row['created']));
$row['active']=('t'==$row['active']) ? 1 : 0;
if($row['v_active'] == NULL) {
$row['v_active'] = 'f';

Loading…
Cancel
Save