Update of /cvs/scoop/scoop/lib/Scoop/Admin
In directory lithium.sabren.com:/tmp/cvs-serv20283/lib/Scoop/Admin

Modified Files:
	PostThrottle.pm 
Log Message:
janra's bugfix for comment throttling errors, and my bugfix for her bug.

--rusty


Index: PostThrottle.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin/PostThrottle.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PostThrottle.pm	30 Jul 2004 08:12:56 -0000	1.10
--- PostThrottle.pm	28 Jan 2005 20:57:10 -0000	1.11
***************
*** 13,17 ****
  	# See if this is a comment post attempt at all
  	my $attempt;
! 	if ($op eq 'comments') { $attempt = $S->_comment_post_attempt() };
  	
  	# See if it's a story submit attempt
--- 13,20 ----
  	# See if this is a comment post attempt at all
  	my $attempt;
! 	if ($op eq 'comments') { 
! 		$attempt = $S->_comment_post_attempt();
! 		warn "Comment posting, result is $attempt\n" if $DEBUG;
! 	}
  	
  	# See if it's a story submit attempt
***************
*** 205,230 ****
  	my $warning = shift;
  
! 	my $from = $S->{UI}->{VARS}->{local_email};
! 	my $subject = qq|Admin Alert from $S->{UI}->{VARS}->{sitename}: $warning|;
! 	my $content = qq|
! This is an administrative alert from the site $S->{UI}->{VARS}->{sitename}, 
! at $S->{UI}->{VARS}->{site_url}$S->{UI}->{VARS}->{rootdir}. The event that 
! triggered this message was:
! 
! event: $warning
!  user: $S->{UID}, "$S->{NICK}"
!    ip: $S->{REMOTE_IP}
! 
! You may take further action by editing this user, at the url:
! 
! $S->{UI}->{VARS}->{site_url}$S->{UI}->{VARS}->{rootdir}/?op=user;tool=prefs;uid=$S->{UID}
! 
! The user's info page is at:
! 
! $S->{UI}->{VARS}->{site_url}$S->{UI}->{VARS}->{rootdir}/?op=user;tool=info;uid=$S->{UID}
! 
  
! --$from
! |;
  
  	my $to = $S->{UI}->{VARS}->{admin_alert};
--- 208,227 ----
  	my $warning = shift;
  
! 	my $subject = $S->{UI}->{BLOCKS}->{admin_alert_subject};
! 	my $content = $S->{UI}->{BLOCKS}->{admin_alert_body};
! 	my $keys;
! 	$keys->{from} = $S->var('local_email');
! 	$keys->{sitename} = $S->var('sitename');
! 	$keys->{site_url} = $S->var('site_url');
! 	$keys->{rootdir} = $S->var('rootdir');
! 	$keys->{warning} = $warning;
! 	$keys->{nick} = $S->{NICK};
! 	$keys->{uid} = $S->{UID};
! 	$keys->{ip} = $S->{REMOTE_IP};
! 	$keys->{user_pref} = $S->var('site_url') . $S->var('rootdir') . "/user/$keys->{nick}/prefs/Protected";
! 	$keys->{user_info} = $S->var('site_url') . $S->var('rootdir') . "/user/$keys->{nick}";
  
! 	$subject = $S->interpolate($subject,$keys);
! 	$content = $S->interpolate($content,$keys);
  
  	my $to = $S->{UI}->{VARS}->{admin_alert};
***************
*** 259,263 ****
  	
  	my $tool = $S->{CGI}->param('tool');
! 	my $mode = $S->{CGI}->param('mode');
  	
  	# See if they're tryng to post, and are allowed to in the first place
--- 256,262 ----
  	
  	my $tool = $S->{CGI}->param('tool');
! 	my $mode = $S->{CGI}->param('post');
! 	
! 	warn "Comment post? Tool is $tool, post is $mode\n" if $DEBUG;
  	
  	# See if they're tryng to post, and are allowed to in the first place