Changeset 302 for wiki-toolkit/trunk/lib/Wiki/Toolkit/Store/Database.pm
- Timestamp:
- 05/20/06 09:54:13 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
wiki-toolkit/trunk/lib/Wiki/Toolkit/Store/Database.pm
r300 r302 123 123 my ($running_total_ref,$result) = @_; 124 124 125 if( $result == 0 || $result == undef) {125 if(($result && $result == 0) || !$result) { 126 126 # No opinion, no need to change things 127 127 } elsif($result == -1 || $result == 1) { … … 1438 1438 1439 1439 # 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 } 1442 1444 1443 1445 # If they didn't tell us what they wanted / we couldn't find it, … … 1447 1449 1448 1450 # Build up our SQL 1449 my$sql = "SELECT id, name, content.version, content.modified ";1451 $sql = "SELECT id, name, content.version, content.modified "; 1450 1452 if($with_content) { 1451 1453 $sql .= ", content.text ";
