Ubuntu 8.04 fixes

This commit is contained in:
Jamie Cameron
2008-04-30 21:02:30 +00:00
parent bc3bf5dfe9
commit bf98ce2347
3 changed files with 18 additions and 4 deletions

View File

@@ -64,3 +64,5 @@ Improved support for Debian/Ubuntu systems that can have different PostgreSQL ve
Fixed a bug that prevented 'Jump to row' from working properly.
---- Changes since 1.400 ----
Added a Module Config option to show databases and tables using just their names.
---- Changes since 1.410 ----
Improve support for PostgreSQL 8.3 on Ubuntu 8.04.

View File

@@ -1,12 +1,12 @@
hba_conf=/etc/postgresql/7.4/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf
hba_conf=/etc/postgresql/*/main/pg_hba.conf
psql=/usr/bin/psql
start_cmd=if [ -r /etc/init.d/postgresql-7.4 ]; then /etc/init.d/postgresql-7.4 start; else /etc/init.d/postgresql-8.2 start; fi
start_cmd=/etc/init.d/postgresql-* start
stop_cmd=/etc/init.d/postgresql-* stop
basedb=template1
perpage=25
plib=
pass=
login=postgres
stop_cmd=if [ -r /etc/init.d/postgresql-7.4 ]; then /etc/init.d/postgresql-7.4 stop; else /etc/init.d/postgresql-8.2 stop; fi
pid_file=/var/run/postmaster.pid
nodbi=0
dump_cmd=/usr/bin/pg_dump

View File

@@ -47,7 +47,10 @@ else {
%displayconfig = %config;
}
foreach my $hba (split(/\t+/, $config{'hba_conf'})) {
if (-r $hba) {
if ($hba =~ /\*|\?/) {
($hba) = glob($hba);
}
if ($hba && -r $hba) {
$hba_conf_file = $hba;
last;
}
@@ -265,6 +268,15 @@ sub execute_sql_safe
{
local $sql = $_[1];
local @params = @_[2..$#_];
if ($gconfig{'debug_what_sql'}) {
# Write to Webmin debug log
local $params;
for(my $i=0; $i<@params; $i++) {
$params .= " ".$i."=".$params[$i];
}
&webmin_debug_log('SQL', "db=$_[0] sql=$sql".$params);
}
$sql =~ s/\\/\\\\/g;
if ($driver_handle &&
$sql !~ /^\s*(create|drop)\s+database/ && $sql !~ /^\s*\\/ &&
!$force_nodbi) {