Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17298ede9cf8
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3e35866d7862
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Apr 7, 2013

  1. Copy the full SHA
    e4615db View commit details
  2. Copy the full SHA
    8def959 View commit details
  3. Copy the full SHA
    f980976 View commit details
  4. fix typo in db layer changes

    mantis committed Apr 7, 2013
    Copy the full SHA
    3e35866 View commit details
Showing with 12 additions and 12 deletions.
  1. +3 −3 admin/install.php
  2. +4 −4 admin/schema.php
  3. +1 −1 core/bug_api.php
  4. +4 −4 core/classes/MantisDatabaseDict/MantisDatabaseDict.class.php
6 changes: 3 additions & 3 deletions admin/install.php
Original file line number Diff line number Diff line change
@@ -788,7 +788,7 @@ function InsertData( $p_table, $p_data ) {

# all checks have passed, install the database
if( 5 == $t_install_state ) {
$t_config_filename = $g_absolute_path . 'config_inc.php';
$t_config_filename = $MantisConfig->absolute_path . 'config_inc.php';
$t_config_exists = file_exists( $t_config_filename );
?>
<table width="100%" cellpadding="10" cellspacing="1">
@@ -839,7 +839,7 @@ function InsertData( $p_table, $p_data ) {
( $f_database_name != config_get( 'database_name', '') ) ||
( $f_db_username != config_get( 'db_username', '' ) ) ||
( $f_db_password != config_get( 'db_password', '' ) ) ) {
print_test_result( BAD, false, 'file ' . $g_absolute_path . 'config_inc.php' . ' already exists and has different settings' );
print_test_result( BAD, false, 'file ' . $MantisConfig->absolute_path . 'config_inc.php' . ' already exists and has different settings' );
} else {
print_test_result( GOOD, false );
$t_write_failed = false;
@@ -850,7 +850,7 @@ function InsertData( $p_table, $p_data ) {
<?php
if( true == $t_write_failed ) {
echo '<tr><table width="50%" cellpadding="10" cellspacing="1">';
echo '<tr><td>Please add the following lines to ' . $g_absolute_path . 'config_inc.php before continuing to the database upgrade check:</td></tr>';
echo '<tr><td>Please add the following lines to ' . $MantisConfig->absolute_path . 'config_inc.php before continuing to the database upgrade check:</td></tr>';
echo '<tr><td><pre>' . htmlentities( $t_config ) . '</pre></td></tr></table></tr>';
}
?>
8 changes: 4 additions & 4 deletions admin/schema.php
Original file line number Diff line number Diff line change
@@ -532,13 +532,13 @@ function db_null_date() {
/* 185 */ $upgrade[] = array( 'AlterColumnSQL', array( '{custom_field_string}', "value XL NULL DEFAULT NULL " ) );
/* 186 */ $upgrade[] = array( 'UpdateFunction', "update_export_columns", array() );
/* 187 */ $upgrade[] = array( 'AlterColumnSQL', array( '{user}', "username C(255) NOTNULL DEFAULT ''" ) );
/* 188 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "description XL NOTNULL DEFAULT ''" ) );
/* 189 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "steps_to_reproduce XL NOTNULL DEFAULT ''" ) );
/* 190 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "additional_information XL NOTNULL DEFAULT ''" ) );
/* 188 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "description XL NOTNULL" ) );
/* 189 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "steps_to_reproduce XL NOTNULL" ) );
/* 190 */ $upgrade[] = array( 'AddColumnSQL', array( '{bug}', "additional_information XL NOTNULL" ) );
/* 191 */ $upgrade[] = array( 'UpdateFunction', "migrate_bug_text", array() );
/* 192 */ $upgrade[] = array( 'DropTableSQL', array( '{bug_text}' ) );
/* 193 */ $upgrade[] = array( 'DropColumnSQL', array( '{bug}', "bug_text_id" ) );
/* 194 */ $upgrade[] = array( 'AddColumnSQL', array( '{bugnote}', "note XL NOTNULL DEFAULT ''" ) );
/* 194 */ $upgrade[] = array( 'AddColumnSQL', array( '{bugnote}', "note XL NOTNULL" ) );
/* 195 */ $upgrade[] = array( 'UpdateFunction', "migrate_bugnote_text", array() );
/* 196 */ $upgrade[] = array( 'DropTableSQL', array( '{bugnote_text}' ) );
/* 197 */ $upgrade[] = array( 'DropColumnSQL', array( '{bugnote}', "bugnote_text_id" ) );
2 changes: 1 addition & 1 deletion core/bug_api.php
Original file line number Diff line number Diff line change
@@ -705,7 +705,7 @@ function bug_set_field( $p_bug_id, $p_field_name, $p_value ) {
}

# Update fields
$query = 'UPDATE {bug} SET $p_field_name=%s WHERE id=%d';
$query = 'UPDATE {bug} SET ' . $p_field_name . '=%s WHERE id=%d';
db_query( $query, array( $c_value, $c_bug_id ) );

# updated the last_updated date
8 changes: 4 additions & 4 deletions core/classes/MantisDatabaseDict/MantisDatabaseDict.class.php
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
class MantisDatabaseDict {
var $dropTable = 'DROP TABLE %s';
var $renameTable = 'RENAME TABLE %s TO %s';
var $dropIndex = 'DROP INDEX %s';
var $dropIndex = 'DROP INDEX %s ON %s';
var $addCol = ' ADD';
var $alterCol = ' MODIFY';
var $dropCol = ' DROP COLUMN';
@@ -226,7 +226,7 @@ function AddColumnSQL($tabname, $flds)
{
$tabname = $this->TableName ($tabname);
$sql = array();
//var_dump($flds); die;

list($lines,$pkey,$idxs) = $this->_GenFields($flds);
// genfields can return FALSE at times
if ($lines == null) $lines = array();
@@ -259,7 +259,7 @@ function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
{
$tabname = $this->TableName ($tabname);
$sql = array();
//var_dump($flds);

list($lines,$pkey,$idxs) = $this->_GenFields($flds);

// genfields can return FALSE at times
@@ -452,7 +452,7 @@ function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
$sql = array();

if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
$sql[] = sprintf ($this->dropIndex, $idxname);
$sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
if ( isset($idxoptions['DROP']) )
return $sql;
}