1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

functions.inc.php: reindent, ensure alias_pgindex_count is initialised in get_domain_details()

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@21 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
David Goodwin
2007-08-17 15:10:59 +00:00
parent b933b9186c
commit fc6013cb2a

View File

@@ -59,7 +59,10 @@ function session_fixid ()
{
if (!isset($_SESSION['exist']))
{
if ( !session_regenerate_id() ) die("Couldn't regenerate your session id.");
if ( !session_regenerate_id() )
{
die("Couldn't regenerate your session id.");
}
$_SESSION['exist'] = true;
}
}
@@ -262,13 +265,14 @@ function get_domain_properties ($domain)
$list['alias_pgindex']=array ();
$list['mbox_pgindex']=array ();
$list['mbox_pgindex_count'] = 0;
//while loop to figure index names. use page_size and loop of queries
$i=0;
$current=0;
$page_size = $CONF['page_size'];
$tmpstr="";
$idxlabel="";
$list['alias_pgindex_count'] = 0;
if ( $list['alias_count'] > $page_size )
{
@@ -335,14 +339,7 @@ function get_domain_properties ($domain)
$query="SELECT * FROM $table_domain WHERE domain='$domain'";
if ('pgsql'==$CONF['database_type'])
{
$query="
SELECT
*,
EXTRACT(epoch FROM created) AS uts_created,
EXTRACT(epoch FROM modified) AS uts_modified
FROM $table_domain
WHERE domain='$domain'
";
$query=" SELECT *, EXTRACT(epoch FROM created) AS uts_created, EXTRACT(epoch FROM modified) AS uts_modified FROM $table_domain WHERE domain='$domain' ";
}
$result = db_query ($query);
$row = db_array ($result['result']);
@@ -1196,7 +1193,7 @@ function db_connect ()
else
{
print "<p />DEBUG INFORMATION:<br />MySQL 3.x / 4.0 functions not available!<br />database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT";
die;
die();
}
}
@@ -1210,7 +1207,7 @@ function db_connect ()
else
{
print "<p />DEBUG INFORMATION:<br />MySQL 4.1 functions not available!<br />database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT";
die;
die();
}
}
@@ -1224,7 +1221,7 @@ function db_connect ()
else
{
print "<p />DEBUG INFORMATION:<br />PostgreSQL functions not available!<br />database_type = 'pgsql' in config.inc.php, are you using a different database? $DEBUG_TEXT";
die;
die();
}
}
@@ -1239,7 +1236,7 @@ function db_connect ()
print "<br />\n";
print "Make sure that you have set the correct database type in the config.inc.php file<br />\n";
print $DEBUG_TEXT;
die;
die();
}
}