mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Minor improvements (#787)
This commit is contained in:
parent
d6478a5d13
commit
0a72b27a09
4 changed files with 22 additions and 3 deletions
|
@ -10,9 +10,11 @@
|
|||
namespace TorrentPier;
|
||||
|
||||
use Closure;
|
||||
|
||||
use Dotenv\Repository\Adapter\PutenvAdapter;
|
||||
use Dotenv\Repository\RepositoryBuilder;
|
||||
use Dotenv\Repository\RepositoryInterface;
|
||||
|
||||
use PhpOption\Option;
|
||||
|
||||
/**
|
||||
|
|
|
@ -229,7 +229,7 @@ class User
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public function session_create($userdata, $auto_created = false)
|
||||
public function session_create($userdata, bool $auto_created = false): array
|
||||
{
|
||||
global $bb_cfg, $lang;
|
||||
|
||||
|
@ -334,7 +334,7 @@ class User
|
|||
* @param bool $update_lastvisit
|
||||
* @param bool $set_cookie
|
||||
*/
|
||||
public function session_end($update_lastvisit = false, $set_cookie = true)
|
||||
public function session_end(bool $update_lastvisit = false, bool $set_cookie = true)
|
||||
{
|
||||
DB()->query("
|
||||
DELETE FROM " . BB_SESSIONS . "
|
||||
|
|
|
@ -29,6 +29,11 @@ class LogAction
|
|||
public $log_type_select = [];
|
||||
public $log_disabled = false;
|
||||
|
||||
/**
|
||||
* Init
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
global $lang, $bb_cfg;
|
||||
|
@ -39,6 +44,8 @@ class LogAction
|
|||
}
|
||||
|
||||
/**
|
||||
* Moderator
|
||||
*
|
||||
* @param string $type_name
|
||||
* @param array $args
|
||||
*/
|
||||
|
@ -88,6 +95,8 @@ class LogAction
|
|||
}
|
||||
|
||||
/**
|
||||
* Admin
|
||||
*
|
||||
* @param string $type_name
|
||||
* @param array $args
|
||||
*/
|
||||
|
|
|
@ -19,10 +19,16 @@ class TorrentFileList
|
|||
public $files_ary = [
|
||||
'/' => []
|
||||
];
|
||||
|
||||
public $multiple = false;
|
||||
public $root_dir = '';
|
||||
public $files_html = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param $decoded_file_contents
|
||||
*/
|
||||
public function __construct($decoded_file_contents)
|
||||
{
|
||||
$this->tor_decoded = $decoded_file_contents;
|
||||
|
@ -53,6 +59,8 @@ class TorrentFileList
|
|||
|
||||
/**
|
||||
* Формирование списка файлов
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function build_filelist_array()
|
||||
{
|
||||
|
@ -120,7 +128,7 @@ class TorrentFileList
|
|||
* @param $length
|
||||
* @return string
|
||||
*/
|
||||
private function build_file_item($name, $length)
|
||||
private function build_file_item($name, $length): string
|
||||
{
|
||||
global $bb_cfg, $images, $lang;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue