[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1359] branches/1.2/bin/admin.pl
- Subject: SF.net SVN: ledger-smb: [1359] branches/1.2/bin/admin.pl
- From: ..hidden..
- Date: Mon, 09 Jul 2007 15:18:23 -0700
Revision: 1359
http://svn.sourceforge.net/ledger-smb/?rev=1359&view=rev
Author: tetragon
Date: 2007-07-09 15:18:22 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Fixing 1750802
Modified Paths:
--------------
branches/1.2/bin/admin.pl
Modified: branches/1.2/bin/admin.pl
===================================================================
--- branches/1.2/bin/admin.pl 2007-07-09 19:18:24 UTC (rev 1358)
+++ branches/1.2/bin/admin.pl 2007-07-09 22:18:22 UTC (rev 1359)
@@ -918,14 +918,16 @@
( $form->{templates} )
? "${LedgerSMB::Sysconfig::templates}/$form->{templates}"
: "$templates/$form->{login}";
+
+ my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};
- # scan %user for $templatedir
- foreach $login ( keys %user ) {
- last if ( $found = ( $form->{templates} eq $user{$login} ) );
- }
+ my $found = $dbh->selectall_arrayref(qq|SELECT c.templates
+ FROM users_conf c INNER JOIN users u ON (c.id = u.id)
+ WHERE c.templates = ? AND u.username <> ?|,
+ undef, $form->{templates}, $form->{login});
# if found keep directory otherwise delete
- if ( !$found ) {
+ if ( ..hidden.. ) {
# delete it if there is a template directory
$dir = "$form->{templates}";
@@ -935,8 +937,6 @@
}
}
- my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};
-
#users_conf
my $deleteUser =
$dbh->prepare(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.