mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
make OPEN_LINKS_IN_NEW_WINDOW behaviour more universel (closes #79)
This commit is contained in:
14
backend.php
14
backend.php
@@ -565,6 +565,12 @@
|
|||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|
||||||
|
$link_target = "";
|
||||||
|
|
||||||
|
if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
|
||||||
|
$link_target = "target=\"_new\"";
|
||||||
|
}
|
||||||
|
|
||||||
$line = db_fetch_assoc($result);
|
$line = db_fetch_assoc($result);
|
||||||
|
|
||||||
if ($line["icon_url"]) {
|
if ($line["icon_url"]) {
|
||||||
@@ -588,10 +594,10 @@
|
|||||||
} else {
|
} else {
|
||||||
$comments_url = $line["link"];
|
$comments_url = $line["link"];
|
||||||
}
|
}
|
||||||
$entry_comments = "<a href=\"$comments_url\">$num_comments comments</a>";
|
$entry_comments = "<a $link_target href=\"$comments_url\">$num_comments comments</a>";
|
||||||
} else {
|
} else {
|
||||||
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
if ($line["comments"] && $line["link"] != $line["comments"]) {
|
||||||
$entry_comments = "<a href=\"".$line["comments"]."\">comments</a>";
|
$entry_comments = "<a $link_target href=\"".$line["comments"]."\">comments</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -604,8 +610,8 @@
|
|||||||
if ($entry_author) {
|
if ($entry_author) {
|
||||||
$entry_author = " - by $entry_author";
|
$entry_author = " - by $entry_author";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr><td><a href=\"" . $line["link"] . "\">" . $line["title"] .
|
print "<tr><td><a $link_target href=\"" . $line["link"] . "\">" . $line["title"] .
|
||||||
"</a>$entry_author</td>";
|
"</a>$entry_author</td>";
|
||||||
|
|
||||||
$parsed_updated = date(get_pref($link, 'LONG_DATE_FORMAT'),
|
$parsed_updated = date(get_pref($link, 'LONG_DATE_FORMAT'),
|
||||||
|
|||||||
Reference in New Issue
Block a user