]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Include.pm
number of unread posts in in menu
[ndwebbie.git] / ND / Include.pm
index e51d0e6b81bae9c9f849e9d390126e98258e52af..d77121fa39e28c091c1328ed2fe1a75bbcc1f759 100644 (file)
@@ -64,7 +64,7 @@ sub parseMarkup {
        my ($text) = @_;
 
        $text =~ s{\n}{\n<br/>}g;
-       $text =~ s{\[B\](.*?)\[/B\]}{<b>$1</b>};
+       $text =~ s{\[B\](.*?)\[/B\]}{<b>$1</b>}gi;
        return $text;
 }
 
@@ -75,7 +75,7 @@ WHERE uid =   $1 AND ftid = $2},undef,$ND::UID,$thread);
        if ($rows == 0){
                $ND::DBH->do(q{INSERT INTO forum_thread_visits (uid,ftid) VALUES ($1,$2)}
                        ,undef,$ND::UID,$thread) or $ND::ERROR .= p($ND::DBH->errstr);
-       }else{
+       }elsif(not defined $rows){
                $ND::ERROR .= p($ND::DBH->errstr);
        }
 }