Changeset 858

Show
Ignore:
Timestamp:
01/30/07 22:31:43 (2 years ago)
Author:
Neal
Message:

Backported [638] from dev branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/upload/admin_maintenance.php

    r64 r858  
    5353                confirm_referrer('admin_maintenance.php'); 
    5454 
    55                 $truncate_sql = ($db_type != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; 
     55                $truncate_sql = ($db_type != 'sqlite' && $db_type != 'pgsql') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; 
    5656                $db->query($truncate_sql.$db->prefix.'search_matches') or error('Unable to empty search index match table', __FILE__, __LINE__, $db->error()); 
    5757                $db->query($truncate_sql.$db->prefix.'search_words') or error('Unable to empty search index words table', __FILE__, __LINE__, $db->error()); 
     
    6666 
    6767                        case 'pgsql'; 
    68                                 $result = $db->query('SELECT setval(\'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error()); 
     68                                $result = $db->query('SELECT setval(\''.$db->prefix.'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error()); 
    6969                } 
    7070        } 
  • trunk/upload/admin_ranks.php

    r125 r858  
    8282 
    8383        // Make sure there isn't already a rank with the same min_posts value 
    84         $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' && min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error()); 
     84        $result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' AND min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error()); 
    8585        if ($db->num_rows($result)) 
    8686                message('There is already a rank with a minimun posts value of '.$min_posts.'.');