summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-05 04:53:13 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-05 04:53:13 +0000
commit036f60865172bc36e1468afd64d5ac775fa39529 (patch)
treeff6390d7252a3d6783bf717cf723069f09e1f9a4 /bin
parent9328565f48fb505f789c371433088a46b0e6a693 (diff)
Converting 2-arg open to 3-arg open
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@720 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-xbin/admin.pl10
-rwxr-xr-xbin/am.pl4
-rwxr-xr-xbin/login.pl4
3 files changed, 9 insertions, 9 deletions
diff --git a/bin/admin.pl b/bin/admin.pl
index 1a0a765b..0ecbe449 100755
--- a/bin/admin.pl
+++ b/bin/admin.pl
@@ -589,12 +589,12 @@ sub form_header {
# access control
- open(FH, $menufile) or $form->error(__FILE__.':'.__LINE__.': '."$menufile : $!");
+ open(FH, '<', $menufile) or $form->error(__FILE__.':'.__LINE__.': '."$menufile : $!");
# scan for first menu level
@a = <FH>;
close(FH);
- if (open(FH, "custom_$menufile")) {
+ if (open(FH, '<', "custom_$menufile")) {
push @a, <FH>;
}
@@ -801,10 +801,10 @@ sub save {
foreach $file (@templates) {
- open(TEMP, "${LedgerSMB::Sysconfig::templates}/$file") or $form->error(__FILE__.':'.__LINE__.': '."$templates/$file : $!");
+ open(TEMP, '<', "${LedgerSMB::Sysconfig::templates}/$file") or $form->error(__FILE__.':'.__LINE__.': '."$templates/$file : $!");
$file =~ s/$form->{mastertemplates}-//;
- open(NEW, ">$form->{templates}/$file") or $form->error(__FILE__.':'.__LINE__.': '."$form->{templates}/$file : $!");
+ open(NEW, '>', "$form->{templates}/$file") or $form->error(__FILE__.':'.__LINE__.': '."$form->{templates}/$file : $!");
while ($line = <TEMP>) {
print NEW $line;
@@ -1297,7 +1297,7 @@ sub unlock_system {
sub lock_system {
# This needs to be done with a db tool
- #open(FH, ">${LedgerSMB::Sysconfig::userspath}/nologin") or $form->error($locale->text('Cannot create Lock!'));
+ #open(FH, '>', "${LedgerSMB::Sysconfig::userspath}/nologin") or $form->error($locale->text('Cannot create Lock!'));
#close(FH);
$form->{callback} = "$form->{script}?action=list_users&amp;path=$form->{path}";
$form->redirect($locale->text('Lockfile created!'));
diff --git a/bin/am.pl b/bin/am.pl
index 56820e39..60c53500 100755
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -1407,9 +1407,9 @@ sub save_language {
foreach $file (@templates) {
if (-f "$myconfig{templates}/$file") {
- open(TEMP, "$myconfig{templates}/$file") or $form->error("$myconfig{templates}/$file : $!");
+ open(TEMP, '<', "$myconfig{templates}/$file") or $form->error("$myconfig{templates}/$file : $!");
- open(NEW, ">$myconfig{templates}/$form->{code}/$file") or $form->error("$myconfig{templates}/$form->{code}/$file : $!");
+ open(NEW, '>', "$myconfig{templates}/$form->{code}/$file") or $form->error("$myconfig{templates}/$form->{code}/$file : $!");
while ($line = <TEMP>) {
print NEW $line;
diff --git a/bin/login.pl b/bin/login.pl
index 8fe9a7cf..bff94a10 100755
--- a/bin/login.pl
+++ b/bin/login.pl
@@ -238,7 +238,7 @@ sub login {
#this needs to be done via db
#if (! $form->{beenthere}) {
- # open(FH, "${LedgerSMB::Sysconfig::memberfile}") or $form->error(__FILE__.':'.__LINE__.": $memberfile : $!");
+ # open(FH, '<', "${LedgerSMB::Sysconfig::memberfile}") or $form->error(__FILE__.':'.__LINE__.": $memberfile : $!");
# @a = <FH>;
# close(FH);
#
@@ -282,7 +282,7 @@ sub login {
# upgrade dataset and log in again
#locking needs to be done via db function
- #open FH, ">${LedgerSMB::Sysconfig::userspath}/nologin" or $form->error($!);
+ #open FH, '>', "${LedgerSMB::Sysconfig::userspath}/nologin" or $form->error($!);
for (qw(dbname dbhost dbport dbdriver dbuser dbpasswd)) { $form->{$_} = $user->{$_} }