Changeset 638

Show
Ignore:
Timestamp:
11/21/06 15:50:50 (2 years ago)
Author:
Kristoffer
Message:

Ticket #5 - Suggested fixes have been investigated and applied.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/punbb-1.3-dev/upload/admin/maintenance.php

    r624 r638  
    5454                confirm_referrer('admin_maintenance.php'); 
    5555 
    56                 $truncate_sql = ($db_type != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; 
     56                $truncate_sql = ($db_type != 'sqlite' && $db_type != 'pgsql') ? 'TRUNCATE TABLE ' : 'DELETE FROM '; 
     57                 
    5758                $db->query($truncate_sql.$db->prefix.'search_matches') or error('Unable to empty search index match table', __FILE__, __LINE__, $db->error()); 
    5859                $db->query($truncate_sql.$db->prefix.'search_words') or error('Unable to empty search index words table', __FILE__, __LINE__, $db->error()); 
     
    6768 
    6869                        case 'pgsql'; 
    69                                 $result = $db->query('SELECT setval(\'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error()); 
     70                                $result = $db->query('SELECT setval(\''.$db->prefix.'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $db->error()); 
    7071                } 
    7172        } 
  • branches/punbb-1.3-dev/upload/admin/ranks.php

    r624 r638  
    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($lang_admin['Same min posts message'].' '.$min_posts.'.');