mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 01:05:56 +00:00
implement ProtectedHandler
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Article extends Handler {
|
class Article extends Protected_Handler {
|
||||||
|
|
||||||
function redirect() {
|
function redirect() {
|
||||||
$id = db_escape_string($_REQUEST['id']);
|
$id = db_escape_string($_REQUEST['id']);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Dlg extends Handler {
|
class Dlg extends Protected_Handler {
|
||||||
private $param;
|
private $param;
|
||||||
|
|
||||||
function before() {
|
function before() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Feeds extends Handler {
|
class Feeds extends Protected_Handler {
|
||||||
|
|
||||||
function catchupAll() {
|
function catchupAll() {
|
||||||
db_query($this->link, "UPDATE ttrss_user_entries SET
|
db_query($this->link, "UPDATE ttrss_user_entries SET
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Feeds extends Handler {
|
class Pref_Feeds extends Protected_Handler {
|
||||||
function batch_edit_cbox($elem, $label = false) {
|
function batch_edit_cbox($elem, $label = false) {
|
||||||
print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
|
print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
|
||||||
onchange=\"dijit.byId('feedEditDlg').toggleField(this, '$elem', '$label')\">";
|
onchange=\"dijit.byId('feedEditDlg').toggleField(this, '$elem', '$label')\">";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Filters extends Handler {
|
class Pref_Filters extends Protected_Handler {
|
||||||
|
|
||||||
function filter_test($filter_type, $reg_exp,
|
function filter_test($filter_type, $reg_exp,
|
||||||
$action_id, $action_param, $filter_param, $inverse, $feed_id) {
|
$action_id, $action_param, $filter_param, $inverse, $feed_id) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Labels extends Handler {
|
class Pref_Labels extends Protected_Handler {
|
||||||
|
|
||||||
function edit() {
|
function edit() {
|
||||||
$label_id = db_escape_string($_REQUEST['id']);
|
$label_id = db_escape_string($_REQUEST['id']);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Prefs extends Handler {
|
class Pref_Prefs extends Protected_Handler {
|
||||||
|
|
||||||
function changepassword() {
|
function changepassword() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Users extends Handler {
|
class Pref_Users extends Protected_Handler {
|
||||||
|
|
||||||
function before() {
|
function before() {
|
||||||
if (parent::before()) {
|
if (parent::before()) {
|
||||||
|
|||||||
8
classes/protected_handler.php
Normal file
8
classes/protected_handler.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
class Protected_Handler extends Handler {
|
||||||
|
|
||||||
|
function before() {
|
||||||
|
return parent::before() && $_SESSION['uid'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class RPC extends Handler {
|
class RPC extends Protected_Handler {
|
||||||
|
|
||||||
function setprofile() {
|
function setprofile() {
|
||||||
$id = db_escape_string($_REQUEST["id"]);
|
$id = db_escape_string($_REQUEST["id"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user