[vhffs-dev] [1984] removed Vhffs::Functions::hash_mxdomain() and Vhffs::Functions:: hash_popuser()

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1984
Author:   gradator
Date:     2012-01-31 21:56:47 +0100 (Tue, 31 Jan 2012)
Log Message:
-----------
removed Vhffs::Functions::hash_mxdomain() and Vhffs::Functions::hash_popuser()

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Functions.pm
    trunk/vhffs-api/src/Vhffs/Services/Mail.pm
    trunk/vhffs-api/src/examples/Makefile.am

Removed Paths:
-------------
    trunk/vhffs-api/src/examples/hashdomain.pl
    trunk/vhffs-api/src/examples/hashpopuser.pl

Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-31 20:03:39 UTC (rev 1983)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-31 20:56:47 UTC (rev 1984)
@@ -62,27 +62,6 @@
 	return 0;
 }
 
-
-sub hash_mxdomain
-{
-	my $domain = shift;
-	my $path = "";
-
-	$path = substr( $domain , 0 , 1 ) . "/" . substr( $domain , 1 , 1 ) . "/" . $domain ;
-
-	return( $path );
-}
-
-sub hash_popuser
-{
-	my $user = shift;
-	my $path = "";
-
-	$path = substr( $user , 0 , 1 ) . "/" . $user ;
-
-	return( $path );
-}
-
 sub hash_webdir
 {
 	use Digest::MD5 qw(md5 md5_hex md5_base64);

Modified: trunk/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2012-01-31 20:03:39 UTC (rev 1983)
+++ trunk/vhffs-api/src/Vhffs/Services/Mail.pm	2012-01-31 20:56:47 UTC (rev 1984)
@@ -109,7 +109,7 @@
         die('Unable to create parent object') unless(defined $parent);
 
         my $sql = 'INSERT INTO vhffs_mxdomain(domain, boxes_path, catchall, object_id) VALUES(?, ?, \'\', ?)';
-        my $domain_hash = Vhffs::Functions::hash_mxdomain($domain);
+        my $domain_hash = substr( $domain, 0, 1 ).'/'.substr( $domain, 1, 1 ).'/'.$domain ;
         my $sth = $dbh->prepare($sql);
         $sth->execute($domain, $domain_hash, $parent->get_oid);
 
@@ -440,8 +440,8 @@
         || Vhffs::Services::MailingList::address_exists($self->get_main, $name, $self->{domain}) );
 
     $password = crypt_pwd( $password );
-    my $domainhash = Vhffs::Functions::hash_mxdomain($self->{domain});
-    my $userhash = Vhffs::Functions::hash_popuser( $name );
+    my $domainhash = $self->{boxes_path};
+    my $userhash = substr( $name, 0, 1 ).'/'.$name;
 	$self->{'boxes'}{$name}{'local_part'} = $name;
 	$self->{'boxes'}{$name}{'password'} = $password;
 	$self->{'boxes'}{$name}{'domain'} = $self->{'domain'};

Modified: trunk/vhffs-api/src/examples/Makefile.am
===================================================================
--- trunk/vhffs-api/src/examples/Makefile.am	2012-01-31 20:03:39 UTC (rev 1983)
+++ trunk/vhffs-api/src/examples/Makefile.am	2012-01-31 20:56:47 UTC (rev 1984)
@@ -23,8 +23,6 @@
 	delete_acl.pl \
 	generate_password.pl \
 	get_list.pl \
-	hashdomain.pl \
-	hashpopuser.pl \
 	hash_webdir.pl \
 	join_group.pl \
 	list_themes.pl \

Deleted: trunk/vhffs-api/src/examples/hashdomain.pl
===================================================================
--- trunk/vhffs-api/src/examples/hashdomain.pl	2012-01-31 20:03:39 UTC (rev 1983)
+++ trunk/vhffs-api/src/examples/hashdomain.pl	2012-01-31 20:56:47 UTC (rev 1984)
@@ -1,8 +0,0 @@
-#!%PERL%
-
-use strict;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::Functions;
-
-print Vhffs::Functions::hash_mxdomain("tuxfamily.org");

Deleted: trunk/vhffs-api/src/examples/hashpopuser.pl
===================================================================
--- trunk/vhffs-api/src/examples/hashpopuser.pl	2012-01-31 20:03:39 UTC (rev 1983)
+++ trunk/vhffs-api/src/examples/hashpopuser.pl	2012-01-31 20:56:47 UTC (rev 1984)
@@ -1,8 +0,0 @@
-#!%PERL%
-
-use strict;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::Functions;
-
-print Vhffs::Functions::hash_popuser("soda");


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/