Skip to content

Commit

Permalink
Admin Upgrade Modifications
Browse files Browse the repository at this point in the history
1. Generated SQL file with \r\n rather than just \n
2. Included config_inc1.php to set the $g_php.
3. Added the 3 sql statements posted by prescience.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1113 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jun 8, 2002
1 parent 388780e commit a61071f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
17 changes: 16 additions & 1 deletion admin/admin_upgrade_0_18_0.php
Expand Up @@ -13,6 +13,21 @@

$upgrade_obj->AddItem( "# Auto-assigning of bugs for a default user per category" );
$upgrade_obj->AddItem( "ALTER TABLE mantis_bug_history_table ADD type INT(2) NOT NULL" );
$upgrade_obj->AddItem();

$upgrade_obj->AddItem( "# Private news support" );
$upgrade_obj->AddItem( "ALTER TABLE mantis_news_table ADD view_state INT(2) DEFAULT '10' NOT NULL ".
"AFTER last_modified" );
$upgrade_obj->AddItem();

$upgrade_obj->AddItem( "# Allow news items to stay at the top" );
$upgrade_obj->AddItem( "ALTER TABLE mantis_news_table ADD announcement INT(1) NOT NULL AFTER view_state" );
$upgrade_obj->AddItem();

$upgrade_obj->AddItem( "# Bug relationship support" );
$upgrade_obj->AddItem( "ALTER TABLE mantis_bug_relationship_table ADD id INT(7) UNSIGNED ZEROFILL NOT ".
"NULL AUTO_INCREMENT PRIMARY KEY FIRST" );
$upgrade_obj->AddItem();

# END OF UPGRADE SQL STATEMENTS

Expand All @@ -21,4 +36,4 @@
} else {
$upgrade_obj->Execute( $f_action );
}
?>
?>
5 changes: 3 additions & 2 deletions admin/admin_upgrade_inc.php
@@ -1,5 +1,6 @@
<?php
require_once( '../constant_inc.php' );
require_once( '../default/config_inc1.php' );
require_once( '../config_inc.php' );
require_once( '../core_database_API.php' );
?>
Expand Down Expand Up @@ -73,9 +74,9 @@ function Execute( $p_action ) {

for ( $i=0; $i<$this->item_count; $i++ ) {
if ( $this->IsValidComment( $this->query_arr[$i] ) ) {
PRINT $this->query_arr[$i] . "\n";
PRINT $this->query_arr[$i] . "\r\n";
} else {
PRINT $this->query_arr[$i] . ";\n";
PRINT $this->query_arr[$i] . ";\r\n";
}
}

Expand Down

0 comments on commit a61071f

Please sign in to comment.