mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Fixed formatting
This commit is contained in:
parent
0a7ddbe8ad
commit
990cf7c5c7
@ -9,7 +9,7 @@ require('./pagestart.php');
|
||||
|
||||
if ($bb_cfg['emailer_disabled'])
|
||||
{
|
||||
bb_die($lang['EMAILER_DISABLED']);
|
||||
bb_die($lang['EMAILER_DISABLED']);
|
||||
}
|
||||
|
||||
@set_time_limit(1200);
|
||||
|
36
ajax.php
36
ajax.php
@ -111,7 +111,7 @@ class ajax_common
|
||||
*/
|
||||
function exec()
|
||||
{
|
||||
global $lang, $bb_cfg;
|
||||
global $lang, $bb_cfg;
|
||||
|
||||
// Exit if we already have errors
|
||||
if (!empty($this->response['error_code']))
|
||||
@ -122,8 +122,8 @@ class ajax_common
|
||||
// Check that requested action is valid
|
||||
$action = $this->action;
|
||||
|
||||
// Action params
|
||||
$action_params = null;
|
||||
// Action params
|
||||
$action_params = null;
|
||||
|
||||
if (!$action || !is_string($action))
|
||||
{
|
||||
@ -134,21 +134,21 @@ class ajax_common
|
||||
$this->ajax_die('invalid action: ' . $action);
|
||||
}
|
||||
|
||||
// Exit if board is disabled via ON/OFF trigger or by admin
|
||||
if ($bb_cfg['board_disable'] || file_exists(BB_DISABLED))
|
||||
{
|
||||
if ($action_params[AJAX_ALWAYS_ACTIVE] !== true)
|
||||
{
|
||||
if ($bb_cfg['board_disable'])
|
||||
{
|
||||
$this->ajax_die($lang['BOARD_DISABLE']);
|
||||
}
|
||||
elseif (file_exists(BB_DISABLED))
|
||||
{
|
||||
$this->ajax_die($lang['BOARD_DISABLE_CRON']);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exit if board is disabled via ON/OFF trigger or by admin
|
||||
if ($bb_cfg['board_disable'] || file_exists(BB_DISABLED))
|
||||
{
|
||||
if ($action_params[AJAX_ALWAYS_ACTIVE] !== true)
|
||||
{
|
||||
if ($bb_cfg['board_disable'])
|
||||
{
|
||||
$this->ajax_die($lang['BOARD_DISABLE']);
|
||||
}
|
||||
elseif (file_exists(BB_DISABLED))
|
||||
{
|
||||
$this->ajax_die($lang['BOARD_DISABLE_CRON']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Auth check
|
||||
switch ($action_params[AJAX_AUTH])
|
||||
|
@ -73,7 +73,7 @@ define('BOT_UID', -746);
|
||||
|
||||
function sqlite3_escape_string ($str)
|
||||
{
|
||||
return SQLite3::escapeString($str);
|
||||
return SQLite3::escapeString($str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,14 +14,14 @@ switch($mode)
|
||||
'stats',
|
||||
));
|
||||
|
||||
$users = array();
|
||||
$stats = $datastore->get('stats');
|
||||
$users = array();
|
||||
$stats = $datastore->get('stats');
|
||||
|
||||
if ($stats['birthday_week_list'])
|
||||
{
|
||||
foreach($stats['birthday_week_list'] as $week)
|
||||
{
|
||||
$users[] = profile_url($week) .' <span class="small">('. birthday_age(date('Y-m-d', strtotime('-1 year', strtotime($week['user_birthday'])))) .')</span>';
|
||||
$users[] = profile_url($week) .' <span class="small">('. birthday_age(date('Y-m-d', strtotime('-1 year', strtotime($week['user_birthday'])))) .')</span>';
|
||||
}
|
||||
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $users));
|
||||
}
|
||||
@ -33,14 +33,14 @@ switch($mode)
|
||||
'stats',
|
||||
));
|
||||
|
||||
$users = array();
|
||||
$stats = $datastore->get('stats');
|
||||
$users = array();
|
||||
$stats = $datastore->get('stats');
|
||||
|
||||
if ($stats['birthday_today_list'])
|
||||
{
|
||||
foreach($stats['birthday_today_list'] as $today)
|
||||
{
|
||||
$users[] = profile_url($today) .' <span class="small">('. birthday_age($today['user_birthday']) .')</span>';
|
||||
$users[] = profile_url($today) .' <span class="small">('. birthday_age($today['user_birthday']) .')</span>';
|
||||
}
|
||||
$html = $lang['BIRTHDAY_TODAY'] . join(', ', $users);
|
||||
}
|
||||
@ -131,8 +131,8 @@ switch($mode)
|
||||
';
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
||||
$this->response['html'] = $html;
|
||||
|
@ -111,9 +111,9 @@ switch ($mode)
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
|
||||
$this->ajax_die('Invalid mode');
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
||||
$this->response['mode'] = $mode;
|
@ -79,9 +79,9 @@ switch ($mode)
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
|
||||
$this->ajax_die('Invalid mode');
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
||||
$this->response['mode'] = $mode;
|
||||
|
@ -130,6 +130,6 @@ switch ($mode)
|
||||
';
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
@ -27,19 +27,19 @@ switch ($mode)
|
||||
|
||||
foreach ($bb_cfg['sitemap_sending'] as $source_name => $source_link)
|
||||
{
|
||||
if ($map->send_url($source_link, $map_link))
|
||||
if ($map->send_url($source_link, $map_link))
|
||||
{
|
||||
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' ' . $source_name . ' : <span style="color: green;">' . $lang['SITEMAP_SENT'] . '</span>';
|
||||
}
|
||||
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' ' . $source_name . ' : <span style="color: green;">' . $lang['SITEMAP_SENT'] . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' ' . $source_name . ' : <span style="color: red;">' . $lang['SITEMAP_ERROR'] . '</span> URL: <a href="' . $source_link . urlencode($map_link) . '" target="_blank">' . $source_link . $map_link . '</a>';
|
||||
}
|
||||
}
|
||||
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' ' . $source_name . ' : <span style="color: red;">' . $lang['SITEMAP_ERROR'] . '</span> URL: <a href="' . $source_link . urlencode($map_link) . '" target="_blank">' . $source_link . $map_link . '</a>';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
||||
$this->response['html'] = $html;
|
||||
|
@ -67,8 +67,8 @@ switch($mode)
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
||||
$this->response['html'] = $html;
|
||||
|
@ -218,11 +218,11 @@ $bb_cfg['charset'] = 'utf8'; // page charset
|
||||
|
||||
if (isset($bb_cfg['default_lang']) && file_exists(LANG_ROOT_DIR . $bb_cfg['default_lang'] .'/'))
|
||||
{
|
||||
$bb_cfg['default_lang_dir'] = LANG_ROOT_DIR . $bb_cfg['default_lang'] .'/';
|
||||
$bb_cfg['default_lang_dir'] = LANG_ROOT_DIR . $bb_cfg['default_lang'] .'/';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bb_cfg['default_lang_dir'] = LANG_ROOT_DIR .'en/';
|
||||
$bb_cfg['default_lang_dir'] = LANG_ROOT_DIR .'en/';
|
||||
}
|
||||
|
||||
$bb_cfg['lang'] = array(
|
||||
|
16
library/includes/cache/sqlite.php
vendored
16
library/includes/cache/sqlite.php
vendored
@ -23,10 +23,10 @@ class cache_sqlite extends cache_common
|
||||
|
||||
function cache_sqlite ($cfg, $prefix = null)
|
||||
{
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die("Error: {$this->db->engine} extension not installed");
|
||||
}
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die("Error: {$this->db->engine} extension not installed");
|
||||
}
|
||||
|
||||
$this->cfg = array_merge($this->cfg, $cfg);
|
||||
$this->db = new sqlite_common($this->cfg);
|
||||
@ -113,10 +113,10 @@ class cache_sqlite extends cache_common
|
||||
return ($result) ? $this->db->changes() : 0;
|
||||
}
|
||||
|
||||
function is_installed ()
|
||||
{
|
||||
return class_exists('SQLite3');
|
||||
}
|
||||
function is_installed ()
|
||||
{
|
||||
return class_exists('SQLite3');
|
||||
}
|
||||
}
|
||||
|
||||
class sqlite_common extends cache_common
|
||||
|
@ -85,7 +85,7 @@ class CACHES
|
||||
$this->ref[$cache_name] =& $this->obj[$cache_name];
|
||||
break;
|
||||
|
||||
case 'filecache':
|
||||
case 'filecache':
|
||||
default: //filecache
|
||||
if (!isset($this->obj[$cache_name]))
|
||||
{
|
||||
|
@ -13,6 +13,6 @@ if (@file_exists(SITEMAP_DIR. 'sitemap.xml'))
|
||||
|
||||
foreach ($bb_cfg['sitemap_sending'] as $source_name => $source_link)
|
||||
{
|
||||
$map->send_url($source_link, $map_link);
|
||||
}
|
||||
$map->send_url($source_link, $map_link);
|
||||
}
|
||||
}
|
@ -22,10 +22,10 @@ class datastore_sqlite extends datastore_common
|
||||
|
||||
function datastore_sqlite ($cfg, $prefix = null)
|
||||
{
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die("Error: {$this->engine} extension not installed");
|
||||
}
|
||||
if (!$this->is_installed())
|
||||
{
|
||||
die("Error: {$this->engine} extension not installed");
|
||||
}
|
||||
|
||||
$this->cfg = array_merge($this->cfg, $cfg);
|
||||
$this->db = new sqlite_common($this->cfg);
|
||||
@ -69,8 +69,8 @@ class datastore_sqlite extends datastore_common
|
||||
$this->db->debug('stop');
|
||||
}
|
||||
|
||||
function is_installed ()
|
||||
{
|
||||
return class_exists('SQLite3');
|
||||
}
|
||||
function is_installed ()
|
||||
{
|
||||
return class_exists('SQLite3');
|
||||
}
|
||||
}
|
@ -1240,12 +1240,12 @@ function show_bt_userdata ($user_id)
|
||||
{
|
||||
global $lang, $template;
|
||||
|
||||
if (!$btu = get_bt_userdata($user_id))
|
||||
{
|
||||
require(INC_DIR .'functions_torrent.php');
|
||||
generate_passkey($user_id, true);
|
||||
$btu = get_bt_userdata($user_id);
|
||||
}
|
||||
if (!$btu = get_bt_userdata($user_id))
|
||||
{
|
||||
require(INC_DIR .'functions_torrent.php');
|
||||
generate_passkey($user_id, true);
|
||||
$btu = get_bt_userdata($user_id);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'SHOW_BT_USERDATA' => true,
|
||||
|
@ -207,7 +207,7 @@ $bb_cfg['tor_icons'] = array(
|
||||
TOR_CHECKING => '<span class="tor-icon tor-checking">%</span>',
|
||||
TOR_TMP => '<span class="tor-icon tor-dup">T</span>',
|
||||
TOR_PREMOD => '<span class="tor-icon tor-dup">∏</span>',
|
||||
TOR_REPLENISH => '<span class="tor-icon tor-dup">R</span>',
|
||||
TOR_REPLENISH => '<span class="tor-icon tor-dup">R</span>',
|
||||
);
|
||||
|
||||
// Запрет на скачивание
|
||||
|
@ -6,11 +6,11 @@ global $bb_cfg, $userdata, $template, $DBS, $lang;
|
||||
|
||||
if (!empty($template))
|
||||
{
|
||||
$birthday_tp = ((string)bb_date(TIMENOW, 'd.m', false) === '04.04') ? ' | 🎉🍰💚' : null;
|
||||
$birthday_tp = ((string)bb_date(TIMENOW, 'd.m', false) === '04.04') ? ' | 🎉🍰💚' : null;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'SIMPLE_FOOTER' => !empty($gen_simple_header),
|
||||
'POWERED' => 'Powered by <a target="_blank" href="https://torrentpier.com">TorrentPier II</a> © 2005-' . date('Y') . $birthday_tp,
|
||||
'POWERED' => 'Powered by <a target="_blank" href="https://torrentpier.com">TorrentPier II</a> © 2005-' . date('Y') . $birthday_tp,
|
||||
'SHOW_ADMIN_LINK' => (IS_ADMIN && !defined('IN_ADMIN')),
|
||||
'ADMIN_LINK_HREF' => "admin/index.php",
|
||||
));
|
||||
|
@ -67,9 +67,9 @@ if ($sql_log)
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function fixSqlLog() {
|
||||
if ($("#sqlLog").height() > 400) {
|
||||
$("#sqlLog").height(400);
|
||||
}
|
||||
if ($("#sqlLog").height() > 400) {
|
||||
$("#sqlLog").height(400);
|
||||
}
|
||||
}
|
||||
$(document).ready(fixSqlLog);
|
||||
</script>
|
@ -356,7 +356,7 @@ foreach ($profile_fields as $field => $can_edit)
|
||||
}
|
||||
}
|
||||
|
||||
$pr_data['user_birthday'] = $db_data['user_birthday'] = !empty($user_birthday) ? $user_birthday : null;
|
||||
$pr_data['user_birthday'] = $db_data['user_birthday'] = !empty($user_birthday) ? $user_birthday : null;
|
||||
}
|
||||
$tp_data['USER_BIRTHDAY'] = $pr_data['user_birthday'];
|
||||
break;
|
||||
|
@ -1094,7 +1094,7 @@ $lang['TOR_STATUS_NAME'] = array(
|
||||
TOR_CHECKING => 'verified',
|
||||
TOR_TMP => 'temporary',
|
||||
TOR_PREMOD => 'pre-moderation',
|
||||
TOR_REPLENISH => 'replenish',
|
||||
TOR_REPLENISH => 'replenish',
|
||||
);
|
||||
$lang['TOR_STATUS_FAILED'] = 'Such status does not exist!';
|
||||
$lang['TORRENT_FAILED'] = 'Distribution was not found!';
|
||||
|
@ -1094,7 +1094,7 @@ $lang['TOR_STATUS_NAME'] = array(
|
||||
TOR_CHECKING => 'проверяется',
|
||||
TOR_TMP => 'временная',
|
||||
TOR_PREMOD => 'премодерация',
|
||||
TOR_REPLENISH => 'пополняемая',
|
||||
TOR_REPLENISH => 'пополняемая',
|
||||
);
|
||||
$lang['TOR_STATUS_FAILED'] = 'Такого статуса не существует!';
|
||||
$lang['TORRENT_FAILED'] = 'Раздача не найдена!';
|
||||
|
@ -1094,7 +1094,7 @@ $lang['TOR_STATUS_NAME'] = array(
|
||||
TOR_CHECKING => 'перевіряється',
|
||||
TOR_TMP => 'тимчасова',
|
||||
TOR_PREMOD => 'премодерація',
|
||||
TOR_REPLENISH => 'поповнювана',
|
||||
TOR_REPLENISH => 'поповнювана',
|
||||
);
|
||||
$lang['TOR_STATUS_FAILED'] = 'Такого статусу не існує!';
|
||||
$lang['TORRENT_FAILED'] = 'Роздача не знайдено!';
|
||||
|
@ -190,10 +190,10 @@ if ($result = DB()->fetch_rowset($sql))
|
||||
$www = $lang['NOSELECT'];
|
||||
}
|
||||
|
||||
if(!$from)
|
||||
{
|
||||
$from = $lang['NOSELECT'];
|
||||
}
|
||||
if(!$from)
|
||||
{
|
||||
$from = $lang['NOSELECT'];
|
||||
}
|
||||
|
||||
$row_class = !($i % 2) ? 'row1' : 'row2';
|
||||
$template->assign_block_vars('memberrow', array(
|
||||
|
@ -894,7 +894,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||
{
|
||||
if ( !empty($_POST['username']) )
|
||||
{
|
||||
$to_userdata = get_userdata($_POST['username']);
|
||||
$to_userdata = get_userdata($_POST['username']);
|
||||
|
||||
if (!$to_userdata || $to_userdata['user_id'] == GUEST_UID)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user