[vhffs-dev] [1983] removed Vhffs::Functions::hash_homename()

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


Revision: 1983
Author:   gradator
Date:     2012-01-31 21:03:39 +0100 (Tue, 31 Jan 2012)
Log Message:
-----------
removed Vhffs::Functions::hash_homename()

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Functions.pm
    trunk/vhffs-api/src/Vhffs/User.pm
    trunk/vhffs-api/src/examples/Makefile.am
    trunk/vhffs-tools/src/vhffs-userinfo

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

Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-31 19:27:45 UTC (rev 1982)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-31 20:03:39 UTC (rev 1983)
@@ -343,22 +343,6 @@
     return unix_md5_crypt($password, $salt);
 }
 
-
-
-sub hash_homename
-{
-    my ( $chain , $path , $main );
-    $chain = shift;
-    $main = shift;
-        
-    return undef if( ! defined $main->get_config->get_datadir );
-
-    $path = $main->get_config->get_datadir. "/home/" . substr( $chain , 0 , 
-                   1 ) . "/" . substr( $chain , 1 , 1 ) . "/" . $chain;    
-
-    return( $path );
-}
-
 sub valid_mail
 {
 	my $mail = shift;

Modified: trunk/vhffs-api/src/Vhffs/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm	2012-01-31 19:27:45 UTC (rev 1982)
+++ trunk/vhffs-api/src/Vhffs/User.pm	2012-01-31 20:03:39 UTC (rev 1983)
@@ -196,7 +196,7 @@
         # Insert base information
         $admin = 0 unless (defined $admin);
         $password = Vhffs::Functions::generate_random_password if( not defined $password or $password eq '' );
-        my $homedir = Vhffs::Functions::hash_homename( $username  , $main );
+        my $homedir = $main->get_config->get_datadir.'/home/'.substr( $username, 0, 1 ).'/'.substr( $username, 1, 1 ).'/'.$username; 
 
         my $sth = $dbh->prepare('INSERT INTO vhffs_users (uid, gid, username, shell, passwd, homedir, admin, firstname, lastname, address, zipcode, city, country, mail, gpg_key, note, language, theme, lastloginpanel, object_id) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, NULL, NULL, ?)');
         $sth->execute($uid, $gid, $username, $userconf->{'default_shell'}, Vhffs::Functions::password_encrypt($password), $homedir, $admin, $firstname, $lastname, $address, $zipcode, $city, $country, $mail, $gpg_key, Vhffs::Constants::DEFAULT_LANG, $parent->get_oid);

Modified: trunk/vhffs-api/src/examples/Makefile.am
===================================================================
--- trunk/vhffs-api/src/examples/Makefile.am	2012-01-31 19:27:45 UTC (rev 1982)
+++ trunk/vhffs-api/src/examples/Makefile.am	2012-01-31 20:03:39 UTC (rev 1983)
@@ -24,7 +24,6 @@
 	generate_password.pl \
 	get_list.pl \
 	hashdomain.pl \
-	hashhome_example.pl \
 	hashpopuser.pl \
 	hash_webdir.pl \
 	join_group.pl \

Deleted: trunk/vhffs-api/src/examples/hashhome_example.pl
===================================================================
--- trunk/vhffs-api/src/examples/hashhome_example.pl	2012-01-31 19:27:45 UTC (rev 1982)
+++ trunk/vhffs-api/src/examples/hashhome_example.pl	2012-01-31 20:03:39 UTC (rev 1983)
@@ -1,16 +0,0 @@
-#!%PERL%
-
-use strict;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::Functions;
-use Vhffs::Main;
-use Data::Dumper;
-
-my $main = init Vhffs::Main;
-
-
-my $username = "soda";
-
-print Vhffs::Functions::hash_homename( $username , $main );
-

Modified: trunk/vhffs-tools/src/vhffs-userinfo
===================================================================
--- trunk/vhffs-tools/src/vhffs-userinfo	2012-01-31 19:27:45 UTC (rev 1982)
+++ trunk/vhffs-tools/src/vhffs-userinfo	2012-01-31 20:03:39 UTC (rev 1983)
@@ -23,7 +23,7 @@
 {
 	foreach $user ( @{$users} )
 	{
-		print $user->get_username . "\t" . $user->get_firstname . "\t". $user->get_lastname . "\t" . $user->get_mail . "\t" . $user->get_shell . "\t".Vhffs::Functions::hash_homename( $user->get_home , $vhffs)."\n";
+		print $user->get_username . "\t" . $user->get_firstname . "\t". $user->get_lastname . "\t" . $user->get_mail . "\t" . $user->get_shell . "\t". $user->get_home ."\n";
 	}
 }
 else


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