[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [389] trunk
- Subject: SF.net SVN: ledger-smb: [389] trunk
- From: ..hidden..
- Date: Sun, 29 Oct 2006 22:12:35 -0800
Revision: 389
http://svn.sourceforge.net/ledger-smb/?rev=389&view=rev
Author: jasonjayr
Date: 2006-10-29 22:12:23 -0800 (Sun, 29 Oct 2006)
Log Message:
-----------
Changed LedgerSMB/User.pm to be package LedgerSMB::User, and changed all the modules that currently call it.
Modified Paths:
--------------
trunk/LedgerSMB/AM.pm
trunk/LedgerSMB/User.pm
trunk/bin/admin.pl
trunk/bin/am.pl
trunk/bin/hr.pl
trunk/bin/login.pl
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/LedgerSMB/AM.pm 2006-10-30 06:12:23 UTC (rev 389)
@@ -1317,7 +1317,7 @@
$dbh->commit;
- my $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ my $myconfig = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
foreach my $item (keys %$form) {
$myconfig->{$item} = $form->{$item};
Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/LedgerSMB/User.pm 2006-10-30 06:12:23 UTC (rev 389)
@@ -31,7 +31,7 @@
#
#=====================================================================
-package User;
+package LedgerSMB::User;
use LedgerSMB::Sysconfig;
Modified: trunk/bin/admin.pl
===================================================================
--- trunk/bin/admin.pl 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/bin/admin.pl 2006-10-30 06:12:23 UTC (rev 389)
@@ -76,7 +76,7 @@
} else {
# if there are no drivers bail out
- $form->error($locale->text('No Database Drivers available!')) unless (User->dbdrivers);
+ $form->error($locale->text('No Database Drivers available!')) unless (LedgerSMB::User->dbdrivers);
# create memberfile
if (! -f ${LedgerSMB::Sysconfig::memberfile}) {
@@ -89,7 +89,7 @@
close FH;
}
- $root = new User "${LedgerSMB::Sysconfig::memberfile}", "root login";
+ $root = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "root login");
unless($root && $root->{password}) {
&setup_initial_password();
@@ -277,7 +277,7 @@
# type=submit $locale->text('Pg Database Administration')
# type=submit $locale->text('PgPP Database Administration')
- foreach $item (User->dbdrivers) {
+ foreach $item (LedgerSMB::User->dbdrivers) {
$dbdrivers .= qq|<button name="action" type="submit" class="submit" value="|.(lc $item).'_database_administration">'.$locale->text("$item Database Administration").qq|</button>|;
}
@@ -373,7 +373,7 @@
if ($form->{login}) {
# get user
- $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $myconfig = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
for (qw(company address signature)) { $myconfig->{$_} = $form->quote($myconfig->{$_}) }
for (qw(address signature)) { $myconfig->{$_} =~ s/\\n/\n/g }
@@ -394,7 +394,7 @@
}
- %countrycodes = User->country_codes;
+ %countrycodes = LedgerSMB::User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
@@ -592,7 +592,7 @@
</tr>|;
# list section for database drivers
- foreach $item (User->dbdrivers) {
+ foreach $item (LedgerSMB::User->dbdrivers) {
print qq|
<tr>
@@ -771,7 +771,7 @@
# check for duplicates
if (!$form->{edit}) {
- $temp = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $temp = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
if ($temp->{login}) {
$form->error("$form->{login} ".$locale->text('is already a member!'));
@@ -796,7 +796,7 @@
$form->{templates} = "${LedgerSMB::Sysconfig::templates}/$form->{templates}";
- $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $myconfig = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
# redo acs variable and delete all the acs codes
@acs = split /;/, $form->{acs};
@@ -970,7 +970,7 @@
$myconfig{dbpasswd} = unpack 'u', $myconfig{dbpasswd};
for (keys %myconfig) { $form->{$_} = $myconfig{$_} }
- User->delete_login(\%$form);
+ LedgerSMB::User->delete_login(\%$form);
# delete config file for user
unlink "${LedgerSMB::Sysconfig::userspath}/$form->{login}.conf";
@@ -1049,7 +1049,7 @@
sub check_password {
- $root = new User "${LedgerSMB::Sysconfig::memberfile}", "root login";
+ $root = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "root login");
if ($root->{password}) {
@@ -1211,14 +1211,14 @@
sub dbupdate {
- User->dbupdate(\%$form);
+ LedgerSMB::User->dbupdate(\%$form);
$form->redirect($locale->text('Dataset updated!'));
}
sub create_dataset {
- @dbsources = sort User->dbsources(\%$form);
+ @dbsources = sort LedgerSMB::User->dbsources(\%$form);
opendir SQLDIR, "sql/." or $form->error($!);
@@ -1343,7 +1343,7 @@
$form->isblank("db", $locale->text('Dataset missing!'));
- User->dbcreate(\%$form);
+ LedgerSMB::User->dbcreate(\%$form);
$form->{title} = "LedgerSMB ".$locale->text('Accounting')
." ".$locale->text('Database Administration')
@@ -1373,7 +1373,7 @@
sub delete_dataset {
- if (@dbsources = User->dbsources_unused(\%$form, ${LedgerSMB::Sysconfig::memberfile})) {
+ if (@dbsources = LedgerSMB::User->dbsources_unused(\%$form, ${LedgerSMB::Sysconfig::memberfile})) {
foreach $item (sort @dbsources) {
$dbsources .= qq|<input name="db" class="radio" type="radio" value="$item" /> $item |;
@@ -1435,7 +1435,7 @@
$form->error($locale->text('No Dataset selected!'));
}
- User->dbdelete(\%$form);
+ LedgerSMB::User->dbdelete(\%$form);
$form->{title} = "LedgerSMB ".$locale->text('Accounting')
." ".$locale->text('Database Administration')
Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/bin/am.pl 2006-10-30 06:12:23 UTC (rev 389)
@@ -2044,7 +2044,7 @@
for (qw(name company address signature)) { $myconfig{$_} = $form->quote($myconfig{$_}) }
for (qw(address signature)) { $myconfig{$_} =~ s/\\n/\n/g }
- %countrycodes = User->country_codes;
+ %countrycodes = LedgerSMB::User->country_codes;
$countrycodes = '';
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
Modified: trunk/bin/hr.pl
===================================================================
--- trunk/bin/hr.pl 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/bin/hr.pl 2006-10-30 06:12:23 UTC (rev 389)
@@ -716,7 +716,7 @@
# if it is a login change memberfile and .conf
if ($form->{employeelogin}) {
- $user = new User ${LedgerSMB::Sysconfig::memberfile}, $form->{employeelogin};
+ $user = LedgerSMB::User->new(${LedgerSMB::Sysconfig::memberfile}, $form->{employeelogin});
for (qw(name email role)) { $user->{$_} = $form->{$_} }
Modified: trunk/bin/login.pl
===================================================================
--- trunk/bin/login.pl 2006-10-30 06:00:41 UTC (rev 388)
+++ trunk/bin/login.pl 2006-10-30 06:12:23 UTC (rev 389)
@@ -263,7 +263,7 @@
}
- $user = new User ${LedgerSMB::Sysconfig::memberfile}, $form->{login};
+ $user = LedgerSMB::User->new(${LedgerSMB::Sysconfig::memberfile}, $form->{login});
# if we get an error back, bale out
if (($errno = $user->login(\%$form, ${LedgerSMB::Sysconfig::userspath})) <= -1) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.