<?php
class Mail extends Plugin {
- private $link;
private $host;
function about() {
}
function init($host) {
- $this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
function emailArticle() {
- $param = db_escape_string($this->link, $_REQUEST['param']);
+ $param = db_escape_string( $_REQUEST['param']);
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pluginhandler\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"plugin\" value=\"mail\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"sendEmail\">";
- $result = db_query($this->link, "SELECT email, full_name FROM ttrss_users WHERE
+ $result = db_query( "SELECT email, full_name FROM ttrss_users WHERE
id = " . $_SESSION["uid"]);
$user_email = htmlspecialchars(db_fetch_result($result, 0, "email"));
$tpl->setVariable('USER_EMAIL', $user_email, true);
$tpl->setVariable('TTRSS_HOST', $_SERVER["HTTP_HOST"], true);
- $result = db_query($this->link, "SELECT link, content, title
+ $result = db_query( "SELECT link, content, title
FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND
id IN ($param) AND owner_uid = " . $_SESSION["uid"]);
if (!$rc) {
$reply['error'] = $mail->ErrorInfo;
} else {
- save_email_address($this->link, db_escape_string($this->link, $destination));
+ save_email_address( db_escape_string($destination));
$reply['message'] = "UPDATE_COUNTERS";
}
}
function completeEmails() {
- $search = db_escape_string($this->link, $_REQUEST["search"]);
+ $search = db_escape_string( $_REQUEST["search"]);
print "<ul>";