Fixed  "BBCode Sites" function oddness

Belazor

Active member
It seems to me that the $cache variable in this function is largely pointless:

PHP:
    public function getBbCodeMediaSitesForCache()
    {
        $sites = $this->getAllBbCodeMediaSites();
        $cache = array();
        foreach ($sites AS &$site)
        {
            $cache[$site['media_site_id']] = array(
                'embed_html' => $site['embed_html']
            );
        }

        return $sites;
    }
 

Enigma

Well-known member
If I had to guess, it should return $cache instead of $sites so it doesn't cache unnecessary information. ;)
 

Mike

XenForo developer
Staff member
Indeed it should be returning $cache. I can't find anything that uses any data other than embed_html.
 
Top