sverhagen / mp3-browser

This Joomla plugin will create a table of every MP3 in a specified folder. It displays the ID3 information of each track with a link to download or play the file in the browser
https://www.totaalsoftware.com/products/mp3-browser
GNU General Public License v2.0
5 stars 5 forks source link

Inside a component #65

Closed sverhagen closed 6 years ago

sverhagen commented 8 years ago

As reported via e-mail by Jason: functionality added earlier to make the plugin work in components seems to not work.

The unverified analysis is as follows.

The problem is the following check in MusicTagsHelper.php:

if (isset($article->introtext))

It appears that introtext does not exist in component texts.

I think the correct version should be:

public static function getMusicTagsFromArticle($article) {
  $matches1 = array();
  $matches2 = array();
  if (isset($article->introtext)) {
    $matches1 = self::getMusicTagsFromText($article->introtext);
  }
  if (isset($article->text)) {
    $matches2 = self::getMusicTagsFromText($article->text);
  }
  return array_unique(array_merge($matches1, $matches2));
}
sverhagen commented 6 years ago

I believe this is/was a duplicate of #62.