*** bin/view.orig Thu Jan 30 09:21:25 2003 --- bin/view Fri Feb 28 17:55:41 2003 *************** *** 157,162 **** --- 157,164 ---- $text =~ s/>/>\;/go; $text =~ s/\t/ /go; $text = "$vtext$text"; + # suppose the CSS has a declaration: .invisibleInNormal {display:none} + $tmpl =~ s/[.]invisibleInNormal/.invisibleInRaw/gos; if( $viewRaw !~ /debug/i ) { $text =~ s/%META[\:A-Z]*{[^\}]*}%[\n\r]*//gos; } *************** *** 205,210 **** --- 207,228 ---- $tmpl =~ s/]*>//goi; my $editAction = $topicExists ? 'Edit' : 'Create'; + if ( $editAction eq 'Create' && &TWiki::Store::_readTemplateFile("oopscreate", $skin ) ) { + my $url = &TWiki::getOopsUrl( $webName, $topic, "oopscreate" ); + my $warndisplay; + # if a template oopscreate exists, use it and set the vars in it: + # %PARAM1% to the intended topic name + # %PARAM2% to none if the topic is a wiki topic, + # (use as a CSS class in the template) + if( (&TWiki::isWikiName($topic)) || ($topic =~ /^[A-Z]{3,}$/ ) ) { + $warndisplay = "none"; + } else { + $warndisplay = "warn"; + } + TWiki::redirect( $query, "$url¶m1=$topic¶m2=$warndisplay"); + return; + } + # Special case for 'view' to handle %EDITTOPIC% and Edit vs. Create. # New %EDITURL% variable is implemented by handleCommonTags, suffixes # '?t=NNNN' to ensure that every Edit link is unique, fixing