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

Fixed Session activity data method wrong...

Discussion in 'Resolved Bugs' started by Liam W, Aug 9, 2016.

  1. Liam W

    Liam W Member

    Lines 55-82 in ControllerPublic/Abstract.php look like they should be:

    PHP:
    $output = array();
    foreach (
    $activities AS $key => $activity)
    {
       
    $product false;
       if (!empty(
    $activity['params']['product_id']))
       {
          
    $productId $activity['params']['product_id'];
          if (isset(
    $productData[$productId]))
          {
             
    $product $productData[$productId];
          }
       }

       if (
    $product)
       {
          
    $output[$key] = array(
             new 
    XenForo_Phrase('xenproduct_viewing_product'),
             
    $product['title'],
             
    $product['url'],
             
    ''
          
    );
       }
       else
       {
           
    $output[$key] = new XenForo_Phrase('xenproduct_viewing_products');
       }
    }
    as opposed to:

    PHP:
    $output = array();
    foreach (
    $activities AS $key => $activity)
    {
       
    $product false;
       if (!empty(
    $activity['params']['product_id']))
       {
          
    $productId $activity['params']['product_id'];
          if (isset(
    $productData[$productId]))
          {
             
    $product $productData[$productId];
          }
       }

       if (
    $product)
       {
          
    $output[$key] = array(
             new 
    XenForo_Phrase('xenproduct_viewing_product'),
             
    $product['title'],
             
    $product['url'],
             
    ''
          
    );
       }
    }

    if (!
    $output)
    {
       
    $output[$key] = new XenForo_Phrase('xenproduct_viewing_products');
    }
    which it is now.

    Liam
     
    Chris D likes this.
  2. Chris D

    Chris D Xen Resources Developer Staff Member Xen Notices

    This is fixed now.
     

Share This Page