diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index efead9c2a..83a0b687b 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -15,45 +15,6 @@ CREATE TABLE IF NOT EXISTS `bb_attachments` ( -- Records of bb_attachments -- ---------------------------- --- ---------------------------- --- Table structure for `bb_attachments_config` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attachments_config`; -CREATE TABLE IF NOT EXISTS `bb_attachments_config` ( - `config_name` varchar(255) NOT NULL DEFAULT '', - `config_value` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`config_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of bb_attachments_config --- ---------------------------- -INSERT INTO `bb_attachments_config` VALUES ('upload_dir', 'data/old_files'); -INSERT INTO `bb_attachments_config` VALUES ('upload_img', 'styles/images/icon_clip.gif'); -INSERT INTO `bb_attachments_config` VALUES ('topic_icon', 'styles/images/icon_clip.gif'); -INSERT INTO `bb_attachments_config` VALUES ('display_order', '0'); -INSERT INTO `bb_attachments_config` VALUES ('max_filesize', '262144'); -INSERT INTO `bb_attachments_config` VALUES ('attachment_quota', '52428800'); -INSERT INTO `bb_attachments_config` VALUES ('max_filesize_pm', '262144'); -INSERT INTO `bb_attachments_config` VALUES ('max_attachments', '1'); -INSERT INTO `bb_attachments_config` VALUES ('max_attachments_pm', '1'); -INSERT INTO `bb_attachments_config` VALUES ('disable_mod', '0'); -INSERT INTO `bb_attachments_config` VALUES ('allow_pm_attach', '1'); -INSERT INTO `bb_attachments_config` VALUES ('attach_version', '2.3.14'); -INSERT INTO `bb_attachments_config` VALUES ('default_upload_quota', '0'); -INSERT INTO `bb_attachments_config` VALUES ('default_pm_quota', '0'); -INSERT INTO `bb_attachments_config` VALUES ('img_display_inlined', '1'); -INSERT INTO `bb_attachments_config` VALUES ('img_max_width', '200'); -INSERT INTO `bb_attachments_config` VALUES ('img_max_height', '200'); -INSERT INTO `bb_attachments_config` VALUES ('img_link_width', '0'); -INSERT INTO `bb_attachments_config` VALUES ('img_link_height', '0'); -INSERT INTO `bb_attachments_config` VALUES ('img_create_thumbnail', '0'); -INSERT INTO `bb_attachments_config` VALUES ('img_min_thumb_filesize', '12000'); -INSERT INTO `bb_attachments_config` VALUES ('img_imagick', '/usr/bin/convert'); -INSERT INTO `bb_attachments_config` VALUES ('use_gd2', '1'); -INSERT INTO `bb_attachments_config` VALUES ('wma_autoplay', '0'); -INSERT INTO `bb_attachments_config` VALUES ('flash_autoplay', '0'); - -- ---------------------------- -- Table structure for `bb_attachments_desc` -- ---------------------------- @@ -80,22 +41,6 @@ CREATE TABLE IF NOT EXISTS `bb_attachments_desc` ( -- Records of bb_attachments_desc -- ---------------------------- --- ---------------------------- --- Table structure for `bb_attach_quota` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attach_quota`; -CREATE TABLE IF NOT EXISTS `bb_attach_quota` ( - `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `group_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `quota_type` smallint(2) NOT NULL DEFAULT '0', - `quota_limit_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - KEY `quota_type` (`quota_type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of bb_attach_quota --- ---------------------------- - -- ---------------------------- -- Table structure for `bb_auth_access` -- ---------------------------- @@ -885,24 +830,6 @@ CREATE TABLE IF NOT EXISTS `bb_privmsgs_text` ( -- Records of bb_privmsgs_text -- ---------------------------- --- ---------------------------- --- Table structure for `bb_quota_limits` --- ---------------------------- -DROP TABLE IF EXISTS `bb_quota_limits`; -CREATE TABLE IF NOT EXISTS `bb_quota_limits` ( - `quota_limit_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `quota_desc` varchar(20) NOT NULL DEFAULT '', - `quota_limit` bigint(20) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`quota_limit_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of bb_quota_limits --- ---------------------------- -INSERT INTO `bb_quota_limits` VALUES ('1', 'Low', '262144'); -INSERT INTO `bb_quota_limits` VALUES ('2', 'Medium', '10485760'); -INSERT INTO `bb_quota_limits` VALUES ('3', 'High', '15728640'); - -- ---------------------------- -- Table structure for `bb_ranks` -- ---------------------------- diff --git a/install/upgrade/changes.txt b/install/upgrade/changes.txt index 6ac007756..9b138540d 100644 --- a/install/upgrade/changes.txt +++ b/install/upgrade/changes.txt @@ -57,4 +57,7 @@ INSERT INTO `bb_cron` VALUES ('', '1', 'Accrual seedbonus', 'tr_seed_bonus.php', // 2.1.6 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'; \ No newline at end of file +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`; \ No newline at end of file diff --git a/library/attach_mod/includes/functions_attach.php b/library/attach_mod/includes/functions_attach.php index cab4f37ca..311d39cc5 100644 --- a/library/attach_mod/includes/functions_attach.php +++ b/library/attach_mod/includes/functions_attach.php @@ -27,7 +27,7 @@ function base64_pack($number) if ($number > 4096) { - return; + return false; } else if ($number < $base) { diff --git a/library/includes/classes/emailer.php b/library/includes/classes/emailer.php index 4abc13786..3256eba20 100644 --- a/library/includes/classes/emailer.php +++ b/library/includes/classes/emailer.php @@ -139,7 +139,7 @@ class emailer if ($bb_cfg['emailer_disabled']) { - return; + return false; } // Escape all quotes diff --git a/library/includes/core/mysql.php b/library/includes/core/mysql.php index 1efc207ea..61959f052 100644 --- a/library/includes/core/mysql.php +++ b/library/includes/core/mysql.php @@ -942,14 +942,14 @@ class sql_db $dbg = $this->dbg[$id]; $this->explain_out .= ' - +
 '. $dbg['src'] .'  ['. sprintf('%.4f', $dbg['time']) .' s]  '. $dbg['info'] .' '. "$this->db_server.$this->selected_db" .' :: Query #'. ($this->num_queries+1) .' 
'. $this->explain_hold .'
-
'. short_query($dbg['sql'], true) .'  
+
'. short_query($dbg['sql'], true) .'  

'; break; diff --git a/library/includes/functions.php b/library/includes/functions.php index effcaa7b1..39e1b0faa 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1525,7 +1525,7 @@ function bb_date ($gmepoch, $format = false, $friendly_date = true) function birthday_age ($date) { global $bb_cfg; - if (!$date) return; + if (!$date) return false; $tz = TIMENOW + (3600 * $bb_cfg['board_timezone']); return delta_time(strtotime($date, $tz)); @@ -1661,7 +1661,7 @@ function obtain_word_list (&$orig_word, &$replacement_word) { global $bb_cfg; - if (!$bb_cfg['use_word_censor']) return; + if (!$bb_cfg['use_word_censor']) return false; if (!$sql = CACHE('bb_cache')->get('censored')) { diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index 6c0472196..a5247b5a6 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -180,7 +180,7 @@ function delete_torrent ($attach_id, $mode = '') function change_tor_status ($attach_id, $new_tor_status) { - global $topic_id, $userdata; + global $lang, $topic_id, $userdata; $attach_id = (int) $attach_id; $new_tor_status = (int) $new_tor_status; @@ -378,7 +378,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE bb_die($mess); } - return; + return true; } function send_torrent_with_passkey ($filename)