1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed [minor] XenForo_Template_Helper_Core::$helperCallbacks not used for all username calls

Discussion in 'Resolved Bug Reports' started by Mike Tougeron, Oct 11, 2011.

  1. Mike Tougeron

    Mike Tougeron Well-Known Member

    [v1.1.0-b2] XenForo_Template_Helper_Core that doesn't always respect the methods defined in XenForo_Template_Helper_Core::$helperCallbacks for username (helperUserName), richusername (helperRichUserName) and usernamehtml (helperUserNameHtml) and instead calls the default methods directly.
     
  2. Mike Tougeron

    Mike Tougeron Well-Known Member

    [mtougeron@localhost:(master) XenForo]$> git diff Template/Helper/Core.php
    diff --git a/xenforo/library/XenForo/Template/Helper/Core.php b/xenforo/library/XenForo/Template/Helper/Core.php
    index 9b0d45e..c41fd8e 100644
    --- a/xenforo/library/XenForo/Template/Helper/Core.php
    +++ b/xenforo/library/XenForo/Template/Helper/Core.php
    @@ -381,15 +381,15 @@ class XenForo_Template_Helper_Core

    if ($users[0])
    {
    - $user1 = self::helperUserName($users[0]);
    + $user1 = self::callHelper('username', array($users[0]));

    if ($users[1])
    {
    - $user2 = self::helperUserName($users[1]);
    + $user2 = self::callHelper('username', array($users[1]));

    if ($users[2])
    {
    - $user3 = self::helperUserName($users[2]);
    + $user3 = self::callHelper('username', array($users[2]));
    }
    }
    }
    @@ -1442,7 +1442,7 @@ class XenForo_Template_Helper_Core

    if ($rich)
    {
    - $username = self::helperRichUserName($user, $username);
    + $username = self::callHelper('richusername', array($user, $username));
    }

    $href = self::getUserHref($user, $attributes);
    @@ -1458,7 +1458,7 @@ class XenForo_Template_Helper_Core

    public static function helperUserName(array $user, $class = '', $rich = false)
    {
    - return self::helperUserNameHtml($user, '', $rich, array('class' => $class));
    + return self::callHelper('usernamehtml', array($user, '', $rich, array('class' => $class)));
    }

    // -------------------------------------------------
     
  3. Kier

    Kier XenForo Developer Staff Member

    All fixed.
     
    Mike Tougeron likes this.

Share This Page