move to psr-4 autoloader
This commit is contained in:
parent
0a5507d3bd
commit
865ecc8796
|
@ -112,7 +112,7 @@
|
|||
$op = "pluginhandler";
|
||||
} */
|
||||
|
||||
$op = str_replace("-", "_", $op);
|
||||
// $op = str_replace(, "_", $op);
|
||||
|
||||
$override = PluginHost::getInstance()->lookup_handler($op, $method);
|
||||
|
||||
|
|
|
@ -620,7 +620,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
?>
|
||||
|
||||
<?= \Controls\hidden_tag("ids", $feed_ids) ?>
|
||||
<?= \Controls\hidden_tag("op", "pref-feeds") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Feeds") ?>
|
||||
<?= \Controls\hidden_tag("method", "batchEditSave") ?>
|
||||
|
||||
<div dojoType="dijit.layout.TabContainer" style="height : 450px">
|
||||
|
@ -959,7 +959,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
</div>
|
||||
<div style="padding : 0px" dojoType="dijit.layout.ContentPane" region="center">
|
||||
<div dojoType="fox.PrefFeedStore" jsId="feedStore"
|
||||
url="backend.php?op=pref-feeds&method=getfeedtree">
|
||||
url="backend.php?op=Pref_Feeds&method=getfeedtree">
|
||||
</div>
|
||||
|
||||
<div dojoType="lib.CheckBoxStoreModel" jsId="feedModel" store="feedStore"
|
||||
|
@ -988,7 +988,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
<label class='dijitButton'><?= __("Choose file...") ?>
|
||||
<input style='display : none' id='opml_file' name='opml_file' type='file'>
|
||||
</label>
|
||||
<input type='hidden' name='op' value='pref-feeds'>
|
||||
<input type='hidden' name='op' value='Pref_Feeds'>
|
||||
<input type='hidden' name='csrf_token' value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<input type='hidden' name='method' value='importOpml'>
|
||||
<button dojoType='dijit.form.Button' class='alt-primary' onclick="return Helpers.OPML.import()" type="submit">
|
|
@ -696,7 +696,7 @@ class Pref_Filters extends Handler_Protected {
|
|||
</div>
|
||||
<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='center'>
|
||||
<div dojoType="fox.PrefFilterStore" jsId="filterStore"
|
||||
url="backend.php?op=pref-filters&method=getfiltertree">
|
||||
url="backend.php?op=Pref_Filters&method=getfiltertree">
|
||||
</div>
|
||||
<div dojoType="lib.CheckBoxStoreModel" jsId="filterModel" store="filterStore"
|
||||
query="{id:'root'}" rootId="root" rootLabel="Filters"
|
|
@ -199,7 +199,7 @@ class Pref_Labels extends Handler_Protected {
|
|||
|
||||
<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='center'>
|
||||
<div dojoType='dojo.data.ItemFileWriteStore' jsId='labelStore'
|
||||
url='backend.php?op=pref-labels&method=getlabeltree'>
|
||||
url='backend.php?op=Pref_Labels&method=getlabeltree'>
|
||||
</div>
|
||||
|
||||
<div dojoType='lib.CheckBoxStoreModel' jsId='labelModel' store='labelStore'
|
|
@ -285,7 +285,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
?>
|
||||
<form dojoType='dijit.form.Form'>
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "changePersonalData") ?>
|
||||
|
||||
<script type="dojo/method" event="onSubmit" args="evt">
|
||||
|
@ -334,7 +334,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
<form dojoType='dijit.form.Form'>
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "changepassword") ?>
|
||||
|
||||
<!-- TODO: return JSON the backend call -->
|
||||
|
@ -426,7 +426,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
?>
|
||||
|
||||
<form dojoType='dijit.form.Form'>
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "otpdisable") ?>
|
||||
|
||||
<!-- TODO: return JSON from the backend call -->
|
||||
|
@ -473,7 +473,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
<form dojoType='dijit.form.Form'>
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "otpenable") ?>
|
||||
|
||||
<fieldset>
|
||||
|
@ -746,7 +746,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
private function index_prefs(): void {
|
||||
?>
|
||||
<form dojoType='dijit.form.Form' id='changeSettingsForm'>
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "saveconfig") ?>
|
||||
|
||||
<script type="dojo/method" event="onSubmit" args="evt, quit">
|
||||
|
@ -836,7 +836,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
?>
|
||||
<form dojoType="dijit.form.Form" id="changePluginsForm">
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pref-prefs") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_Prefs") ?>
|
||||
<?= \Controls\hidden_tag("method", "setplugins") ?>
|
||||
|
||||
<div dojoType="dijit.layout.BorderContainer" gutters="false">
|
||||
|
@ -936,7 +936,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
<script type='dojo/method' event='onSelected' args='evt'>
|
||||
if (this.domNode.querySelector('.loading'))
|
||||
window.setTimeout(() => {
|
||||
xhr.post("backend.php", {op: 'pref-prefs', method: 'index_auth'}, (reply) => {
|
||||
xhr.post("backend.php", {op: 'Pref_Prefs', method: 'index_auth'}, (reply) => {
|
||||
this.attr('content', reply);
|
||||
});
|
||||
}, 100);
|
|
@ -194,7 +194,7 @@ class Pref_System extends Handler_Administrative {
|
|||
}
|
||||
</script>
|
||||
|
||||
<?= \Controls\hidden_tag("op", "pref-system") ?>
|
||||
<?= \Controls\hidden_tag("op", "Pref_System") ?>
|
||||
<?= \Controls\hidden_tag("method", "sendTestEmail") ?>
|
||||
|
||||
<fieldset>
|
||||
|
@ -210,7 +210,7 @@ class Pref_System extends Handler_Administrative {
|
|||
<script type='dojo/method' event='onSelected' args='evt'>
|
||||
if (this.domNode.querySelector('.loading'))
|
||||
window.setTimeout(() => {
|
||||
xhr.post("backend.php", {op: 'pref-system', method: 'getphpinfo'}, (reply) => {
|
||||
xhr.post("backend.php", {op: 'Pref_System', method: 'getphpinfo'}, (reply) => {
|
||||
this.attr('content', `<div class='phpinfo'>${reply}</div>`);
|
||||
});
|
||||
}, 200);
|
|
@ -12,6 +12,11 @@
|
|||
"url": "https://dev.tt-rss.org/fox/idiorm.git"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"": "classes/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"spomky-labs/otphp": "^10.0",
|
||||
"chillerlan/php-qrcode": "^4.3.3",
|
||||
|
|
|
@ -1,17 +1,2 @@
|
|||
<?php
|
||||
spl_autoload_register(function($class) {
|
||||
|
||||
$root_dir = dirname(__DIR__); // we were in tt-rss/include
|
||||
|
||||
// - internal tt-rss classes are loaded from classes/ and use special naming logic instead of namespaces
|
||||
// - plugin classes are loaded by PluginHandler from plugins.local/ and plugins/
|
||||
|
||||
$class_file = "$root_dir/classes/" . str_replace("_", "/", strtolower($class)) . ".php";
|
||||
|
||||
if (file_exists($class_file))
|
||||
include $class_file;
|
||||
|
||||
});
|
||||
|
||||
// also pull composer autoloader
|
||||
require_once "vendor/autoload.php";
|
||||
|
|
28
js/App.js
28
js/App.js
|
@ -153,7 +153,7 @@ const App = {
|
|||
return dijit.getEnclosingWidget(elem.closest('.dijitDialog'));
|
||||
},
|
||||
getPhArgs(plugin, method, args = {}) {
|
||||
return {...{op: "pluginhandler", plugin: plugin, method: method}, ...args};
|
||||
return {...{op: "PluginHandler", plugin: plugin, method: method}, ...args};
|
||||
},
|
||||
label_to_feed_id: function(label) {
|
||||
return this.LABEL_BASE_INDEX - 1 - Math.abs(label);
|
||||
|
@ -291,7 +291,7 @@ const App = {
|
|||
setCombinedMode: function(combined) {
|
||||
const value = combined ? "true" : "false";
|
||||
|
||||
xhr.post("backend.php", {op: "rpc", method: "setpref", key: "COMBINED_DISPLAY_MODE", value: value}, () => {
|
||||
xhr.post("backend.php", {op: "RPC", method: "setpref", key: "COMBINED_DISPLAY_MODE", value: value}, () => {
|
||||
this.setInitParam("combined_display_mode",
|
||||
!this.getInitParam("combined_display_mode"));
|
||||
|
||||
|
@ -306,7 +306,7 @@ const App = {
|
|||
if (App.isCombinedMode()) {
|
||||
const value = expand ? "true" : "false";
|
||||
|
||||
xhr.post("backend.php", {op: "rpc", method: "setpref", key: "CDM_EXPANDED", value: value}, () => {
|
||||
xhr.post("backend.php", {op: "RPC", method: "setpref", key: "CDM_EXPANDED", value: value}, () => {
|
||||
this.setInitParam("cdm_expanded", !this.getInitParam("cdm_expanded"));
|
||||
Headlines.renderAgain();
|
||||
});
|
||||
|
@ -440,7 +440,7 @@ const App = {
|
|||
}
|
||||
},
|
||||
hotkeyHelp: function() {
|
||||
xhr.post("backend.php", {op: "rpc", method: "hotkeyHelp"}, (reply) => {
|
||||
xhr.post("backend.php", {op: "RPC", method: "hotkeyHelp"}, (reply) => {
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
title: __("Keyboard shortcuts"),
|
||||
content: reply,
|
||||
|
@ -621,7 +621,7 @@ const App = {
|
|||
|
||||
try {
|
||||
xhr.post("backend.php",
|
||||
{op: "rpc", method: "log",
|
||||
{op: "RPC", method: "log",
|
||||
file: params.filename ? params.filename : error.fileName,
|
||||
line: params.lineno ? params.lineno : error.lineNumber,
|
||||
msg: message,
|
||||
|
@ -703,7 +703,7 @@ const App = {
|
|||
this.initHotkeyActions();
|
||||
|
||||
const params = {
|
||||
op: "rpc",
|
||||
op: "RPC",
|
||||
method: "sanityCheck",
|
||||
clientTzOffset: new Date().getTimezoneOffset() * 60,
|
||||
hasSandbox: "sandbox" in document.createElement("iframe"),
|
||||
|
@ -737,7 +737,7 @@ const App = {
|
|||
return errorMsg == "";
|
||||
},
|
||||
updateRuntimeInfo: function() {
|
||||
xhr.json("backend.php", {op: "rpc", method: "getruntimeinfo"}, () => {
|
||||
xhr.json("backend.php", {op: "RPC", method: "getruntimeinfo"}, () => {
|
||||
// handled by xhr.json()
|
||||
});
|
||||
},
|
||||
|
@ -858,7 +858,7 @@ const App = {
|
|||
checkForUpdates: function() {
|
||||
console.log('checking for updates...');
|
||||
|
||||
xhr.json("backend.php", {op: 'rpc', method: 'checkforupdates'})
|
||||
xhr.json("backend.php", {op: 'RPC', method: 'checkforupdates'})
|
||||
.then((reply) => {
|
||||
console.log('update reply', reply);
|
||||
|
||||
|
@ -965,7 +965,7 @@ const App = {
|
|||
|
||||
if (article_id) Article.view(article_id);
|
||||
|
||||
xhr.post("backend.php", {op: "rpc", method: "setWidescreen", wide: wide ? 1 : 0});
|
||||
xhr.post("backend.php", {op: "RPC", method: "setWidescreen", wide: wide ? 1 : 0});
|
||||
},
|
||||
initHotkeyActions: function() {
|
||||
if (this.is_prefs) {
|
||||
|
@ -1149,7 +1149,7 @@ const App = {
|
|||
if (!Feeds.activeIsCat() && parseInt(Feeds.getActive()) > 0) {
|
||||
|
||||
/* global __csrf_token */
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "updatedebugger",
|
||||
feed_id: Feeds.getActive(), csrf_token: __csrf_token});
|
||||
|
||||
} else {
|
||||
|
@ -1158,7 +1158,7 @@ const App = {
|
|||
};
|
||||
|
||||
this.hotkey_actions["feed_debug_viewfeed"] = () => {
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "view",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "view",
|
||||
feed: Feeds.getActive(), timestamps: 1, debug: 1, cat: Feeds.activeIsCat(), csrf_token: __csrf_token});
|
||||
};
|
||||
|
||||
|
@ -1177,13 +1177,13 @@ const App = {
|
|||
Headlines.reverse();
|
||||
};
|
||||
this.hotkey_actions["feed_toggle_grid"] = () => {
|
||||
xhr.json("backend.php", {op: "rpc", method: "togglepref", key: "CDM_ENABLE_GRID"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "RPC", method: "togglepref", key: "CDM_ENABLE_GRID"}, (reply) => {
|
||||
App.setInitParam("cdm_enable_grid", reply.value);
|
||||
Headlines.renderAgain();
|
||||
})
|
||||
};
|
||||
this.hotkey_actions["feed_toggle_vgroup"] = () => {
|
||||
xhr.post("backend.php", {op: "rpc", method: "togglepref", key: "VFEED_GROUP_BY_FEED"}, () => {
|
||||
xhr.post("backend.php", {op: "RPC", method: "togglepref", key: "VFEED_GROUP_BY_FEED"}, () => {
|
||||
Feeds.reloadCurrent();
|
||||
})
|
||||
};
|
||||
|
@ -1274,7 +1274,7 @@ const App = {
|
|||
CommonDialogs.subscribeToFeed();
|
||||
break;
|
||||
case "qmcDigest":
|
||||
window.location.href = "backend.php?op=digest";
|
||||
window.location.href = "backend.php?op=Digest";
|
||||
break;
|
||||
case "qmcEditFeed":
|
||||
if (Feeds.activeIsCat())
|
||||
|
|
|
@ -123,7 +123,7 @@ const Article = {
|
|||
Article.setActive(0);
|
||||
},
|
||||
displayUrl: function (id) {
|
||||
const query = {op: "article", method: "getmetadatabyid", id: id};
|
||||
const query = {op: "Article", method: "getmetadatabyid", id: id};
|
||||
|
||||
xhr.json("backend.php", query, (reply) => {
|
||||
if (reply && reply.link) {
|
||||
|
@ -136,7 +136,7 @@ const Article = {
|
|||
openInNewWindow: function (id) {
|
||||
/* global __csrf_token */
|
||||
App.postOpenWindow("backend.php",
|
||||
{ "op": "article", "method": "redirect", "id": id, "csrf_token": __csrf_token });
|
||||
{ "op": "Article", "method": "redirect", "id": id, "csrf_token": __csrf_token });
|
||||
|
||||
Headlines.toggleUnread(id, 0);
|
||||
},
|
||||
|
@ -395,7 +395,7 @@ const Article = {
|
|||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhr.json("backend.php", {op: "article", method: "printArticleTags", id: id}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Article", method: "printArticleTags", id: id}, (reply) => {
|
||||
|
||||
dijit.getEnclosingWidget(App.byId("tags_str"))
|
||||
.attr('value', reply.tags.join(", "))
|
||||
|
@ -404,7 +404,7 @@ const Article = {
|
|||
App.byId('tags_str').onkeyup = (e) => {
|
||||
const last_tag = e.target.value.split(',').pop().trim();
|
||||
|
||||
xhr.json("backend.php", {op: 'article', method: 'completeTags', search: last_tag}, (data) => {
|
||||
xhr.json("backend.php", {op: 'Article', method: 'completeTags', search: last_tag}, (data) => {
|
||||
App.byId("tags_choices").innerHTML = `${data.map((tag) =>
|
||||
`<a href="#" onclick="Article.autocompleteInject(this, 'tags_str')">${tag}</a>` )
|
||||
.join(', ')}`
|
||||
|
|
|
@ -28,7 +28,7 @@ const CommonDialogs = {
|
|||
},
|
||||
subscribeToFeed: function() {
|
||||
xhr.json("backend.php",
|
||||
{op: "feeds", method: "subscribeToFeed"},
|
||||
{op: "Feeds", method: "subscribeToFeed"},
|
||||
(reply) => {
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
title: __("Subscribe to feed"),
|
||||
|
@ -215,7 +215,7 @@ const CommonDialogs = {
|
|||
},
|
||||
showFeedsWithErrors: function() {
|
||||
|
||||
xhr.json("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Feeds", method: "feedsWithErrors"}, (reply) => {
|
||||
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
id: "errorFeedsDlg",
|
||||
|
@ -231,7 +231,7 @@ const CommonDialogs = {
|
|||
Notify.progress("Removing selected feeds...", true);
|
||||
|
||||
const query = {
|
||||
op: "pref-feeds", method: "remove",
|
||||
op: "Pref_Feeds", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
@ -305,7 +305,7 @@ const CommonDialogs = {
|
|||
|
||||
if (caption != undefined && caption.trim().length > 0) {
|
||||
|
||||
const query = {op: "pref-labels", method: "add", caption: caption.trim()};
|
||||
const query = {op: "Pref_Labels", method: "add", caption: caption.trim()};
|
||||
|
||||
Notify.progress("Loading, please wait...", true);
|
||||
|
||||
|
@ -325,7 +325,7 @@ const CommonDialogs = {
|
|||
if (typeof title == "undefined" || confirm(msg)) {
|
||||
Notify.progress("Removing feed...");
|
||||
|
||||
const query = {op: "pref-feeds", quiet: 1, method: "remove", ids: feed_id};
|
||||
const query = {op: "Pref_Feeds", quiet: 1, method: "remove", ids: feed_id};
|
||||
|
||||
xhr.post("backend.php", query, () => {
|
||||
if (App.isPrefs()) {
|
||||
|
@ -348,7 +348,7 @@ const CommonDialogs = {
|
|||
if (feed_id <= 0)
|
||||
return alert(__("You can't edit this kind of feed."));
|
||||
|
||||
const query = {op: "pref-feeds", method: "editfeed", id: feed_id};
|
||||
const query = {op: "Pref_Feeds", method: "editfeed", id: feed_id};
|
||||
|
||||
console.log("editFeed", query);
|
||||
|
||||
|
@ -378,7 +378,7 @@ const CommonDialogs = {
|
|||
const fd = new FormData();
|
||||
fd.append('icon_file', icon_file)
|
||||
fd.append('feed_id', feed_id);
|
||||
fd.append('op', 'pref-feeds');
|
||||
fd.append('op', 'Pref_Feeds');
|
||||
fd.append('method', 'uploadIcon');
|
||||
fd.append('csrf_token', App.getInitParam("csrf_token"));
|
||||
|
||||
|
@ -427,7 +427,7 @@ const CommonDialogs = {
|
|||
if (confirm(__("Remove stored feed icon?"))) {
|
||||
Notify.progress("Removing feed icon...", true);
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "removeicon", feed_id: id}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "removeicon", feed_id: id}, () => {
|
||||
Notify.info("Feed icon removed.");
|
||||
|
||||
if (App.isPrefs())
|
||||
|
@ -470,7 +470,7 @@ const CommonDialogs = {
|
|||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-feeds", method: "editfeed", id: feed_id}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Feeds", method: "editfeed", id: feed_id}, (reply) => {
|
||||
const feed = reply.feed;
|
||||
const is_readonly = reply.user.access_level == App.UserAccessLevels.ACCESS_LEVEL_READONLY;
|
||||
|
||||
|
@ -493,7 +493,7 @@ const CommonDialogs = {
|
|||
<div dojoType="dijit.layout.ContentPane" title="${__('General')}">
|
||||
|
||||
${App.FormFields.hidden_tag("id", feed_id)}
|
||||
${App.FormFields.hidden_tag("op", "pref-feeds")}
|
||||
${App.FormFields.hidden_tag("op", "Pref_Feeds")}
|
||||
${App.FormFields.hidden_tag("method", "editSave")}
|
||||
|
||||
<section>
|
||||
|
@ -621,7 +621,7 @@ const CommonDialogs = {
|
|||
|
||||
Notify.progress("Loading, please wait...", true);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-feeds", method: "getsharedurl", id: feed, is_cat: is_cat, search: search}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Feeds", method: "getsharedurl", id: feed, is_cat: is_cat, search: search}, (reply) => {
|
||||
try {
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
title: __("Show as feed"),
|
||||
|
@ -630,7 +630,7 @@ const CommonDialogs = {
|
|||
|
||||
Notify.progress("Trying to change address...", true);
|
||||
|
||||
const query = {op: "pref-feeds", method: "regenFeedKey", id: feed, is_cat: is_cat};
|
||||
const query = {op: "Pref_Feeds", method: "regenFeedKey", id: feed, is_cat: is_cat};
|
||||
|
||||
xhr.json("backend.php", query, (reply) => {
|
||||
const new_link = reply.link;
|
||||
|
|
|
@ -115,7 +115,7 @@ const Filters = {
|
|||
insertRule: function(parentNode, replaceNode) {
|
||||
const rule = dojo.formToJson("filter_new_rule_form");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-filters", method: "printrulename", rule: rule}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Filters", method: "printrulename", rule: rule}, (reply) => {
|
||||
try {
|
||||
const li = document.createElement('li');
|
||||
li.addClassName("rule");
|
||||
|
@ -147,7 +147,7 @@ const Filters = {
|
|||
|
||||
const action = dojo.formToJson(form);
|
||||
|
||||
xhr.post("backend.php", { op: "pref-filters", method: "printactionname", action: action }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Filters", method: "printactionname", action: action }, (reply) => {
|
||||
try {
|
||||
const li = document.createElement('li');
|
||||
li.addClassName("action");
|
||||
|
@ -200,7 +200,7 @@ const Filters = {
|
|||
|
||||
console.log(rule, dialog.filter_info);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-filters", method: "editrule", ids: rule.feed_id.join(",")}, function (editrule) {
|
||||
xhr.json("backend.php", {op: "Pref_Filters", method: "editrule", ids: rule.feed_id.join(",")}, function (editrule) {
|
||||
edit_rule_dialog.attr('content',
|
||||
`
|
||||
<form name="filter_new_rule_form" id="filter_new_rule_form" onsubmit="return false">
|
||||
|
@ -326,7 +326,7 @@ const Filters = {
|
|||
|
||||
dijit.byId("filterDlg_actionSelect").attr('value', action.action_id);
|
||||
|
||||
/*xhr.post("backend.php", {op: 'pref-filters', method: 'newaction', action: actionStr}, (reply) => {
|
||||
/*xhr.post("backend.php", {op: 'Pref_Filters', method: 'newaction', action: actionStr}, (reply) => {
|
||||
edit_action_dialog.attr('content', reply);
|
||||
|
||||
setTimeout(() => {
|
||||
|
@ -365,7 +365,7 @@ const Filters = {
|
|||
|
||||
Notify.progress("Removing filter...");
|
||||
|
||||
const query = {op: "pref-filters", method: "remove", ids: this.attr('value').id};
|
||||
const query = {op: "Pref_Filters", method: "remove", ids: this.attr('value').id};
|
||||
|
||||
xhr.post("backend.php", query, () => {
|
||||
const tree = dijit.byId("filterTree");
|
||||
|
@ -411,7 +411,7 @@ const Filters = {
|
|||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-filters", method: "edit", id: filter_id}, function (filter) {
|
||||
xhr.json("backend.php", {op: "Pref_Filters", method: "edit", id: filter_id}, function (filter) {
|
||||
|
||||
dialog.filter_info = filter;
|
||||
|
||||
|
@ -425,7 +425,7 @@ const Filters = {
|
|||
`
|
||||
<form onsubmit='return false'>
|
||||
|
||||
${App.FormFields.hidden_tag("op", "pref-filters")}
|
||||
${App.FormFields.hidden_tag("op", "Pref_Filters")}
|
||||
${App.FormFields.hidden_tag("id", filter_id)}
|
||||
${App.FormFields.hidden_tag("method", filter_id ? "editSave" : "add")}
|
||||
${App.FormFields.hidden_tag("csrf_token", App.getInitParam('csrf_token'))}
|
||||
|
@ -541,7 +541,7 @@ const Filters = {
|
|||
|
||||
dialog.editRule(null, dojo.toJson(rule));
|
||||
} else {
|
||||
const query = {op: "article", method: "getmetadatabyid", id: Article.getActive()};
|
||||
const query = {op: "Article", method: "getmetadatabyid", id: Article.getActive()};
|
||||
|
||||
xhr.json("backend.php", query, (reply) => {
|
||||
let title;
|
||||
|
|
|
@ -104,7 +104,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
|||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Open site"),
|
||||
onClick: function() {
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "opensite",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "opensite",
|
||||
feed_id: this.getParent().row_id, csrf_token: __csrf_token});
|
||||
}}));
|
||||
|
||||
|
@ -114,7 +114,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
|||
label: __("Debug feed"),
|
||||
onClick: function() {
|
||||
/* global __csrf_token */
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "updatedebugger",
|
||||
feed_id: this.getParent().row_id, csrf_token: __csrf_token});
|
||||
}}));
|
||||
}
|
||||
|
|
16
js/Feeds.js
16
js/Feeds.js
|
@ -160,7 +160,7 @@ const Feeds = {
|
|||
},
|
||||
// null = get all data, [] would give empty response for specific type
|
||||
requestCounters: function(feed_ids = null, label_ids = null) {
|
||||
xhr.json("backend.php", {op: "rpc",
|
||||
xhr.json("backend.php", {op: "RPC",
|
||||
method: "getAllCounters",
|
||||
"feed_ids[]": feed_ids,
|
||||
"feed_id_count": feed_ids ? feed_ids.length : -1,
|
||||
|
@ -179,7 +179,7 @@ const Feeds = {
|
|||
}
|
||||
|
||||
const store = new dojo.data.ItemFileWriteStore({
|
||||
url: "backend.php?op=pref_feeds&method=getfeedtree&mode=2"
|
||||
url: "backend.php?op=Pref_Feeds&method=getfeedtree&mode=2"
|
||||
});
|
||||
|
||||
// noinspection JSUnresolvedFunction
|
||||
|
@ -347,7 +347,7 @@ const Feeds = {
|
|||
toggleUnread: function() {
|
||||
const hide = !App.getInitParam("hide_read_feeds");
|
||||
|
||||
xhr.post("backend.php", {op: "rpc", method: "setpref", key: "HIDE_READ_FEEDS", value: hide}, () => {
|
||||
xhr.post("backend.php", {op: "RPC", method: "setpref", key: "HIDE_READ_FEEDS", value: hide}, () => {
|
||||
this.hideOrShowFeeds(hide);
|
||||
App.setInitParam("hide_read_feeds", hide);
|
||||
});
|
||||
|
@ -386,7 +386,7 @@ const Feeds = {
|
|||
}, 10 * 1000);
|
||||
}
|
||||
|
||||
let query = {...{op: "feeds", method: "view", feed: feed}, ...dojo.formToObject("toolbar-main")};
|
||||
let query = {...{op: "Feeds", method: "view", feed: feed}, ...dojo.formToObject("toolbar-main")};
|
||||
|
||||
if (method) query.m = method;
|
||||
|
||||
|
@ -435,7 +435,7 @@ const Feeds = {
|
|||
|
||||
Notify.progress("Marking all feeds as read...");
|
||||
|
||||
xhr.json("backend.php", {op: "feeds", method: "catchupAll"}, () => {
|
||||
xhr.json("backend.php", {op: "Feeds", method: "catchupAll"}, () => {
|
||||
this.reloadCurrent();
|
||||
});
|
||||
|
||||
|
@ -473,7 +473,7 @@ const Feeds = {
|
|||
}
|
||||
|
||||
const catchup_query = {
|
||||
op: 'rpc', method: 'catchupFeed', feed_id: feed,
|
||||
op: 'RPC', method: 'catchupFeed', feed_id: feed,
|
||||
is_cat: is_cat, mode: mode, search_query: this.last_search_query[0],
|
||||
search_lang: this.last_search_query[1]
|
||||
};
|
||||
|
@ -612,7 +612,7 @@ const Feeds = {
|
|||
},
|
||||
search: function() {
|
||||
xhr.json("backend.php",
|
||||
{op: "feeds", method: "search"},
|
||||
{op: "Feeds", method: "search"},
|
||||
(reply) => {
|
||||
try {
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
|
@ -686,7 +686,7 @@ const Feeds = {
|
|||
updateRandom: function() {
|
||||
console.log("in update_random_feed");
|
||||
|
||||
xhr.json("backend.php", {op: "rpc", method: "updaterandomfeed"}, () => {
|
||||
xhr.json("backend.php", {op: "RPC", method: "updaterandomfeed"}, () => {
|
||||
//
|
||||
});
|
||||
},
|
||||
|
|
|
@ -160,26 +160,26 @@ const Headlines = {
|
|||
|
||||
if (ops.tmark.length != 0)
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "rpc", method: "markSelected", "ids[]": ops.tmark, cmode: 2}));
|
||||
{op: "RPC", method: "markSelected", "ids[]": ops.tmark, cmode: 2}));
|
||||
|
||||
if (ops.tpub.length != 0)
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "rpc", method: "publishSelected", "ids[]": ops.tpub, cmode: 2}));
|
||||
{op: "RPC", method: "publishSelected", "ids[]": ops.tpub, cmode: 2}));
|
||||
|
||||
if (ops.read.length != 0)
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "rpc", method: "catchupSelected", "ids[]": ops.read, cmode: 0}));
|
||||
{op: "RPC", method: "catchupSelected", "ids[]": ops.read, cmode: 0}));
|
||||
|
||||
if (ops.unread.length != 0)
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "rpc", method: "catchupSelected", "ids[]": ops.unread, cmode: 1}));
|
||||
{op: "RPC", method: "catchupSelected", "ids[]": ops.unread, cmode: 1}));
|
||||
|
||||
const scores = Object.keys(ops.rescore);
|
||||
|
||||
if (scores.length != 0) {
|
||||
scores.forEach((score) => {
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "article", method: "setScore", "ids[]": ops.rescore[score], score: score}));
|
||||
{op: "Article", method: "setScore", "ids[]": ops.rescore[score], score: score}));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ const Headlines = {
|
|||
}
|
||||
|
||||
const query = {
|
||||
op: "article", method: "removeFromLabel",
|
||||
op: "Article", method: "removeFromLabel",
|
||||
ids: ids.toString(), lid: id
|
||||
};
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ const Headlines = {
|
|||
}
|
||||
|
||||
const query = {
|
||||
op: "article", method: "assignToLabel",
|
||||
op: "Article", method: "assignToLabel",
|
||||
ids: ids.toString(), lid: id
|
||||
};
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ const Headlines = {
|
|||
return;
|
||||
}
|
||||
|
||||
const query = {op: "rpc", method: "delete", ids: rows.toString()};
|
||||
const query = {op: "RPC", method: "delete", ids: rows.toString()};
|
||||
|
||||
xhr.json("backend.php", query, () => {
|
||||
Feeds.reloadCurrent();
|
||||
|
@ -1586,7 +1586,7 @@ const Headlines = {
|
|||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Open site"),
|
||||
onClick: function() {
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "opensite",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "opensite",
|
||||
feed_id: this.getParent().currentTarget.getAttribute("data-feed-id"), csrf_token: __csrf_token});
|
||||
}}));
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ const Headlines = {
|
|||
label: __("Debug feed"),
|
||||
onClick: function() {
|
||||
/* global __csrf_token */
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
|
||||
App.postOpenWindow("backend.php", {op: "Feeds", method: "updatedebugger",
|
||||
feed_id: this.getParent().currentTarget.getAttribute("data-feed-id"), csrf_token: __csrf_token});
|
||||
}}));
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore"], function (declare
|
|||
|
||||
dojo.xhrPost({
|
||||
url: "backend.php",
|
||||
content: {op: "pref-feeds", method: "savefeedorder",
|
||||
content: {op: "Pref_Feeds", method: "savefeedorder",
|
||||
payload: newFileContentString},
|
||||
error: saveFailedCallback,
|
||||
load: saveCompleteCallback});
|
||||
|
|
|
@ -150,7 +150,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
const searchElem = App.byId("feed_search");
|
||||
const search = (searchElem) ? searchElem.value : "";
|
||||
|
||||
xhr.post("backend.php", { op: "pref-feeds", search: search }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Feeds", search: search }, (reply) => {
|
||||
dijit.byId('feedsTab').attr('content', reply);
|
||||
Notify.close();
|
||||
});
|
||||
|
@ -185,14 +185,14 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
resetFeedOrder: function() {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "feedsortreset"}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "feedsortreset"}, () => {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
resetCatOrder: function() {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "catsortreset"}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "catsortreset"}, () => {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
|
@ -200,7 +200,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
if (confirm(__("Remove category %s? Any nested feeds would be placed into Uncategorized.").replace("%s", item.name))) {
|
||||
Notify.progress("Removing category...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "removeCat", ids: id}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "removeCat", ids: id}, () => {
|
||||
Notify.close();
|
||||
this.reload();
|
||||
});
|
||||
|
@ -215,7 +215,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
Notify.progress("Unsubscribing from selected feeds...", true);
|
||||
|
||||
const query = {
|
||||
op: "pref-feeds", method: "remove",
|
||||
op: "Pref_Feeds", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
@ -231,14 +231,14 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
return false;
|
||||
},
|
||||
checkErrorFeeds: function() {
|
||||
xhr.json("backend.php", {op: "pref-feeds", method: "feedsWithErrors"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Feeds", method: "feedsWithErrors"}, (reply) => {
|
||||
if (reply.length > 0) {
|
||||
Element.show(dijit.byId("pref_feeds_errors_btn").domNode);
|
||||
}
|
||||
});
|
||||
},
|
||||
checkInactiveFeeds: function() {
|
||||
xhr.json("backend.php", {op: "pref-feeds", method: "inactivefeeds"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Feeds", method: "inactivefeeds"}, (reply) => {
|
||||
if (reply.length > 0) {
|
||||
Element.show(dijit.byId("pref_feeds_inactive_btn").domNode);
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
Notify.progress("Removing selected categories...");
|
||||
|
||||
const query = {
|
||||
op: "pref-feeds", method: "removeCat",
|
||||
op: "Pref_Feeds", method: "removeCat",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
@ -316,7 +316,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "editfeeds", ids: rows.toString()}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "editfeeds", ids: rows.toString()}, (reply) => {
|
||||
Notify.close();
|
||||
|
||||
try {
|
||||
|
@ -393,7 +393,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", { op: 'pref-feeds', method: 'renamecat', id: id, title: new_name }, () => {
|
||||
xhr.post("backend.php", { op: 'Pref_Feeds', method: 'renamecat', id: id, title: new_name }, () => {
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
|
@ -404,14 +404,14 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
if (title) {
|
||||
Notify.progress("Creating category...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "addCat", cat: title}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "addCat", cat: title}, () => {
|
||||
Notify.close();
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
batchSubscribe: function() {
|
||||
xhr.json("backend.php", {op: 'pref-feeds', method: 'batchSubscribe'}, (reply) => {
|
||||
xhr.json("backend.php", {op: 'Pref_Feeds', method: 'batchSubscribe'}, (reply) => {
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
id: "batchSubDlg",
|
||||
title: __("Batch subscribe"),
|
||||
|
@ -431,7 +431,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
},
|
||||
content: `
|
||||
<form onsubmit='return false'>
|
||||
${App.FormFields.hidden_tag("op", "pref-feeds")}
|
||||
${App.FormFields.hidden_tag("op", "Pref_Feeds")}
|
||||
${App.FormFields.hidden_tag("method", "batchaddfeeds")}
|
||||
|
||||
<header class='horizontal'>
|
||||
|
@ -484,7 +484,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
});
|
||||
},
|
||||
showInactiveFeeds: function() {
|
||||
xhr.json("backend.php", {op: 'pref-feeds', method: 'inactivefeeds'}, function (reply) {
|
||||
xhr.json("backend.php", {op: 'Pref_Feeds', method: 'inactivefeeds'}, function (reply) {
|
||||
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
id: "inactiveFeedsDlg",
|
||||
|
@ -500,7 +500,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
|
|||
Notify.progress("Removing selected feeds...", true);
|
||||
|
||||
const query = {
|
||||
op: "pref-feeds", method: "remove",
|
||||
op: "Pref_Feeds", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore"], function (declare
|
|||
dojo.xhrPost({
|
||||
url: "backend.php",
|
||||
content: {
|
||||
op: "pref-filters", method: "savefilterorder",
|
||||
op: "Pref_Filters", method: "savefilterorder",
|
||||
payload: newFileContentString
|
||||
},
|
||||
error: saveFailedCallback,
|
||||
|
|
|
@ -107,7 +107,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
|||
let search = "";
|
||||
if (user_search) { search = user_search.value; }
|
||||
|
||||
xhr.post("backend.php", { op: "pref-filters", search: search }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Filters", search: search }, (reply) => {
|
||||
dijit.byId('filtersTab').attr('content', reply);
|
||||
Notify.close();
|
||||
});
|
||||
|
@ -125,7 +125,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
|||
resetFilterOrder: function() {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-filters", method: "filtersortreset"}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Filters", method: "filtersortreset"}, () => {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
|
@ -140,7 +140,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
|||
if (confirm(__("Combine selected filters?"))) {
|
||||
Notify.progress("Joining filters...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-filters", method: "join", ids: rows.toString()}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Filters", method: "join", ids: rows.toString()}, () => {
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
|||
Notify.progress("Removing selected filters...");
|
||||
|
||||
const query = {
|
||||
op: "pref-filters", method: "remove",
|
||||
op: "Pref_Filters", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ const Helpers = {
|
|||
alert("No passwords selected.");
|
||||
} else if (confirm(__("Remove selected app passwords?"))) {
|
||||
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "deleteAppPasswords", "ids[]": rows}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "deleteAppPasswords", "ids[]": rows}, (reply) => {
|
||||
this.updateContent(reply);
|
||||
Notify.close();
|
||||
});
|
||||
|
@ -31,7 +31,7 @@ const Helpers = {
|
|||
const title = prompt("Password description:")
|
||||
|
||||
if (title) {
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "generateAppPassword", title: title}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "generateAppPassword", title: title}, (reply) => {
|
||||
this.updateContent(reply);
|
||||
Notify.close();
|
||||
});
|
||||
|
@ -45,7 +45,7 @@ const Helpers = {
|
|||
if (confirm(__("This will invalidate all previously generated feed URLs. Continue?"))) {
|
||||
Notify.progress("Clearing URLs...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-feeds", method: "clearKeys"}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Feeds", method: "clearKeys"}, () => {
|
||||
Notify.info("Generated URLs cleared.");
|
||||
});
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ const Helpers = {
|
|||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "previewDigest"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "previewDigest"}, (reply) => {
|
||||
dialog.domNode.querySelector('.digest-preview').innerHTML = reply[0];
|
||||
});
|
||||
});
|
||||
|
@ -91,7 +91,7 @@ const Helpers = {
|
|||
},
|
||||
update: function() {
|
||||
xhr.post("backend.php", {
|
||||
op: "pref-system",
|
||||
op: "Pref_System",
|
||||
severity: dijit.byId("severity").attr('value'),
|
||||
page: Helpers.EventLog.log_page
|
||||
}, (reply) => {
|
||||
|
@ -114,7 +114,7 @@ const Helpers = {
|
|||
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-system", method: "clearLog"}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_System", method: "clearLog"}, () => {
|
||||
Helpers.EventLog.refresh();
|
||||
});
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ const Helpers = {
|
|||
const new_title = prompt(__("Name for cloned profile:"));
|
||||
|
||||
if (new_title) {
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "cloneprofile", "new_title": new_title, "old_profile": sel_rows[0]}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "cloneprofile", "new_title": new_title, "old_profile": sel_rows[0]}, () => {
|
||||
Notify.close();
|
||||
dialog.refresh();
|
||||
});
|
||||
|
@ -153,7 +153,7 @@ const Helpers = {
|
|||
if (confirm(__("Remove selected profiles? Active and default profiles will not be removed."))) {
|
||||
Notify.progress("Removing selected profiles...", true);
|
||||
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "remprofiles", "ids[]": sel_rows}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "remprofiles", "ids[]": sel_rows}, () => {
|
||||
Notify.close();
|
||||
dialog.refresh();
|
||||
});
|
||||
|
@ -167,7 +167,7 @@ const Helpers = {
|
|||
if (this.validate()) {
|
||||
Notify.progress("Creating profile...", true);
|
||||
|
||||
const query = {op: "pref-prefs", method: "addprofile", title: dialog.attr('value').newprofile};
|
||||
const query = {op: "Pref_Prefs", method: "addprofile", title: dialog.attr('value').newprofile};
|
||||
|
||||
xhr.post("backend.php", query, () => {
|
||||
Notify.close();
|
||||
|
@ -177,7 +177,7 @@ const Helpers = {
|
|||
}
|
||||
},
|
||||
refresh: function() {
|
||||
xhr.json("backend.php", {op: 'pref-prefs', method: 'getprofiles'}, (reply) => {
|
||||
xhr.json("backend.php", {op: 'Pref_Prefs', method: 'getprofiles'}, (reply) => {
|
||||
dialog.attr('content', `
|
||||
<div dojoType='fox.Toolbar'>
|
||||
<div dojoType='fox.form.DropDownButton'>
|
||||
|
@ -210,7 +210,7 @@ const Helpers = {
|
|||
profile-id='${profile.id}'>${profile.title}
|
||||
<script type='dojo/method' event='onChange' args='value'>
|
||||
xhr.post("backend.php",
|
||||
{op: 'pref-prefs', method: 'saveprofile', value: value, id: this.attr('profile-id')}, () => {
|
||||
{op: 'Pref_Prefs', method: 'saveprofile', value: value, id: this.attr('profile-id')}, () => {
|
||||
//
|
||||
});
|
||||
</script>
|
||||
|
@ -242,7 +242,7 @@ const Helpers = {
|
|||
if (confirm(__("Activate selected profile?"))) {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "activateprofile", id: sel_rows.toString()}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "activateprofile", id: sel_rows.toString()}, () => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ const Helpers = {
|
|||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "customizeCSS"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "customizeCSS"}, (reply) => {
|
||||
|
||||
const editor = dijit.getEnclosingWidget(dialog.domNode.querySelector(".user-css-editor"));
|
||||
|
||||
|
@ -327,14 +327,14 @@ const Helpers = {
|
|||
},
|
||||
confirmReset: function() {
|
||||
if (confirm(__("Reset to defaults?"))) {
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "resetconfig"}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "resetconfig"}, (reply) => {
|
||||
Helpers.Prefs.refresh();
|
||||
Notify.info(reply);
|
||||
});
|
||||
}
|
||||
},
|
||||
refresh: function() {
|
||||
xhr.post("backend.php", { op: "pref-prefs" }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Prefs" }, (reply) => {
|
||||
dijit.byId('prefsTab').attr('content', reply);
|
||||
Notify.close();
|
||||
});
|
||||
|
@ -360,7 +360,7 @@ const Helpers = {
|
|||
this.render_contents();
|
||||
},
|
||||
reload: function() {
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "getPluginsList"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "getPluginsList"}, (reply) => {
|
||||
this._list_of_plugins = reply;
|
||||
this.render_contents();
|
||||
}, (e) => {
|
||||
|
@ -444,7 +444,7 @@ const Helpers = {
|
|||
if (confirm(__("Clear stored data for %s?").replace("%s", name))) {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-prefs", method: "clearPluginData", name: name}, () => {
|
||||
xhr.post("backend.php", {op: "Pref_Prefs", method: "clearPluginData", name: name}, () => {
|
||||
Helpers.Prefs.refresh();
|
||||
});
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ const Helpers = {
|
|||
if (confirm(msg)) {
|
||||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "uninstallPlugin", plugin: plugin}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "uninstallPlugin", plugin: plugin}, (reply) => {
|
||||
if (reply && reply.status == 1)
|
||||
Helpers.Plugins.reload();
|
||||
else {
|
||||
|
@ -504,7 +504,7 @@ const Helpers = {
|
|||
|
||||
const container = install_dialog.domNode.querySelector(".contents");
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "installPlugin", plugin: plugin}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "installPlugin", plugin: plugin}, (reply) => {
|
||||
if (!reply) {
|
||||
container.innerHTML = `<li class='text-center text-error'>${__("Operation failed: check event log.")}</li>`;
|
||||
} else {
|
||||
|
@ -603,7 +603,7 @@ const Helpers = {
|
|||
const container = dialog.domNode.querySelector(".contents");
|
||||
container.innerHTML = `<li class='text-center'>${__("Looking for plugins...")}</li>`;
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "getAvailablePlugins"}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "getAvailablePlugins"}, (reply) => {
|
||||
dialog.entries = reply;
|
||||
dialog.render_contents();
|
||||
});
|
||||
|
@ -656,7 +656,7 @@ const Helpers = {
|
|||
container.innerHTML = `<li class='text-center'>${__("Updating, please wait...")}</li>`;
|
||||
let enable_update_btn = false;
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "updateLocalPlugins", plugins: dialog.plugins_to_update.join(",")}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "updateLocalPlugins", plugins: dialog.plugins_to_update.join(",")}, (reply) => {
|
||||
|
||||
if (!reply) {
|
||||
container.innerHTML = `<li class='text-center text-error'>${__("Operation failed: check event log.")}</li>`;
|
||||
|
@ -717,7 +717,7 @@ const Helpers = {
|
|||
|
||||
//container.innerHTML = `<li class='text-center'>${__("Checking: %s...").replace("%s", name)}</li>`;
|
||||
|
||||
xhr.json("backend.php", {op: "pref-prefs", method: "checkForPluginUpdates", name: name}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Prefs", method: "checkForPluginUpdates", name: name}, (reply) => {
|
||||
|
||||
if (!reply) {
|
||||
container.innerHTML += `<li class='text-error'>${__("%s: Operation failed: check event log.").replace("%s", name)}</li>`;
|
||||
|
@ -834,7 +834,7 @@ const Helpers = {
|
|||
},
|
||||
export: function() {
|
||||
console.log("export");
|
||||
window.open("backend.php?op=opml&method=export&" + dojo.formToQuery("opmlExportForm"));
|
||||
window.open("backend.php?op=OPML&method=export&" + dojo.formToQuery("opmlExportForm"));
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,13 +55,13 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
|
|||
return rv;
|
||||
},
|
||||
reload: function() {
|
||||
xhr.post("backend.php", { op: "pref-labels" }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Labels" }, (reply) => {
|
||||
dijit.byId('labelsTab').attr('content', reply);
|
||||
Notify.close();
|
||||
});
|
||||
},
|
||||
editLabel: function(id) {
|
||||
xhr.json("backend.php", {op: "pref-labels", method: "edit", id: id}, (reply) => {
|
||||
xhr.json("backend.php", {op: "Pref_Labels", method: "edit", id: id}, (reply) => {
|
||||
|
||||
const fg_color = reply['fg_color'];
|
||||
const bg_color = reply['bg_color'] ? reply['bg_color'] : '#fff7d5';
|
||||
|
@ -91,7 +91,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
|
|||
}
|
||||
|
||||
const query = {
|
||||
op: "pref-labels", method: "colorset", kind: kind,
|
||||
op: "Pref_Labels", method: "colorset", kind: kind,
|
||||
ids: id, fg: fg, bg: bg, color: color
|
||||
};
|
||||
|
||||
|
@ -131,7 +131,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
|
|||
</section>
|
||||
|
||||
${App.FormFields.hidden_tag('id', id)}
|
||||
${App.FormFields.hidden_tag('op', 'pref-labels')}
|
||||
${App.FormFields.hidden_tag('op', 'Pref_Labels')}
|
||||
${App.FormFields.hidden_tag('method', 'save')}
|
||||
|
||||
${App.FormFields.hidden_tag('fg_color', fg_color, {}, 'labelEdit_fgColor')}
|
||||
|
@ -189,7 +189,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
|
|||
if (confirm(__("Reset selected labels to default colors?"))) {
|
||||
|
||||
const query = {
|
||||
op: "pref-labels", method: "colorreset",
|
||||
op: "Pref_Labels", method: "colorreset",
|
||||
ids: labels.toString()
|
||||
};
|
||||
|
||||
|
@ -210,7 +210,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
|
|||
Notify.progress("Removing selected labels...");
|
||||
|
||||
const query = {
|
||||
op: "pref-labels", method: "remove",
|
||||
op: "Pref_Labels", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ const Users = {
|
|||
const user_search = App.byId("user_search");
|
||||
const search = user_search ? user_search.value : "";
|
||||
|
||||
xhr.post("backend.php", { op: "pref-users", sort: sort, search: search }, (reply) => {
|
||||
xhr.post("backend.php", { op: "Pref_Users", sort: sort, search: search }, (reply) => {
|
||||
dijit.byId('usersTab').attr('content', reply);
|
||||
Notify.close();
|
||||
resolve();
|
||||
|
@ -21,7 +21,7 @@ const Users = {
|
|||
if (login) {
|
||||
Notify.progress("Adding user...");
|
||||
|
||||
xhr.post("backend.php", {op: "pref-users", method: "add", login: login}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Users", method: "add", login: login}, (reply) => {
|
||||
Users.reload().then(() => {
|
||||
Notify.info(reply);
|
||||
})
|
||||
|
@ -30,7 +30,7 @@ const Users = {
|
|||
}
|
||||
},
|
||||
edit: function(id) {
|
||||
xhr.json('backend.php', {op: 'pref-users', method: 'edit', id: id}, (reply) => {
|
||||
xhr.json('backend.php', {op: 'Pref_Users', method: 'edit', id: id}, (reply) => {
|
||||
const user = reply.user;
|
||||
const admin_disabled = (user.id == 1);
|
||||
|
||||
|
@ -53,7 +53,7 @@ const Users = {
|
|||
<form onsubmit='return false'>
|
||||
|
||||
${App.FormFields.hidden_tag('id', user.id.toString())}
|
||||
${App.FormFields.hidden_tag('op', 'pref-users')}
|
||||
${App.FormFields.hidden_tag('op', 'Pref_Users')}
|
||||
${App.FormFields.hidden_tag('method', 'editSave')}
|
||||
|
||||
<div dojoType="dijit.layout.TabContainer" style="height : 400px">
|
||||
|
@ -104,7 +104,7 @@ const Users = {
|
|||
<div dojoType="dijit.layout.ContentPane" title="${__('User details')}">
|
||||
<script type='dojo/method' event='onShow' args='evt'>
|
||||
if (this.domNode.querySelector('.loading')) {
|
||||
xhr.post("backend.php", {op: 'pref-users', method: 'userdetails', id: ${user.id}}, (reply) => {
|
||||
xhr.post("backend.php", {op: 'Pref_Users', method: 'userdetails', id: ${user.id}}, (reply) => {
|
||||
this.attr('content', reply);
|
||||
});
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ const Users = {
|
|||
|
||||
const id = rows[0];
|
||||
|
||||
xhr.post("backend.php", {op: "pref-users", method: "resetPass", id: id}, (reply) => {
|
||||
xhr.post("backend.php", {op: "Pref_Users", method: "resetPass", id: id}, (reply) => {
|
||||
Notify.close();
|
||||
Notify.info(reply, true);
|
||||
});
|
||||
|
@ -162,7 +162,7 @@ const Users = {
|
|||
Notify.progress("Removing selected users...");
|
||||
|
||||
const query = {
|
||||
op: "pref-users", method: "remove",
|
||||
op: "Pref_Users", method: "remove",
|
||||
ids: sel_rows.toString()
|
||||
};
|
||||
|
||||
|
|
12
prefs.php
12
prefs.php
|
@ -142,26 +142,26 @@
|
|||
<div id="main" dojoType="dijit.layout.BorderContainer">
|
||||
<div dojoType="dijit.layout.TabContainer" region="center" id="pref-tabs">
|
||||
<div id="prefsTab" dojoType="dijit.layout.ContentPane"
|
||||
href="backend.php?op=pref-prefs"
|
||||
href="backend.php?op=Pref_Prefs"
|
||||
title="<i class='material-icons'>settings</i> <?= __('Preferences') ?>"></div>
|
||||
<div id="feedsTab" dojoType="dijit.layout.ContentPane"
|
||||
href="backend.php?op=pref-feeds"
|
||||
href="backend.php?op=Pref_Feeds"
|
||||
title="<i class='material-icons'>rss_feed</i> <?= __('Feeds') ?>"></div>
|
||||
<div id="filtersTab" dojoType="dijit.layout.ContentPane"
|
||||
style="padding : 0px"
|
||||
href="backend.php?op=pref-filters"
|
||||
href="backend.php?op=Pref_Filters"
|
||||
title="<i class='material-icons'>filter_list1</i> <?= __('Filters') ?>"></div>
|
||||
<div id="labelsTab" dojoType="dijit.layout.ContentPane"
|
||||
style="padding : 0px"
|
||||
href="backend.php?op=pref-labels"
|
||||
href="backend.php?op=Pref_Labels"
|
||||
title="<i class='material-icons'>label_outline1</i> <?= __('Labels') ?>"></div>
|
||||
<?php if ($_SESSION["access_level"] >= UserHelper::ACCESS_LEVEL_ADMIN) { ?>
|
||||
<div id="usersTab" dojoType="dijit.layout.ContentPane"
|
||||
style="padding : 0px"
|
||||
href="backend.php?op=pref-users"
|
||||
href="backend.php?op=Pref_Users"
|
||||
title="<i class='material-icons'>person</i> <?= __('Users') ?>"></div>
|
||||
<div id="systemTab" dojoType="dijit.layout.ContentPane"
|
||||
href="backend.php?op=pref-system"
|
||||
href="backend.php?op=Pref_System"
|
||||
title="<i class='material-icons'>info_outline</i> <?= __('System') ?>"></div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
|
|
|
@ -41,4 +41,5 @@ return array(
|
|||
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
|
||||
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
|
||||
'Assert\\' => array($vendorDir . '/beberlei/assert/lib/Assert'),
|
||||
'' => array($baseDir . '/classes'),
|
||||
);
|
||||
|
|
|
@ -331,6 +331,10 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
|
|||
),
|
||||
);
|
||||
|
||||
public static $fallbackDirsPsr4 = array (
|
||||
0 => __DIR__ . '/../..' . '/classes',
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'AllowDynamicProperties' => __DIR__ . '/..' . '/symfony/polyfill-php82/Resources/stubs/AllowDynamicProperties.php',
|
||||
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
|
||||
|
@ -1071,6 +1075,7 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
|
|||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$prefixDirsPsr4;
|
||||
$loader->fallbackDirsPsr4 = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$fallbackDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
|
|
Loading…
Reference in New Issue