mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-06 13:01:44 -07:00
Добавляет опциональный параметр IN_ADMIN_CP. Этот параметр указывается для тех ajax скриптов, которые должны выполнятся (работать) при выключенном форуме (через админку или крон). Если этот параметр не указан. то скрипты без него работать не будут в принципе нигде. По умолчанию параметр IN_ADMIN_CP имеют два скрипты которые выполняются через админку (manage_admin и sitemap).
44 lines
1 KiB
PHP
44 lines
1 KiB
PHP
<?php
|
||
/**
|
||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||
*
|
||
* @copyright Copyright (c) 2005-2023 TorrentPier (https://torrentpier.com)
|
||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||
*/
|
||
|
||
define('BB_SCRIPT', 'ajax');
|
||
define('IN_AJAX', true);
|
||
|
||
require __DIR__ . '/common.php';
|
||
|
||
$ajax = new TorrentPier\Legacy\Ajax();
|
||
$ajax->init();
|
||
|
||
// Init userdata
|
||
$user->session_start();
|
||
|
||
// Load actions required modules
|
||
switch ($ajax->action) {
|
||
case 'view_post':
|
||
case 'posts':
|
||
case 'post_mod_comment':
|
||
require INC_DIR . '/bbcode.php';
|
||
break;
|
||
|
||
case 'view_torrent':
|
||
case 'mod_action':
|
||
case 'change_tor_status':
|
||
case 'change_torrent':
|
||
case 'gen_passkey':
|
||
require ATTACH_DIR . '/attachment_mod.php';
|
||
break;
|
||
}
|
||
|
||
$ajax->exec();
|
||
|
||
/**
|
||
* @deprecated ajax_common
|
||
* Dirty class removed from here since 2.2.0
|
||
* To add new actions see at src/Legacy/Ajax.php
|
||
*/
|