# check for manual tags
- $tag_filter = find_article_filter($article_filters, "tag");
+ foreach ($article_filters as $f) {
+ if ($f[0] == "tag") {
- if ($tag_filter) {
+ $manual_tags = trim_array(split(",", $f[1]));
- $manual_tags = trim_array(split(",", $tag_filter[1]));
-
- foreach ($manual_tags as $tag) {
- if (tag_is_valid($tag)) {
- array_push($entry_tags, $tag);
+ foreach ($manual_tags as $tag) {
+ if (tag_is_valid($tag)) {
+ array_push($entry_tags, $tag);
+ }
}
}
}
$link_title = "Updated: $last_updated";
}
- $feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\"
- href=\"javascript:viewfeed('$feed_id', '', false, '', false, 0);\">$feed_title</a>";
+ $feed = "<span class='feedlink' title=\"$link_title\" id=\"FEEDL-$feed_id\" href=\"#\"
+ onclick=\"viewfeed('$feed_id');\">$feed_title</span>";
/* if ($feed_id < -10) {
$bg_color = "#00ccff";
function make_lockfile($filename) {
$fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
- if (flock($fp, LOCK_EX | LOCK_NB)) {
+ if (flock($fp, LOCK_EX | LOCK_NB)) {
+ if (function_exists('posix_getpid')) {
+ fwrite($fp, posix_getpid() . "\n");
+ }
return $fp;
} else {
return false;
$res = preg_replace('/<img[^>]+>/is', '', $res);
}
- if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
+ if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW', $owner)) {
$res = preg_replace("/href=/i", "target=\"_blank\" href=", $res);
}
print "<div class=\"postEnclosures\">";
if (!get_pref($link, "STRIP_IMAGES")) {
- if ($always_display_enclosures || !preg_match("/<img/i", $article_content)) {
+ if ($always_display_enclosures ||
+ !preg_match("/<img/i", $article_content)) {
+
foreach ($entries as $entry) {
- if (preg_match("/image/", $entry["type"])) {
- print "<p><img
+
+ if (preg_match("/image/", $entry["type"]) ||
+ preg_match("/\.(jpg|png|gif|bmp)/i", $entry["filename"])) {
+
+ print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
- src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
+ src=\"" .htmlspecialchars($entry["url"]) . "\"/></p>";
}
}
}
}
- print "<div class=\"postEnclosures\">";
-
if (db_num_rows($result) == 1) {
print __("Attachment:") . " ";
} else {
$always_display_enclosures = db_fetch_result($tmp_result, 0, "always_display_enclosures");
if (!get_pref($link, "STRIP_IMAGES")) {
- if ($always_display_enclosures || !preg_match("/img/i", $article_content)) {
+ if ($always_display_enclosures ||
+ !preg_match("/img/i", $article_content)) {
+
foreach ($entries as $entry) {
- if (preg_match("/image/", $entry["type"])) {
+ if (preg_match("/image/", $entry["type"]) ||
+ preg_match("/\.(jpg|png|gif|bmp)/i", $entry["filename"])) {
print "<p><img
alt=\"".htmlspecialchars($entry["filename"])."\"
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";