Skip to content
Permalink
Browse files
scrub some link names
just in case you're trying to break things
  • Loading branch information
lachlan-00 committed Aug 30, 2021
1 parent d566bdb commit bb0bc198539fb9853f8a04e393cac2ae79c09864
@@ -595,7 +595,7 @@ public function format($details = true, $limit_threshold = '')
$album_artist->format();
$this->album_artist_name = $album_artist->name;
$this->f_album_artist_name = $album_artist->f_name;
$this->f_album_artist_link = "<a href=\"" . $web_path . "/artists.php?action=show&artist=" . $this->album_artist . "\" title=\"" . scrub_out($this->album_artist_name) . "\">" . $this->f_album_artist_name . "</a>";
$this->f_album_artist_link = "<a href=\"" . $web_path . "/artists.php?action=show&artist=" . $this->album_artist . "\" title=\"" . scrub_out($this->album_artist_name) . "\">" . scrub_out($this->f_album_artist_name) . "</a>";
}

$this->tags = Tag::get_top_tags('album', $this->id);
@@ -620,7 +620,7 @@ public function format($details = true, $limit_threshold = '')
if ($this->artist_count == '1') {
$artist = trim(trim((string)$this->artist_prefix) . ' ' . trim((string)$this->artist_name));
$this->f_artist_name = $artist;
$this->f_artist_link = "<a href=\"$web_path/artists.php?action=show&artist=" . $this->album_artist . "\" title=\"" . scrub_out($this->artist_name) . "\">" . $artist . "</a>";
$this->f_artist_link = "<a href=\"$web_path/artists.php?action=show&artist=" . $this->album_artist . "\" title=\"" . scrub_out($this->artist_name) . "\">" . scrub_out($artist) . "</a>";
$this->f_artist = $artist;
} else {
$this->f_artist_link = "<span title=\"$this->artist_count " . T_('Artists') . "\">" . T_('Various') . "</span>";
@@ -473,7 +473,7 @@ public function format($details = true, $limit_threshold = '')
$this->link = ($this->catalog_id)
? AmpConfig::get('web_path') . '/artists.php?action=show&catalog=' . $this->catalog_id . '&artist=' . $this->id
: AmpConfig::get('web_path') . '/artists.php?action=show&artist=' . $this->id;
$this->f_link = "<a href=\"" . $this->link . "\" title=\"" . $this->f_name . "\">" . $this->f_name . "</a>";
$this->f_link = "<a href=\"" . $this->link . "\" title=\"" . scrub_out($this->f_name) . "\">" . scrub_out($this->f_name) . "</a>";

if ($details) {
$min = sprintf("%02d", (floor($this->time / 60) % 60));
@@ -144,7 +144,7 @@ public function format($details = true)
unset($details);
$this->f_name = scrub_out($this->name);
$this->link = AmpConfig::get('web_path') . '/labels.php?action=show&label=' . scrub_out($this->id);
$this->f_link = "<a href=\"" . $this->link . "\" title=\"" . $this->f_name . "\">" . $this->f_name;
$this->f_link = "<a href=\"" . $this->link . "\" title=\"" . scrub_out($this->f_name) . "\">" . scrub_out($this->f_name);
$this->artists = count($this->get_artists());
}

@@ -138,7 +138,7 @@ public function format($details = true)
$this->f_original_name = trim((string)$this->prefix . " " . $this->f_title);
$this->f_title = ($this->f_original_name ?: $this->f_title);
$this->f_full_title = $this->f_title;
$this->f_link = '<a href="' . $this->link . '">' . $this->f_title . '</a>';
$this->f_link = '<a href="' . $this->link . '">' . scrub_out($this->f_title) . '</a>';

return true;
} // format
@@ -271,7 +271,7 @@ public function format($details = true)
{
parent::format($details);
$this->link = AmpConfig::get('web_path') . '/playlist.php?action=show_playlist&playlist_id=' . $this->id;
$this->f_link = '<a href="' . $this->link . '">' . $this->f_name . '</a>';
$this->f_link = '<a href="' . $this->link . '">' . scrub_out($this->f_name) . '</a>';

$this->f_date = $this->date ? get_datetime((int)$this->date) : T_('Unknown');
$this->f_last_update = $this->last_update ? get_datetime((int)$this->last_update) : T_('Unknown');
@@ -149,7 +149,7 @@ public function format($details = true)
$this->f_lastbuilddate = date("c", (int)$this->lastbuilddate);
$this->f_lastsync = date("c", (int)$this->lastsync);
$this->link = AmpConfig::get('web_path') . '/podcast.php?action=show&podcast=' . $this->id;
$this->f_link = '<a href="' . $this->link . '" title="' . $this->f_title . '">' . $this->f_title . '</a>';
$this->f_link = '<a href="' . $this->link . '" title="' . scrub_out($this->f_title) . '">' . scrub_out($this->f_title) . '</a>';
$this->f_website_link = "<a target=\"_blank\" href=\"" . $this->website . "\">" . $this->website . "</a>";

return true;
@@ -1018,7 +1018,7 @@ public function format($details = true)
parent::format();

$this->link = AmpConfig::get('web_path') . '/smartplaylist.php?action=show_playlist&playlist_id=' . $this->id;
$this->f_link = '<a href="' . $this->link . '">' . $this->f_name . '</a>';
$this->f_link = '<a href="' . $this->link . '">' . scrub_out($this->f_name) . '</a>';
}

/**
@@ -180,7 +180,7 @@ public function format($details = true)
$season->format($details);

$this->f_title = ($this->original_name ?: $this->f_title);
$this->f_link = '<a href="' . $this->link . '">' . $this->f_title . '</a>';
$this->f_link = '<a href="' . $this->link . '">' . scrub_out($this->f_title) . '</a>';
$this->f_season = $season->f_name;
$this->f_season_link = $season->f_link;
$this->f_tvshow = $season->f_tvshow;
@@ -1013,7 +1013,7 @@ public function format($details = true)

// Base link
$this->link = AmpConfig::get('web_path') . '/stats.php?action=show_user&user_id=' . $this->id;
$this->f_link = '<a href="' . $this->link . '">' . $this->f_name . '</a>';
$this->f_link = '<a href="' . $this->link . '">' . scrub_out($this->f_name) . '</a>';

if ($details) {
$user_data = self::get_user_data($this->id);
@@ -447,7 +447,7 @@ public function format()
$this->f_artist_link = $wartist['link'];
}
$this->link = AmpConfig::get('web_path') . "/albums.php?action=show_missing&mbid=" . $this->mbid . "&artist=" . $this->artist . "&artist_mbid=" . $this->artist_mbid . "\" title=\"" . $this->name;
$this->f_link = "<a href=\"" . $this->link . "\">" . $this->name . "</a>";
$this->f_link = "<a href=\"" . $this->link . "\">" . scrub_out($this->name) . "</a>";
$user = new User($this->user);
$user->format();
$this->f_user = $user->f_name;

0 comments on commit bb0bc19

Please sign in to comment.