Revision: 556
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=556&view=rev
Author: GingerDog
Date: 2009-01-28 21:01:55 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
functions.inc.php: make it more forgiving if we have not defined the table name in config.inc.php
Modified Paths:
--------------
branches/postfixadmin-amavis/functions.inc.php
Modified: branches/postfixadmin-amavis/functions.inc.php
===================================================================
--- branches/postfixadmin-amavis/functions.inc.php 2009-01-28 20:15:42 UTC (rev 555)
+++ branches/postfixadmin-amavis/functions.inc.php 2009-01-28 21:01:55 UTC (rev 556)
@@ -1700,9 +1700,12 @@
function table_by_key ($table_key)
{
global $CONF;
- $table = $CONF['database_prefix'].$CONF['database_tables'][$table_key];
- if (empty($table)) $table = $table_key;
- return $table;
+ if(isset($CONF['database_tables'][$table_key])) {
+ return $CONF['database_prefix'].$CONF['database_tables'][$table_key];
+ }
+ else {
+ return $table_key;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|