remove the rest of db.php; rename some leftover methods in feeds
This commit is contained in:
parent
bd3c38de84
commit
9f55454f63
|
@ -14,7 +14,6 @@
|
||||||
define('NO_SESSION_AUTOSTART', true);
|
define('NO_SESSION_AUTOSTART', true);
|
||||||
|
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
$op = (string)clean($op);
|
$op = (string)clean($op);
|
||||||
|
|
|
@ -438,7 +438,7 @@ class Feeds extends Handler_Protected {
|
||||||
* when there's nothing to load - e.g. no stuff in fresh feed */
|
* when there's nothing to load - e.g. no stuff in fresh feed */
|
||||||
|
|
||||||
if ($feed == -5) {
|
if ($feed == -5) {
|
||||||
print json_encode($this->generate_dashboard_feed());
|
print json_encode($this->_generate_dashboard_feed());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ class Feeds extends Handler_Protected {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sth && !$sth->fetch()) {
|
if ($sth && !$sth->fetch()) {
|
||||||
print json_encode($this->generate_error_feed(__("Feed not found.")));
|
print json_encode($this->_generate_error_feed(__("Feed not found.")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,7 +523,7 @@ class Feeds extends Handler_Protected {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generate_dashboard_feed() {
|
private function _generate_dashboard_feed() {
|
||||||
$reply = array();
|
$reply = array();
|
||||||
|
|
||||||
$reply['headlines']['id'] = -5;
|
$reply['headlines']['id'] = -5;
|
||||||
|
@ -565,7 +565,7 @@ class Feeds extends Handler_Protected {
|
||||||
return $reply;
|
return $reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generate_error_feed($error) {
|
private function _generate_error_feed($error) {
|
||||||
$reply = array();
|
$reply = array();
|
||||||
|
|
||||||
$reply['headlines']['id'] = -7;
|
$reply['headlines']['id'] = -7;
|
||||||
|
@ -630,7 +630,7 @@ class Feeds extends Handler_Protected {
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_debugger() {
|
function updatedebugger() {
|
||||||
header("Content-type: text/html");
|
header("Content-type: text/html");
|
||||||
|
|
||||||
$xdebug = isset($_REQUEST["xdebug"]) ? (int)$_REQUEST["xdebug"] : 1;
|
$xdebug = isset($_REQUEST["xdebug"]) ? (int)$_REQUEST["xdebug"] : 1;
|
||||||
|
@ -690,7 +690,7 @@ class Feeds extends Handler_Protected {
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="op" value="feeds">
|
<input type="hidden" name="op" value="feeds">
|
||||||
<input type="hidden" name="method" value="update_debugger">
|
<input type="hidden" name="method" value="updatedebugger">
|
||||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
|
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
|
||||||
<input type="hidden" name="action" value="do_update">
|
<input type="hidden" name="action" value="do_update">
|
||||||
<input type="hidden" name="feed_id" value="<?= $feed_id ?>">
|
<input type="hidden" name="feed_id" value="<?= $feed_id ?>">
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "db.php";
|
|
||||||
|
|
||||||
function get_pref($pref_name, $user_id = false, $die_on_error = false) {
|
function get_pref($pref_name, $user_id = false, $die_on_error = false) {
|
||||||
return Db_Prefs::get()->read($pref_name, $user_id, $die_on_error);
|
return Db_Prefs::get()->read($pref_name, $user_id, $die_on_error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Original from http://www.daniweb.com/code/snippet43.html
|
// Original from http://www.daniweb.com/code/snippet43.html
|
||||||
|
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
require_once "classes/db.php";
|
|
||||||
require_once "autoload.php";
|
require_once "autoload.php";
|
||||||
require_once "errorhandler.php";
|
require_once "errorhandler.php";
|
||||||
require_once "lib/gettext/gettext.inc.php";
|
require_once "lib/gettext/gettext.inc.php";
|
||||||
|
|
|
@ -998,10 +998,9 @@ const App = {
|
||||||
};
|
};
|
||||||
this.hotkey_actions["feed_debug_update"] = () => {
|
this.hotkey_actions["feed_debug_update"] = () => {
|
||||||
if (!Feeds.activeIsCat() && parseInt(Feeds.getActive()) > 0) {
|
if (!Feeds.activeIsCat() && parseInt(Feeds.getActive()) > 0) {
|
||||||
//window.open("backend.php?op=feeds&method=update_debugger&feed_id=" + Feeds.getActive());
|
|
||||||
|
|
||||||
/* global __csrf_token */
|
/* global __csrf_token */
|
||||||
App.postOpenWindow("backend.php", {op: "feeds", method: "update_debugger",
|
App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
|
||||||
feed_id: Feeds.getActive(), csrf_token: __csrf_token});
|
feed_id: Feeds.getActive(), csrf_token: __csrf_token});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -102,7 +102,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
||||||
label: __("Debug feed"),
|
label: __("Debug feed"),
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
/* global __csrf_token */
|
/* global __csrf_token */
|
||||||
App.postOpenWindow("backend.php", {op: "feeds", method: "update_debugger",
|
App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
|
||||||
feed_id: this.getParent().row_id, csrf_token: __csrf_token});
|
feed_id: this.getParent().row_id, csrf_token: __csrf_token});
|
||||||
}}));
|
}}));
|
||||||
}
|
}
|
||||||
|
|
1
opml.php
1
opml.php
|
@ -7,7 +7,6 @@
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
if (!init_plugins()) return;
|
if (!init_plugins()) return;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
startup_gettext();
|
startup_gettext();
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
function make_stampfile($filename) {
|
function make_stampfile($filename) {
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
define_default('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL); // seconds
|
define_default('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL); // seconds
|
||||||
|
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "db.php";
|
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
|
|
||||||
if (!function_exists('pcntl_fork')) {
|
if (!function_exists('pcntl_fork')) {
|
||||||
|
|
Loading…
Reference in New Issue