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.mtauthorauthtype.php

    r1174 r2356  
    88function smarty_function_mtauthorauthtype($args, &$ctx) { 
    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 
     17    if (empty($author)) { 
    1118        return $ctx->error("No author available"); 
    1219    }