Commit info for scoop/lib/Scoop/Admin:

Modified Files:
      Tag: CURRENT
	AdminStories.pm PostThrottle.pm 
Log Message:
Syncing up CURRENT with my changes to STABLE. --hulver


Index: AdminStories.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin/AdminStories.pm,v
retrieving revision 1.127.2.3
retrieving revision 1.127.2.4
diff -r1.127.2.3 -r1.127.2.4
322a323,334
> 
> 	# if using macros, then render the macro(s) before archiving.
> 	# Render both introtext and bodytext.
> 
> 	my $introtext = $story->{introtext};
> 	my $bodytext = $story->{bodytext};
> 
> 	if (exists($S->{UI}->{VARS}->{use_macros}) && $S->{UI}->{VARS}->{use_macros}) {
> 		$introtext = $S->process_macros($introtext);
> 		$bodytext = $S->process_macros($bodytext);
> 	}
> 
329,330c341,342
< 		      $S->{DBHARCHIVE}->quote($story->{introtext}),
< 		      $S->{DBHARCHIVE}->quote($story->{bodytext}),
---
> 		      $S->{DBHARCHIVE}->quote($introtext),
> 		      $S->{DBHARCHIVE}->quote($bodytext),
367a380,388
> 
> 		# if using macros, then render the macro(s) before archiving comments.
> 
> 		my $comment = $comments->{comment};
> 
> 		if (exists($S->{UI}->{VARS}->{use_macros}) && $S->{UI}->{VARS}->{use_macros}) {
> 			$comment = $S->process_macros($comment);
> 		}
> 
374c395
< 		 	   $S->{DBHARCHIVE}->quote($comments->{comment}),
---
> 		 	   $S->{DBHARCHIVE}->quote($comment),
505,514d525
< 	# Check for diary and set tid if so.
< 	if ($parms->{'section'} eq 'Diary') {
< 		if ($parms->{tid} && $S->have_perm('story_admin')) {
< 			$params{'tid'} = $parms->{tid};
< 		} else {
< 			$parms->{tid} = 'diary_'.$S->{UID};
< 			$params{'tid'} = $parms->{tid};
< 		}
< 	}
< 	
576a588,590
> 	# if using macros, and 'render on save' is on, then render the macro(s) before saving.
> 	# Render both introtext and bodytext.
> 
577a592,600
> 	my $bodytext = $params{bodytext};
> 
> 	if (exists($S->{UI}->{VARS}->{use_macros}) && $S->{UI}->{VARS}->{use_macros}
> 		&& defined($S->{UI}->{VARS}->{macro_render_on_save})
> 		&& $S->{UI}->{VARS}->{macro_render_on_save}) {
> 		$introtext = $S->process_macros($introtext);
> 		$bodytext = $S->process_macros($bodytext);
> 	}
> 
579,580c602,603
< 	
< 	my $bodytext = $S->{DBH}->quote($params{bodytext});
---
> 	$bodytext = $S->{DBH}->quote($bodytext);	
> 
948,954c971,981
< 	if ($S->have_perm('story_admin') && $sid) {
< 		warn "SID is $sid\n" if $DEBUG;
< 		my $stories = $S->getstories({'-type' => 'fullstory', '-perm_override' => 1, '-sid' => $sid});
< 		my $story = $stories->[0];
< 		if ($story->{tid} && $story->{section} eq 'Diary') {
< 			warn "Topic is $story->{tid}\n";
< 			return qq|<INPUT TYPE="hidden" NAME="tid" VALUE="$tid"><B>[ $story->{tid} ]</B>|;
---
> 	if (!$S->{UI}->{VARS}->{diary_topics}) {
> 		if ($S->have_perm('story_admin') && $sid) {
> 			warn "SID is $sid\n" if $DEBUG;
> 			my $stories = $S->getstories({'-type' => 'fullstory', '-perm_override' => 1, '-sid' => $sid});
> 			my $story = $stories->[0];
> 			if ($story->{tid} && $story->{section} eq 'Diary') {
> 				warn "Topic is $story->{tid}\n";
> 				return qq|<INPUT TYPE="hidden" NAME="tid" VALUE="$tid"><B>[ $story->{tid} ]</B>|;
> 			}
> 		} elsif ($section eq 'Diary') {
> 			return qq|<INPUT TYPE="hidden" NAME="tid" VALUE="diary"><B>[ $S->{NICK} ]</B>|;
956,957d982
< 	} elsif ($section eq 'Diary') {
< 		return qq|<B>[ $S->{NICK} ]</B>|;
970c995
< 			next if ($topic->{tid} eq 'diary');
---
> 			next if (($topic->{tid} eq 'diary') && (!$S->{UI}->{VARS}->{diary_topics}));
972c997
< 			if ($topic->{tid} eq $tid) {
---
> 			if (($topic->{tid} eq $tid) || (($tid eq '') && ($topic->{tid} eq 'diary') && ($section eq 'Diary'))) {

Index: PostThrottle.pm
===================================================================
RCS file: /cvs/scoop/scoop/lib/Scoop/Admin/PostThrottle.pm,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -r1.8 -r1.8.2.1
10a11
> 	return if ($S->{GID} eq 'Superuser');