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: 30e3d69
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c8a0c59
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on May 29, 2012

  1. Fix PostgreSQL errors with boolean fields

    PostgreSQL triggers an error when comparing a boolean field with an
    integer value. This happens frequently in MantisBT as AdoDB stores
    boolean fields as integers for most RDBMS.
    
    This could prevent for example manage_user_page.php from loading.
    
    To fix the problem, db_prepare_bool() has been modified to return 'true'
    or 'false' as appropriate when the DB is PostgreSQL, through use of
    AdoDB qstr() function. Behavior for other RDMBS is unchanged.
    
    The where clause condition in manage_user_page.php has been modified to
    use db_prepare_bool() instead of hardcoding 'enabled = 1'.
    
    Following code cleanup was also performed:
    - Uses of db_prepare_bool() in filter_api.php and mc_api.php that
      would have caused incorrect behavior with the modified function have
      been removed
    - Removed non-existant 2nd parameter in call to db_prepare_bool() in
      filter_api.php
    - Fix whitespace in mc_api.php
    
    Fixes #14288
    dregad committed May 29, 2012
    Copy the full SHA
    3255958 View commit details
  2. Optimize filter_db_get_available_queries()

    This function was retrieving a list of filters then, through a for
    loop, keeping only the records visible by the current user.
    
    The revised code performs the filtering directly in the SQL.
    
    The same correction was made to mci_filter_db_get_available_queries()
    dregad committed May 29, 2012
    Copy the full SHA
    c8a0c59 View commit details
Loading