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/block.mtauthoruserpicasset.php

    r1174 r2356  
    88function smarty_block_mtauthoruserpicasset($args, $content, &$ctx, &$repeat) { 
    99    $author = $ctx->stash('author'); 
    10     if (!$author) { 
     10    if (empty($author)) { 
     11        $entry = $ctx->stash('entry'); 
     12        if (!empty($entry)) { 
     13            $author = $ctx->mt->db->fetch_author($entry['entry_author_id']); 
     14        } 
     15    } 
     16    if (empty($author)) { 
    1117        return $ctx->error("No author available"); 
    1218    }