Show
Ignore:
Timestamp:
05/16/08 07:45:14 (19 months ago)
Author:
takayama
Message:

Fixed BugId:79763
* When author object was not found in the context, try to load author object from entry in the context

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-38/php/lib/function.mtauthordisplayname.php

    r1174 r2356  
    1010    // parameters: none 
    1111    $author = $ctx->stash('author'); 
     12    if (empty($author)) { 
     13        $entry = $ctx->stash('entry'); 
     14        if (!empty($entry)) { 
     15            $author = $ctx->mt->db->fetch_author($entry['entry_author_id']); 
     16        } 
     17    } 
     18    if (empty($author)) { 
     19        return $ctx->error("No author available"); 
     20    } 
    1221    $author_name = $author['author_nickname']; 
    1322    $author_name or $author_name =