mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Minor improvements (#833)
This commit is contained in:
parent
1ed6ca1c13
commit
b1403aa95b
2 changed files with 106 additions and 2 deletions
|
@ -68,7 +68,7 @@ $bb_cfg['cache'] = [
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
],
|
],
|
||||||
// Available cache types: memcache, sqlite, redis, (filecache by default)
|
// Available cache types: filecache, memcache, sqlite, redis, apcu (filecache by default)
|
||||||
'engines' => [
|
'engines' => [
|
||||||
'bb_cache' => ['filecache', []],
|
'bb_cache' => ['filecache', []],
|
||||||
'bb_config' => ['filecache', []],
|
'bb_config' => ['filecache', []],
|
||||||
|
@ -81,7 +81,7 @@ $bb_cfg['cache'] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
// Datastore
|
// Datastore
|
||||||
// Available datastore types: memcache, sqlite, redis (filecache by default)
|
// Available datastore types: filecache, memcache, sqlite, redis, apcu (filecache by default)
|
||||||
$bb_cfg['datastore_type'] = 'filecache';
|
$bb_cfg['datastore_type'] = 'filecache';
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
|
|
104
src/Ajax.php
104
src/Ajax.php
|
@ -60,6 +60,7 @@ class Ajax
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform action
|
* Perform action
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function exec()
|
public function exec()
|
||||||
|
@ -159,6 +160,7 @@ class Ajax
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send data
|
* Send data
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function send()
|
public function send()
|
||||||
|
@ -202,6 +204,7 @@ class Ajax
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin session
|
* Admin session
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function check_admin_session()
|
public function check_admin_session()
|
||||||
|
@ -225,6 +228,7 @@ class Ajax
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt for password
|
* Prompt for password
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function prompt_for_password()
|
public function prompt_for_password()
|
||||||
|
@ -267,101 +271,201 @@ class Ajax
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edit user profile actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function edit_user_profile()
|
public function edit_user_profile()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/edit_user_profile.php';
|
require AJAX_DIR . '/edit_user_profile.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change user rank actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function change_user_rank()
|
public function change_user_rank()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/change_user_rank.php';
|
require AJAX_DIR . '/change_user_rank.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change user opt actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function change_user_opt()
|
public function change_user_opt()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/change_user_opt.php';
|
require AJAX_DIR . '/change_user_opt.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate passkey actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function gen_passkey()
|
public function gen_passkey()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/gen_passkey.php';
|
require AJAX_DIR . '/gen_passkey.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Group membership actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function group_membership()
|
public function group_membership()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/group_membership.php';
|
require AJAX_DIR . '/group_membership.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage group actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function manage_group()
|
public function manage_group()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/edit_group_profile.php';
|
require AJAX_DIR . '/edit_group_profile.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post moderator comment actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function post_mod_comment()
|
public function post_mod_comment()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/post_mod_comment.php';
|
require AJAX_DIR . '/post_mod_comment.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View post actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function view_post()
|
public function view_post()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/view_post.php';
|
require AJAX_DIR . '/view_post.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change torrent status actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function change_tor_status()
|
public function change_tor_status()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/change_tor_status.php';
|
require AJAX_DIR . '/change_tor_status.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change torrent actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function change_torrent()
|
public function change_torrent()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/change_torrent.php';
|
require AJAX_DIR . '/change_torrent.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View torrent actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function view_torrent()
|
public function view_torrent()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/view_torrent.php';
|
require AJAX_DIR . '/view_torrent.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User registration actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function user_register()
|
public function user_register()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/user_register.php';
|
require AJAX_DIR . '/user_register.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moderator actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function mod_action()
|
public function mod_action()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/mod_action.php';
|
require AJAX_DIR . '/mod_action.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Posts actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function posts()
|
public function posts()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/posts.php';
|
require AJAX_DIR . '/posts.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage user actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function manage_user()
|
public function manage_user()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/manage_user.php';
|
require AJAX_DIR . '/manage_user.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage admin actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function manage_admin()
|
public function manage_admin()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/manage_admin.php';
|
require AJAX_DIR . '/manage_admin.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Topic tpl actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function topic_tpl()
|
public function topic_tpl()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/topic_tpl.php';
|
require AJAX_DIR . '/topic_tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index data actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function index_data()
|
public function index_data()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/index_data.php';
|
require AJAX_DIR . '/index_data.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Avatar actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function avatar()
|
public function avatar()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/avatar.php';
|
require AJAX_DIR . '/avatar.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sitemap actions
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function sitemap()
|
public function sitemap()
|
||||||
{
|
{
|
||||||
require AJAX_DIR . '/sitemap.php';
|
require AJAX_DIR . '/sitemap.php';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue