Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some deprecations, normalize.css, torrent file content sort fix #434

Merged
merged 1 commit into from Jul 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions common.php
Expand Up @@ -264,8 +264,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
$old_name = $file;
$ext = '';
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
$old_name = $matches[1];
$ext = $matches[2];
list($old_name, $ext) = $matches;
}
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
clearstatcache();
Expand Down
6 changes: 0 additions & 6 deletions library/ajax/sitemap.php
Expand Up @@ -56,12 +56,6 @@
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Google: <span style="color: red;">' . $lang['SITEMAP_ERROR'] . '</span> URL: <a href="http://google.com/webmasters/sitemaps/ping?sitemap=' . urlencode($map_link) . '" target="_blank">http://google.com/webmasters/sitemaps/ping?sitemap=' . $map_link . '</a>';
}

if ($map->sendSitemap('http://ping.blogs.yandex.ru/ping?sitemap=', $map_link)) {
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Yandex: <span style="color: green;">' . $lang['SITEMAP_SENT'] . '</span>';
} else {
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Yandex: <span style="color: red;">' . $lang['SITEMAP_ERROR'] . '</span> URL: <a href="http://ping.blogs.yandex.ru/ping?sitemap=' . urlencode($map_link) . '" target="_blank">http://ping.blogs.yandex.ru/ping?sitemap=' . $map_link . '</a>';
}

if ($map->sendSitemap('http://www.bing.com/ping?sitemap=', $map_link)) {
$html .= '<br />' . $lang['SITEMAP_NOTIFY_SEARCH'] . ' Bing: <span style="color: green;">' . $lang['SITEMAP_SENT'] . '</span>';
} else {
Expand Down
1 change: 0 additions & 1 deletion library/includes/cron/jobs/sitemap.php
Expand Up @@ -34,6 +34,5 @@
$map_link = make_url('sitemap/sitemap.xml');

$map->sendSitemap('http://google.com/webmasters/sitemaps/ping?sitemap=', $map_link);
$map->sendSitemap('http://ping.blogs.yandex.ru/ping?sitemap=', $map_link);
$map->sendSitemap('http://www.bing.com/ping?sitemap=', $map_link);
}
2 changes: 1 addition & 1 deletion library/language/source/main.php
Expand Up @@ -846,7 +846,7 @@
$lang['NOT_MODERATOR'] = 'You are not a moderator of this forum.';
$lang['NOT_AUTHORISED'] = 'Not Authorised';

$lang['YOU_BEEN_BANNED'] = 'You have been banned from this forum.<br />Please contact the webmaster or board administrator for more information.';
$lang['YOU_BEEN_BANNED'] = 'You have been banned from this forum. Please contact the board administrator for more information.';

// Viewonline
$lang['ONLINE_EXPLAIN'] = 'users active over the past five minutes';
Expand Down
8 changes: 3 additions & 5 deletions src/Legacy/Common/User.php
Expand Up @@ -239,7 +239,7 @@ public function session_start(array $cfg = [])
*/
public function session_create($userdata, $auto_created = false)
{
global $bb_cfg;
global $bb_cfg, $lang;

$this->data = $userdata;
$session_id = $this->sessiondata['sid'];
Expand All @@ -254,10 +254,8 @@ public function session_create($userdata, $auto_created = false)
$where_sql = 'ban_ip = ' . USER_IP;
$where_sql .= $login ? " OR ban_userid = $user_id" : '';

$sql = "SELECT ban_id FROM " . BB_BANLIST . " WHERE $where_sql LIMIT 1";

if (DB()->fetch_row($sql)) {
header('Location: https://torrentpier.com/banned/');
if (DB()->fetch_row("SELECT ban_id FROM " . BB_BANLIST . " WHERE $where_sql LIMIT 1")) {
bb_simple_die($lang['YOU_BEEN_BANNED']);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Legacy/TorrentFileList.php
Expand Up @@ -114,7 +114,7 @@ private function build_filelist_array()
$cur_files_ary[] = $this->build_file_item($name, $length);
}
}
natsort($cur_files_ary);
asort($cur_files_ary);
} else {
$name = $f['path'][0];
$this->files_ary['/'][] = $this->build_file_item($name, $length);
Expand Down
3 changes: 2 additions & 1 deletion styles/templates/default/css/main.css
Expand Up @@ -22,11 +22,12 @@
* SOFTWARE.
*/

@import "normalize.css";
@import "initial.css";
@import "ajax.css";
@import "alert.css";
@import "globals.css";
@import "images.css";
@import "initial.css";
@import "main_content.css";
@import "menus.css";
@import "misc.css";
Expand Down