mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 04:35:56 +00:00
* add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags * add similar shortcut for frontend * allow plugins to selectively exclude their methods from CSRF checking
This commit is contained in:
@@ -16,7 +16,7 @@ Plugins.Af_Readability = {
|
||||
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhrJson("backend.php",{ op: "pluginhandler", plugin: "af_readability", method: "embed", param: id }, (reply) => {
|
||||
xhrJson("backend.php", App.getPhArgs("af_readability", "embed", {id: id}), (reply) => {
|
||||
|
||||
if (content && reply.content) {
|
||||
content.setAttribute(self.orig_attr_name, content.innerHTML);
|
||||
|
||||
@@ -67,9 +67,7 @@ class Af_Readability extends Plugin {
|
||||
|
||||
<form dojoType='dijit.form.Form'>
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pluginhandler") ?>
|
||||
<?= \Controls\hidden_tag("method", "save") ?>
|
||||
<?= \Controls\hidden_tag("plugin", "af_readability") ?>
|
||||
<?= \Controls\pluginhandler_tags($this, "save") ?>
|
||||
|
||||
<script type='dojo/method' event='onSubmit' args='evt'>
|
||||
evt.preventDefault();
|
||||
@@ -329,7 +327,7 @@ class Af_Readability extends Plugin {
|
||||
}
|
||||
|
||||
function embed() {
|
||||
$article_id = (int) $_REQUEST["param"];
|
||||
$article_id = (int) $_REQUEST["id"];
|
||||
|
||||
$sth = $this->pdo->prepare("SELECT link FROM ttrss_entries WHERE id = ?");
|
||||
$sth->execute([$article_id]);
|
||||
|
||||
Reference in New Issue
Block a user