[vhffs-dev] [1963] removed functions which are not used anymore from Functions.pm

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


Revision: 1963
Author:   gradator
Date:     2012-01-28 15:20:31 +0100 (Sat, 28 Jan 2012)
Log Message:
-----------
removed functions which are not used anymore from Functions.pm

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Constants.pm
    trunk/vhffs-api/src/Vhffs/Functions.pm

Modified: trunk/vhffs-api/src/Vhffs/Constants.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Constants.pm	2012-01-28 13:17:59 UTC (rev 1962)
+++ trunk/vhffs-api/src/Vhffs/Constants.pm	2012-01-28 14:20:31 UTC (rev 1963)
@@ -60,8 +60,6 @@
     ML_POSTING_MEMBERS_ONLY_MODERATED => 4,
     ML_POSTING_ADMINS_ONLY => 5,
 
-	MAILS_DIR					=> "/usr/share/vhffs/mails/",
-
 # Objects' types
     TYPE_USER => 10,
     TYPE_GROUP => 11,

Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-28 13:17:59 UTC (rev 1962)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm	2012-01-28 14:20:31 UTC (rev 1963)
@@ -41,7 +41,7 @@
 package Vhffs::Functions;
 require Exporter;
 @ISA    = qw(Exporter);
-@EXPORT = qw( send_mail mail_template);
+@EXPORT = qw( send_mail );
 
 use strict;
 use utf8;
@@ -108,16 +108,6 @@
 	return( $path );
 }
 
-
-sub check_arg
-{
-	my $arg = shift;
-	return undef unless defined $arg;
-	$arg =~ s/\'//g;
-	return( $arg );
-}
-
-
 sub hash_popuser
 {
 	my $user = shift;
@@ -128,17 +118,6 @@
 	return( $path );
 }
 
-sub old_hash
-{
-	use Digest::MD5 qw(md5 md5_hex md5_base64);
-	my $servername = shift;
-	my $hash = md5_hex( $servername );
-	my $webdir = substr( $hash , 0 , 2 ) . "/" . substr( $hash , 2 , 2 ) . "/" .substr( $hash , 4 , 2 ) . "/" . substr( $hash , 6 , 2 ) . "/" . substr( $hash , 8 , 2 ) . "/" . substr( $hash , 10 , 2 ) . "/" .substr( $hash , 12 , 2 ) . "/" .substr( $hash , 14 , 2 ) . "/" . substr( $hash , 16 , 2 ) . "/" .substr( $hash , 18 , 2 ) . "/" . substr( $hash , 20 , 2 ) . "/" . substr( $hash , 22 , 2 ) . "/" . substr( $hash , 24 , 2 ) . "/" .substr( $hash , 26 , 2 ) . "/" .substr( $hash , 28 , 2 ) .  "/" .substr( $hash , 30 , 2 ) .  "/" .$servername;
-
-	return( $webdir );
-}
-
-
 sub hash_webdir
 {
 	use Digest::MD5 qw(md5 md5_hex md5_base64);
@@ -172,23 +151,7 @@
 }
 
 
-sub stripslashes
-{
-    my $string = shift;
 
-    $string =~ s/\\//g;
-    $string =~ s/\Q//g;
-
-    return ( $string  );
-}
-
-sub addslashes
-{
-	my $string = shift;
-
-	return( quotemeta( $string ) );
-}
-
 =head2 chmod_recur
 
     Vhffs::Functions::chmod_recur($dir, $fmod, $dmod);
@@ -474,46 +437,6 @@
     return gettext($TYPES_STRINGS[$type] or 'Unknown');
 }
 
-sub mail_template
-{
-	my( $user , $keys , $template , $file , $content , $line , $key , $vhffs );
-	$vhffs		= shift;
-	$template 	= shift;
-	$user 		= shift;
-	$keys		= shift;
-
-	$file = Vhffs::Constants::MAILS_DIR . "/" . $template;
-
-	return( -1 ) if( ! defined $user );
-
-	return( -1 ) if( ! -f $file );
-	return( -1 ) if( ! -r $file );
-
-	$content = "";
-
-	open( FIC , $file );
-
-	while( $line = <FIC> )
-	{
-		foreach $key ( keys %{$keys} )
-		{
-			$line =~ s/$key/$keys->{$key}/g;
-		}
-		$content .= $line;
-	}
-
-	if( send_mail( $vhffs , $keys->{FROM} , $user->get_mail , $keys->{SUBJECT} , $content ) != 1 )
-	{
-		return( -2 );
-	}
-
-	close( FIC );
-
-
-
-	return( 1 );
-}
-
 =pod
 
 =head2 check_domain_name


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