From: Peter T. <pet...@us...> - 2001-07-21 07:58:56
|
Update of /cvsroot/twiki/twiki/bin In directory usw-pr-cvs1:/tmp/cvs-serv17850 Modified Files: preview save Log Message: Check to reject empty topic Index: preview =================================================================== RCS file: /cvsroot/twiki/twiki/bin/preview,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** preview 2001/07/20 07:22:11 1.25 --- preview 2001/07/21 07:58:53 1.26 *************** *** 139,142 **** --- 139,148 ---- &TWiki::Form::fieldVars2Meta( $webName, $query, $meta ); $text = $query->param( "text" ); + if( ! $text ) { + # empty topic not allowed + my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsempty" ); + print $query->redirect( $url ); + return; + } $ptext = $text; Index: save =================================================================== RCS file: /cvsroot/twiki/twiki/bin/save,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** save 2001/07/13 11:10:06 1.23 --- save 2001/07/21 07:58:53 1.24 *************** *** 75,78 **** --- 75,83 ---- TWiki::redirect( $query, $url ); return; + } elsif( ! $text ) { + # empty topic not allowed + my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsempty" ); + print $query->redirect( $url ); + return; } |