Changeset 67 in bookmarks for trunk


Ignore:
Timestamp:
02/04/14 15:31:28 (11 years ago)
Author:
peter
Message:

changed method name in BookmarkController from _check_modified() to _request_is_newer_than()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkController.pm

    r66 r67  
    306306} 
    307307 
    308 #TODO: better method name 
    309308# returns 1 if there is an If-Modified-Since header and it is newer than the given $mtime 
    310309# returns 0 if there is an If-Modified-Since header but the $mtime is newer 
    311310# returns undef if there is no If-Modified-Since header 
    312 sub _check_modified { 
     311sub _request_is_newer_than { 
    313312    my $self = shift; 
    314313    my $mtime = shift; 
     
    330329    my $bookmark = $self->get_bookmark({ id => $id }); 
    331330    if ($bookmark) { 
    332         return [304, [], []] if $self->_check_modified($bookmark->mtime); 
     331        return [304, [], []] if $self->_request_is_newer_than($bookmark->mtime); 
    333332 
    334333        my $last_modified = time2str($bookmark->mtime); 
     
    357356    my $bookmark = $self->get_bookmark({ id => $id }); 
    358357    if ($bookmark) { 
    359         return [304, [], []] if $self->_check_modified($bookmark->mtime); 
     358        return [304, [], []] if $self->_request_is_newer_than($bookmark->mtime); 
    360359 
    361360        # check whether the requested field is part of the bookmark 
Note: See TracChangeset for help on using the changeset viewer.