[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1858] trunk/LedgerSMB
- Subject: SF.net SVN: ledger-smb: [1858] trunk/LedgerSMB
- From: ..hidden..
- Date: Wed, 07 Nov 2007 12:30:51 -0800
Revision: 1858
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1858&view=rev
Author: einhverfr
Date: 2007-11-07 12:30:51 -0800 (Wed, 07 Nov 2007)
Log Message:
-----------
Converting backticks to use system() to avoid many problems on Windows
Modified Paths:
--------------
trunk/LedgerSMB/Database.pm
trunk/LedgerSMB/IS.pm
trunk/LedgerSMB/User.pm
Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm 2007-11-07 20:22:55 UTC (rev 1857)
+++ trunk/LedgerSMB/Database.pm 2007-11-07 20:30:51 UTC (rev 1858)
@@ -71,7 +71,7 @@
sub create {
my $self = (@_);
$self->_init_environment();
- `createdb $self->{dbname}`;
+ system('createdb $self->{dbname}');
my $error = $!;
if ($error){
$self->error($!);
@@ -108,7 +108,8 @@
# Private method. Executes the sql script in psql.
sub _execute_script {
my ($self, $script) = @_;
- `psql $self->{dbname} < 'sql/$script.sql'`;
+ # Note that this needs to be changed so that it works with Win32!
+ system('psql $self->{dbname} < "sql/$script.sql"');
return $!;
}
Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm 2007-11-07 20:22:55 UTC (rev 1857)
+++ trunk/LedgerSMB/IS.pm 2007-11-07 20:30:51 UTC (rev 1858)
@@ -20,7 +20,7 @@
# Web: http://www.sql-ledger.org
#
# Contributors: Jim Rawlings <..hidden..>
-#`
+#
#======================================================================
#
# This file has undergone whitespace cleanup.
Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm 2007-11-07 20:22:55 UTC (rev 1857)
+++ trunk/LedgerSMB/User.pm 2007-11-07 20:30:51 UTC (rev 1858)
@@ -426,7 +426,7 @@
$ENV{PGHOST} = $form->{dbhost};
$ENV{PGPORT} = $form->{dbport};
- $results = `psql -f $filename 2>&1`;
+ $results = system('psql -f $filename 2>&1');
if ($?) {
$form->error($!);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.