/[Semantic-Engine]/EPrints/EPrints.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /EPrints/EPrints.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10 by dpavlin, Fri Jun 29 14:52:31 2007 UTC revision 11 by dpavlin, Fri Jun 29 16:58:42 2007 UTC
# Line 37  sub id { Line 37  sub id {
37  sub lookup {  sub lookup {
38          my $self = shift;          my $self = shift;
39          my $field = shift;          my $field = shift;
40            my $table = shift;
41            my $where = '';
42    
43            if ( ! $table ) {
44                    $table = "archive_$field";
45                    $where = " and lang = 'hr'";
46            }
47    
48          my $sql = qq{          my $sql = qq{
49          SELECT $field          SELECT $field
50          FROM archive_$field          FROM $table
51          WHERE eprintid = $id and lang = 'hr'          WHERE eprintid = $id $where
52          };          };
53          warn "# sql: $sql\n" if $debug;          warn "# sql: $sql\n" if $debug;
54          my @results = map { _x( $_->{$field} ) } @{ $dbh->selectall_arrayref($sql, { Slice => {} }) };          my @results = map { _x( $_->{$field} ) } @{ $dbh->selectall_arrayref($sql, { Slice => {} }) };

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26