implement ProtectedHandler

This commit is contained in:
Andrew Dolgov 2011-12-13 14:15:42 +04:00
parent 8e17d6636e
commit 46da73c255
10 changed files with 79 additions and 71 deletions

View File

@ -1,5 +1,5 @@
<?php
class Article extends Handler {
class Article extends Protected_Handler {
function redirect() {
$id = db_escape_string($_REQUEST['id']);

View File

@ -1,5 +1,5 @@
<?php
class Dlg extends Handler {
class Dlg extends Protected_Handler {
private $param;
function before() {

View File

@ -1,5 +1,5 @@
<?php
class Feeds extends Handler {
class Feeds extends Protected_Handler {
function catchupAll() {
db_query($this->link, "UPDATE ttrss_user_entries SET

View File

@ -1,5 +1,5 @@
<?php
class Pref_Feeds extends Handler {
class Pref_Feeds extends Protected_Handler {
function batch_edit_cbox($elem, $label = false) {
print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
onchange=\"dijit.byId('feedEditDlg').toggleField(this, '$elem', '$label')\">";

View File

@ -1,5 +1,5 @@
<?php
class Pref_Filters extends Handler {
class Pref_Filters extends Protected_Handler {
function filter_test($filter_type, $reg_exp,
$action_id, $action_param, $filter_param, $inverse, $feed_id) {

View File

@ -1,5 +1,5 @@
<?php
class Pref_Labels extends Handler {
class Pref_Labels extends Protected_Handler {
function edit() {
$label_id = db_escape_string($_REQUEST['id']);

View File

@ -1,5 +1,5 @@
<?php
class Pref_Prefs extends Handler {
class Pref_Prefs extends Protected_Handler {
function changepassword() {

View File

@ -1,5 +1,5 @@
<?php
class Pref_Users extends Handler {
class Pref_Users extends Protected_Handler {
function before() {
if (parent::before()) {

View File

@ -0,0 +1,8 @@
<?php
class Protected_Handler extends Handler {
function before() {
return parent::before() && $_SESSION['uid'];
}
}
?>

View File

@ -1,5 +1,5 @@
<?php
class RPC extends Handler {
class RPC extends Protected_Handler {
function setprofile() {
$id = db_escape_string($_REQUEST["id"]);