[vhffs-dev] [2002] a bit more code cleaning

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


Revision: 2002
Author:   gradator
Date:     2012-02-10 00:28:41 +0100 (Fri, 10 Feb 2012)
Log Message:
-----------
a bit more code cleaning

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

Modified: trunk/vhffs-api/src/Vhffs/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm	2012-02-09 23:27:06 UTC (rev 2001)
+++ trunk/vhffs-api/src/Vhffs/Object.pm	2012-02-09 23:28:41 UTC (rev 2002)
@@ -185,7 +185,7 @@
 		push(@params, '%'.$name.'%');
 	}
 	if( defined $state ) {
-		if( $query =~ /WHERE/ )  {
+		if( $query =~ /WHERE/ ) {
 			$query .= ' AND o.state = ?';
 		}
 		else {
@@ -196,7 +196,7 @@
 	if( defined $age ) {
 		my $ts = time() - $age;
 
-		if( $query =~ /WHERE/ )  {
+		if( $query =~ /WHERE/ ) {
 			$query .= ' AND date_creation < ? ';
 		}
 		else {
@@ -513,7 +513,7 @@
 	my $message = shift;
 	my $user = $self->{main}->get_current_user->get_uid if defined $self->{main}->get_current_user;
 
-	my $query = 'INSERT INTO vhffs_history(object_id, date, message, source_uid)  VALUES(?, ?, ?, ?)';
+	my $query = 'INSERT INTO vhffs_history(object_id, date, message, source_uid) VALUES(?, ?, ?, ?)';
 	my $request = $self->{'db'}->prepare( $query );
 	$request->execute( $self->{'object_id'}, time(), $message, $user ) or return -2;
 
@@ -528,7 +528,7 @@
 
 $history = $object->get_history();
 
-if( defined $history ) 
+if( defined $history ) {
 	foreach $key ( keys %{$history} ) {
 
 		print "At date " . $key . " message: " . $history->{$key}{'message'};
@@ -563,7 +563,7 @@
 Get refusal reason of this object.
 
 =cut
-sub get_refuse_reason  {
+sub get_refuse_reason {
 	my $self = shift;
 	return gettext('no reason given') unless defined $self->{'refuse_reason'} and length $self->{'refuse_reason'} > 0;
 	return $self->{'refuse_reason'};


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