function setprofile() {
$_SESSION["profile"] = $_REQUEST["id"];
+
+ // default value
+ if (!$_SESSION["profile"]) $_SESSION["profile"] = null;
}
function remprofiles() {
function completeLabels() {
$search = $_REQUEST["search"];
- $sth = $this->pdo->query("SELECT DISTINCT caption FROM
+ $sth = $this->pdo->prepare("SELECT DISTINCT caption FROM
ttrss_labels2
WHERE owner_uid = ? AND
LOWER(caption) LIKE LOWER(?) ORDER BY caption
print "</ul>";
}
- function purge() {
- $ids = explode(",", $_REQUEST["ids"]);
- $days = (int) $_REQUEST["days"];
-
- $sth = $this->pdo->prepare("SELECT id FROM ttrss_feeds WHERE
- id = ? AND owner_uid = ?");
-
- foreach ($ids as $id) {
- $sth->execute([$id, $_SESSION['uid']]);
-
- if ($sth->fetch()) {
- purge_feed($id, $days);
- }
- }
- }
-
function updateFeedBrowser() {
if (defined('_DISABLE_FEED_BROWSER') && _DISABLE_FEED_BROWSER) return;