fix batch feed editor using wrong SQL syntax when saving feed password
remove uses of auth_pass_encrypted in several other places
This commit is contained in:
parent
0f0d6ca559
commit
51b521c326
2 changed files with 4 additions and 8 deletions
|
@ -1530,7 +1530,6 @@ class Feeds extends Handler_Protected {
|
||||||
"SELECT id FROM ttrss_feeds
|
"SELECT id FROM ttrss_feeds
|
||||||
WHERE feed_url = '$url' AND owner_uid = ".$_SESSION["uid"]);
|
WHERE feed_url = '$url' AND owner_uid = ".$_SESSION["uid"]);
|
||||||
|
|
||||||
$auth_pass_encrypted = 'false';
|
|
||||||
$auth_pass = db_escape_string($auth_pass);
|
$auth_pass = db_escape_string($auth_pass);
|
||||||
|
|
||||||
if (db_num_rows($result) == 0) {
|
if (db_num_rows($result) == 0) {
|
||||||
|
@ -1538,7 +1537,7 @@ class Feeds extends Handler_Protected {
|
||||||
"INSERT INTO ttrss_feeds
|
"INSERT INTO ttrss_feeds
|
||||||
(owner_uid,feed_url,title,cat_id, auth_login,auth_pass,update_method,auth_pass_encrypted)
|
(owner_uid,feed_url,title,cat_id, auth_login,auth_pass,update_method,auth_pass_encrypted)
|
||||||
VALUES ('".$_SESSION["uid"]."', '$url',
|
VALUES ('".$_SESSION["uid"]."', '$url',
|
||||||
'[Unknown]', $cat_qpart, '$auth_login', '$auth_pass', 0, $auth_pass_encrypted)");
|
'[Unknown]', $cat_qpart, '$auth_login', '$auth_pass', 0, false)");
|
||||||
|
|
||||||
$result = db_query(
|
$result = db_query(
|
||||||
"SELECT id FROM ttrss_feeds WHERE feed_url = '$url'
|
"SELECT id FROM ttrss_feeds WHERE feed_url = '$url'
|
||||||
|
|
|
@ -971,7 +971,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
|
|
||||||
$feed_language = $this->dbh->escape_string(trim($_POST["feed_language"]));
|
$feed_language = $this->dbh->escape_string(trim($_POST["feed_language"]));
|
||||||
|
|
||||||
$auth_pass_encrypted = 'false';
|
|
||||||
$auth_pass = $this->dbh->escape_string($auth_pass);
|
$auth_pass = $this->dbh->escape_string($auth_pass);
|
||||||
|
|
||||||
if (get_pref('ENABLE_FEED_CATS')) {
|
if (get_pref('ENABLE_FEED_CATS')) {
|
||||||
|
@ -1001,7 +1000,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
purge_interval = '$purge_intl',
|
purge_interval = '$purge_intl',
|
||||||
auth_login = '$auth_login',
|
auth_login = '$auth_login',
|
||||||
auth_pass = '$auth_pass',
|
auth_pass = '$auth_pass',
|
||||||
auth_pass_encrypted = $auth_pass_encrypted,
|
auth_pass_encrypted = false,
|
||||||
private = $private,
|
private = $private,
|
||||||
cache_images = $cache_images,
|
cache_images = $cache_images,
|
||||||
hide_images = $hide_images,
|
hide_images = $hide_images,
|
||||||
|
@ -1055,8 +1054,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "auth_pass":
|
case "auth_pass":
|
||||||
$qpart = "auth_pass = '$auth_pass' AND
|
$qpart = "auth_pass = '$auth_pass', auth_pass_encrypted = false";
|
||||||
auth_pass_encrypted = $auth_pass_encrypted";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "private":
|
case "private":
|
||||||
|
@ -1857,7 +1855,6 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
"SELECT id FROM ttrss_feeds
|
"SELECT id FROM ttrss_feeds
|
||||||
WHERE feed_url = '$feed' AND owner_uid = ".$_SESSION["uid"]);
|
WHERE feed_url = '$feed' AND owner_uid = ".$_SESSION["uid"]);
|
||||||
|
|
||||||
$auth_pass_encrypted = 'false';
|
|
||||||
$pass = $this->dbh->escape_string($pass);
|
$pass = $this->dbh->escape_string($pass);
|
||||||
|
|
||||||
if ($this->dbh->num_rows($result) == 0) {
|
if ($this->dbh->num_rows($result) == 0) {
|
||||||
|
@ -1865,7 +1862,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||||
"INSERT INTO ttrss_feeds
|
"INSERT INTO ttrss_feeds
|
||||||
(owner_uid,feed_url,title,cat_id,auth_login,auth_pass,update_method,auth_pass_encrypted)
|
(owner_uid,feed_url,title,cat_id,auth_login,auth_pass,update_method,auth_pass_encrypted)
|
||||||
VALUES ('".$_SESSION["uid"]."', '$feed',
|
VALUES ('".$_SESSION["uid"]."', '$feed',
|
||||||
'[Unknown]', $cat_qpart, '$login', '$pass', 0, $auth_pass_encrypted)");
|
'[Unknown]', $cat_qpart, '$login', '$pass', 0, false)");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->dbh->query("COMMIT");
|
$this->dbh->query("COMMIT");
|
||||||
|
|
Loading…
Reference in a new issue