diff --git a/install/server_conf/bash.txt b/install/server_conf/bash.txt deleted file mode 100644 index 0cb7a314b..000000000 --- a/install/server_conf/bash.txt +++ /dev/null @@ -1,5 +0,0 @@ -$ mkdir /tmp/nginx -$ mkdir /tmp/nginx/fastcgi_temp -$ mkdir /tmp/nginx/client_temp - -$ mkdir /var/log/nginx/ \ No newline at end of file diff --git a/install/server_conf/fastcgi_params b/install/server_conf/fastcgi_params deleted file mode 100644 index 425b73424..000000000 --- a/install/server_conf/fastcgi_params +++ /dev/null @@ -1,31 +0,0 @@ -fastcgi_connect_timeout 60; -fastcgi_send_timeout 180; -fastcgi_read_timeout 180; -fastcgi_buffer_size 32k; -fastcgi_buffers 4 32k; -fastcgi_busy_buffers_size 32k; -fastcgi_temp_file_write_size 32k; -fastcgi_temp_path /tmp/nginx/fastcgi_temp 1 2; - -fastcgi_param QUERY_STRING $query_string; -fastcgi_param REQUEST_METHOD $request_method; -fastcgi_param CONTENT_TYPE $content_type; -fastcgi_param CONTENT_LENGTH $content_length; - -fastcgi_param SCRIPT_NAME $fastcgi_script_name; -fastcgi_param REQUEST_URI $request_uri; -fastcgi_param DOCUMENT_URI $document_uri; -fastcgi_param DOCUMENT_ROOT $document_root; -fastcgi_param SERVER_PROTOCOL $server_protocol; - -fastcgi_param GATEWAY_INTERFACE CGI/1.1; -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - -fastcgi_param REMOTE_ADDR $remote_addr; -fastcgi_param REMOTE_PORT $remote_port; -fastcgi_param SERVER_ADDR $server_addr; -fastcgi_param SERVER_PORT $server_port; -fastcgi_param SERVER_NAME $server_name; - -# PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; \ No newline at end of file diff --git a/install/server_conf/nginx.conf b/install/server_conf/nginx.conf deleted file mode 100644 index 1e24a39a0..000000000 --- a/install/server_conf/nginx.conf +++ /dev/null @@ -1,154 +0,0 @@ -user www www; -worker_processes auto; - -#error_log /var/log/nginx/error.log; -#error_log /var/log/nginx/error.log notice; -#error_log /var/log/nginx/error.log info; - -pid /var/run/nginx.pid; - -worker_rlimit_nofile 1024; -events { - worker_connections 1024; -} - -http { - include mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] $request ' - # '"$status" $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #log_format IP .$remote_addr.; - - access_log off; - - server_tokens off; - reset_timedout_connection on; - - sendfile on; - - # http://en.wikipedia.org/wiki/Asynchronous_I/O - # aio sendfile; - - output_buffers 1 64k; - - tcp_nopush on; - tcp_nodelay on; - send_lowat 12000; - log_not_found off; - - keepalive_timeout 65; - - limit_req_zone $binary_remote_addr zone=one:16m rate=5r/s; - - gzip on; - gzip_vary on; - gzip_min_length 2048; - gzip_comp_level 5; - gzip_http_version 1.0; - gzip_proxied any; - gzip_disable "msie6"; - gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; - - client_max_body_size 10m; - large_client_header_buffers 4 8k; - client_body_temp_path /tmp/nginx/client_temp 1 2; - - server { - #listen 80 default sndbuf=32k rcvbuf=8k accept_filter=httpready; - #listen [::]:80 default sndbuf=32k rcvbuf=8k accept_filter=httpready; - - listen 80 default sndbuf=32k rcvbuf=8k; - server_name sitedomain.ru; - - charset utf8; - - access_log off; - - location / { - root /var/www; - index index.php index.html index.htm; - } - - error_page 404 /404.html; - error_page 500 502 503 504 /50x.html; - - # pass the PHP scripts to FastCGI server listening on /tmp/php.sock - location ~ \.php$ { - #limit_req zone=one burst=20 nodelay; - #limit_req_log_level info; - - root /var/www; - fastcgi_index index.php; - fastcgi_pass unix:/tmp/php.sock; # 127.0.0.1:9000; - fastcgi_intercept_errors on; - - # FreeBSD Optimization - fastcgi_pass_request_body off; - client_body_in_file_only clean; - fastcgi_param REQUEST_BODY_FILE $request_body_file; - - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name; - - include fastcgi_params; - } - - # rewrite to XBTT (old) -# location ^~ /bt/ { -# access_log off; -# if ( $query_string ~ "^uk=([^&?]{10})[&?]+(.*)$" ) { -# set $uk $1; -# set $qs $2&ip=$remote_addr; -# } -# if ( $query_string ~ "^uk=([^&?]{10})[&?]+((.*&|)ip=.*)$" ) { -# set $uk $1; -# set $qs $2; -# } -# if ( $qs ) { -# rewrite ^.*/([a-z]+)(\.php|)$ /$uk/$1?$qs break; -# } -# rewrite ^/?(.*)$ /$1?ip=$remote_addr&$query_string break; -# proxy_pass http://127.0.0.1:2710/; -# } - - # cache static files - location ~* \.(jpg|jpeg|gif|png|css|js|ico)$ { - root /var/www; - access_log off; - expires 30d; - add_header Cache-Control public; - } - - # sitemap rewrite - rewrite ^/sitemap.xml$ /internal_data/sitemap/sitemap.xml; - - # deny access to admin folder - location ~ \/admin|backup\/ { - deny all; - #allow YOUR_IP; - } - - # deny access to system folder - location ~ \/(install|internal_data|library)\/ { - deny all; - } - - # deny access to git folder - location ~ /\.git { - deny all; - } - - # deny access to .htaccess, if apache's document root concurs with nginx's one - location ~ /\.ht { - deny all; - } - - # deny access to critical files - location ~ \.(.*sql|tpl|db|inc|log|md)$ { - deny all; - } - } -} \ No newline at end of file diff --git a/install/sphinx/sphinx.conf b/install/sphinx/sphinx.conf deleted file mode 100644 index d29033d81..000000000 --- a/install/sphinx/sphinx.conf +++ /dev/null @@ -1,104 +0,0 @@ -source torrentpier -{ - type = mysql - sql_host = localhost - sql_user = user - sql_pass = pass - sql_db = dbase - sql_query_pre = SET NAMES utf8 - sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 - sql_query_pre = SET CHARACTER_SET_CLIENT=utf8 -} - -source topics: torrentpier -{ - sql_query = \ - SELECT topic_id, forum_id, topic_title \ - FROM bb_topics \ - WHERE topic_id BETWEEN $start AND $end - - sql_query_range = SELECT MIN(topic_id), MAX(topic_id) FROM bb_topics - sql_range_step = 100000 - - sql_attr_uint = forum_id - sql_ranged_throttle = 50 - sql_query_info = SELECT * FROM bb_topics WHERE topic_id = $id -} - -source posts: torrentpier -{ - sql_query = \ - SELECT pt.post_id, pt.post_text, t.topic_title, t.topic_id, t.forum_id \ - FROM bb_posts_text pt \ - LEFT JOIN bb_topics t on pt.post_id = t.topic_first_post_id \ - WHERE pt.post_id BETWEEN $start AND $end - - sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM bb_posts_text - sql_range_step = 100000 - - sql_attr_uint = topic_id - sql_attr_uint = forum_id - sql_ranged_throttle = 50 - sql_query_info = SELECT * FROM bb_posts_text WHERE post_id = $id -} - -source users: torrentpier -{ - sql_query = \ - SELECT user_id, username \ - FROM bb_users \ - WHERE user_id BETWEEN $start AND $end - - sql_query_range = SELECT 1, MAX(user_id) FROM bb_users - sql_range_step = 1000 - sql_query_info = SELECT * FROM bb_users WHERE user_id = $id -} - -index topics -{ - docinfo = extern - morphology = stem_enru - charset_type = utf-8 - charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42C->U+430..U+44C, U+42E..U+42F->U+44E..U+44F, U+430..U+44C, U+44E..U+44F, U+0401->U+0435, U+0451->U+0435, U+042D->U+0435, U+044D->U+0435 - min_prefix_len = 0 - min_infix_len = 0 - min_word_len = 1 - min_stemming_len = 4 - enable_star = 1 - phrase_boundary = :, - , . , $ - phrase_boundary_step = 1 - html_strip = 1 - path = ./sphinx/data/topics - source = topics -} - -index posts: topics -{ - path = ./sphinx/data/posts - source = posts -} - -index users: topics -{ - path = ./sphinx/data/users - source = users -} - -indexer -{ - mem_limit = 256M -} - -searchd -{ - listen = 127.0.0.1:3312 - log = ./sphinx/log/searchd.log - query_log = ./sphinx/log/query.log - read_timeout = 5 - max_children = 15 - max_matches = 5000 - seamless_rotate = 1 - preopen_indexes = 0 - unlink_old = 1 - pid_file = ./sphinx/searchd.pid -} \ No newline at end of file diff --git a/install/upgrade/changes.txt b/install/upgrade/changes.txt deleted file mode 100644 index 00b3fbe1a..000000000 --- a/install/upgrade/changes.txt +++ /dev/null @@ -1,81 +0,0 @@ -Схема изменений начиная с версии 2.1 (R600): - -Изменения в базе: - -// 2.1.1 -DROP TABLE IF EXISTS `bb_reports`; -DROP TABLE IF EXISTS `bb_reports_changes`; -DROP TABLE IF EXISTS `bb_reports_modules`; -DROP TABLE IF EXISTS `bb_reports_reasons`; -DELETE FROM `bb_config` WHERE `config_name` = 'report_subject_auth'; -DELETE FROM `bb_config` WHERE `config_name` = 'report_modules_cache'; -DELETE FROM `bb_config` WHERE `config_name` = 'report_hack_count'; -DELETE FROM `bb_config` WHERE `config_name` = 'report_notify'; -DELETE FROM `bb_config` WHERE `config_name` = 'report_list_admin'; -DELETE FROM `bb_config` WHERE `config_name` = 'report_new_window'; -DELETE FROM `bb_config` WHERE `config_name` = 'reports_enabled'; -ALTER TABLE `bb_posts` DROP COLUMN `post_reported`; -ALTER TABLE `bb_privmsgs` DROP COLUMN `privmsgs_reported`; -ALTER TABLE `bb_topics` DROP COLUMN `topic_reported`; -DELETE FROM `bb_cron` WHERE `cron_script` = 'site_backup.php'; -DELETE FROM `bb_cron` WHERE `cron_script` = 'db_backup.php'; -UPDATE `bb_cron` SET `cron_script` = 'board_maintenance.php' WHERE `cron_script` = 'bb_maintenance.php'; -UPDATE `bb_attachments_config` SET `config_value` = 'data/old_files' WHERE `config_name` = 'upload_dir'; -UPDATE `bb_attachments_config` SET `config_value` = 'styles/images/icon_clip.gif' WHERE `config_name` = 'upload_img'; -UPDATE `bb_attachments_config` SET `config_value` = 'styles/images/icon_clip.gif' WHERE `config_name` = 'topic_icon'; -UPDATE `bb_config` SET `config_value` = 'styles/images/smiles' WHERE `config_name` = 'smilies_path'; - -// 2.1.4 -ALTER TABLE `bb_bt_tracker` DROP COLUMN `ul_gdc`; -ALTER TABLE `bb_bt_tracker` DROP COLUMN `ul_gdc_c`; -ALTER TABLE `bb_bt_tracker` DROP COLUMN `ul_16k_c`; -ALTER TABLE `bb_bt_tracker` DROP COLUMN `ul_eq_dl`; -ALTER TABLE `bb_bt_torrents` CHANGE `info_hash` `info_hash` VARBINARY(20) NOT NULL DEFAULT ''; -ALTER TABLE `bb_bt_torrents` CHANGE `speed_up` `speed_up` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_torrents` CHANGE `speed_down` `speed_down` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker` CHANGE `peer_id` `peer_id` VARCHAR(20) NOT NULL DEFAULT '0'; -UPDATE `bb_config` SET `config_value` = '180' WHERE `config_name` = 'cron_check_interval'; -ALTER TABLE `bb_cron` CHANGE `run_order` `run_order` TINYINT(4) unsigned NOT NULL DEFAULT '0'; -ALTER TABLE `bb_cron` CHANGE `run_interval` `run_interval` TIME DEFAULT NULL DEFAULT '0'; -ALTER TABLE `bb_groups` CHANGE `group_description` `group_description` TEXT NOT NULL; -ALTER TABLE `bb_groups` CHANGE `group_signature` `group_signature` TEXT NOT NULL; -ALTER TABLE `bb_posts` CHANGE `mc_comment` `mc_comment` TEXT NOT NULL; -ALTER TABLE `bb_posts` CHANGE `mc_user_id` `mc_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_posts_html` CHANGE `post_html` `post_html` MEDIUMTEXT NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `user_regdate` `user_regdate` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_users` CHANGE `user_lang` `user_lang` VARCHAR(255) NOT NULL DEFAULT 'ru'; -ALTER TABLE `bb_users` CHANGE `avatar_ext_id` `avatar_ext_id` TINYINT(4) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_user_group` CHANGE `user_time` `user_time` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker` ADD `client` VARCHAR(51) NOT NULL DEFAULT 'Unknown' AFTER `port`; -ALTER TABLE `bb_bt_tracker` ADD `complete` INT(11) NOT NULL DEFAULT '0' AFTER `complete_percent`; - -// 2.1.5 -DROP TABLE IF EXISTS `bb_captcha`; -DELETE FROM `bb_cron` WHERE `cron_script` = 'captcha_gen_gc.php'; -INSERT INTO `bb_cron` VALUES ('', '1', 'Accrual seedbonus', 'tr_seed_bonus.php', 'interval', '', '', '25', '', '', '00:15:00', '0', '', '0', '0', '0'); - -// 2.2.0 -DROP TABLE IF EXISTS `bb_ads`; -DELETE FROM `bb_config` WHERE `config_name` = 'active_ads'; -DELETE FROM `bb_cron` WHERE `cron_script` = 'attach_maintenance.php'; -DROP TABLE IF EXISTS `bb_attachments_config`; -DROP TABLE IF EXISTS `bb_attach_quota`; -DROP TABLE IF EXISTS `bb_quota_limits`; -ALTER TABLE `bb_topics` ADD `attach_ext_id` TINYINT(4) NOT NULL DEFAULT '0' AFTER `topic_dl_type`; -ALTER TABLE `bb_topics` ADD `filesize` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `attach_ext_id`; -DELETE FROM `bb_config` WHERE `config_name` = 'new_tpls'; -ALTER TABLE `bb_log` DROP COLUMN `log_username`; -ALTER TABLE `bb_topics` CHANGE `topic_dl_type` `tracker_status` TINYINT(1) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_topics` ADD `tracker_id` TINYINT(4) NOT NULL DEFAULT '0' AFTER `topic_moved_id`; -ALTER TABLE `bb_bt_torrents` DROP `post_id`; -DELETE FROM `bb_config` WHERE `config_name` = 'bt_add_auth_key'; -DELETE FROM `bb_config` WHERE `config_name` = 'bt_check_announce_url'; -ALTER TABLE `bb_forums` ADD `forum_last_topic_time` INT NOT NULL AFTER `forum_last_post_id`; -DROP TABLE IF EXISTS `bb_extensions`; -DROP TABLE IF EXISTS `bb_extension_groups`; -DROP TABLE IF EXISTS `bb_attachments_desc`; -DROP TABLE IF EXISTS `bb_attachments`; -ALTER TABLE `bb_topics` ADD `tracker_id` TINYINT(4) NOT NULL DEFAULT '0' AFTER `topic_moved_id`; -ALTER TABLE `bb_topics` ADD `attach_dl_cnt` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `attach_ext_id`; -DROP TABLE IF EXISTS `bb_bt_tor_dl_stat`; -DELETE FROM `bb_cron` WHERE `cron_script` = 'cache_gc.php'; \ No newline at end of file diff --git a/install/upgrade/r496-user_birthday.php b/install/upgrade/r496-user_birthday.php deleted file mode 100644 index 257d598e9..000000000 --- a/install/upgrade/r496-user_birthday.php +++ /dev/null @@ -1,39 +0,0 @@ -session_start(); - -set_die_append_msg(); -if (!IS_SUPER_ADMIN) bb_die($lang['ONLY_FOR_SUPER_ADMIN']); - -$confirm = request_var('confirm', ''); - -if ($confirm) { - DB()->query("ALTER TABLE ". BB_USERS ." CHANGE COLUMN user_birthday user_birthday_old int(11) NOT NULL DEFAULT 0 AFTER user_gender"); - DB()->query("ALTER TABLE ". BB_USERS ." ADD user_birthday date NOT NULL DEFAULT '0000-00-00' AFTER user_gender"); - - $sql = "SELECT user_id, user_birthday_old FROM ". BB_USERS ." WHERE user_birthday_old != 0 AND user_id NOT IN ('". EXCLUDED_USERS ."')"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $birthday = bb_date($row['user_birthday_old'] * 86400 + 1, 'Y-m-d', 0); - DB()->query("UPDATE ". BB_USERS ." SET user_birthday = '". $birthday ."' WHERE user_id = ". $row['user_id'] .""); - } - - DB()->query("ALTER TABLE ". BB_USERS ." DROP user_birthday_old"); - - bb_die('
\n"; - - while (true) { - set_time_limit(600); - echo "$start [ $avatars_ok / $avatars_err ]\n"; - $end = $start + $rows_per_cycle - 1; - $sql = " - SELECT user_id, avatar_ext_id, user_avatar - FROM " . BB_USERS . " - WHERE user_avatar != '' - AND avatar_ext_id = 0 - AND user_id BETWEEN $start AND $end - ORDER BY NULL - "; - - foreach (DB()->fetch_rowset($sql) as $row) { - $FILE = array( - 'name' => '', - 'type' => '', - 'size' => 0, - 'tmp_name' => BB_ROOT . $bb_cfg['avatar_path'] . '/' . basename($row['user_avatar']), - 'error' => 0, - ); - $upload = new upload_common(); - - if ($upload->init($bb_cfg['avatars'], $FILE, false) && $upload->store('avatar', $row)) { - DB()->query("UPDATE " . BB_USERS . " SET avatar_ext_id = {$upload->file_ext_id} WHERE user_id = {$row['user_id']} LIMIT 1"); - $avatars_ok++; - } else { - echo "{$row['user_id']}: ", join("\n{$row['user_id']}: ", $upload->errors), "\n"; - $avatars_err++; - } - } - - if ($end > $end_id) { - break; - } - $start += $rows_per_cycle; - sleep(1); - } - - echo "---------- База данных успешно обновлена. Аватары указанных выше пользователей перенесены не были. ----------\n"; - - DB()->query("ALTER TABLE " . BB_USERS . " DROP `user_avatar`"); - DB()->query("ALTER TABLE " . BB_USERS . " DROP `user_avatar_type`"); -} else { - $msg = ''; - - bb_die($msg); -} \ No newline at end of file diff --git a/install/upgrade/r588-short_lang.php b/install/upgrade/r588-short_lang.php deleted file mode 100644 index b4700ca2b..000000000 --- a/install/upgrade/r588-short_lang.php +++ /dev/null @@ -1,55 +0,0 @@ -session_start(); - -set_die_append_msg(); -if (!IS_SUPER_ADMIN) bb_die($lang['ONLY_FOR_SUPER_ADMIN']); - -$confirm = request_var('confirm', ''); - -if ($confirm) { - DB()->query("UPDATE " . BB_CONFIG . " SET `config_value` = 'ru' WHERE `config_name` = 'default_lang'"); - DB()->query("ALTER TABLE " . BB_USERS . " ADD `user_twitter` varchar (15) NOT NULL DEFAULT '' AFTER `user_skype`"); - - $rows_per_cycle = 10000; - - $row = DB()->fetch_row("SELECT MAX(user_id) AS end_id FROM " . BB_USERS); - $end_id = (int)$row['end_id']; - $start = 0; - - while (true) { - set_time_limit(600); - $end = $start + $rows_per_cycle - 1; - - DB()->query("UPDATE " . BB_USERS . " SET user_lang = 'ru' WHERE user_lang = 'russian'"); - DB()->query("UPDATE " . BB_USERS . " SET user_lang = 'en' WHERE user_lang = 'english'"); - - if ($end > $end_id) { - break; - } - $start += $rows_per_cycle; - sleep(1); - } - - bb_die("База данных успешно обновлена. Можно приступать к обновлению файлов. Не забудьте удалить этот файл."); -} else { - $msg = ''; - - bb_die($msg); -} \ No newline at end of file diff --git a/install/upgrade/r600-stable.php b/install/upgrade/r600-stable.php deleted file mode 100644 index 2d8da4789..000000000 --- a/install/upgrade/r600-stable.php +++ /dev/null @@ -1,225 +0,0 @@ -session_start(); - -set_die_append_msg(); -if (!IS_SUPER_ADMIN) bb_die($lang['ONLY_FOR_SUPER_ADMIN']); - -bb_die(' -