~ubuntu-branches/debian/squeeze/movabletype-opensource/squeeze

« back to all changes in this revision

Viewing changes to php/lib/function.mtauthorurl.php

  • Committer: Bazaar Package Importer
  • Author(s): Dominic Hargreaves
  • Date: 2008-06-13 23:28:40 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080613232840-ya4jfxv1jgl45a3d
Tags: 4.2~rc2-1
* New upstream release candidate
* Update Standards-Version (no changes)
* Ensure that schema upgrade message is always seen

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
function smarty_function_mtauthorurl($args, &$ctx) {
9
9
    $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)) {
11
18
        return $ctx->error("No author available");
12
19
    }
13
20
    return isset($author['author_url']) ? $author['author_url'] : '';