root/branches/release-36/php/lib/function.mtsigninlink.php @ 2062

Revision 2062, 0.7 kB (checked in by bchoate, 19 months ago)

Updates to blog-side javascript regarding user state and permissions. BugId:79077,69644,67754,69814,79258,62643. Fixed declarations for conditional tags. BugId:79476. Display auth'd user nickname rather than name from comment object. BugId:79475

Line 
1<?php
2# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
3# This program is distributed under the terms of the
4# GNU General Public License, version 2.
5#
6# $Id$
7
8function smarty_function_mtsigninlink($args, &$ctx) {
9    $blog = $ctx->stash('blog');
10    $entry = $ctx->stash('entry');
11    $static_arg = $args['static'] ? "&static=1" : "&static=0";
12
13    require_once "function.mtcgipath.php";
14    $path = smarty_function_mtcgipath($args, $ctx);
15    $return = $path . $ctx->mt->config('CommentScript') .
16        '?__mode=login' . $static_arg;
17    if ($blog)
18        $return .= '&blog_id' . $blog['blog_id'];
19    if ($entry)
20        $return .= '&entry_id' . $entry['entry_id'];
21    return $return;
22}
Note: See TracBrowser for help on using the browser.