diff --git a/.gitignore b/.gitignore
index 0fab765bf..ffb41f0b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@
.idea
.php_cs.cache
composer.phar
-composer.lock
configs/local.php
data/avatars
data/torrent_files
diff --git a/README.md b/README.md
index ecccaba3d..02f5e6396 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,8 @@ and go from there. The documentation will be translated into english in the near
* Apache / nginx
* MySQL / MariaDB / Percona
-* PHP: 5.6 / 7.0 / 7.1
-* PHP Extensions: bcmath, intl, tidy (optional), xml
+* PHP: 7.1 / 7.2 / 7.3
+* PHP Extensions: bcmath, intl, tidy (optional), xml, xmlwriter
## Installation
diff --git a/admin/admin_attach_cp.php b/admin/admin_attach_cp.php
index 47a8fbacd..a05774157 100644
--- a/admin/admin_attach_cp.php
+++ b/admin/admin_attach_cp.php
@@ -158,8 +158,8 @@ if ($confirm && count($delete_id_list) > 0) {
$hidden_fields .= '';
$hidden_fields .= '';
- for ($i = 0, $iMax = count($delete_id_list); $i < $iMax; $i++) {
- $hidden_fields .= '';
+ foreach ($delete_id_list as $iValue) {
+ $hidden_fields .= '';
}
print_confirmation(array(
@@ -382,8 +382,8 @@ if ($view === 'attachments') {
for ($i = 0, $iMax = count($attachments); $i < $iMax; $i++) {
$delete_box = '';
- for ($j = 0, $jMax = count($delete_id_list); $j < $jMax; $j++) {
- if ($delete_id_list[$j] == $attachments[$i]['attach_id']) {
+ foreach ($delete_id_list as $jValue) {
+ if ($jValue == $attachments[$i]['attach_id']) {
$delete_box = '';
break;
}
diff --git a/admin/admin_attachments.php b/admin/admin_attachments.php
index 0f615fe37..a2890b979 100644
--- a/admin/admin_attachments.php
+++ b/admin/admin_attachments.php
@@ -133,23 +133,25 @@ $select_pm_size_mode = size_select('pm_size', $pm_size);
if ($search_imagick) {
$imagick = '';
- if (preg_match('/convert/i', $imagick)) {
+ if (false !== stripos($imagick, "convert")) {
return true;
- } elseif ($imagick != 'none') {
- if (!preg_match('/WIN/i', PHP_OS)) {
+ }
+
+ if ($imagick != 'none') {
+ if (!false !== stripos(PHP_OS, "WIN")) {
$retval = @exec('whereis convert');
$paths = explode(' ', $retval);
if (is_array($paths)) {
- for ($i = 0, $iMax = count($paths); $i < $iMax; $i++) {
+ foreach ($paths as $i => $iValue) {
$path = basename($paths[$i]);
if ($path == 'convert') {
- $imagick = $paths[$i];
+ $imagick = $iValue;
}
}
}
- } elseif (preg_match('/WIN/i', PHP_OS)) {
+ } elseif (false !== stripos(PHP_OS, "WIN")) {
$path = 'c:/imagemagick/convert.exe';
if (!@file_exists(amod_realpath($path))) {
@@ -344,7 +346,9 @@ if ($check_image_cat) {
// Does the target directory exist, is it a directory and writeable
if (!@file_exists(amod_realpath($upload_dir))) {
- mkdir($upload_dir, 0755);
+ if (!mkdir($upload_dir, 0755) && !is_dir($upload_dir)) {
+ throw new \RuntimeException(sprintf('Directory "%s" was not created', $upload_dir));
+ }
@chmod($upload_dir, 0777);
if (!@file_exists(amod_realpath($upload_dir))) {
diff --git a/admin/admin_board.php b/admin/admin_board.php
index c2a534b03..27d71181a 100644
--- a/admin/admin_board.php
+++ b/admin/admin_board.php
@@ -14,7 +14,7 @@ if (!empty($setmodules)) {
}
require __DIR__ . '/pagestart.php';
-$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
+$mode = $_GET['mode'] ?? '';
$return_links = array(
'index' => '
' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', ''),
@@ -34,7 +34,7 @@ if (!$result = DB()->sql_query($sql)) {
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
- $new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
+ $new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
if ($config_name == 'seed_bonus_points' ||
diff --git a/admin/admin_cron.php b/admin/admin_cron.php
index 82c108464..9bf4d2acc 100644
--- a/admin/admin_cron.php
+++ b/admin/admin_cron.php
@@ -14,11 +14,11 @@ if (!empty($setmodules)) {
return;
}
-$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
+$mode = $_GET['mode'] ?? '';
$job_id = isset($_GET['id']) ? (int)$_GET['id'] : '';
$submit = isset($_POST['submit']);
$jobs = isset($_POST['select']) ? implode(',', $_POST['select']) : '';
-$cron_action = isset($_POST['cron_action']) ? $_POST['cron_action'] : '';
+$cron_action = $_POST['cron_action'] ?? '';
if ($mode == 'run' && !$job_id) {
define('BB_ROOT', './../');
@@ -40,7 +40,7 @@ foreach ($sql as $row) {
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
- $new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
+ $new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
bb_update_config(array($config_name => $new[$config_name]));
diff --git a/admin/admin_extensions.php b/admin/admin_extensions.php
index 95486cd27..f40e548d9 100644
--- a/admin/admin_extensions.php
+++ b/admin/admin_extensions.php
@@ -238,9 +238,9 @@ if ($submit && $mode == 'groups') {
$allowed_list = array();
- for ($i = 0, $iMax = count($group_allowed_list); $i < $iMax; $i++) {
+ foreach ($group_allowed_list as $iValue) {
for ($j = 0, $jMax = count($group_change_list); $j < $jMax; $j++) {
- if ($group_allowed_list[$i] == $group_change_list[$j]) {
+ if ($iValue == $group_change_list[$j]) {
$allowed_list[$j] = 1;
}
}
@@ -371,7 +371,7 @@ if ($mode == 'groups') {
$template->assign_vars(array(
'TPL_ATTACH_EXTENSION_GROUPS' => true,
- 'ADD_GROUP_NAME' => isset($extension_group) ? $extension_group : '',
+ 'ADD_GROUP_NAME' => $extension_group ?? '',
'MAX_FILESIZE' => $max_add_filesize,
'S_FILESIZE' => size_select('add_size_select', $size),
'S_ADD_DOWNLOAD_MODE' => download_select('add_download_mode'),
@@ -456,8 +456,8 @@ if ($add_forum && $e_mode == 'perm' && $group) {
$add_forums_list = get_var('entries', array(0));
$add_all_forums = false;
- for ($i = 0, $iMax = count($add_forums_list); $i < $iMax; $i++) {
- if ($add_forums_list[$i] == 0) {
+ foreach ($add_forums_list as $iValue) {
+ if ($iValue == 0) {
$add_all_forums = true;
}
}
@@ -491,9 +491,9 @@ if ($add_forum && $e_mode == 'perm' && $group) {
}
// Generate array for Auth_Pack, do not add doubled forums
- for ($i = 0, $iMax = count($add_forums_list); $i < $iMax; $i++) {
+ foreach ($add_forums_list as $i => $iValue) {
if (!in_array($add_forums_list[$i], $auth_p)) {
- $auth_p[] = $add_forums_list[$i];
+ $auth_p[] = $iValue;
}
}
@@ -528,9 +528,9 @@ if ($delete_forum && $e_mode == 'perm' && $group) {
$auth_p = array();
// Generate array for Auth_Pack, delete the chosen ones
- for ($i = 0, $iMax = count($auth_p2); $i < $iMax; $i++) {
+ foreach ($auth_p2 as $i => $iValue) {
if (!in_array($auth_p2[$i], $delete_forums_list)) {
- $auth_p[] = $auth_p2[$i];
+ $auth_p[] = $iValue;
}
}
diff --git a/admin/admin_forums.php b/admin/admin_forums.php
index 44c2b678a..5ab972ed3 100644
--- a/admin/admin_forums.php
+++ b/admin/admin_forums.php
@@ -45,7 +45,7 @@ $forumname = '';
if (isset($_REQUEST['addforum']) || isset($_REQUEST['addcategory'])) {
$mode = isset($_REQUEST['addforum']) ? 'addforum' : 'addcat';
- if ($mode == 'addforum' && isset($_POST['addforum']) && isset($_POST['forumname']) && is_array($_POST['addforum'])) {
+ if (isset($_POST['addforum'], $_POST['forumname']) && $mode == 'addforum' && is_array($_POST['addforum'])) {
$req_cat_id = array_keys($_POST['addforum']);
$cat_id = reset($req_cat_id);
$forumname = stripslashes($_POST['forumname'][$cat_id]);
@@ -559,15 +559,17 @@ if ($mode) {
$move_down_forum_id = false;
$forums = $cat_forums[$cat_id]['f_ord'];
$forum_order = $forum_info['forum_order'];
- $prev_forum = isset($forums[$forum_order - 10]) ? $forums[$forum_order - 10] : false;
- $next_forum = isset($forums[$forum_order + 10]) ? $forums[$forum_order + 10] : false;
+ $prev_forum = $forums[$forum_order - 10] ?? false;
+ $next_forum = $forums[$forum_order + 10] ?? false;
// move selected forum ($forum_id) UP
if ($move < 0 && $prev_forum) {
if ($forum_info['forum_parent'] && $prev_forum['forum_parent'] != $forum_info['forum_parent']) {
$show_main_page = true;
break;
- } elseif ($move_down_forum_id = get_prev_root_forum_id($forums, $forum_order)) {
+ }
+
+ if ($move_down_forum_id = get_prev_root_forum_id($forums, $forum_order)) {
$move_up_forum_id = $forum_id;
$move_down_ord_val = (get_sf_count($forum_id) + 1) * 10;
$move_up_ord_val = ((get_sf_count($move_down_forum_id) + 1) * 10) + $move_down_ord_val;
@@ -578,7 +580,9 @@ if ($mode) {
if ($forum_info['forum_parent'] && $next_forum['forum_parent'] != $forum_info['forum_parent']) {
$show_main_page = true;
break;
- } elseif ($move_up_forum_id = get_next_root_forum_id($forums, $forum_order)) {
+ }
+
+ if ($move_up_forum_id = get_next_root_forum_id($forums, $forum_order)) {
$move_down_forum_id = $forum_id;
$move_down_forum_order = $forum_order;
$move_down_ord_val = (get_sf_count($move_up_forum_id) + 1) * 10;
diff --git a/admin/admin_groups.php b/admin/admin_groups.php
index fc27b10c6..9bc6fcae8 100644
--- a/admin/admin_groups.php
+++ b/admin/admin_groups.php
@@ -87,7 +87,7 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
$release_group = isset($_POST['release_group']) ? (int)$_POST['release_group'] : 0;
$group_name = isset($_POST['group_name']) ? trim($_POST['group_name']) : '';
$group_desc = isset($_POST['group_description']) ? trim($_POST['group_description']) : '';
- $group_moderator = isset($_POST['username']) ? $_POST['username'] : '';
+ $group_moderator = $_POST['username'] ?? '';
if ($group_name === '') {
bb_die($lang['NO_GROUP_NAME']);
diff --git a/admin/admin_phpinfo.php b/admin/admin_phpinfo.php
index bad4a8286..dc909493f 100644
--- a/admin/admin_phpinfo.php
+++ b/admin/admin_phpinfo.php
@@ -14,4 +14,5 @@ if (!empty($setmodules)) {
require __DIR__ . '/pagestart.php';
+/** @noinspection ForgottenDebugOutputInspection */
phpinfo();
diff --git a/admin/admin_ranks.php b/admin/admin_ranks.php
index 346677fc9..46d1d13cd 100644
--- a/admin/admin_ranks.php
+++ b/admin/admin_ranks.php
@@ -15,7 +15,7 @@ if (!empty($setmodules)) {
require __DIR__ . '/pagestart.php';
if (isset($_GET['mode']) || isset($_POST['mode'])) {
- $mode = isset($_GET['mode']) ? $_GET['mode'] : $_POST['mode'];
+ $mode = $_GET['mode'] ?? $_POST['mode'];
} else {
//
// These could be entered via a form button
diff --git a/admin/admin_rebuild_search.php b/admin/admin_rebuild_search.php
index 27c1f9d88..acb4126c1 100644
--- a/admin/admin_rebuild_search.php
+++ b/admin/admin_rebuild_search.php
@@ -134,7 +134,7 @@ if ($mode == 'submit' || $mode == 'refresh') {
}
// get the db sizes
- list($search_data_size, $search_index_size, $search_tables_size) = get_db_sizes();
+ [$search_data_size, $search_index_size, $search_tables_size] = get_db_sizes();
// get the post subject/text of each post
$result = DB()->query("
@@ -290,7 +290,7 @@ if ($mode == 'submit' || $mode == 'refresh') {
}
// get the db sizes
- list($search_data_size, $search_index_size, $search_tables_size) = get_db_sizes();
+ [$search_data_size, $search_index_size, $search_tables_size] = get_db_sizes();
// calculate the final (estimated) values
$final_search_tables_size = '';
diff --git a/admin/admin_sitemap.php b/admin/admin_sitemap.php
index 6bd142f67..0fe43458a 100644
--- a/admin/admin_sitemap.php
+++ b/admin/admin_sitemap.php
@@ -24,7 +24,7 @@ if (!$result = DB()->sql_query($sql)) {
$config_name = $row['config_name'];
$config_value = $row['config_value'];
$default_config[$config_name] = $config_value;
- $new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
+ $new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
$new_params[$config_name] = $new[$config_name];
diff --git a/admin/admin_smilies.php b/admin/admin_smilies.php
index 1c4254689..196d209e2 100644
--- a/admin/admin_smilies.php
+++ b/admin/admin_smilies.php
@@ -16,7 +16,7 @@ require __DIR__ . '/pagestart.php';
// Check to see what mode we should operate in
if (isset($_POST['mode']) || isset($_GET['mode'])) {
- $mode = isset($_POST['mode']) ? $_POST['mode'] : $_GET['mode'];
+ $mode = $_POST['mode'] ?? $_GET['mode'];
$mode = htmlspecialchars($mode);
} else {
$mode = '';
@@ -77,7 +77,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
bb_die('Could not read smiley pak file');
}
- for ($i = 0, $iMax = count($fcontents); $i < $iMax; $i++) {
+ foreach ($fcontents as $i => $iValue) {
$smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
for ($j = 2, $jMax = count($smile_data); $j < $jMax; $j++) {
@@ -239,8 +239,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
}
// Convert < and > to proper htmlentities for parsing
- $smile_code = str_replace('<', '<', $smile_code);
- $smile_code = str_replace('>', '>', $smile_code);
+ $smile_code = str_replace(['<', '>'], ['<', '>'], $smile_code);
// Proceed with updating the smiley table
$sql = 'UPDATE ' . BB_SMILIES . "
@@ -255,10 +254,10 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
break;
case 'savenew':
- $smile_code = isset($_POST['smile_code']) ? $_POST['smile_code'] : $_GET['smile_code'];
- $smile_url = isset($_POST['smile_url']) ? $_POST['smile_url'] : $_GET['smile_url'];
+ $smile_code = $_POST['smile_code'] ?? $_GET['smile_code'];
+ $smile_url = $_POST['smile_url'] ?? $_GET['smile_url'];
$smile_url = bb_ltrim(basename($smile_url), "'");
- $smile_emotion = isset($_POST['smile_emotion']) ? $_POST['smile_emotion'] : $_GET['smile_emotion'];
+ $smile_emotion = $_POST['smile_emotion'] ?? $_GET['smile_emotion'];
$smile_code = trim($smile_code);
$smile_url = trim($smile_url);
$smile_emotion = trim($smile_emotion);
@@ -269,8 +268,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
}
// Convert < and > to proper htmlentities for parsing
- $smile_code = str_replace('<', '<', $smile_code);
- $smile_code = str_replace('>', '>', $smile_code);
+ $smile_code = str_replace(['<', '>'], ['<', '>'], $smile_code);
// Save the data to the smiley table
$sql = 'INSERT INTO ' . BB_SMILIES . " (code, smile_url, emoticon)
diff --git a/admin/admin_user_ban.php b/admin/admin_user_ban.php
index fd1d1f75d..26c87f280 100644
--- a/admin/admin_user_ban.php
+++ b/admin/admin_user_ban.php
@@ -44,7 +44,7 @@ if (isset($_POST['submit'])) {
if (isset($_POST['ban_email'])) {
$email_list_temp = explode(',', $_POST['ban_email']);
- for ($i = 0, $iMax = count($email_list_temp); $i < $iMax; $i++) {
+ foreach ($email_list_temp as $i => $iValue) {
if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i]))) {
$email_list[] = trim($email_list_temp[$i]);
}
diff --git a/admin/admin_user_search.php b/admin/admin_user_search.php
index 68e799717..a467f6d27 100644
--- a/admin/admin_user_search.php
+++ b/admin/admin_user_search.php
@@ -251,7 +251,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username))));
- $username = preg_replace('/\*/', '%', trim(strip_tags(strtolower($username))));
+ $username = str_replace("\*", '%', trim(strip_tags(strtolower($username))));
if (false !== strpos($username, '%')) {
$op = 'LIKE';
@@ -272,7 +272,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email))));
- $email = preg_replace('/\*/', '%', trim(strip_tags(strtolower($email))));
+ $email = str_replace("\*", '%', trim(strip_tags(strtolower($email))));
if (false !== strpos($email, '%')) {
$op = 'LIKE';
@@ -313,7 +313,7 @@ if (!isset($_REQUEST['dosearch'])) {
$where_sql = '';
$where_sql .= ($ip_in_sql != '') ? "poster_ip IN ($ip_in_sql)" : '';
- $where_sql .= ($ip_like_sql != '') ? ($where_sql != '') ? " OR $ip_like_sql" : "$ip_like_sql" : '';
+ $where_sql .= ($ip_like_sql != '') ? ($where_sql != '') ? " OR $ip_like_sql" : (string)$ip_like_sql : '';
if (!$where_sql) {
bb_die('invalid request');
@@ -340,7 +340,7 @@ if (!isset($_REQUEST['dosearch'])) {
}
$where_sql = '';
$where_sql .= ($ip_in_sql != '') ? "user_last_ip IN ($ip_in_sql)" : '';
- $where_sql .= ($ip_like_sql_flylast != '') ? ($where_sql != '') ? " OR $ip_like_sql_flylast" : "$ip_like_sql_flylast" : '';
+ $where_sql .= ($ip_like_sql_flylast != '') ? ($where_sql != '') ? " OR $ip_like_sql_flylast" : (string)$ip_like_sql_flylast : '';
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
if (!$result = DB()->sql_query($sql)) {
bb_die('Could not count users #2');
@@ -357,7 +357,7 @@ if (!isset($_REQUEST['dosearch'])) {
}
$where_sql = '';
$where_sql .= ($ip_in_sql != '') ? "user_reg_ip IN ($ip_in_sql)" : '';
- $where_sql .= ($ip_like_sql_flyreg != '') ? ($where_sql != '') ? " OR $ip_like_sql_flyreg" : "$ip_like_sql_flyreg" : '';
+ $where_sql .= ($ip_like_sql_flyreg != '') ? ($where_sql != '') ? " OR $ip_like_sql_flyreg" : (string)$ip_like_sql_flyreg : '';
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
if (!$result = DB()->sql_query($sql)) {
bb_die('Could not count users #3');
@@ -567,7 +567,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = strip_tags(htmlspecialchars(stripslashes($userfield_value)));
- $userfield_value = preg_replace('/\*/', '%', trim(strip_tags(strtolower($userfield_value))));
+ $userfield_value = str_replace("\*", '%', trim(strip_tags(strtolower($userfield_value))));
if (false !== strpos($userfield_value, '%')) {
$op = 'LIKE';
diff --git a/admin/index.php b/admin/index.php
index 3f15ddd0a..5100a6c03 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -34,7 +34,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
ksort($module);
foreach ($module as $cat => $action_array) {
- $cat = (!empty($lang[$cat])) ? $lang[$cat] : preg_replace('/_/', ' ', $cat);
+ $cat = (!empty($lang[$cat])) ? $lang[$cat] : str_replace("_", ' ', $cat);
$template->assign_block_vars('catrow', array(
'ADMIN_CATEGORY' => $cat,
@@ -46,7 +46,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
foreach ($action_array as $action => $file) {
$row_class = !($row_count % 2) ? 'row1' : 'row2';
- $action = (!empty($lang[$action])) ? $lang[$action] : preg_replace('/_/', ' ', $action);
+ $action = (!empty($lang[$action])) ? $lang[$action] : str_replace("_", ' ', $action);
$template->assign_block_vars('catrow.modulerow', array(
'ROW_CLASS' => $row_class,
diff --git a/bt/announce.php b/bt/announce.php
index 9c3a49a23..704da8b8d 100644
--- a/bt/announce.php
+++ b/bt/announce.php
@@ -20,7 +20,7 @@ if (empty($_SERVER['HTTP_USER_AGENT'])) {
// Ignore 'completed' event
if (isset($_GET['event']) && $_GET['event'] === 'completed') {
- dummy_exit(mt_rand(600, 1200));
+ dummy_exit(random_int(600, 1200));
}
$announce_interval = $bb_cfg['announce_interval'];
@@ -71,7 +71,7 @@ foreach ($input_vars_num as $var_name) {
$$var_name = isset($_GET[$var_name]) ? (float)$_GET[$var_name] : null;
}
// Passkey
-$passkey = isset($$passkey_key) ? $$passkey_key : null;
+$passkey = $$passkey_key ?? null;
// Verify request
// Required params (info_hash, peer_id, port, uploaded, downloaded, left, passkey)
diff --git a/common.php b/common.php
index bec97a86d..f4f9ea4d2 100644
--- a/common.php
+++ b/common.php
@@ -248,7 +248,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
$old_name = $file;
$ext = '';
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
- list($old_name, $ext) = $matches;
+ [$old_name, $ext] = $matches;
}
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
clearstatcache();
@@ -461,7 +461,7 @@ function log_request($file = '', $prepend_str = false, $add_post = true)
if (!defined('IN_TRACKER')) {
require INC_DIR . '/init_bb.php';
} else {
- define('DUMMY_PEER', pack('Nn', ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : mt_rand(1000, 65000)));
+ define('DUMMY_PEER', pack('Nn', ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : random_int(1000, 65000)));
function dummy_exit($interval = 1800)
{
@@ -480,7 +480,7 @@ if (!defined('IN_TRACKER')) {
if (!defined('IN_ADMIN')) {
// Exit if tracker is disabled via ON/OFF trigger
if (file_exists(BB_DISABLED)) {
- dummy_exit(mt_rand(60, 2400));
+ dummy_exit(random_int(60, 2400));
}
}
}
diff --git a/composer.json b/composer.json
index de6ca9298..323dc5a2c 100644
--- a/composer.json
+++ b/composer.json
@@ -35,18 +35,20 @@
"docs": "https://docs.torrentpier.com/"
},
"require": {
- "php": "^5.6 || ^7.0",
- "bugsnag/bugsnag": "^3.5",
- "filp/whoops": "^2.1",
- "gigablah/sphinxphp": "^2.0",
- "google/recaptcha": "^1.1",
- "longman/ip-tools": "^1.2",
- "roave/security-advisories": "dev-master",
- "rych/bencode": "^1.0",
- "samdark/sitemap": "^2.0",
- "swiftmailer/swiftmailer": "^5.4",
- "symfony/dotenv": "^3.3",
- "symfony/var-dumper": "^3.3"
+ "php": "^7.1.3",
+ "bugsnag/bugsnag": "3.13.0",
+ "filp/whoops": "^2.2.0",
+ "gigablah/sphinxphp": "2.0.8",
+ "google/recaptcha": "1.1.3",
+ "longman/ip-tools": "1.2.1",
+ "rych/bencode": "1.0.0",
+ "samdark/sitemap": "2.2.0",
+ "swiftmailer/swiftmailer": "6.0.2",
+ "symfony/dotenv": "4.1.0",
+ "symfony/var-dumper": "4.1.0"
+ },
+ "require-dev": {
+ "roave/security-advisories": "dev-master"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 000000000..a507c8ad9
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,1304 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "d367e53f8e56b59ee06d21695adbd34d",
+ "packages": [
+ {
+ "name": "bugsnag/bugsnag",
+ "version": "v3.13.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/bugsnag/bugsnag-php.git",
+ "reference": "f07dfa792db5d28bf38fb9321aebe75d6b352fc5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/bugsnag/bugsnag-php/zipball/f07dfa792db5d28bf38fb9321aebe75d6b352fc5",
+ "reference": "f07dfa792db5d28bf38fb9321aebe75d6b352fc5",
+ "shasum": ""
+ },
+ "require": {
+ "composer/ca-bundle": "^1.0",
+ "guzzlehttp/guzzle": "^5.0|^6.0",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "graham-campbell/testbench-core": "^1.1",
+ "mockery/mockery": "^0.9.4|^1.0",
+ "mtdowling/burgomaster": "dev-master#72151eddf5f0cf101502b94bf5031f9c53501a04",
+ "php-mock/php-mock-phpunit": "^1.1",
+ "phpunit/phpunit": "^4.8|^5.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Bugsnag\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "James Smith",
+ "email": "notifiers@bugsnag.com",
+ "homepage": "https://bugsnag.com"
+ }
+ ],
+ "description": "Official Bugsnag notifier for PHP applications.",
+ "homepage": "https://github.com/bugsnag/bugsnag-php",
+ "keywords": [
+ "bugsnag",
+ "errors",
+ "exceptions",
+ "logging",
+ "tracking"
+ ],
+ "time": "2018-06-06T16:58:57+00:00"
+ },
+ {
+ "name": "composer/ca-bundle",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/ca-bundle.git",
+ "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169",
+ "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169",
+ "shasum": ""
+ },
+ "require": {
+ "ext-openssl": "*",
+ "ext-pcre": "*",
+ "php": "^5.3.2 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
+ "psr/log": "^1.0",
+ "symfony/process": "^2.5 || ^3.0 || ^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\CaBundle\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
+ "keywords": [
+ "cabundle",
+ "cacert",
+ "certificate",
+ "ssl",
+ "tls"
+ ],
+ "time": "2018-03-29T19:57:20+00:00"
+ },
+ {
+ "name": "doctrine/lexer",
+ "version": "v1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
+ "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Lexer\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "lexer",
+ "parser"
+ ],
+ "time": "2014-09-09T13:34:57+00:00"
+ },
+ {
+ "name": "egulias/email-validator",
+ "version": "2.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/egulias/EmailValidator.git",
+ "reference": "8790f594151ca6a2010c6218e09d96df67173ad3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3",
+ "reference": "8790f594151ca6a2010c6218e09d96df67173ad3",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "^1.0.1",
+ "php": ">= 5.5"
+ },
+ "require-dev": {
+ "dominicsayers/isemail": "dev-master",
+ "phpunit/phpunit": "^4.8.35||^5.7||^6.0",
+ "satooshi/php-coveralls": "^1.0.1"
+ },
+ "suggest": {
+ "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Egulias\\EmailValidator\\": "EmailValidator"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eduardo Gulias Davis"
+ }
+ ],
+ "description": "A library for validating emails against several RFCs",
+ "homepage": "https://github.com/egulias/EmailValidator",
+ "keywords": [
+ "email",
+ "emailvalidation",
+ "emailvalidator",
+ "validation",
+ "validator"
+ ],
+ "time": "2018-04-10T10:11:19+00:00"
+ },
+ {
+ "name": "filp/whoops",
+ "version": "2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/filp/whoops.git",
+ "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a",
+ "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9 || ^7.0",
+ "psr/log": "^1.0.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "^0.9 || ^1.0",
+ "phpunit/phpunit": "^4.8.35 || ^5.7",
+ "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0"
+ },
+ "suggest": {
+ "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
+ "whoops/soap": "Formats errors as SOAP responses"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Whoops\\": "src/Whoops/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Filipe Dobreira",
+ "homepage": "https://github.com/filp",
+ "role": "Developer"
+ }
+ ],
+ "description": "php error handling for cool kids",
+ "homepage": "https://filp.github.io/whoops/",
+ "keywords": [
+ "error",
+ "exception",
+ "handling",
+ "library",
+ "throwable",
+ "whoops"
+ ],
+ "time": "2018-03-03T17:56:25+00:00"
+ },
+ {
+ "name": "gigablah/sphinxphp",
+ "version": "2.0.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/gigablah/sphinxphp.git",
+ "reference": "6d5e97fdd33c1129ca372203d1330827c1cbc46c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/gigablah/sphinxphp/zipball/6d5e97fdd33c1129ca372203d1330827c1cbc46c",
+ "reference": "6d5e97fdd33c1129ca372203d1330827c1cbc46c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*",
+ "satooshi/php-coveralls": "dev-master"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Sphinx": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Andrew Aksyonoff",
+ "homepage": "http://sphinxsearch.com/"
+ }
+ ],
+ "description": "Sphinx Search PHP API",
+ "homepage": "http://sphinxsearch.com/",
+ "keywords": [
+ "api",
+ "search",
+ "sphinx"
+ ],
+ "time": "2013-08-22T08:05:44+00:00"
+ },
+ {
+ "name": "google/recaptcha",
+ "version": "1.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/google/recaptcha.git",
+ "reference": "5a56d15ca10a7b75158178752b2ad8f755eb4f78"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/google/recaptcha/zipball/5a56d15ca10a7b75158178752b2ad8f755eb4f78",
+ "reference": "5a56d15ca10a7b75158178752b2ad8f755eb4f78",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "ReCaptcha\\": "src/ReCaptcha"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Client library for reCAPTCHA, a free service that protect websites from spam and abuse.",
+ "homepage": "http://www.google.com/recaptcha/",
+ "keywords": [
+ "Abuse",
+ "captcha",
+ "recaptcha",
+ "spam"
+ ],
+ "time": "2017-03-09T18:44:34+00:00"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "6.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/promises": "^1.0",
+ "guzzlehttp/psr7": "^1.4",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+ "psr/log": "^1.0"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.3-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
+ ],
+ "time": "2018-04-22T15:46:56+00:00"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle promises library",
+ "keywords": [
+ "promise"
+ ],
+ "time": "2016-12-20T10:07:11+00:00"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.4.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ],
+ "time": "2017-03-20T17:10:46+00:00"
+ },
+ {
+ "name": "longman/ip-tools",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/akalongman/php-ip-tools.git",
+ "reference": "6c050dfbf91811d14b9b3aa31fb7116eac0f0a18"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/akalongman/php-ip-tools/zipball/6c050dfbf91811d14b9b3aa31fb7116eac0f0a18",
+ "reference": "6c050dfbf91811d14b9b3aa31fb7116eac0f0a18",
+ "shasum": ""
+ },
+ "require": {
+ "ext-bcmath": "*",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "~2.1",
+ "phpunit/phpunit": "~4.1",
+ "squizlabs/php_codesniffer": "~2.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Longman\\IPTools\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Avtandil Kikabidze aka LONGMAN",
+ "email": "akalongman@gmail.com",
+ "homepage": "https://longman.me",
+ "role": "Developer"
+ }
+ ],
+ "description": "PHP IP Tools for manipulation with IPv4 and IPv6",
+ "homepage": "https://github.com/akalongman/php-ip-tools",
+ "keywords": [
+ "IP",
+ "Match",
+ "compare",
+ "ipv4",
+ "ipv6",
+ "mask",
+ "subnet",
+ "tools",
+ "utilities"
+ ],
+ "time": "2016-10-23T20:08:46+00:00"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "time": "2016-08-06T14:39:51+00:00"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2016-10-10T12:19:37+00:00"
+ },
+ {
+ "name": "rych/bencode",
+ "version": "v1.0.0",
+ "target-dir": "Rych/Bencode",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/rchouinard/bencode.git",
+ "reference": "d1b5c88f3fd7ff1f4167756f0ed63f970a32431c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/rchouinard/bencode/zipball/d1b5c88f3fd7ff1f4167756f0ed63f970a32431c",
+ "reference": "d1b5c88f3fd7ff1f4167756f0ed63f970a32431c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.4"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Rych\\Bencode": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ryan Chouinard",
+ "email": "rchouinard@gmail.com",
+ "homepage": "http://ryanchouinard.com"
+ }
+ ],
+ "description": "Bencode serializer for PHP 5.3+",
+ "homepage": "https://github.com/rchouinard/bencode",
+ "keywords": [
+ "bencode",
+ "serialize"
+ ],
+ "time": "2014-01-13T00:34:03+00:00"
+ },
+ {
+ "name": "samdark/sitemap",
+ "version": "2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/samdark/sitemap.git",
+ "reference": "c897f7a9cb0882e34169359a5f1f715e05b34d67"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/samdark/sitemap/zipball/c897f7a9cb0882e34169359a5f1f715e05b34d67",
+ "reference": "c897f7a9cb0882e34169359a5f1f715e05b34d67",
+ "shasum": ""
+ },
+ "require": {
+ "ext-xmlwriter": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "samdark\\sitemap\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Alexander Makarov",
+ "email": "sam@rmcreative.ru",
+ "homepage": "http://rmcreative.ru/"
+ }
+ ],
+ "description": "Sitemap and sitemap index builder",
+ "homepage": "https://github.com/samdark/sitemap",
+ "keywords": [
+ "Sitemap"
+ ],
+ "time": "2018-02-02T09:27:13+00:00"
+ },
+ {
+ "name": "swiftmailer/swiftmailer",
+ "version": "v6.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/swiftmailer/swiftmailer.git",
+ "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc",
+ "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc",
+ "shasum": ""
+ },
+ "require": {
+ "egulias/email-validator": "~2.0",
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "~0.9.1",
+ "symfony/phpunit-bridge": "~3.3@dev"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "6.0-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "lib/swift_required.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Chris Corbyn"
+ },
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Swiftmailer, free feature-rich PHP mailer",
+ "homepage": "http://swiftmailer.symfony.com",
+ "keywords": [
+ "email",
+ "mail",
+ "mailer"
+ ],
+ "time": "2017-09-30T22:39:41+00:00"
+ },
+ {
+ "name": "symfony/dotenv",
+ "version": "v4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/dotenv.git",
+ "reference": "f98b6b65e04dd51f40d2cfc81c2c833ff3773b1e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/dotenv/zipball/f98b6b65e04dd51f40d2cfc81c2c833ff3773b1e",
+ "reference": "f98b6b65e04dd51f40d2cfc81c2c833ff3773b1e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3"
+ },
+ "require-dev": {
+ "symfony/process": "~3.4|~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Dotenv\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Registers environment variables from a .env file",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "dotenv",
+ "env",
+ "environment"
+ ],
+ "time": "2018-05-30T07:26:09+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2018-04-26T10:06:28+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
+ "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2018-04-26T10:06:28+00:00"
+ },
+ {
+ "name": "symfony/var-dumper",
+ "version": "v4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/var-dumper.git",
+ "reference": "bc88ad53e825ebacc7b190bbd360781fce381c64"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/bc88ad53e825ebacc7b190bbd360781fce381c64",
+ "reference": "bc88ad53e825ebacc7b190bbd360781fce381c64",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php72": "~1.5"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+ "symfony/console": "<3.4"
+ },
+ "require-dev": {
+ "ext-iconv": "*",
+ "symfony/process": "~3.4|~4.0",
+ "twig/twig": "~1.34|~2.4"
+ },
+ "suggest": {
+ "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+ "ext-intl": "To show region name in time zone dump",
+ "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+ },
+ "bin": [
+ "Resources/bin/var-dump-server"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "Resources/functions/dump.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\VarDumper\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony mechanism for exploring and dumping PHP variables",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "debug",
+ "dump"
+ ],
+ "time": "2018-04-29T07:56:09+00:00"
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "roave/security-advisories",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Roave/SecurityAdvisories.git",
+ "reference": "0e4ea9f9e1fd3c6a563524f8f399696d98c7c85a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0e4ea9f9e1fd3c6a563524f8f399696d98c7c85a",
+ "reference": "0e4ea9f9e1fd3c6a563524f8f399696d98c7c85a",
+ "shasum": ""
+ },
+ "conflict": {
+ "3f/pygmentize": "<1.2",
+ "adodb/adodb-php": "<5.20.12",
+ "amphp/artax": "<1.0.6|>=2,<2.0.6",
+ "amphp/http": "<1.0.1",
+ "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
+ "aws/aws-sdk-php": ">=3,<3.2.1",
+ "bugsnag/bugsnag-laravel": ">=2,<2.0.2",
+ "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.0.15|>=3.1,<3.1.4|>=3.4,<3.4.14|>=3.5,<3.5.17|>=3.6,<3.6.4",
+ "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
+ "cartalyst/sentry": "<=2.1.6",
+ "codeigniter/framework": "<=3.0.6",
+ "composer/composer": "<=1.0.0-alpha11",
+ "contao-components/mediaelement": ">=2.14.2,<2.21.1",
+ "contao/core": ">=2,<3.5.35",
+ "contao/core-bundle": ">=4,<4.4.18|>=4.5,<4.5.8",
+ "contao/listing-bundle": ">=4,<4.4.8",
+ "contao/newsletter-bundle": ">=4,<4.1",
+ "doctrine/annotations": ">=1,<1.2.7",
+ "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2",
+ "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1",
+ "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2",
+ "doctrine/doctrine-bundle": "<1.5.2",
+ "doctrine/doctrine-module": "<=0.7.1",
+ "doctrine/mongodb-odm": ">=1,<1.0.2",
+ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
+ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1",
+ "dompdf/dompdf": ">=0.6,<0.6.2",
+ "drupal/core": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3",
+ "drupal/drupal": ">=7,<7.59|>=8,<8.4.8|>=8.5,<8.5.3",
+ "erusev/parsedown": "<1.7",
+ "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1",
+ "firebase/php-jwt": "<2",
+ "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2",
+ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
+ "fuel/core": "<1.8.1",
+ "gree/jose": "<=2.2",
+ "gregwar/rst": "<1.0.3",
+ "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1",
+ "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
+ "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29",
+ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
+ "joomla/session": "<1.3.1",
+ "kreait/firebase-php": ">=3.2,<3.8.1",
+ "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
+ "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
+ "magento/magento1ce": ">=1.5.0.1,<1.9.3.2",
+ "magento/magento1ee": ">=1.9,<1.14.3.2",
+ "magento/magento2ce": ">=2,<2.2",
+ "monolog/monolog": ">=1.8,<1.12",
+ "namshi/jose": "<2.2",
+ "onelogin/php-saml": "<2.10.4",
+ "oro/crm": ">=1.7,<1.7.4",
+ "oro/platform": ">=1.7,<1.7.4",
+ "padraic/humbug_get_contents": "<1.1.2",
+ "pagarme/pagarme-php": ">=0,<3",
+ "paragonie/random_compat": "<2",
+ "paypal/merchant-sdk-php": "<3.12",
+ "phpmailer/phpmailer": ">=5,<5.2.24",
+ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3",
+ "phpxmlrpc/extras": "<0.6.1",
+ "propel/propel": ">=2.0.0-alpha1,<=2.0.0-alpha7",
+ "propel/propel1": ">=1,<=1.7.1",
+ "pusher/pusher-php-server": "<2.2.1",
+ "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
+ "sensiolabs/connect": "<4.2.3",
+ "shopware/shopware": "<5.3.7",
+ "silverstripe/cms": ">=3,<=3.0.11|>=3.1,<3.1.11",
+ "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
+ "silverstripe/framework": ">=3,<3.3",
+ "silverstripe/userforms": "<3",
+ "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4",
+ "simplesamlphp/simplesamlphp": "<1.15.2",
+ "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
+ "slim/slim": "<2.6",
+ "socalnick/scn-social-auth": "<1.15.2",
+ "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
+ "stormpath/sdk": ">=0,<9.9.99",
+ "swiftmailer/swiftmailer": ">=4,<5.4.5",
+ "symfony/dependency-injection": ">=2,<2.0.17",
+ "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
+ "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2",
+ "symfony/http-foundation": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/http-kernel": ">=2,<2.3.29|>=2.4,<2.5.12|>=2.6,<2.6.8",
+ "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
+ "symfony/routing": ">=2,<2.0.19",
+ "symfony/security": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<2.8.37|>=3,<3.3.17|>=3.4,<3.4.7|>=4,<4.0.7",
+ "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-guard": ">=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/serializer": ">=2,<2.0.11",
+ "symfony/symfony": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
+ "symfony/translation": ">=2,<2.0.17",
+ "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
+ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4",
+ "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
+ "thelia/backoffice-default-template": ">=2.1,<2.1.2",
+ "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3",
+ "titon/framework": ">=0,<9.9.99",
+ "twig/twig": "<1.20",
+ "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5",
+ "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5",
+ "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4",
+ "willdurand/js-translation-bundle": "<2.1.1",
+ "yiisoft/yii": ">=1.1.14,<1.1.15",
+ "yiisoft/yii2": "<2.0.15",
+ "yiisoft/yii2-bootstrap": "<2.0.4",
+ "yiisoft/yii2-dev": "<2.0.15",
+ "yiisoft/yii2-elasticsearch": "<2.0.5",
+ "yiisoft/yii2-gii": "<2.0.4",
+ "yiisoft/yii2-jui": "<2.0.4",
+ "yiisoft/yii2-redis": "<2.0.8",
+ "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3",
+ "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
+ "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5",
+ "zendframework/zend-diactoros": ">=1,<1.0.4",
+ "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-http": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.3,<2.3.8|>=2.4,<2.4.1",
+ "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3",
+ "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2",
+ "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4",
+ "zendframework/zend-validator": ">=2.3,<2.3.6",
+ "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1",
+ "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6",
+ "zendframework/zendframework": ">=2,<2.4.11|>=2.5,<2.5.1",
+ "zendframework/zendframework1": "<1.12.20",
+ "zendframework/zendopenid": ">=2,<2.0.2",
+ "zendframework/zendxml": ">=1,<1.0.1",
+ "zetacomponents/mail": "<1.8.2",
+ "zf-commons/zfc-user": "<1.2.2",
+ "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3",
+ "zfr/zfr-oauth2-server-module": "<0.1.2"
+ },
+ "type": "metapackage",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "role": "maintainer"
+ }
+ ],
+ "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
+ "time": "2018-06-08T09:55:50+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": {
+ "roave/security-advisories": 20
+ },
+ "prefer-stable": true,
+ "prefer-lowest": false,
+ "platform": {
+ "php": "^7.1.3"
+ },
+ "platform-dev": []
+}
diff --git a/dl.php b/dl.php
index 6dfec78b2..d165c6273 100644
--- a/dl.php
+++ b/dl.php
@@ -128,7 +128,6 @@ for ($i = 0; $i < $num_auth_pages && $authorised == false; $i++) {
$topic_id = $row['topic_id'];
$forum_id = $row['forum_id'];
- $is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
set_die_append_msg($forum_id, $topic_id);
@@ -181,27 +180,27 @@ if ($download_mode == PHYSICAL_LINK) {
$url = make_url($upload_dir . '/' . $attachment['physical_filename']);
header('Location: ' . $url);
exit;
-} else {
- if (IS_GUEST && !bb_captcha('check')) {
- global $template;
-
- $redirect_url = isset($_POST['redirect_url']) ? $_POST['redirect_url'] : (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/');
- $message = '
$out"); } diff --git a/src/Legacy/TorrentFileList.php b/src/Legacy/TorrentFileList.php index 353b1958f..e02334450 100644 --- a/src/Legacy/TorrentFileList.php +++ b/src/Legacy/TorrentFileList.php @@ -62,7 +62,7 @@ class TorrentFileList $info['name'] =& $info['name.utf-8']; } - if (isset($info['files']) && is_array($info['files'])) { + if (isset($info['files']) && \is_array($info['files'])) { $this->root_dir = isset($info['name']) ? '../' . clean_tor_dirname($info['name']) : '...'; $this->multiple = true; @@ -70,13 +70,13 @@ class TorrentFileList if (isset($f['path.utf-8'])) { $f['path'] =& $f['path.utf-8']; } - if (!isset($f['path']) || !is_array($f['path'])) { + if (!isset($f['path']) || !\is_array($f['path'])) { continue; } array_deep($f['path'], 'clean_tor_dirname'); $length = isset($f['length']) ? (float)$f['length'] : 0; - $subdir_count = count($f['path']) - 1; + $subdir_count = \count($f['path']) - 1; if ($subdir_count > 0) { $name = array_pop($f['path']); @@ -91,7 +91,7 @@ class TorrentFileList $cur_files_ary =& $cur_files_ary[$subdir]; if ($j === $subdir_count) { - if (is_string($cur_files_ary)) { + if (\is_string($cur_files_ary)) { $GLOBALS['bnc_error'] = 1; break; } diff --git a/src/Legacy/Validate.php b/src/Legacy/Validate.php index 9ba3ee158..1f88bf02a 100644 --- a/src/Legacy/Validate.php +++ b/src/Legacy/Validate.php @@ -93,7 +93,7 @@ class Validate if (!$email || !filter_var($email, FILTER_VALIDATE_EMAIL)) { return $lang['EMAIL_INVALID']; } - if (strlen($email) > USEREMAIL_MAX_LENGTH) { + if (\strlen($email) > USEREMAIL_MAX_LENGTH) { return $lang['EMAIL_TOO_LONG']; } diff --git a/src/Legacy/WordsRate.php b/src/Legacy/WordsRate.php index 2e49009cb..4f535cb47 100644 --- a/src/Legacy/WordsRate.php +++ b/src/Legacy/WordsRate.php @@ -46,7 +46,7 @@ class WordsRate $this->del_text_hl = $text; // длинное сообщение - if (strlen($text) > 600) { + if (\strlen($text) > 600) { return $this->words_rate; } // вырезаем цитаты если содержит +1 diff --git a/styles/templates/default/tpl_config.php b/styles/templates/default/tpl_config.php index 0dec63425..c57eafe00 100644 --- a/styles/templates/default/tpl_config.php +++ b/styles/templates/default/tpl_config.php @@ -10,7 +10,7 @@ global $bb_cfg, $page_cfg, $template, $images, $lang; $width = $height = array(); -$template_name = basename(dirname(__FILE__)); +$template_name = basename(__DIR__); $_img = BB_ROOT . 'styles/images/'; $_main = BB_ROOT . 'styles/' . basename(TEMPLATES_DIR) . '/' . $template_name . '/images/'; diff --git a/tracker.php b/tracker.php index 5752c6b57..808972542 100644 --- a/tracker.php +++ b/tracker.php @@ -690,8 +690,8 @@ if ($allowed_forums) { $passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = " . (int)$user_id . " LIMIT 1"); // Build torrents table foreach (DB()->fetch_rowset($sql) as $tor) { - $dl = isset($tor['speed_down']) ? $tor['speed_down'] : 0; - $ul = isset($tor['speed_up']) ? $tor['speed_up'] : 0; + $dl = $tor['speed_down'] ?? 0; + $ul = $tor['speed_up'] ?? 0; $seeds = $tor['seeders']; $leechs = $tor['leechers']; diff --git a/viewforum.php b/viewforum.php index e5c4598de..8234e82dc 100644 --- a/viewforum.php +++ b/viewforum.php @@ -82,7 +82,7 @@ $mod_redirect_url = ''; $tor_status = -1; // all by default if ($is_auth['auth_mod']) { - $redirect = isset($_POST['redirect']) ? $_POST['redirect'] : $_SERVER['REQUEST_URI']; + $redirect = $_POST['redirect'] ?? $_SERVER['REQUEST_URI']; $redirect = url_arg($redirect, 'mod', 1, '&'); $mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1"; @@ -456,7 +456,7 @@ foreach ($topic_rowset as $topic) { 'TOR_STATUS_ICON' => isset($topic['tor_status']) ? $bb_cfg['tor_icons'][$topic['tor_status']] : '', 'TOR_STATUS_TEXT' => isset($topic['tor_status']) ? $lang['TOR_STATUS_NAME'][$topic['tor_status']] : '', - 'ATTACH' => isset($topic['topic_attachment']) ? $topic['topic_attachment'] : false, + 'ATTACH' => $topic['topic_attachment'] ?? false, 'STATUS' => $topic['topic_status'], 'TYPE' => $topic['topic_type'], 'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL && !$forum_data['allow_reg_tracker']), diff --git a/viewtopic.php b/viewtopic.php index c9eba8d1b..7ac4df45d 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -182,7 +182,7 @@ $moderation = (!empty($_REQUEST['mod']) && $is_auth['auth_mod']); $mod_redirect_url = ''; if ($is_auth['auth_mod']) { - $redirect = isset($_POST['redirect']) ? $_POST['redirect'] : @$_SERVER['REQUEST_URI']; + $redirect = $_POST['redirect'] ?? @$_SERVER['REQUEST_URI']; $redirect = url_arg($redirect, 'mod', 1, '&'); $mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1"; @@ -798,7 +798,7 @@ foreach ($is_auth as $name => $is) { } $template->assign_vars(array( - 'PG_ROW_CLASS' => isset($pg_row_class) ? $pg_row_class : 'row1', + 'PG_ROW_CLASS' => $pg_row_class ?? 'row1', )); if (IS_ADMIN) {