Indefero

Indefero Commit Details


Date:2011-07-01 06:35:43 (13 years 9 months ago)
Author:Thomas Keller
Branch:develop, feature.content-md5, feature.diff-whitespace, feature.issue-of-others, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:3a8c56acc4430547efe9cdadc32c706d1bed6a99
Parents: 7b2552f9409c326afb9b7d4e4c5bfb65ae340d85
Message:Postgres needs a VARCHAR cast, which MySQL doesn't understand, of course. *sigh*

Changes:

File differences

src/IDF/Views/Issue.php
747747
748748
749749
750
750
751
752
753
754
755
756
751757
752758
753759
        else {
            // ID-based search
            if (is_numeric($query)) {
                $sql = new Pluf_SQL('project=%s AND CAST(id AS CHAR) LIKE %s', array($prj->id, $query.'%'));
                $sql = 'project=%s AND CAST(id AS VARCHAR) LIKE %s';
                // MySQL can't cast to VARCHAR and a CAST to CHAR converts
                // the whole number, not just the first digit
                if (strtolower(Pluf::f('db_engine')) == 'mysql') {
                    $sql = 'project=%s AND CAST(id AS CHAR) LIKE %s';
                }
                $sql = new Pluf_SQL($sql, array($prj->id, $query.'%'));
                $tmp = Pluf::factory('IDF_Issue')->getList(array(
                    'filter' => $sql->gen(),
                    'order' => 'id ASC'

Archive Download the corresponding diff file

Page rendered in 0.18400s using 13 queries.