[phpBB] svn: r609 - trunk/phpbb3

taffit at wolffelaar.nl taffit at wolffelaar.nl
Mon Mar 7 04:06:28 CET 2011


Author: taffit
Date: 2011-03-07 04:06:27 +0100 (Mon, 07 Mar 2011)
New Revision: 609

Modified:
   trunk/phpbb3/dbapps-lib
Log:
Simplify pgsql call

Since ${dbc_dbserver} is tested, no need to handle an expansion for it.

Modified: trunk/phpbb3/dbapps-lib
===================================================================
--- trunk/phpbb3/dbapps-lib	2011-03-07 03:06:03 UTC (rev 608)
+++ trunk/phpbb3/dbapps-lib	2011-03-07 03:06:27 UTC (rev 609)
@@ -18,9 +18,9 @@
             ;;
         pgsql )
             if [ -z "${dbc_dbserver}" ]; then
-                echo $sql | su - postgres -c "psql ${dbc_dbserver:+-h $dbc_dbserver} ${dbc_dbport:+-p $dbc_dbport} -d \"dbname=$dbc_dbname ${dbc_ssl:+sslmode=require}\" -q" || run_sql_fail $dbc_dbtype
+                echo $sql | su - postgres -c "psql ${dbc_dbport:+-p $dbc_dbport} -d \"dbname=$dbc_dbname ${dbc_ssl:+sslmode=require}\" -q" || run_sql_fail $dbc_dbtype
             else
-                echo $sql | psql ${dbc_dbserver:+-h $dbc_dbserver} ${dbc_dbport:+-p $dbc_dbport} -d \"dbname=$dbc_dbname ${dbc_ssl:+sslmode=require}\" -q || run_sql_fail $dbc_dbtype
+                echo $sql | psql -h $dbc_dbserver ${dbc_dbport:+-p $dbc_dbport} -d \"dbname=$dbc_dbname ${dbc_ssl:+sslmode=require}\" -q || run_sql_fail $dbc_dbtype
             fi
             ;;
         sqlite )





More information about the phpBB-l mailing list