Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv4392/bin
Modified Files:
web-archive
Log Message:
* Fixed-up the disabling of search code.
* CVS commit archive of a list properly uses list options defined
in lib/lists.def.
* Short title of CVS commit archives has changed from
"<list-name>.CVS" to "[CVS] <list-name>".
Index: web-archive
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/web-archive,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** web-archive 7 Jul 2002 04:50:26 -0000 1.26
--- web-archive 7 Jul 2002 06:22:51 -0000 1.27
***************
*** 208,212 ****
my(@months, @folders);
my($dir, $list, $mon, $mondir, $htmldir, $cvs, $title, $mtime,
! $folder, $i, $yr, $prevdir, $nextdir, $prevmon, $nextmon, $nosearch);
print "Lists: ", join(', ', @dirs), "\n" if $debug;
--- 208,213 ----
my(@months, @folders);
my($dir, $list, $mon, $mondir, $htmldir, $cvs, $title, $mtime,
! $folder, $i, $yr, $prevdir, $nextdir, $prevmon, $nextmon,
! $disable_search, $listname, $short_title);
print "Lists: ", join(', ', @dirs), "\n" if $debug;
***************
*** 270,285 ****
mkdir($htmldir, 0777);
! $nosearch = (defined($listdef->{$list}{'no-search'}) &&
! $listdef->{$list}{'no-search'}[0]);
! $cvs = $list =~ /\.CVS/;
! #($title) = $list =~ /([^.]+)/;
! if (defined($listdef->{$list}{'description'})) {
! $title = join(' ', @{$listdef->{$list}{'description'}});
} else {
! $title = $list;
}
if ($cvs) {
$title = '[CVS] '.$title;
}
--- 271,290 ----
mkdir($htmldir, 0777);
! my $listname = $list;
! $cvs = ($listname =~ s/\.CVS$//);
! $disable_search = ($list =~ /^\./) ||
! ((defined($listdef->{$listname}{'no-search'}) &&
! $listdef->{$listname}{'no-search'}[0]));
!
! if (defined($listdef->{$listname}{'description'})) {
! $title = join(' ', @{$listdef->{$listname}{'description'}});
} else {
! $title = $listname;
}
+ $short_title = $listname;
if ($cvs) {
$title = '[CVS] '.$title;
+ $short_title = '[CVS] '.$short_title;
}
***************
*** 294,298 ****
'-title', "$title (date)",
'-ttitle', "$title (thread)",
! '-definevar', "LIST-NAME=$list",
'-definevar', "SEARCH-CGI=$SEARCH_CGI",
'-definevar', "PNAV-CGI=$MNAV_CGI",
--- 299,303 ----
'-title', "$title (date)",
'-ttitle', "$title (thread)",
! '-definevar', "LIST-NAME='$short_title'",
'-definevar', "SEARCH-CGI=$SEARCH_CGI",
'-definevar', "PNAV-CGI=$MNAV_CGI",
***************
*** 301,306 ****
'-definevar', "MNAV-CGI=$MNAV_CGI", # backwards compatibility
);
! if (-e "$MHA_RC_DIR/$list.mrc") {
! push(@mhaargs, '-rcfile', "$MHA_RC_DIR/$list.mrc");
}
if ($cvs) {
--- 306,312 ----
'-definevar', "MNAV-CGI=$MNAV_CGI", # backwards compatibility
);
!
! if (-e "$MHA_RC_DIR/$listname.mrc") {
! push(@mhaargs, '-rcfile', "$MHA_RC_DIR/$listname.mrc");
}
if ($cvs) {
***************
*** 328,339 ****
# add any custom options specified in definition file
! if (defined($listdef->{$list}{'mhonarc-options'})) {
require 'shellwords.pl';
push(@mhaargs,
! shellwords(join(' ', @{$listdef->{$list}{'mhonarc-options'}})));
}
# if searching is disabled, zero-out $SEARCH-FORM$
! if ($nosearch) {
push(@mhaargs, '-definevar', "SEARCH-FORM=''");
}
--- 334,345 ----
# add any custom options specified in definition file
! if (defined($listdef->{$listname}{'mhonarc-options'})) {
require 'shellwords.pl';
push(@mhaargs,
! shellwords(join(' ', @{$listdef->{$listname}{'mhonarc-options'}})));
}
# if searching is disabled, zero-out $SEARCH-FORM$
! if ($disable_search) {
push(@mhaargs, '-definevar', "SEARCH-FORM=''");
}
***************
*** 390,394 ****
# The -Y option is used so we do not have to process all months
# to update index.
! if (!$nosearch && $list !~ /^\./) {
my @nmzargs = (
$MKNMZ,
--- 396,400 ----
# The -Y option is used so we do not have to process all months
# to update index.
! if (!$nosearch && !$disable_search) {
my @nmzargs = (
$MKNMZ,
***************
*** 429,435 ****
my @vars = (
! '-nosearch' => $nosearch,
'SEARCH-CGI' => $SEARCH_CGI,
! 'LIST-NAME' => $list,
'LIST-DESC' => $title,
);
--- 435,441 ----
my @vars = (
! '-nosearch' => $disable_search,
'SEARCH-CGI' => $SEARCH_CGI,
! 'LIST-NAME' => $short_title,
'LIST-DESC' => $title,
);
***************
*** 451,455 ****
if (-e join('/', $htmldir, $mon, 'threads.html'));
! if (!$listdef->{$list}{'no-raw-link'}[0]) {
my $raw_label = '[Raw: ]';
my $compressed = 0;
--- 457,461 ----
if (-e join('/', $htmldir, $mon, 'threads.html'));
! if (!$listdef->{$listname}{'no-raw-link'}[0]) {
my $raw_label = '[Raw: ]';
my $compressed = 0;
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV