Show
Ignore:
Timestamp:
05/20/06 09:54:13 (6 years ago)
Author:
dom
Message:

Clean up after Nick, mutter mutter

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/lib/Wiki/Toolkit/Store/Database.pm

    r300 r302  
    123123        my ($running_total_ref,$result) = @_; 
    124124 
    125         if($result == 0 || $result == undef) { 
     125        if(($result && $result == 0) || !$result) { 
    126126                # No opinion, no need to change things 
    127127        } elsif($result == -1 || $result == 1) { 
     
    14381438 
    14391439        # If they only gave us the node name, get the node id 
    1440     $sql = "SELECT id FROM node WHERE name=" . $dbh->quote($name); 
    1441     my ($node_id) = $dbh->selectrow_array($sql); 
     1440    unless ($node_id) { 
     1441        $sql = "SELECT id FROM node WHERE name=" . $dbh->quote($name); 
     1442        $node_id = $dbh->selectrow_array($sql); 
     1443    } 
    14421444 
    14431445        # If they didn't tell us what they wanted / we couldn't find it,  
     
    14471449 
    14481450        # Build up our SQL 
    1449         my $sql = "SELECT id, name, content.version, content.modified "; 
     1451        $sql = "SELECT id, name, content.version, content.modified "; 
    14501452        if($with_content) { 
    14511453                $sql .= ", content.text ";