1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

implement settings profiles (bump schema)

This commit is contained in:
Andrew Dolgov
2010-01-13 18:31:51 +03:00
parent 57c7aa0f33
commit d9084cf220
18 changed files with 548 additions and 96 deletions

View File

@@ -49,6 +49,7 @@
init_connection($link);
$op = $_REQUEST["op"];
$subop = $_REQUEST["subop"];
$mode = $_REQUEST["mode"];
$print_exec_time = false;
@@ -81,7 +82,7 @@
}
if (!($_SESSION["uid"] && validate_session($link)) && $op != "globalUpdateFeeds"
&& $op != "rss" && $op != "getUnread" && $op != "publish") {
&& $op != "rss" && $op != "getUnread" && $op != "publish" && $op != "getProfiles") {
if ($op == "rpc" || $op == "viewfeed" || $op == "view") {
print_error_xml(6); die;
@@ -506,6 +507,32 @@
$print_exec_time = false;
break; // digestSend
case "getProfiles":
$login = db_escape_string($_REQUEST["login"]);
$password = db_escape_string($_REQUEST["password"]);
if (authenticate_user($link, $login, $password)) {
$result = db_query($link, "SELECT * FROM ttrss_settings_profiles
WHERE owner_uid = " . $_SESSION["uid"] . " ORDER BY title");
print "<select style='width: 100%' name='profile'>";
print "<option value='0'>" . __("Default profile") . "</option>";
while ($line = db_fetch_assoc($result)) {
$id = $line["id"];
$title = $line["title"];
print "<option value='$id'>$title</option>";
}
print "</select>";
$_SESSION = array();
break;
}
} // Select action according to $op value.
// We close the connection to database.