Changeset 1814

Show
Ignore:
Timestamp:
05/10/06 00:46:27
Author:
miyagawa
Message:

fix entry tag. feed tag and uncomment feed unread mgmt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PlaggerLDR/trunk/lib/PlaggerLDR/Controller/API.pm

    r1813 r1814  
    3030            subscribe_id => $feed->id, 
    3131            unread_count => $unread, 
    32             folder => ($feed->tags)[0] || '', 
     32            folder => eval { ($feed->tags)[0]->name } || '', 
    3333            tags => [], # TODO 
    3434            rate => 0, 
     
    7272            modified_on => ($entry->date ? $entry->date->epoch : time), 
    7373            created_on => ($entry->date ? $entry->date->epoch : time), 
    74             category => $entry->tags->count ? ($entry->tags)[0]->name : undef, 
     74            category => eval { ($entry->tags)[0]->name } || undef, 
    7575            title => $entry->title, 
    7676            id => $entry->id, 
     
    8787    my $feed = $schema->resultset('Feed')->find( $c->req->param('subscribe_id') ); 
    8888    for my $entry ($feed->entries({ read => 0 })) { 
    89 #        $entry->read(1); 
    90 #        $entry->update; 
     89        $entry->read(1); 
     90        $entry->update; 
    9191    } 
    9292