wtf fux0r
This commit is contained in:
		@@ -50,7 +50,7 @@ sub cleanup {
 | 
				
			|||||||
		"INSERT INTO kwote_backup SELECT * FROM kwote WHERE ".
 | 
							"INSERT INTO kwote_backup SELECT * FROM kwote WHERE ".
 | 
				
			||||||
		"(now()-submit_dt)>? AND rating<=?"
 | 
							"(now()-submit_dt)>? AND rating<=?"
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
	$sth->bind_param(1, $NEGATIVE_KWOTE_TTL);
 | 
						$sth->bind_param(1, $KWOTE_TTL);
 | 
				
			||||||
	$sth->bind_param(2, $KWOTE_DEATH_RATING);
 | 
						$sth->bind_param(2, $KWOTE_DEATH_RATING);
 | 
				
			||||||
	$sth->execute() or die "Couldn't backup kwotes";
 | 
						$sth->execute() or die "Couldn't backup kwotes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -58,7 +58,7 @@ sub cleanup {
 | 
				
			|||||||
	$sth = $dbh->prepare(
 | 
						$sth = $dbh->prepare(
 | 
				
			||||||
		"DELETE FROM kwote WHERE (now()-submit_dt)>? AND rating<=?"
 | 
							"DELETE FROM kwote WHERE (now()-submit_dt)>? AND rating<=?"
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
	$sth->bind_param(1, $NEGATIVE_KWOTE_TTL);
 | 
						$sth->bind_param(1, $KWOTE_TTL);
 | 
				
			||||||
	$sth->bind_param(2, $KWOTE_DEATH_RATING);
 | 
						$sth->bind_param(2, $KWOTE_DEATH_RATING);
 | 
				
			||||||
	$sth->execute() or die "Couldn't delete kwotes";
 | 
						$sth->execute() or die "Couldn't delete kwotes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -126,7 +126,7 @@ sub  vote {
 | 
				
			|||||||
# adds a kwote to the database
 | 
					# adds a kwote to the database
 | 
				
			||||||
sub add_kwote {
 | 
					sub add_kwote {
 | 
				
			||||||
	my ($dbh, $kwote_text, $ip_address) = @_;
 | 
						my ($dbh, $kwote_text, $ip_address) = @_;
 | 
				
			||||||
    my ($addr, $kid, $amt) = @_;    
 | 
						my ($addr, $kid, $amt) = @_;    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# make sure the kwote is ok
 | 
						# make sure the kwote is ok
 | 
				
			||||||
	return undef if (!defined($kwote_text) || $kwote_text eq "");
 | 
						return undef if (!defined($kwote_text) || $kwote_text eq "");
 | 
				
			||||||
@@ -162,7 +162,7 @@ sub add_kwote {
 | 
				
			|||||||
	$sth->execute() or return undef;
 | 
						$sth->execute() or return undef;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# return the id
 | 
						# return the id
 | 
				
			||||||
	return $dbh->{insertid};
 | 
						return $sth->{insertid};
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##
 | 
					##
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ $DB_HOST = "mysql";
 | 
				
			|||||||
$DB_USER = "kwotes";
 | 
					$DB_USER = "kwotes";
 | 
				
			||||||
# database user
 | 
					# database user
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$DB_PASS = "kwotes";
 | 
					$DB_PASS = "kw0t3s";
 | 
				
			||||||
# database password
 | 
					# database password
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$SECS_BETWEEN_KWOTES = 60*60;
 | 
					$SECS_BETWEEN_KWOTES = 60*60;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user