summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-08-01 04:48:56 +0100
committerAndrew Dolgov <[email protected]>2008-08-01 04:48:56 +0100
commitc3b44b7304e5261a87427a3277508451fd6eee43 (patch)
tree7c0ac97c545a5fb5589fcde30f5d4dc0532b0d0a
parentb2d5d145c3af40750bb5fe9e7969467b77fff9e0 (diff)
parent73f5f114ec76d32db19f3dcc2aa571c912ed360b (diff)
fix conflict when sanitize_rss was called incorrectly in CDM
-rw-r--r--extras/button/license.txt10
-rw-r--r--extras/button/musicplayer.swfbin0 -> 6134 bytes
-rw-r--r--extras/button/musicplayer_f6.swfbin0 -> 6463 bytes
-rw-r--r--functions.php32
-rw-r--r--login_form.php6
-rw-r--r--sanity_check.php2
-rw-r--r--schema/ttrss_schema_mysql.sql6
-rw-r--r--schema/ttrss_schema_pgsql.sql6
8 files changed, 53 insertions, 9 deletions
diff --git a/extras/button/license.txt b/extras/button/license.txt
new file mode 100644
index 000000000..12d609e12
--- /dev/null
+++ b/extras/button/license.txt
@@ -0,0 +1,10 @@
+Copyright (c) 2005, Fabricio Zuardi
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/extras/button/musicplayer.swf b/extras/button/musicplayer.swf
new file mode 100644
index 000000000..39c8d5398
--- /dev/null
+++ b/extras/button/musicplayer.swf
Binary files differ
diff --git a/extras/button/musicplayer_f6.swf b/extras/button/musicplayer_f6.swf
new file mode 100644
index 000000000..2eb5d5796
--- /dev/null
+++ b/extras/button/musicplayer_f6.swf
Binary files differ
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);
diff --git a/login_form.php b/login_form.php
index b2c6bcf59..cf764bfe8 100644
--- a/login_form.php
+++ b/login_form.php
@@ -101,9 +101,11 @@ window.onload = init;
<?php } ?>
<table>
<tr><td align="right"><?php echo __("Login:") ?></td>
- <td align="right"><input name="login"></td></tr>
+ <td align="right"><input name="login"
+ value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
<tr><td align="right"><?php echo __("Password:") ?></td>
- <td align="right"><input type="password" name="password"></td></tr>
+ <td align="right"><input type="password" name="password"
+ value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
<?php if (ENABLE_TRANSLATIONS) { ?>
<tr><td align="right"><?php echo __("Language:") ?></td>
<td align="right">
diff --git a/sanity_check.php b/sanity_check.php
index ee715a823..1afd28d94 100644
--- a/sanity_check.php
+++ b/sanity_check.php
@@ -2,7 +2,7 @@
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 17);
- define('SCHEMA_VERSION', 38);
+ define('SCHEMA_VERSION', 39);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 59a8c83b5..c2a5ce580 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -209,7 +209,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
-insert into ttrss_version values (38);
+insert into ttrss_version values (39);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -334,6 +334,10 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Do not show images in articles', 2);
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ENABLE_FLASH_PLAYER', 1, 'false', 'Enable inline MP3 player', 3, 'Enable the Flash-based XSPF Player to play MP3-format podcast enclosures.');
+
create table ttrss_user_prefs (
owner_uid integer not null,
pref_name varchar(250),
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index c0cddfbad..ba5ebac28 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -189,7 +189,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (38);
+insert into ttrss_version values (39);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -308,6 +308,10 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('STRIP_IMAGES', 1, 'false', 'Do not show images in articles', 2);
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('ENABLE_FLASH_PLAYER', 1, 'false', 'Enable inline MP3 player', 3, 'Enable the Flash-based XSPF Player to play MP3-format podcast enclosures.');
+
create table ttrss_user_prefs (
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,