From: Tara L Andrews Date: Thu, 23 Feb 2012 02:09:18 +0000 (+0100) Subject: add support for direct SQL query of directory X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b85f745ad28120e32891e7c9c96c1d068e787979;p=scpubgit%2Fstemmaweb.git add support for direct SQL query of directory --- diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index cd6cb76..c33b9f0 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -49,12 +49,7 @@ sub directory :Local :Args(0) { my $m = $c->model('Directory'); # TODO not used yet, will load user texts later my $user = $c->request->param( 'user' ) || 'ALL'; - my @textlist; - $m->scan( sub { - push( @textlist, { - 'id' => $m->object_to_id( @_ ), - 'name' => $_[0]->name } ) - } ); + my @textlist = $m->traditionlist(); $c->stash->{texts} = \@textlist; $c->stash->{template} = 'directory.tt'; }