diff --git a/ChangeLog b/ChangeLog index c089349eb2..287f822f8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,9 @@ To Do: * Split manage user actions into separate files * Added several ; in core_API.php that caused errors on some servers * Added view next/prev XYZ bugs on bug viewing page + * Added a string_display() function to prevent HTML tags from screwing up display + * Modified version to be an enum. + * Added version editing capability 12.06.2000 - 0.10.2 diff --git a/INSTALL b/INSTALL index 463953fed2..047cdeac92 100644 --- a/INSTALL +++ b/INSTALL @@ -54,35 +54,8 @@ is covered in CONFIGURATION. ------------------------------------------------------------------------------- ### Upgrading ### ------------------------------------------------------------------------------- -================= -0.9.x to 0.10.x -================= -You will need to add a 'protected' field in the mantis_user_table. -This command will do the trick: - -ALTER TABLE mantis_user_table ADD protected VARCHAR (3) not null - -================= -0.10.2 to 0.10.3+ -================= - -I've added a profile table and inserted feedback into the main bug table -Run these queries: - -ALTER TABLE mantis_bug_table CHANGE status status ENUM ('new','fdeedback', - 'acknowledged','confirmed','assigned','resolved') DEFAULT 'new' not null; - -CREATE TABLE mantis_user_profile_table ( - id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, - user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, - platform varchar(32) NOT NULL, - os varchar(32) NOT NULL, - os_build varchar(16) NOT NULL, - description text NOT NULL, - default_profile char(3) NOT NULL, - PRIMARY KEY (id) -); +See the files: UPGRADING and db_upgrade.sql ------------------------------------------------------------------------------- ### Useful links ### diff --git a/README b/README index 0b1c69965e..0cce28ad5a 100644 --- a/README +++ b/README @@ -51,6 +51,10 @@ Features: - Projection / ETA - Items updated since last visit indicators +The release numbering convention I'm using is major.minor.micro. +Major indicates a large change in the core package, minor a significant +amount of feature addition/modification, micro for mostly bug fixes. + I'd appreciate an email letting me know if you find this program useful. I won't publish any information without permission, I'd just like an idea and knowing I'm helping people will only motivate me more. diff --git a/UPGRADING b/UPGRADING new file mode 100644 index 0000000000..657287698f --- /dev/null +++ b/UPGRADING @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------- +# Upgrading +# ------------------------------------------------------------------------------- + +# Here are the basic steps to upgrade the database tables +# Take a look in db_upgrade.sql as well. + +# ================= +# 0.10.2 to 0.11.0 +# ================= + +# I've added a profile table and inserted feedback into the main bug table. +# Also modified version to be an enum (edit using the manage section) +# Run these queries: + +ALTER TABLE mantis_bug_table CHANGE status status ENUM ('new','fdeedback', + 'acknowledged','confirmed','assigned','resolved') DEFAULT 'new' not null; + +CREATE TABLE mantis_user_profile_table ( + id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, + user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, + platform varchar(32) NOT NULL, + os varchar(32) NOT NULL, + os_build varchar(16) NOT NULL, + description text NOT NULL, + default_profile char(3) NOT NULL, + PRIMARY KEY (id) +); + +ALTER TABLE mantis_bug_table CHANGE version version ENUM ('none') not null; + +CREATE TABLE mantis_user_defaults_table ( + id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, + user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, + hide_resolved char(3) NOT NULL, + limit_view int(11) DEFAULT '0' NOT NULL, + show_last char(3) NOT NULL, + advanced_report char(3) NOT NULL, + advanced_view char(3) NOT NULL, + PRIMARY KEY (id) +); + +# ================= +# 0.9.x to 0.10.x +# ================= + +# You will need to add a 'protected' field in the mantis_user_table. +# This command will do the trick: + +ALTER TABLE mantis_user_table ADD protected VARCHAR (3) not null + diff --git a/account_page.php3 b/account_page.php3 index c33b84a5b0..9f0b0df95e 100644 --- a/account_page.php3 +++ b/account_page.php3 @@ -38,7 +38,7 @@

[ Manage Profiles ] - + [ Change Preferences ]
diff --git a/bug_update_page.php3 b/bug_update_page.php3 index 8bb4d7167f..2557f6164b 100644 --- a/bug_update_page.php3 +++ b/bug_update_page.php3 @@ -80,10 +80,10 @@ $row = mysql_fetch_array( $result ); extract( $row, EXTR_PREFIX_ALL, "v2" ); - $v_summary = string_unsafe( $v_summary ); - $v2_description = string_unsafe( $v2_description ); - $v2_steps_to_reproduce = string_unsafe( $v2_steps_to_reproduce ); - $v2_additional_information = string_unsafe( $v2_additional_information ); + $v_summary = string_display( $v_summary ); + $v2_description = string_display( $v2_description ); + $v2_steps_to_reproduce = string_display( $v2_steps_to_reproduce ); + $v2_additional_information = string_display( $v2_additional_information ); $v_date_submitted = date( "m-d H:i", sql_to_unix_time( $v_date_submitted ) ); $v_last_updated = date( "m-d H:i", sql_to_unix_time( $v_last_updated ) ); ?> diff --git a/bugnote_inc.php b/bugnote_inc.php index 50aaea0d3b..710c21f6eb 100644 --- a/bugnote_inc.php +++ b/bugnote_inc.php @@ -88,7 +88,7 @@
> - +
diff --git a/config_inc.php b/config_inc.php index 6e9556b65a..54068be2dc 100644 --- a/config_inc.php +++ b/config_inc.php @@ -19,7 +19,7 @@ #-------------------- # file path variables - $g_path = "/mantisbt/"; # requires trailing / + $g_path = "/mantis/"; # requires trailing / #-------------------- #-------------------- @@ -150,6 +150,9 @@ $g_manage_category_page = "manage_category_page".$g_php; $g_manage_category_update = "manage_category_update".$g_php; + $g_manage_product_versions_page = "manage_product_versions_page".$g_php; + $g_manage_product_versions_update = "manage_product_versions_update".$g_php; + # news $g_news_menu_page = "news_menu_page".$g_php; $g_news_edit_page = "news_edit_page".$g_php; @@ -201,12 +204,13 @@ $g_date_partitions = array("1 day","3 days","1 week","1 month","1 year"); #-------------------- + $g_product_versions = "0.9.0,0.9.1,0.10.0,0.10.1,0.10.2,0.10.3"; + #-------------------- # html table appearance variables $g_primary_table_tags = ""; #-------------------- - #-------------------- # color values $g_white_color = "#ffffff"; # white @@ -238,4 +242,4 @@ #version $g_mantis_version = "0.10.3"; #-------------------- -?> \ No newline at end of file +?> diff --git a/core_API.php b/core_API.php index e91febb641..f332afa8d2 100644 --- a/core_API.php +++ b/core_API.php @@ -133,8 +133,10 @@ function get_enum_string( $p_field_name ) { } ### end for } #-------------------- - function get_enum_count( $t_enum_string ) { - return count(explode(",",$t_enum_string)); + # returns the number of items in a list + # default delimiter is a , + function get_list_item_count( $t_enum_string, $p_delim_char="," ) { + return count(explode($p_delim_char,$t_enum_string)); } #-------------------- ### Used for update pages @@ -143,7 +145,7 @@ function print_categories( $p_category="" ) { $t_category_string = get_enum_string( "category" ); $t_str = $t_category_string.","; - $cat_count = get_enum_count($t_str)-1; + $cat_count = get_list_item_count($t_str)-1; for ($i=0;$i<$cat_count;$i++) { $t_s = substr( $t_str, 1, strpos($t_str, ",")-2 ); $t_str = substr( $t_str, strpos($t_str, ",")+1, strlen($t_str) ); @@ -162,7 +164,7 @@ function print_list( $p_list, $p_item="" ) { $t_category_string = get_enum_string( $p_list ); $t_str = $t_category_string.","; - $entry_count = get_enum_count($t_str)-1; + $entry_count = get_list_item_count($t_str)-1; for ($i=0;$i<$entry_count;$i++) { $t_s = substr( $t_str, 1, strpos($t_str, ",")-2 ); $t_str = substr( $t_str, strpos($t_str, ",")+1, strlen($t_str) ); @@ -175,13 +177,31 @@ function print_list( $p_list, $p_item="" ) { } ### end for } #-------------------- + ### Used for update pages + function print_list2( $p_list, $p_item="" ) { + global $g_mantis_bug_table; + + $t_str = $p_list.","; + $entry_count = get_list_item_count( $t_str )-1; + for ($i=0;$i<$entry_count;$i++) { + $t_s = substr( $t_str, 0, strpos($t_str, ",") ); + $t_str = substr( $t_str, strpos($t_str, ",")+1, strlen($t_str) ); + if ( $p_item==$t_s ) { + PRINT "