0.15_03 commit r0_15_03
authorTony Cook <tony@develop-help.com>
Tue, 21 Dec 2004 04:39:47 +0000 (04:39 +0000)
committertony <tony@45cb6cf1-00bc-42d2-bb5a-07f51df49f94>
Tue, 21 Dec 2004 04:39:47 +0000 (04:39 +0000)
15 files changed:
Makefile
schema/bse.sql
schema/mysql_build.pl
site/cgi-bin/admin/generate.pl
site/cgi-bin/admin/reorder.pl
site/cgi-bin/fmail.pl
site/cgi-bin/modules/BSE/Util/Tags.pm
site/cgi-bin/modules/DevHelp/Formatter.pm
site/cgi-bin/modules/DevHelp/HTML.pm
site/cgi-bin/modules/Generate.pm
site/cgi-bin/search.pl
site/docs/bse.pod
t/t00smoke.t
t/t050format.t
test.cfg

index fb44be2c0731b44f24835d69d99f9e4aaa41e836..8c2bb512f322e575fe2967f4396900875fc238af 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.15_02
+VERSION=0.15_03
 DISTNAME=bse-$(VERSION)
 DISTBUILD=$(DISTNAME)
 DISTTAR=../$(DISTNAME).tar
@@ -22,6 +22,10 @@ dist: cleantree $(DISTTGZ)
 
 # make sure everything is committed
 cleantree:
+       if grep -q 'perl.*-d:ptkdb' site/cgi-bin/*.pl site/cgi-bin/admin/*.pl ; \
+         then echo '***' The debugger is still enabled ; \
+         exit 1; \
+       fi
        if cvs status 2>/dev/null | grep -q '^\?\|Locally Modified' ; \
           then echo '***' The tree has modified or unadded files ; \
           exit 1 ; \
index 38239342697adc4271fdeb86e6ee755d27bc446e..65e071af1571a57acc0549968f8122bc3263f105 100644 (file)
@@ -1,7 +1,7 @@
 -- represents sections, articles
 DROP TABLE IF EXISTS article;
 CREATE TABLE article (
-  id integer DEFAULT '0' NOT NULL auto_increment,
+  id integer NOT NULL auto_increment,
 
   -- 0 for the entry page
   -- -1 for top-level sections (shown in side menu)
@@ -93,7 +93,7 @@ CREATE TABLE article (
 
 DROP TABLE IF EXISTS searchindex;
 CREATE TABLE searchindex (
-  id varchar(200) binary DEFAULT '' NOT NULL,
+  id varbinary(200) DEFAULT '' NOT NULL,
   -- a comma-separated lists of article and section ids
   articleIds varchar(255) default '' not null,
   sectionIds varchar(255) default '' not null,
index 3a65d30105ef7956e408e9fbc0053f21c5ccfac9..183a8021490749dbe90d4894921d9f7711a6d42a 100644 (file)
@@ -39,7 +39,7 @@ while (my $row = $tl->fetchrow_arrayref) {
 undef $tl;
 
 my @expected = qw(field type null key default extra);
-my @want = qw(field type null default extra);
+my @want =     qw(field type null default extra);
 for my $table (@tables) {
   print "Table $table\n";
   my $ti = $dbh->prepare("describe $table")
@@ -56,6 +56,10 @@ for my $table (@tables) {
   while (my $row = $ti->fetchrow_arrayref) {
     for my $name (@want) {
       defined $row->[$names{$name}] or $row->[$names{$name}] = "NULL";
+      if ($name eq 'type' && 
+         $row->[$names{$name}] =~ /^varchar\((\d+)\) binary$/i) {
+       $row->[$names{$name}] = "varbinary($1)";
+      }
     }
     print "Column ",join(";",@$row[@names{@want}]),
     "\n";
index eb68b5f09a0cc3ce92c17f7cd43ef7a136c7a754..bbc43a6653d3769969540581eb702b8856f593ff 100755 (executable)
@@ -12,12 +12,13 @@ use BSE::WebUtil qw(refresh_to_admin);
 use Carp 'verbose';
 use BSE::Request;
 use URI::Escape;
+use BSE::CfgInfo 'admin_base_url';
 
 my $req = BSE::Request->new;
 
 my $cfg = $req->cfg;
 my $cgi = $req->cgi;
-my $siteurl = $cfg->entryErr('site', 'url');
+my $siteurl = admin_base_url($cfg);
 unless ($req->check_admin_logon()) {
   refresh_to_admin($cfg, "/cgi-bin/admin/logon.pl");
   exit;
index 78c844ee216c980800bb3ce461c6c1c9a2efcca3..ad01863e40b807080aa6b4c520e3138dc1fcc0b2 100755 (executable)
@@ -65,7 +65,7 @@ if ($req->user_can(edit_reorder_children => $parentid)) {
   
   my $type = $cgi->param('type');
   if ($type) {
-    @kids = grep $_->[0]{generator} =~ /::\Q$type\E$/, @kids;
+    @kids = grep $_->[0]{generator} =~ /::\Q$type\E$/, @kids;
   }
   
   my @order = sort { $b <=> $a } map $_->[1]{$_->[2]}, @kids;
index 002165be3c24a4f0a01fe242a1982cd0d5ddbd98..6764d60ae459bf17ebdc9c0ff2538f389102e6e9 100755 (executable)
@@ -1,4 +1,5 @@
-#!/usr/bin/perl -w -d:ptkdb
+#!/usr/bin/perl -w
+# -d:ptkdb
 BEGIN { $ENV{DISPLAY} = '192.168.32.15:0.0' }
 use strict;
 use FindBin;
index eda94e9158859d582986e1cd4591eaa7c7cb0640..e56ce6179a56a0e2c5e2b2442f5ad77bbc1a3cd0 100644 (file)
@@ -346,8 +346,17 @@ sub tag_nobodytext {
 sub tag_old {
   my ($cgi, $args, $acts, $name, $templater) = @_;
 
-  my ($field, $func, $funcargs) = 
-    DevHelp::Tags->get_parms($args, $acts, $templater);
+  my ($field, $func, $funcargs);
+  
+  if ($args =~ /^(\[[^\[\]]*(?:\[[^\[\]]*\][^\[\]]*)*\])(.*)/) {
+    my ($fieldargs, $rest) = ($1, $2);
+    ($field) = DevHelp::Tags->get_parms($fieldargs, $acts, $templater);
+    defined $rest or $rest = '';
+    ($func, $funcargs) = split ' ', $rest, 2;
+  }
+  else {
+    ($field, $func, $funcargs) = split ' ', $args, 3;
+  }
 
   my $value = $cgi->param($field);
   if (defined $value) {
@@ -403,6 +412,7 @@ sub basic {
      oldi => [ \&tag_oldi, $cgi ],
      $it->make_iterator(\&DevHelp::Tags::iter_get_repeat, 'repeat', 'repeats'),
      dynreplace => \&tag_replace,
+     dyntoday => \&tag_today,
     );
 }
 
index 8e2c132e4a40bde023ec7b0be391c82f61803b1d..30b104884c4ca6cb58f16990891fe3202ca3e245 100644 (file)
@@ -84,7 +84,8 @@ sub _format_bullets {
   shift @points if @points and $points[0] eq '';
   return '' unless @points;
   for my $point (@points) {
-    $point =~ s!\n$!<br /><br />!;
+    $point =~ s!\n$!!
+      and $point = "<p>$point</p>";
   }
   return "<ul><li>".join("</li><li>", @points)."</li></ul>";
 }
@@ -101,7 +102,8 @@ sub _format_ol {
   shift @points if @points and $points[0] eq '';
   return '' unless @points;
   for my $point (@points) {
-    $point =~ s!\n$!<br /><br />!;
+    $point =~ s!\n$!!
+      and $point = "<p>$point</p>";
   }
   my $ol = "<ol";
   $ol .= qq! type="$type"! if $type;
@@ -150,29 +152,48 @@ sub _fix_spanned {
 
 sub replace_char {
   my ($self, $rpart) = @_;
-
-  $$rpart =~ s#poplink\[([^|\]\[]+)\|([^\]\[]+)\]#<a href="$1" target="_blank">$2</a>#ig
+  $$rpart =~ s#(acronym|abbr|dfn)\[([^|\]\[]+)\|([^\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<$1 class="$3" title="$2">/, "</$1>", $4)#egi
     and return 1;
-  $$rpart =~ s#poplink\[([^|\]\[]+)\]#<a href="$1" target="_blank">$1</a>#ig
+  $$rpart =~ s#(acronym|abbr|dfn)\[([^|\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<$1 title="$2">/, "</$1>", $3)#egi
     and return 1;
-  $$rpart =~ s#link\[([^|\]\[]+)\|([^\]\[]+)\]#<a href="$1">$2</a>#ig
+  $$rpart =~ s#(acronym|abbr|dfn)\[\|([^\]\[]+)\]#
+    _fix_spanned("<$1>", "</$1>", $2)#egi
     and return 1;
-  $$rpart =~ s#link\[([^|\]\[]+)\]#<a href="$1">$1</a>#ig
+  $$rpart =~ s#(acronym|abbr|dfn)\[([^\]\[]+)\]#
+    _fix_spanned("<$1>", "</$1>", $2)#egi
+    and return 1;
+  $$rpart =~ s#bdo\[([^|\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<bdo dir="$1">/, "</bdo>", $2)#egi
+    and return 1;
+  $$rpart =~ s#(strong|em|samp|code|var|sub|sup|kbd|q|b|i|tt)\[([^|\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<$1 class="$2">/, "</$1>", $3)#egi
     and return 1;
-  $$rpart =~ s#b\[([^\]\[]+)\]#_fix_spanned("<b>", "</b>", $1)#egi
+  $$rpart =~ s#(strong|em|samp|code|var|sub|sup|kbd|q|b|i|tt)\[\|([^\]\[]+)\]#
+    _fix_spanned("<$1>", "</$1>", $2)#egi
     and return 1;
-  $$rpart =~ s#i\[([^\]\[]+)\]#_fix_spanned("<i>", "</i>", $1)#egi
+  $$rpart =~ s#(strong|em|samp|code|var|sub|sup|kbd|q|b|i|tt)\[([^\]\[]+)\]#
+    _fix_spanned("<$1>", "</$1>", $2)#egi
     and return 1;
-  $$rpart =~ s#tt\[([^\]\[]+)\]#_fix_spanned("<tt>", "</tt>", $1)#egi
+  $$rpart =~ s#poplink\[([^|\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<a href="$1" target="_blank">/, "</a>", $2)#eig
+    and return 1;
+  $$rpart =~ s#poplink\[([^|\]\[]+)\]#<a href="$1" target="_blank">$1</a>#ig
+    and return 1;
+  $$rpart =~ s#link\[([^|\]\[]+)\|([^\]\[]+)\]#
+    _fix_spanned(qq/<a href="$1">/, "</a>", $2)#eig
+    and return 1;
+  $$rpart =~ s#link\[([^|\]\[]+)\]#<a href="$1">$1</a>#ig
     and return 1;
   $$rpart =~ s#font\[([^|\]\[]+)\|([^\]\[]+)\]#
     _fix_spanned(qq/<font size="$1">/, "</font>", $2)#egi
-      and return 1;
+    and return 1;
   $$rpart =~ s#anchor\[([^|\]\[]*)\]#<a name="$1"></a>#ig
     and return 1;
   $$rpart =~ s#fontcolor\[([^|\]\[]+)\|([^\]\[]+)\|([^\]\[]+)\]#
     _fix_spanned(qq/<font size="$1" color="$2">/, "</font>", $3)#egi
-      and return 1;
+    and return 1;
   $$rpart =~ s!(?<=\W)\[([^\]\[]+)\]!&#91;$1&#93;!g
     and return 1;
   
@@ -212,6 +233,7 @@ sub format {
       $out .= "<pre>$work</pre>";
     }
     else {
+      next unless $part =~ /\S/;
     TRY: while (1) {
        $self->replace(\$part)
          and next TRY;
@@ -219,12 +241,15 @@ sub format {
          and next TRY;
        $part =~ s#pre\[([^\]\[]+)\]#<pre>$1</pre>#ig
          and next TRY;
-       $part =~ s#h([1-6])\[\|([^\[\]]+)\](?:\r?\n)?#<h$1>$2</h$1>#ig
-          and next TRY;
-       $part =~ s#div\[([^\[\]\|]+)\|([^\[\]]+)\]#<div class="$1">$2</div>#ig
-          and next TRY;
-       $part =~ s#h([1-6])\[([^\[\]\|]+)\|([^\[\]]+)\](?:\r?\n)?#<h$1 class="$2">$3</h$1>#ig
-          and next TRY;
+       $part =~ s#h([1-6])\[([^\[\]\|]+)\|([^\[\]]+)\](?:\r?\n)?#
+         _fix_spanned(qq/\n\n<h$1 class="$2">/, "</h$1>\n\n", $3)#ieg
+         and next TRY;
+       $part =~ s#\n*h([1-6])\[\|([^\[\]]+)\]\n*#
+         _fix_spanned("\n\n<h$1>", "</h$1>\n\n", $2)#ieg
+         and next TRY;
+       $part =~ s#\n*h([1-6])\[([^\[\]]+)\]\n*#
+         _fix_spanned("\n\n<h$1>", "</h$1>\n\n", $2)#ieg
+         and next TRY;
        $part =~ s#align\[([^|\]\[]+)\|([^\]\[]+)\]#<div align="$1">$2</div>#ig
          and next TRY;
        $part =~ s#hr\[([^|\]\[]*)\|([^\]\[]*)\]#_make_hr($1, $2)#ieg
@@ -235,7 +260,8 @@ sub format {
          and next TRY;
        $part =~ s#table\[([^\]\[]+)\|([^\]\[|]+)\]#_make_table($1, "|$2")#ieg
          and next TRY;
-       $part =~ s#(?:^|\n{1,2})((?: *(?:\*\*|\#\#|\%\%)[^\n]+(?:\n|$)\n?[^\S\n]*)+)\n?#_format_lists($1)#eg
+       #print STDERR "step: ",unpack("H*", $part),"\n$part\n";
+       $part =~ s#(?:^|\n+|\G)((?: *(?:\*\*|\#\#|\%\%)[^\n]+(?:\n|$)\n?[^\S\n]*)+)\n?#"\n\n"._format_lists($1)."\n\n"#eg
          and next TRY;
        $part =~ s#indent\[([^\]\[]+)\]#<ul>$1</ul>#ig
          and next TRY;
@@ -247,16 +273,40 @@ sub format {
            and next TRY;
        $part =~ s#class\[([^\]\[\|]+)\|([^\]\[]+)\]#
          _fix_spanned(qq/<span class="$1">/, "</span>", $2)#eig
-          and next TRY;
+         and next TRY;
        $part =~ s#style\[([^\]\[\|]+)\|([^\]\[]+)\]#
          _fix_spanned(qq/<span style="$1">/, "</span>", $2)#eig
-          and next TRY;
+         and next TRY;
+       $part =~ s#(div|address|blockquote)\[\n*([^\[\]\|]+)\|\n*([^\[\]]+?)\n*\]#<$1 class="$2">$3</$1>#ig
+         and next TRY;
+       $part =~ s#(div|address|blockquote)\[\n*\|([^\[\]]+?)\n*]#<$1>$2</$1>#ig
+         and next TRY;
+       $part =~ s#(div|address|blockquote)\[\n*([^\[\]]+?)\n*]#<$1>$2</$1>#ig
+         and next TRY;
        last;
       }
+      $part =~ s/^\s+|\s+\z//g; # avoid spurious leading/trailing <p>
       $part =~ s!(\n([ \r]*\n)*)!$1 eq "\n" ? "<br />\n" : "</p>\n<p>"!eg;
       $part = "<p>$part</p>";
-      $part =~ s/<p><div class=\"([^\"]+)\">/<div class="$1"><p>/g;
+      $part =~ s/<p>(<div [^>]*>)/$1<p>/g;
       $part =~ s!</div></p>!</p></div>!g;
+      $part =~ s/<p>(<blockquote>)/$1<p>/g;
+      $part =~ s/<p>(<blockquote [^>]*>)/$1<p>/g;
+      $part =~ s!</blockquote></p>!</p></blockquote>!g;
+      $part =~ s/<p>(<address>)/$1<p>/g;
+      $part =~ s/<p>(<address [^>]*>)/$1<p>/g;
+      $part =~ s!</address></p>!</p></address>!g;
+      $part =~ s!<p>(<hr[^>]*>)</p>!$1!g;
+      $part =~ s!<p>(<(?:table|ol|ul|center|h[1-6])[^>]*>)!$1!g;
+      $part =~ s!(</(?:table|ol|ul|center|h[1-6])>)</p>!$1!g;
+      # attempts to convert class[name|paragraph] into <p class="name">...
+      # tried to use a negative lookahead but it wouldn't work
+      $part =~ s#(<p><span class="([^"<>]+)">(.*?)</span></p>)#
+        my ($one, $two, $three)= ($1, $2, $3); 
+        $3 =~ /<span/ ? $one : qq!<p class="$two">$three</p>!#ge;
+      $part =~ s#(<p><span style="([^"<>]+)">(.*?)</span></p>)#
+        my ($one, $two, $three)= ($1, $2, $3); 
+        $3 =~ /<span/ ? $one : qq!<p style="$two">$three</p>!#ge;
       #$part =~ s!\n!<br />!g;
       $out .= $part;
     }
@@ -297,12 +347,28 @@ sub remove_format {
     TRY: while (1) {
        $self->remove(\$part)
          and next TRY;
+       $part =~ s#(?:acronym|abbr|dfn)\[([^|\]\[]+)\|([^\]\[]+)\|([^\]\[]+)\]#$3#ig
+         and next TRY;
+       $part =~ s#(?:acronym|abbr|dfn|bdo)\[([^|\]\[]+)\|([^\]\[]+)\]#$2#ig
+         and next TRY;
+       $part =~ s#(?:acronym|abbr|dfn|bdo)\[(\|[^|\]\[]+)\]#$1#ig
+         and next TRY;
+       $part =~ s#(?:acronym|abbr|dfn)\[([^|\]\[]+)\]#$1#ig
+         and next TRY;
+       $part =~ s#(?:strong|em|samp|code|var|sub|sup|kbd|q|address|blockquote|b|i|tt)\[([^|\]\[]+)\|([^\]\[]+)\]#$2#ig
+         and next TRY;
+       $part =~ s#(?:strong|em|samp|code|var|sub|sup|kbd|q|address|blockquote|b|i|tt)\[\|([^\]\[]+)\]#$1#ig
+         and next TRY;
+       $part =~ s#(?:strong|em|samp|code|var|sub|sup|kbd|q|address|blockquote|b|i|tt)\[([^\]\[]+)\]#$1#ig
+         and next TRY;
        $part =~ s#div\[([^\[\]\|]+)\|([^\[\]]+)\](?:\r?\n)?#$2#ig
-          and next TRY;
-       $part =~ s#h([1-6])\[\|([^\[\]]+)\](?:\r?\n)?#$2#ig
-          and next TRY;
+         and next TRY;
        $part =~ s#h([1-6])\[([^\[\]\|]+)\|([^\[\]]+)\](?:\r?\n)?#$3#ig
-          and next TRY;
+         and next TRY;
+       $part =~ s#h([1-6])\[\|([^\[\]]+)\](?:\r?\n)?#$2#ig
+         and next TRY;
+       $part =~ s#h([1-6])\[([^\[\]]+)\](?:\r?\n)?#$2#ig
+         and next TRY;
        $part =~ s#poplink\[([^|\]\[]+)\|([^\]\[]+)\]#$2#ig
          and next TRY;
        $part =~ s#poplink\[([^|\]\[]+)\]#$1#ig
@@ -311,10 +377,6 @@ sub remove_format {
          and next TRY;
        $part =~ s#link\[([^|\]\[]+)\]#$1#ig
          and next TRY;
-       $part =~ s#[bi]\[([^\]\[]+)\]#$1#ig
-         and next TRY;
-       $part =~ s#tt\[([^\]\[]+)\]#$1#ig
-         and next TRY;
        $part =~ s#align\[([^|\]\[]+)\|([^\]\[]+)\]#$2#ig
          and next TRY;
        $part =~ s#font\[([^|\]\[]+)\|([^\]\[]+)\]#$2#ig
@@ -344,9 +406,9 @@ sub remove_format {
        $part =~ s#image\[([^\]\[]+)\]##ig
          and next TRY;
        $part =~ s#class\[([^\]\[\|]+)\|([^\]\[]+)\]#$2#ig
-          and next TRY;
+         and next TRY;
        $part =~ s#style\[([^\]\[\|]+)\|([^\]\[]+)\]#$2#ig
-          and next TRY;
+         and next TRY;
        
        last TRY;
       }
index 6356febabdfd69889c332337669fab8a10507e2a..1774fe52cbde3a2d0344dd4564a45b5d8aab2cde 100644 (file)
@@ -55,7 +55,9 @@ sub popup_menu {
   exists $opts{'-name'}
     or confess "No -name parameter";
 
-  my $html = '<select name="' . escape_html($opts{"-name"}) . '">';
+  my $html = '<select name="' . escape_html($opts{"-name"}) . '"';
+  $html .= ' id="'.escape_html($opts{'-id'}).'"' if $opts{'-id'};
+  $html .= '>';
   my $labels = $opts{"-labels"} || {};
   my $values = $opts{"-values"};
   my $default = $opts{"-default"};
index 28d3433a6e4644621785b2d420fa2c9dedd04f74..d39bbe9a9322dcdde93343d566c8c7ea25f56887 100644 (file)
@@ -53,7 +53,12 @@ sub summarize {
     $text .= '...';
   }
 
-  return $self->format_body({}, $articles, $text, 'tr', 1, 0);
+  # the formatter now adds <p></p> around the text, but we don't
+  # want that here
+  my $result = $self->format_body({}, $articles, $text, 'tr', 1, 0);
+  $result =~ s!<p>|</p>!!g;
+
+  return $result;
 }
 
 # attempts to move the given position forward if it's within a HTML tag,
@@ -482,7 +487,7 @@ sub baseActs {
        return 0;
      },
      level2 => sub {
-       return $subsections[$subsect_index]{$_[0]};
+       return escape_html($subsections[$subsect_index]{$_[0]});
      },
      ifLevel2 => 
      sub {
index 03043507172ef108b13955cb74e928f18b1f30f0..c41411d7ced117579d02ecd087a7030d9140063b 100755 (executable)
@@ -12,6 +12,7 @@ use Carp;
 use BSE::Cfg;
 use BSE::Template;
 use DevHelp::HTML qw':default popup_menu';
+use BSE::Util::Tags;
 
 my $cfg = BSE::Cfg->new;
 
@@ -83,6 +84,7 @@ my $words_re = qr/$words_re_str/i;
 my %acts;
 %acts =
   (
+   BSE::Util::Tags->basic(\%acts, $cgi, $cfg),
    iterate_results => 
    sub { 
      ++$result_seq;
@@ -138,7 +140,7 @@ my %acts;
    multiple => sub { @results != 1 },
    terms => sub { escape_html($words) },
    resultSeq => sub { $result_seq },
-   list => sub { popup_menu(-name=>'s',
+   list => sub { popup_menu(-name=>'s', -id => 's',
                            -values=>\@sections,
                            -labels=>\%sections) },
    
index e870ecf5abbca1492659bb77a256f9bca03de4bc..de82da8aa252eed8da617fb620dc78a72ff055f0 100644 (file)
@@ -10,6 +10,60 @@ Maybe I'll add some other bits here.
 
 =head1 CHANGES
 
+=head2 0.15_03
+
+=over
+
+=item *
+
+generate.pl would refresh to the wrong place when secure admin was
+configured, causing the logon page to be displayed.
+
+=item *
+
+reorder.pl had a syntax error which didn't show in the test suite.
+The test suite has been updated to catch similar errors in reorder.pl
+
+=item *
+
+the low level body text formatter now includes <p></p> around its
+results.  Many other minor changes were made to hopefully improve the
+output from the formatter.
+
+=item *
+
+the level2 tag now HTML escapes its results
+
+=item *
+
+the old tag is now more backward compatible.
+
+=item *
+
+changed the search index primary key from "varchar(200) binary" to
+"varbinary(200)".  Unfortunately mysql 3 reports this type as
+"varchar(200) binary" so the tool we use to build mysql.str has been
+mangled to convert that type to varbinary.
+
+=item *
+
+the article table included a default value declaration in the column
+spec for the primary key.  This conflicts with the auto_increment on
+mysql 4 and has been removed.
+
+=item *
+
+the makefile now checks for .pl files that still include the option to
+start the debugger in their #! lines before building a dist.  This
+will prevent releasing a dist that tries to start the debugger when
+you call a script.
+
+=item *
+
+the search results page now has access to the basic dynamic tags
+
+=back
+
 =head2 0.15_02
 
 =over
index ce0a39a60f74be70a9986dae1a641e2a05bb9a62..55acf0a08f26e50a13146ee992f4766454fa7072 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use BSE::Test qw(make_ua ok fetch_ok base_url config);
 
 ++$|;
-print "1..55\n";
+print "1..58\n";
 my $baseurl = base_url;
 ok($baseurl =~ /^http:/, "basic check of base url");
 my $ua = make_ua;
@@ -64,3 +64,6 @@ fetch_ok($ua, "printable error", "$baseurl/cgi-bin/printable.pl?id=5&template=fo
         qr!Invalid\s+template\s+name!i);
 fetch_ok($ua, "siteusers", "$baseurl/cgi-bin/admin/siteusers.pl",
         qr!Admin Site Members!i);
+
+fetch_ok($ua, "reorder", "$baseurl/cgi-bin/admin/reorder.pl",
+       "html", "Refresh: 0; .*/menu\.pl");
index 29aed72b6b1022b07a344ae01a7457ba570000f8..80fc610ff700085235cd7787e9cf9d7e4dda12b8 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 46;
+use Test::More tests => 62;
 
 sub format_test($$$;$);
 
@@ -8,7 +8,71 @@ my $gotmodule = require_ok('DevHelp::Formatter');
 
 SKIP: {
   skip "couldn't load module", 41 unless $gotmodule;
+  format_test 'acronym[hello]', '<p><acronym>hello</acronym></p>', 'acronym';
+  format_test 'acronym[|hello]', '<p><acronym>hello</acronym></p>', 'acronym with empty title';
+  format_test 'acronym[foo|hello]', '<p><acronym title="foo">hello</acronym></p>', 'acronym with title';
+  format_test 'acronym[foo|bar|hello]', '<p><acronym class="bar" title="foo">hello</acronym></p>', 'acronym with class and title';
+  format_test 'bdo[ltr|hello]', '<p><bdo dir="ltr">hello</bdo></p>', 'bdo with dir';
+  format_test 'code[hello]', '<p><code>hello</code></p>', 'code';
+  format_test 'code[|hello]', '<p><code>hello</code></p>', 'code empty class';
+  format_test 'code[foo|hello]', '<p><code class="foo">hello</code></p>', 'code with class';
+  format_test 'code[var[x]="1"]', '<p><code><var>x</var>=&quot;1&quot;</code></p>', 'code with var';
+  format_test 'blockquote[hello]', '<blockquote><p>hello</p></blockquote>', 'blockquote';
+  format_test 'blockquote[|hello]', '<blockquote><p>hello</p></blockquote>', 'blockquote with empty class';
+  format_test 'blockquote[foo|hello]', '<blockquote class="foo"><p>hello</p></blockquote>', 'blockquote with class';
+  format_test <<IN, <<OUT, 'strong over paras', 'both';
+strong[foo|hello
 
+foo]
+IN
+<p><strong class="foo">hello</strong></p>
+<p><strong class="foo">foo</strong></p>
+OUT
+  format_test <<IN, <<OUT, 'blockquote list h1 var', 'both';
+blockquote[
+** one
+** two
+h1[quux]var[hello
+there]
+
+foo]
+IN
+<blockquote><ul><li>one</li><li>two</li></ul>
+<h1>quux</h1>
+<p><var>hello<br />
+there</var></p>
+<p>foo</p></blockquote>
+OUT
+  format_test <<IN, <<OUT, 'address class h1 abbr over paras', 'both';
+address[foo|h1[bar
+
+quux]abbr[my abbr|hello]
+
+class[foo|b[bold|E=MCsup[2]]]
+
+foo]
+IN
+<address class="foo"><h1>bar</h1>
+<h1>quux</h1>
+<p><abbr title="my abbr">hello</abbr></p>
+<p class="foo"><b class="bold">E=MC<sup>2</sup></b></p>
+<p>foo</p></address>
+OUT
+  format_test <<IN, <<OUT, 'div blockquote h1 class over paras', 'both';
+div[quux|blockquote[foo|h1[bar]
+b[hello]
+class[foo|b[bold|E=MCsup[2
+
+kbd[xxx|super]]]]
+
+foo]]
+IN
+<div class="quux"><blockquote class="foo"><h1>bar</h1>
+<p><b>hello</b><br />
+<span class="foo"><b class="bold">E=MC<sup>2</sup></b></span></p>
+<p class="foo"><b class="bold"><sup><kbd class="xxx">super</kbd></sup></b></p>
+<p>foo</p></blockquote></div>
+OUT
   format_test <<IN, <<OUT, 'bold', 'both';
 b[hello]
 IN
@@ -43,9 +107,12 @@ IN
 <p><i><b>bar</b></i></p>
 OUT
   format_test <<IN, <<OUT, 'link', 'both';
-link[http://foo/|bar]
+link[http://foo/|bar
+
+quux]
 IN
 <p><a href="http://foo/">bar</a></p>
+<p><a href="http://foo/">quux</a></p>
 OUT
   format_test 'tt[hello]', '<p><tt>hello</tt></p>', 'tt';
   format_test 'font[-1|text]', '<p><font size="-1">text</font></p>', 'fontsize';
index 45aaa08fc55b0b848d346cb39be9dd967216b147..822615a37d92c869bbbea09d06f9d807b25053cf 100644 (file)
--- a/test.cfg
+++ b/test.cfg
@@ -102,3 +102,4 @@ test formmail validation.name_width=60
 test formmail validation.company_description=Organization
 test formmail validation.company_required=0
 
+site.secureadmin=1