<link rel="stylesheet" type="text/css" href="admin.css" /> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> <tr class="top-bar"> <td class="links"> [ <a href="upgrade_list.php">Back to Upgrade List</a> ] [ <a href="upgrade_escaping.php">Refresh view</a> ] </td> <td class="title"> String Escaping Database Fixes </td> </tr> </table> <br /><br /> <?php if (!db_table_exists(config_get('mantis_upgrade_table'))) { # Create the upgrade table if it does not exist $query = "CREATE TABLE " . config_get('mantis_upgrade_table') . "(upgrade_id char(20) NOT NULL,\n\t\t\t\t description char(255) NOT NULL,\n\t\t\t\t PRIMARY KEY (upgrade_id))"; $result = db_query($query); } # link the data structures and upgrade list require_once 'upgrade_inc.php'; # drop the database upgrades and load the escaping ones $upgrade_set = new UpgradeSet(); $upgrade_set->add_items(include 'upgrades/0_17_escaping_fixes_inc.php'); $upgrade_set->process_post_data(); ?> </body> </html>
} function output($p_limit = null) { # @@@ The generated file is in UNIX format, should it be in Windows format? $t_filename = $this->upgrade_file . '.sql'; #header( "Content-Type: text/plain; name=$t_filename" ); #header( 'Content-Transfer-Encoding: BASE64;' ); #header( "Content-Disposition: attachment; filename=$t_filename" ); $t_upgrade_table = config_get_global('mantis_upgrade_table'); foreach ($this->item_array as $item) { if ($item->is_applied() || null !== $p_limit && is_array($p_limit) && !in_array($item->id, $p_limit)) { #and not in limit list continue; #then skip to the next one } else { echo $item->display(); } } } } $upgrade_set = new UpgradeSet(); $upgrade_set->add_items_with_check('upgrades/0_13_inc.php', $t_project_table); $upgrade_set->add_items_with_check('upgrades/0_14_inc.php', $t_bug_file_table); $upgrade_set->add_items_with_check('upgrades/0_15_inc.php', $t_bug_history_table); $upgrade_set->add_items_with_check('upgrades/0_16_inc.php', $t_bug_monitor_table); # this upgrade process was introduced in 0.17.x, so beyond here, the # process of checking the upgrade_table to see if updates are applied should work $upgrade_set->add_items_with_check('upgrades/0_17_inc.php', '', '0.17.0'); $upgrade_set->add_items_with_check('upgrades/0_18_inc.php', '', '0.18.0'); $upgrade_set->add_items_with_check('upgrades/0_19_inc.php', '', '0.19.0'); $upgrade_set->add_items_with_check('upgrades/1_00_inc.php', '', '1.0.0');
# it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # Mantis is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Mantis. If not, see <http://www.gnu.org/licenses/>. # -------------------------------------------------------- # $Id: upgrade_advanced.php,v 1.7.2.1 2007-10-13 22:34:58 giallu Exp $ # -------------------------------------------------------- require_once 'upgrade_inc.php'; $upgrade_set = new UpgradeSet(); $upgrade_set->add_items(include 'upgrades/0_13_inc.php'); $upgrade_set->add_items(include 'upgrades/0_14_inc.php'); $upgrade_set->add_items(include 'upgrades/0_15_inc.php'); $upgrade_set->add_items(include 'upgrades/0_16_inc.php'); $upgrade_set->add_items(include 'upgrades/0_17_inc.php'); $upgrade_set->add_items(include 'upgrades/0_18_inc.php'); $upgrade_set->add_items(include 'upgrades/0_19_inc.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title> Mantis Administration - Database Upgrade </title> <link rel="stylesheet" type="text/css" href="admin.css" /> </head> <body>