diff options
author | Andrew Dolgov <[email protected]> | 2008-08-01 04:48:56 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-08-01 04:48:56 +0100 |
commit | c3b44b7304e5261a87427a3277508451fd6eee43 (patch) | |
tree | 7c0ac97c545a5fb5589fcde30f5d4dc0532b0d0a /functions.php | |
parent | b2d5d145c3af40750bb5fe9e7969467b77fff9e0 (diff) | |
parent | 73f5f114ec76d32db19f3dcc2aa571c912ed360b (diff) |
fix conflict when sanitize_rss was called incorrectly in CDM
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/functions.php b/functions.php index 5ac17b451..0c8716e60 100644 --- a/functions.php +++ b/functions.php @@ -1682,11 +1682,11 @@ $pwd_hash2 = encrypt_password($password, $login); if (defined('ALLOW_REMOTE_USER_AUTH') && ALLOW_REMOTE_USER_AUTH - && $_SERVER["REMOTE_USER"]) { + && $_SERVER["REMOTE_USER"] && $login != "admin") { $login = db_escape_string($_SERVER["REMOTE_USER"]); - $query = "SELECT id,login,access_level + $query = "SELECT id,login,access_level,pwd_hash FROM ttrss_users WHERE login = '$login'"; @@ -3522,6 +3522,12 @@ // $res = strip_tags_long($res, "<p><a><i><em><b><strong><blockquote><br><img><div><span>"); } + if (get_pref($link, "STRIP_IMAGES")) { + + $res = preg_replace('/<img[^>]+>/is', '', $res); + + } + return $res; } @@ -4704,7 +4710,16 @@ $filename = substr($url, strrpos($url, "/")+1); - $entry = "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" . + $entry = ""; + + if (($ctype = __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + + $entry .= "<object type=\"application/x-shockwave-flash\" data=\"extras/button/musicplayer.swf?song_url=$url\" width=\"20\" height=\"20\"> <param name=\"movie\" value=\"extras/button/musicplayer.swf?song_url=$url\" /> </object>"; + + } + + $entry .= "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" . $filename . " (" . $ctype . ")" . "</a>"; array_push($entries, $entry); @@ -5163,7 +5178,16 @@ $filename = substr($url, strrpos($url, "/")+1); - $entry = "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" . + $entry = ""; + + if (($ctype = __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + + $entry .= "<object type=\"application/x-shockwave-flash\" data=\"extras/button/musicplayer.swf?song_url=$url\" width=\"20\" height=\"20\"> <param name=\"movie\" value=\"extras/button/musicplayer.swf?song_url=$url\" /> </object>"; + + } + + $entry .= "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" . $filename . " (" . $ctype . ")" . "</a>"; array_push($entries, $entry); |