Ignore:
Timestamp:
May 1, 2008, 12:21:49 PM (14 years ago)
Author:
nick
Message:

Command line delete tool

File:
1 edited

Legend:

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

    r420 r423  
    11221122        post_delete_node($name,$node_id,$version,$args{plugins});
    11231123    return 1;
     1124}
     1125
     1126# Returns the name of the node with the given ID
     1127# Not normally used except when doing low-level maintenance
     1128sub node_name_for_id {
     1129        my ($self, $node_id) = @_;
     1130    my $dbh = $self->dbh;
     1131
     1132    my $name_sql = "SELECT name FROM node WHERE id=?";
     1133    my $name_sth = $dbh->prepare($name_sql);
     1134    $name_sth->execute($node_id);
     1135        my ($name) = $name_sth->fetchrow_array;
     1136    $name_sth->finish;
     1137
     1138        return $name;
    11241139}
    11251140
Note: See TracChangeset for help on using the changeset viewer.