Show
Ignore:
Timestamp:
03/06/07 11:00:35 (5 years ago)
Author:
kake
Message:

Fix bug - ->categories was picking up out-of-date categories.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wiki-toolkit-plugin-categoriser/trunk/lib/Wiki/Toolkit/Plugin/Categoriser.pm

    r267 r380  
    44 
    55use vars qw( $VERSION @ISA ); 
    6 $VERSION = '0.04'; 
     6$VERSION = '0.05'; 
    77@ISA = qw( Wiki::Toolkit::Plugin ); 
    88 
     
    125125    my ($self, %args) = @_; 
    126126    my $dbh = $self->datastore->dbh; 
    127     my $sth = $dbh->prepare( "SELECT metadata_value FROM node INNER JOIN metadata ON (node_id = id) WHERE name = ? AND metadata_type = 'category'" ); 
     127    my $sth = $dbh->prepare( "SELECT metadata_value 
     128                              FROM node 
     129                              INNER JOIN metadata 
     130                                ON ( node.id = metadata.node_id 
     131                                     AND node.version = metadata.version ) 
     132                              WHERE name = ? AND metadata_type = 'category'" ); 
    128133    $sth->execute( $args{node} ); 
    129134    my @categories;