Skip to content

Commit

Permalink
scrub some link names
Browse files Browse the repository at this point in the history
just in case you're trying to break things
  • Loading branch information
lachlan-00 committed Aug 30, 2021
1 parent d566bdb commit bb0bc19
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Repository/Model/Album.php
Expand Up @@ -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);
Expand All @@ -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>";
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Artist.php
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Label.php
Expand Up @@ -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());
}

Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Movie.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Playlist.php
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Podcast.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Search.php
Expand Up @@ -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>';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/TVShow_Episode.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/User.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Model/Wanted.php
Expand Up @@ -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;
Expand Down

0 comments on commit bb0bc19

Please sign in to comment.