From b5ed10aebfc464ba44eb0477247e074e05a255a1 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Fri, 6 Aug 2004 19:58:50 +0000 Subject: [PATCH] (PortraitSupportRule): Duplicate the horizontal rule and the heading stuff from usemod.pl, but only enable them if usemod.pl is loaded (when UsemodRule is defined). --- modules/portrait-support.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/portrait-support.pl b/modules/portrait-support.pl index fb2a5ba7..9bf5c516 100644 --- a/modules/portrait-support.pl +++ b/modules/portrait-support.pl @@ -16,7 +16,7 @@ # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA -$ModulesDescription .= '

$Id: portrait-support.pl,v 1.10 2004/08/06 19:54:56 as Exp $

'; +$ModulesDescription .= '

$Id: portrait-support.pl,v 1.11 2004/08/06 19:58:50 as Exp $

'; push(@MyMacros, sub{ s/\[new::\]/"[new:" . GetParam('username', T('Anonymous')) . ':' . TimeToText($Now) . "]"/ge }); @@ -29,10 +29,10 @@ my $MyColorDiv = 0; my %Portraits = (); sub PortraitSupportRule { - if ($bol && m/\G(\s*\n)*----+[ \t]*\n?/cg) { + if ($bol && defined(&UsemodRule) && m/\G(\s*\n)*----+[ \t]*\n?/cg) { $MyColor = 0; return CloseHtmlEnvironments() . ($MyColorDiv ? '' : '') . $q->hr(); - } elsif ($bol && m/\G(\s*\n)*(\=+)[ \t]*(.+?)[ \t]*(=+)[ \t]*\n?/cg) { + } elsif ($bol && defined(&UsemodRule) && m/\G(\s*\n)*(\=+)[ \t]*(.+?)[ \t]*(=+)[ \t]*\n?/cg) { my ($depth, $text) = ($2, $3); $depth = length($depth); $depth = 6 if ($depth > 6);