From: <vb...@us...> - 2003-08-08 23:31:05
|
Update of /cvsroot/mantisbt/manual In directory sc8-pr-cvs1:/tmp/cvs-serv26089 Modified Files: core.php extract_to_zip.php index.php update.php Log Message: MANTIS MANUAL M update.php - Fixed some problems with register_globals OFF M index.php - Changed index page to have Download Zip rather than Extract which gave two options (zip/files). M extract_to_zip - Fixed timeout problem M core.php (print_items): fixed problems with manual readonly mode. (process_wiki_link): wiki-style links should now work for downloaded copies of the manual, but still won't work for the online version. Index: core.php =================================================================== RCS file: /cvsroot/mantisbt/manual/core.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- core.php 8 Aug 2003 01:03:39 -0000 1.7 +++ core.php 8 Aug 2003 23:31:02 -0000 1.8 @@ -30,7 +30,7 @@ } # --- --- function print_items( $p_parent_id, $p_count, $p_item_id=0 ) { - global $g_table_name; + global $g_table_name, $g_manual_readonly; $query = "SELECT item_id, item_title, item_order FROM $g_table_name @@ -45,8 +45,8 @@ print str_replace( " ", " ", str_pad("", $p_count*4, " ", STR_PAD_LEFT) ); $num = $i+1; - PRINT "$v_item_order. <a class=\"item\" href=\"index.php?f_item_id=$v_item_id\">$v_item_title</a> - if ( $g_manual_readonly ) { + PRINT "$v_item_order. <a class=\"item\" href=\"index.php?f_item_id=$v_item_id\">$v_item_title</a>"; + if ( !$g_manual_readonly ) { PRINT "[<a class=\"small\" href=\"edit_form.php?f_item_id=$v_item_id\">edit</a>]"; } PRINT '<br />'; @@ -248,7 +248,7 @@ if ( 0 != $t_row ) { extract( $t_row ); $t_filename = create_filename( $item_id ); - return '<a href="$t_filename">'.$item_title.'</a>'; + return "<a href=\"$t_filename\">$item_title</a>"; } else { return ''; } Index: extract_to_zip.php =================================================================== RCS file: /cvsroot/mantisbt/manual/extract_to_zip.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extract_to_zip.php 20 Sep 2002 00:38:33 -0000 1.2 +++ extract_to_zip.php 8 Aug 2003 23:31:02 -0000 1.3 @@ -1,6 +1,9 @@ <?php include( "core.php" ); ?> <?php include( "zip.php" ); ?> <?php + // Don't timeout + set_time_limit( 0 ); + $zip = new zipfile(); #$zip->ctrl_dir = 'man'; Index: index.php =================================================================== RCS file: /cvsroot/mantisbt/manual/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- index.php 8 Aug 2003 01:03:39 -0000 1.7 +++ index.php 8 Aug 2003 23:31:02 -0000 1.8 @@ -6,15 +6,15 @@ <br /> <?php if ( !$g_manual_readonly ) { ?> - <a href="add_form.php">Add Item</a> | +<a href="add_form.php">Add Item</a> | <?php } ?> - <a href="extract.php">Extract</a> -<p> +<a href="extract_to_zip.php">Download Zip</a> +<br /><br /> <table width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#ffffff"> <tr> <td class="top-bar" colspan="2"> - + Mantis Manual </td> </tr> <tr valign="top"> Index: update.php =================================================================== RCS file: /cvsroot/mantisbt/manual/update.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- update.php 8 Aug 2003 01:03:39 -0000 1.2 +++ update.php 8 Aug 2003 23:31:02 -0000 1.3 @@ -4,12 +4,14 @@ trigger_error( 'This manual is readonly', E_USER_ERROR ); } + $f_item_id = addslashes( $_POST['f_item_id'] ); $f_parent_id = addslashes( $_POST['f_parent_id'] ); $f_item_title = addslashes( $_POST['f_item_title'] ); $f_applicable_version = addslashes( $_POST['f_applicable_version'] ); $f_description = addslashes( $_POST['f_description'] ); $f_see_also = addslashes( $_POST['f_see_also'] ); $f_item_order = addslashes( $_POST['f_item_order'] ); + $f_old_item_order = addslashes( $_POST['f_old_item_order'] ); $f_visible = addslashes( $_POST['f_visible'] ); $query = "UPDATE $g_table_name |