[vhffs-dev] [svn] commit: r249 - in /trunk/vhffs-api/src: Vhffs/Services/Repository.pm examples/create_repository.pl

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


Author: gradator
Date: Sun Oct 29 02:11:01 2006
New Revision: 249

Log:
Added an exemple to create a repository, fixes the API


Added:
    trunk/vhffs-api/src/examples/create_repository.pl   (with props)
Modified:
    trunk/vhffs-api/src/Vhffs/Services/Repository.pm

Modified: trunk/vhffs-api/src/Vhffs/Services/Repository.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Repository.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Services/Repository.pm Sun Oct 29 02:11:01 2006
@@ -58,17 +58,19 @@
 	$name = shift;
 	$user = shift;
 	$group = shift;
-    
+
 	$this = {};
-    
+
 	$this = $class->SUPER::new( $main , 1 , '401' );
-    
+
 	#We return an undefined value if the user or the NAME are not correct
 	return undef if( ! defined ( $name ) );
 	return undef if( ! ( $name =~ /[a-z0-9]+/) );
-    
+
 	$this->{'name'} = $name;
-    
+	$this->{'user'} = $user  if( defined $user );
+	$this->{'group'} = $group  if( defined $group );
+
 	bless( $this , $class );
 
 	return $this;
@@ -170,12 +172,6 @@
 	return 1;
 }
 
-
-sub set_quota
-{
-	my $self = shift;
-	$self->{'quota'} = $_;
-}
 
 sub getall
 {




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