diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index a2340f8d3..e39e80f37 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -659,6 +659,7 @@ INSERT INTO `bb_cron` VALUES (18, 1, 'Seeder last seen', 'tr_update_seeder_last_ INSERT INTO `bb_cron` VALUES (19, 1, 'Captcha', 'captcha_gen_gc.php', 'daily', NULL, '05:00:00', 120, '', '', NULL, 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (20, 1, 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', NULL, NULL, 255, '', '', '06:00:00', 0, '', 0, 0, 0); INSERT INTO `bb_cron` VALUES (21, 1, 'Cache garbage collector', 'cache_gc.php', 'interval', NULL, NULL, 255, '', '', '00:05:00', 0, '', 0, 0, 0); +INSERT INTO `bb_cron` VALUES (22, 1, 'Attach maintenance', 'attach_maintenance.php', 'daily', NULL, '05:00:00', 40, '', '', NULL, 1, '', 0, 1, 0); -- -------------------------------------------------------- diff --git a/upload/admin/admin_rebuild_search.php b/upload/admin/admin_rebuild_search.php index 7970340bd..953f316d2 100644 --- a/upload/admin/admin_rebuild_search.php +++ b/upload/admin/admin_rebuild_search.php @@ -1,7 +1,5 @@ assign_block_vars('catrow', array( 'ADMIN_CATEGORY' => $cat, @@ -41,7 +39,7 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' ) ksort($action_array); $row_count = 0; - while( list($action, $file) = each($action_array) ) + while (list($action, $file) = each($action_array)) { $row_class = !($row_count % 2) ? 'row1' : 'row2'; @@ -56,22 +54,18 @@ if( isset($_GET['pane']) && $_GET['pane'] == 'left' ) } } } -elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) +elseif (isset($_GET['pane']) && $_GET['pane'] == 'right') { $template->assign_vars(array( 'TPL_ADMIN_MAIN' => true, )); - // // Get forum statistics - // - $total_posts = get_db_stat('postcount'); - $total_users = get_db_stat('usercount'); + $total_posts = get_db_stat('postcount'); + $total_users = get_db_stat('usercount'); $total_topics = get_db_stat('topiccount'); - - $start_date = bb_date($bb_cfg['board_startdate']); - - $boarddays = ( TIMENOW - $bb_cfg['board_startdate'] ) / 86400; + $start_date = bb_date($bb_cfg['board_startdate']); + $boarddays = (TIMENOW - $bb_cfg['board_startdate']) / 86400; $posts_per_day = sprintf('%.2f', $total_posts / $boarddays); $topics_per_day = sprintf('%.2f', $total_topics / $boarddays); @@ -90,12 +84,10 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) } @closedir($avatar_dir); - $avatar_dir_size = humn_size($avatar_dir_size); } else { - // Couldn't open Avatar dir. $avatar_dir_size = $lang['NOT_AVAILABLE']; } @@ -114,13 +106,7 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) $users_per_day = $total_users; } - // // DB size ... MySQL only - // - // This code is heavily influenced by a similar routine - // in phpMyAdmin 2.2.0 - // - $sql = "SELECT VERSION() AS mysql_version"; if ($result = DB()->sql_query($sql)) { @@ -169,20 +155,17 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) 'TOPICS_PER_DAY' => $topics_per_day, 'USERS_PER_DAY' => $users_per_day, 'AVATAR_DIR_SIZE' => $avatar_dir_size, - 'DB_SIZE' => $dbsize, - 'GZIP_COMPRESSION' => ( $bb_cfg['gzip_compress'] ) ? $lang['ON'] : $lang['OFF'], + 'DB_SIZE' => $dbsize, + 'GZIP_COMPRESSION' => ($bb_cfg['gzip_compress']) ? $lang['ON'] : $lang['OFF'], )); - // - // End forum statistics - // + if (@$_GET['users_online']) { $template->assign_vars(array( 'SHOW_USERS_ONLINE' => true, )); - // + // Get users online information. - // $sql = "SELECT u.user_id, u.username, u.user_rank, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_start FROM " . BB_USERS . " u, " . BB_SESSIONS . " s WHERE s.session_logged_in = 1 @@ -248,9 +231,7 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) } } - // // Guest users - // if( count($onlinerow_guest) ) { $guest_users = 0; @@ -277,42 +258,15 @@ elseif( isset($_GET['pane']) && $_GET['pane'] == 'right' ) else { $template->assign_vars(array( - 'USERS_ONLINE_HREF' => "index.php?pane=right&users_online=1&sid={$userdata['session_id']}", + 'USERS_ONLINE_HREF' => "index.php?pane=right&users_online=1", )); } - - $template->assign_vars(array( - 'U_UPDATE_USER_LEVEL' => "index.php?update_user_level=1", - 'U_SYNC_TOPICS' => "index.php?sync_topics=1", - 'U_SYNC_USER_POSTS' => "index.php?sync_user_posts=1", - )); -} -elseif (isset($_REQUEST['update_user_level'])) -{ - require(INC_DIR .'functions_group.php'); - update_user_level('all'); - bb_die($lang['USER_LEVELS_UPDATED']); -} -elseif (isset($_REQUEST['sync_topics'])) -{ - sync('topic', 'all'); - sync('forum', 'all'); - bb_die($lang['TOPICS_DATA_SYNCHRONIZED']); -} -elseif (isset($_REQUEST['sync_user_posts'])) -{ - sync('user_posts', 'all'); - bb_die($lang['USER POSTS COUNT SYNCHRONIZED']); } else { - // // Generate frameset - // $template->assign_vars(array( 'TPL_ADMIN_FRAMESET' => true, - 'S_FRAME_NAV' => "index.php?pane=left", - 'S_FRAME_MAIN' => "index.php?pane=right", )); send_no_cache_headers(); print_page('index.tpl', 'admin', 'no_header'); @@ -320,9 +274,7 @@ else print_page('index.tpl', 'admin'); -// // Functions -// function inarray($needle, $haystack) { for($i = 0; $i < sizeof($haystack); $i++ ) diff --git a/upload/ajax.php b/upload/ajax.php index b7013459a..079eb7c05 100644 --- a/upload/ajax.php +++ b/upload/ajax.php @@ -32,7 +32,7 @@ switch ($ajax->action) case 'view_torrent': case 'mod_action': case 'change_tor_status': - case 'gen_passkey'; + case 'gen_passkey': require(BB_ROOT . 'attach_mod/attachment_mod.php'); require(INC_DIR . 'functions_torrent.php'); break; @@ -47,6 +47,7 @@ switch ($ajax->action) break; case 'manage_user': + case 'manage_admin': require(INC_DIR . 'functions_admin.php'); break; @@ -75,6 +76,7 @@ class ajax_common 'change_user_rank' => array('admin'), 'change_user_opt' => array('admin'), 'manage_user' => array('admin'), + 'manage_admin' => array('admin'), 'mod_action' => array('mod'), 'topic_tpl' => array('mod'), @@ -378,6 +380,11 @@ class ajax_common require(AJAX_DIR . 'manage_user.php'); } + function manage_admin() + { + require(AJAX_DIR . 'manage_admin.php'); + } + function topic_tpl() { require(AJAX_DIR . 'topic_tpl.php'); diff --git a/upload/ajax/manage_admin.php b/upload/ajax/manage_admin.php new file mode 100644 index 000000000..b1b33b6d0 --- /dev/null +++ b/upload/ajax/manage_admin.php @@ -0,0 +1,114 @@ +request['mode']; + +switch ($mode) +{ + case 'clear_cache': + + $gc_cache = array( + 'bb_cache', + 'tr_cache', + 'session_cache', + 'bb_cap_sid', + 'bb_login_err', + 'bb_poll_data', + ); + + // foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val) + foreach ($gc_cache as $cache_name) + { + CACHE($cache_name)->rm(); + } + + $this->response['cache_html'] = ''. $lang['ALL_CACHE_CLEARED'] .''; + + break; + + case 'clear_datastore': + + global $datastore; + + $datastore->clean(); + + $this->response['datastore_html'] = ''. $lang['DATASTORE_CLEARED'] .''; + + break; + + case 'clear_template_cache': + + global $template; + + $match = 'tpl_'; + $match_len = strlen($match); + $dir = $template->cachedir; + $res = @opendir($dir); + while (($file = readdir($res)) !== false) + { + if (substr($file, 0, $match_len) === $match) + { + @unlink($dir . $file); + } + } + closedir($res); + + $this->response['template_cache_html'] = ''. $lang['ALL_TEMPLATE_CLEARED'] .''; + + break; + + case 'indexer': + + exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result); + + if (!is_file($bb_cfg['sphinx_config_path'].".log")) + { + file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND); + } + + file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND); + + foreach ($result as $row) + { + file_put_contents($bb_cfg['sphinx_config_path'].".log", $row."\r\n", FILE_APPEND); + } + + file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND); + file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND); + + $this->response['indexer_html'] = ''. $lang['INDEXER'] .''; + + break; + + case 'update_user_level': + + require(INC_DIR .'functions_group.php'); + + update_user_level('all'); + + $this->response['update_user_level_html'] = ''. $lang['USER_LEVELS_UPDATED'] .''; + + break; + + case 'sync_topics': + + sync('topic', 'all'); + sync('forum', 'all'); + + $this->response['sync_topics_html'] = ''. $lang['TOPICS_DATA_SYNCHRONIZED'] .''; + + break; + + case 'sync_user_posts': + + sync('user_posts', 'all'); + + $this->response['sync_user_posts_html'] = ''. $lang['USER POSTS COUNT SYNCHRONIZED'] .''; + + break; +} + +$this->response['mode'] = $mode; \ No newline at end of file diff --git a/upload/ajax/manage_user.php b/upload/ajax/manage_user.php index fd68b23d6..94d87d3d1 100644 --- a/upload/ajax/manage_user.php +++ b/upload/ajax/manage_user.php @@ -9,53 +9,8 @@ $user_id = $this->request['user_id']; switch ($mode) { - case 'clear_cache': - $gc_cache = array( - 'bb_cache', - 'tr_cache', - 'session_cache', - 'bb_cap_sid', - 'bb_login_err', - 'bb_poll_data', - ); - - // foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val) - foreach ($gc_cache as $cache_name) - { - CACHE($cache_name)->rm(); - } - - $this->response['cache_html'] = ''. $lang['ALL_CACHE_CLEARED'] .''; - break; - - case 'clear_datastore': - global $datastore; - - $datastore->clean(); - - $this->response['datastore_html'] = ''. $lang['DATASTORE_CLEARED'] .''; - break; - - case 'clear_template_cache': - global $template; - - $match = 'tpl_'; - $match_len = strlen($match); - $dir = $template->cachedir; - $res = @opendir($dir); - while (($file = readdir($res)) !== false) - { - if (substr($file, 0, $match_len) === $match) - { - @unlink($dir . $file); - } - } - closedir($res); - - $this->response['template_cache'] = ''. $lang['ALL_CACHE_CLEARED'] .''; - break; - case 'delete_profile': + if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DELETE_ME']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']); @@ -67,9 +22,11 @@ switch ($mode) $this->response['info'] = $lang['USER_DELETED']; } else $this->ajax_die($lang['USER_DELETE_CSV']); + break; case 'delete_topics': + if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']); @@ -82,9 +39,11 @@ switch ($mode) $this->response['info'] = $lang['USER_DELETED_POSTS']; } else $this->ajax_die($lang['NOT_ADMIN']); + break; case 'delete_message': + if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']); @@ -95,17 +54,21 @@ switch ($mode) $this->response['info'] = $lang['USER_DELETED_POSTS']; } else $this->ajax_die($lang['NOT_ADMIN']); + break; case 'user_activate': + if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']); DB()->query("UPDATE ". BB_USERS ." SET user_active = '1' WHERE user_id = ". $user_id); $this->response['info'] = $lang['USER_ACTIVATE_ON']; + break; case 'user_deactivate': + if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DEACTIVATE_ME']); if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['ACTIVATE_CONFIRM']); @@ -113,23 +76,7 @@ switch ($mode) delete_user_sessions($user_id); $this->response['info'] = $lang['USER_ACTIVATE_OFF']; - break; - case "indexer": - exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result); - if (!is_file($bb_cfg['sphinx_config_path'].".log")) - { - file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND); - } - file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND); - foreach ($result as $row) - { - file_put_contents($bb_cfg['sphinx_config_path'].".log", $row."\r\n", FILE_APPEND); - } - file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND); - file_put_contents($bb_cfg['sphinx_config_path'].".log", "\r\n", FILE_APPEND); - - $this->response['indexer'] = ''. $lang['INDEXER'] .""; break; } diff --git a/upload/attach_mod/includes/functions_includes.php b/upload/attach_mod/includes/functions_includes.php index d9a7c8c6c..01c48b5a2 100644 --- a/upload/attach_mod/includes/functions_includes.php +++ b/upload/attach_mod/includes/functions_includes.php @@ -168,7 +168,7 @@ function attachment_quota_settings($admin_mode, $submit = false, $mode) if ($admin_mode == 'group' && !$submit && isset($_POST['edit'])) { - // Get group id again, we do not trust phpBB here, Mods may be installed ;) + // Get group id again $group_id = get_var(POST_GROUPS_URL, 0); // Show the contents diff --git a/upload/config.php b/upload/config.php index 452fa8cb5..8bfdfedb8 100644 --- a/upload/config.php +++ b/upload/config.php @@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.6 (RC)'; -$bb_cfg['tp_release_date'] = '02-02-2014'; -$bb_cfg['tp_release_state'] = 'R581'; +$bb_cfg['tp_release_date'] = '09-02-2014'; +$bb_cfg['tp_release_state'] = 'R582'; // Database $charset = 'utf8'; diff --git a/upload/includes/cron/jobs/attach_maintenance.php b/upload/includes/cron/jobs/attach_maintenance.php new file mode 100644 index 000000000..1274b35bd --- /dev/null +++ b/upload/includes/cron/jobs/attach_maintenance.php @@ -0,0 +1,224 @@ +expect_slow_query(600); + +$fix_errors = true; +$debug_mode = false; + +$tmp_attach_tbl = 'tmp_attachments'; +$db_max_packet = 800000; +$sql_limit = 3000; + +$check_attachments = false; +$orphan_files = $orphan_db_attach = $orphan_tor = array(); +$posts_without_attach = $topics_without_attach = array(); + +DB()->query(" + CREATE TEMPORARY TABLE $tmp_attach_tbl ( + physical_filename VARCHAR(255) NOT NULL default '', + KEY physical_filename (physical_filename(20)) + ) ENGINE = MyISAM DEFAULT CHARSET = utf8 +"); +DB()->add_shutdown_query("DROP TEMPORARY TABLE IF EXISTS $tmp_attach_tbl"); + +// Get attach_mod config +$attach_dir = get_attachments_dir(); + +// Get all names of existed attachments and insert them into $tmp_attach_tbl +if ($dir = @opendir($attach_dir)) +{ + $check_attachments = true; + $files = array(); + $f_len = 0; + + while (false !== ($f = readdir($dir))) + { + if ($f == 'index.php' || $f == '.htaccess' || is_dir("$attach_dir/$f") || is_link("$attach_dir/$f")) + { + continue; + } + $f = DB()->escape($f); + $files[] = "('$f')"; + $f_len += strlen($f) + 5; + + if ($f_len > $db_max_packet) + { + $files = join(',', $files); + DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files"); + $files = array(); + $f_len = 0; + } + } + if ($files = join(',', $files)) + { + DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files"); + } + closedir($dir); +} + +if ($check_attachments) +{ + // Delete bad records + DB()->query(" + DELETE a, d + FROM ". BB_ATTACHMENTS_DESC ." d + LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id) + WHERE ( + d.physical_filename = '' + OR d.real_filename = '' + OR d.extension = '' + OR d.mimetype = '' + OR d.filesize = 0 + OR d.filetime = 0 + OR a.post_id = 0 + ) + "); + + // Delete attachments that exist in file system but not exist in DB + $sql = "SELECT f.physical_filename + FROM $tmp_attach_tbl f + LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(physical_filename) + WHERE d.physical_filename IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + if ($filename = basename($row['physical_filename'])) + { + if ($fix_errors) + { + @unlink("$attach_dir/$filename"); + @unlink("$attach_dir/". THUMB_DIR .'/t_'. $filename); + } + if ($debug_mode) + { + $orphan_files[] = "$attach_dir/$filename"; + } + } + } + // Find DB records for attachments that exist in DB but not exist in file system + $sql = "SELECT d.attach_id + FROM ". BB_ATTACHMENTS_DESC ." d + LEFT JOIN $tmp_attach_tbl f USING(physical_filename) + WHERE f.physical_filename IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $orphan_db_attach[] = $row['attach_id']; + } + // Attachment exist in DESC_TABLE but not exist in ATTACH_TABLE + $sql = "SELECT d.attach_id + FROM ". BB_ATTACHMENTS_DESC ." d + LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id) + WHERE a.attach_id IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $orphan_db_attach[] = $row['attach_id']; + } + // Attachment exist in ATTACH_TABLE but not exist in DESC_TABLE + $sql = "SELECT a.attach_id + FROM ". BB_ATTACHMENTS ." a + LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id) + WHERE d.attach_id IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $orphan_db_attach[] = $row['attach_id']; + } + // Attachments without post + $sql = "SELECT a.attach_id + FROM ". BB_ATTACHMENTS ." a + LEFT JOIN ". BB_POSTS ." p USING(post_id) + WHERE p.post_id IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $orphan_db_attach[] = $row['attach_id']; + } + // Delete all orphan attachments + if ($orphans_sql = join(',', $orphan_db_attach)) + { + if ($fix_errors) + { + DB()->query("DELETE FROM ". BB_ATTACHMENTS_DESC ." WHERE attach_id IN($orphans_sql)"); + DB()->query("DELETE FROM ". BB_ATTACHMENTS ." WHERE attach_id IN($orphans_sql)"); + } + } + + // Torrents without attachments + $sql = "SELECT tor.topic_id + FROM ". BB_BT_TORRENTS ." tor + LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id) + WHERE d.attach_id IS NULL + LIMIT $sql_limit"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $orphan_tor[] = $row['topic_id']; + } + // Delete all orphan torrents + if ($orphans_sql = join(',', $orphan_tor)) + { + if ($fix_errors) + { + DB()->query("DELETE FROM ". BB_BT_TORRENTS ." WHERE topic_id IN($orphans_sql)"); + } + } + + // Check post_attachment markers + $sql = "SELECT p.post_id + FROM ". BB_POSTS ." p + LEFT JOIN ". BB_ATTACHMENTS ." a USING(post_id) + WHERE p.post_attachment = 1 + AND a.post_id IS NULL"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $posts_without_attach[] = $row['post_id']; + } + if ($posts_sql = join(',', $posts_without_attach)) + { + if ($fix_errors) + { + DB()->query("UPDATE ". BB_POSTS ." SET post_attachment = 0 WHERE post_id IN($posts_sql)"); + } + } + // Check topic_attachment markers + $sql = "SELECT t.topic_id + FROM ". BB_POSTS ." p, ". BB_TOPICS ." t + WHERE t.topic_id = p.topic_id + AND t.topic_attachment = 1 + GROUP BY p.topic_id + HAVING SUM(p.post_attachment) = 0"; + + foreach (DB()->fetch_rowset($sql) as $row) + { + $topics_without_attach[] = $row['topic_id']; + } + if ($topics_sql = join(',', $topics_without_attach)) + { + if ($fix_errors) + { + DB()->query("UPDATE ". BB_TOPICS ." SET topic_attachment = 0 WHERE topic_id IN($topics_sql)"); + } + } +} +if ($debug_mode) +{ + prn_r($orphan_files, '$orphan_files'); + prn_r($orphan_db_attach, '$orphan_db_attach'); + prn_r($orphan_tor, '$orphan_tor'); + prn_r($posts_without_attach, '$posts_without_attach'); + prn_r($topics_without_attach, '$topics_without_attach'); +} + +DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl"); + +unset($fix_errors, $debug_mode); \ No newline at end of file diff --git a/upload/includes/cron/jobs/bb_maintenance.php b/upload/includes/cron/jobs/bb_maintenance.php index 9936447b6..95602372f 100644 --- a/upload/includes/cron/jobs/bb_maintenance.php +++ b/upload/includes/cron/jobs/bb_maintenance.php @@ -2,259 +2,47 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -$fix_errors = true; -$debug_mode = false; - -$tmp_attach_tbl = 'tmp_attachments'; -$db_max_packet = 800000; -$sql_limit = 3000; - -$check_attachments = false; -$orphan_files = $orphan_db_attach = $orphan_tor = array(); -$posts_without_attach = $topics_without_attach = array(); - -$lock_tables = array( - $tmp_attach_tbl .' f', - BB_ATTACHMENTS_DESC .' d', - BB_ATTACHMENTS_DESC, - BB_ATTACHMENTS .' a', - BB_ATTACHMENTS, - BB_BT_TORRENTS .' tor', - BB_BT_TORRENTS, - BB_POSTS .' p', - BB_POSTS, - BB_PRIVMSGS .' pm', - BB_TOPICS .' t', - BB_TOPICS, -); - -DB()->query(" - CREATE TEMPORARY TABLE $tmp_attach_tbl ( - physical_filename VARCHAR(255) NOT NULL default '', - KEY physical_filename (physical_filename(20)) - ) ENGINE = MyISAM DEFAULT CHARSET = utf8 -"); - -// Get attach_mod config -$attach_dir = get_attachments_dir(); - -// Get all names of existed attachments and insert them into $tmp_attach_tbl -if ($dir = @opendir($attach_dir)) -{ - $check_attachments = true; - $files = array(); - $f_len = 0; - - while (false !== ($f = readdir($dir))) - { - if ($f == 'index.php' || $f == '.htaccess' || is_dir("$attach_dir/$f") || is_link("$attach_dir/$f")) - { - continue; - } - $f = DB()->escape($f); - $files[] = "('$f')"; - $f_len += strlen($f) + 5; - - if ($f_len > $db_max_packet) - { - $files = join(',', $files); - DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files"); - $files = array(); - $f_len = 0; - } - } - if ($files = join(',', $files)) - { - DB()->query("INSERT INTO $tmp_attach_tbl VALUES $files"); - } - closedir($dir); -} - -// Lock tables -# $lock = DB()->lock($lock_tables); - -if ($check_attachments) -{ - // Delete bad records - DB()->query(" - DELETE a, d - FROM ". BB_ATTACHMENTS_DESC ." d - LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id) - WHERE ( - d.physical_filename = '' - OR d.real_filename = '' - OR d.extension = '' - OR d.mimetype = '' - OR d.filesize = 0 - OR d.filetime = 0 - OR a.post_id = 0 - ) - "); - - // Delete attachments that exist in file system but not exist in DB - $sql = "SELECT f.physical_filename - FROM $tmp_attach_tbl f - LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(physical_filename) - WHERE d.physical_filename IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - if ($filename = basename($row['physical_filename'])) - { - if ($fix_errors) - { - @unlink("$attach_dir/$filename"); - @unlink("$attach_dir/". THUMB_DIR .'/t_'. $filename); - } - if ($debug_mode) - { - $orphan_files[] = "$attach_dir/$filename"; - } - } - } - // Find DB records for attachments that exist in DB but not exist in file system - $sql = "SELECT d.attach_id - FROM ". BB_ATTACHMENTS_DESC ." d - LEFT JOIN $tmp_attach_tbl f USING(physical_filename) - WHERE f.physical_filename IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $orphan_db_attach[] = $row['attach_id']; - } - // Attachment exist in DESC_TABLE but not exist in ATTACH_TABLE - $sql = "SELECT d.attach_id - FROM ". BB_ATTACHMENTS_DESC ." d - LEFT JOIN ". BB_ATTACHMENTS ." a USING(attach_id) - WHERE a.attach_id IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $orphan_db_attach[] = $row['attach_id']; - } - // Attachment exist in ATTACH_TABLE but not exist in DESC_TABLE - $sql = "SELECT a.attach_id - FROM ". BB_ATTACHMENTS ." a - LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id) - WHERE d.attach_id IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $orphan_db_attach[] = $row['attach_id']; - } - // Attachments without post - $sql = "SELECT a.attach_id - FROM ". BB_ATTACHMENTS ." a - LEFT JOIN ". BB_POSTS ." p USING(post_id) - WHERE p.post_id IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $orphan_db_attach[] = $row['attach_id']; - } - // Delete all orphan attachments - if ($orphans_sql = join(',', $orphan_db_attach)) - { - if ($fix_errors) - { - DB()->query("DELETE FROM ". BB_ATTACHMENTS_DESC ." WHERE attach_id IN($orphans_sql)"); - DB()->query("DELETE FROM ". BB_ATTACHMENTS ." WHERE attach_id IN($orphans_sql)"); - } - } - - // Torrents without attachments - $sql = "SELECT tor.topic_id - FROM ". BB_BT_TORRENTS ." tor - LEFT JOIN ". BB_ATTACHMENTS_DESC ." d USING(attach_id) - WHERE d.attach_id IS NULL - LIMIT $sql_limit"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $orphan_tor[] = $row['topic_id']; - } - // Delete all orphan torrents - if ($orphans_sql = join(',', $orphan_tor)) - { - if ($fix_errors) - { - DB()->query("DELETE FROM ". BB_BT_TORRENTS ." WHERE topic_id IN($orphans_sql)"); - } - } - - // Check post_attachment markers - $sql = "SELECT p.post_id - FROM ". BB_POSTS ." p - LEFT JOIN ". BB_ATTACHMENTS ." a USING(post_id) - WHERE p.post_attachment = 1 - AND a.post_id IS NULL"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $posts_without_attach[] = $row['post_id']; - } - if ($posts_sql = join(',', $posts_without_attach)) - { - if ($fix_errors) - { - DB()->query("UPDATE ". BB_POSTS ." SET post_attachment = 0 WHERE post_id IN($posts_sql)"); - } - } - // Check topic_attachment markers - $sql = "SELECT t.topic_id - FROM ". BB_POSTS ." p, ". BB_TOPICS ." t - WHERE t.topic_id = p.topic_id - AND t.topic_attachment = 1 - GROUP BY p.topic_id - HAVING SUM(p.post_attachment) = 0"; - - foreach (DB()->fetch_rowset($sql) as $row) - { - $topics_without_attach[] = $row['topic_id']; - } - if ($topics_sql = join(',', $topics_without_attach)) - { - if ($fix_errors) - { - DB()->query("UPDATE ". BB_TOPICS ." SET topic_attachment = 0 WHERE topic_id IN($topics_sql)"); - } - } -} -if ($debug_mode) -{ - prn_r($orphan_files, '$orphan_files'); - prn_r($orphan_db_attach, '$orphan_db_attach'); - prn_r($orphan_tor, '$orphan_tor'); - prn_r($posts_without_attach, '$posts_without_attach'); - prn_r($topics_without_attach, '$topics_without_attach'); -} - -// Unlock tables -# $unlock = DB()->unlock(); - -DB()->query("DROP TEMPORARY TABLE $tmp_attach_tbl"); - -unset($fix_errors, $debug_mode); - -// Sync require_once(INC_DIR .'functions_admin.php'); + +// Синхронизация sync('topic', 'all'); sync('forum', 'all'); sync('user_posts', 'all'); -// Clean "user_newpasswd" -DB()->query(" - UPDATE ". BB_USERS ." SET - user_newpasswd = '' - WHERE user_lastvisit < ". (TIMENOW - 7*86400) ." -"); +// Чистка bb_poll_users +if ($poll_max_days = (int) $bb_cfg['poll_max_days']) +{ + $per_cycle = 20000; + $row = DB()->fetch_row("SELECT MIN(topic_id) AS start_id, MAX(topic_id) AS finish_id FROM ". BB_POLL_USERS); + $start_id = (int) $row['start_id']; + $finish_id = (int) $row['finish_id']; -// Clean posts cache + while (true) + { + set_time_limit(600); + $end_id = $start_id + $per_cycle - 1; + + DB()->query(" + DELETE FROM ". BB_POLL_USERS ." + WHERE topic_id BETWEEN $start_id AND $end_id + AND vote_dt < DATE_SUB(NOW(), INTERVAL $poll_max_days DAY) + "); + if ($end_id > $finish_id) + { + break; + } + if (!($start_id % ($per_cycle*10))) + { + sleep(1); + } + $start_id += $per_cycle; + } +} + +// Чистка user_newpasswd +DB()->query("UPDATE ". BB_USERS ." SET user_newpasswd = '' WHERE user_lastvisit < ". (TIMENOW - 7*86400)); + +// Чистка кеша постов if ($posts_days = intval($bb_cfg['posts_cache_days_keep'])) { DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_html_time < DATE_SUB(NOW(), INTERVAL $posts_days DAY)"); diff --git a/upload/includes/cron/jobs/cache_gc.php b/upload/includes/cron/jobs/cache_gc.php index 4aebb9826..56fac64bf 100644 --- a/upload/includes/cron/jobs/cache_gc.php +++ b/upload/includes/cron/jobs/cache_gc.php @@ -3,11 +3,12 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); $gc_cache = array( - 'tr_cache', 'bb_cache', + 'tr_cache', 'session_cache', - 'bb_login_err', 'bb_cap_sid', + 'bb_login_err', + 'bb_poll_data', ); foreach ($gc_cache as $cache_name) @@ -15,6 +16,6 @@ foreach ($gc_cache as $cache_name) if (method_exists(CACHE($cache_name), 'gc')) { $changes = CACHE($cache_name)->gc(); - $cron_runtime_log = date('Y-m-d H:i:s') ." -- tr -- $changes rows deleted\n"; + $cron_runtime_log .= date('Y-m-d H:i:s') ." -- ". str_pad("$cache_name ", 25, '-', STR_PAD_RIGHT) ." del: $changes\n"; } } \ No newline at end of file diff --git a/upload/includes/emailer.class.php b/upload/includes/emailer.class.php index f1c464b37..fdf2f5c6a 100644 --- a/upload/includes/emailer.class.php +++ b/upload/includes/emailer.class.php @@ -100,11 +100,11 @@ class emailer { $tpl_file = LANG_ROOT_DIR ."lang_$template_lang/email/$template_file.tpl"; - if (!@file_exists(@phpbb_realpath($tpl_file))) + if (!@file_exists(@bb_realpath($tpl_file))) { $tpl_file = LANG_ROOT_DIR ."lang_{$bb_cfg['default_lang']}/email/$template_file.tpl"; - if (!@file_exists(@phpbb_realpath($tpl_file))) + if (!@file_exists(@bb_realpath($tpl_file))) { message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__); } diff --git a/upload/includes/functions.php b/upload/includes/functions.php index bef0f7b38..00d0f2351 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -188,7 +188,7 @@ class ads_common // define('AUTH_LIST_ALL', 0); -// forum's ACL types (phpbb_forums: auth_view, auth_read... values) +// forum's ACL types (bb_forums: auth_view, auth_read... values) define('AUTH_REG', 1); define('AUTH_ACL', 2); define('AUTH_ADMIN', 5); @@ -1344,13 +1344,13 @@ function get_db_stat($mode) function clean_username($username) { $username = mb_substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25, 'UTF-8'); - $username = phpbb_rtrim($username, "\\"); + $username = bb_rtrim($username, "\\"); $username = str_replace("'", "\'", $username); return $username; } -function phpbb_ltrim($str, $charlist = false) +function bb_ltrim($str, $charlist = false) { if ($charlist === false) { @@ -1362,7 +1362,7 @@ function phpbb_ltrim($str, $charlist = false) return $str; } -function phpbb_rtrim($str, $charlist = false) +function bb_rtrim($str, $charlist = false) { if ($charlist === false) { @@ -1804,7 +1804,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add // This does exactly what preg_quote() does in PHP 4-ish // If you just need the 1-parameter preg_quote call, then don't bother using this. // -function phpbb_preg_quote($str, $delimiter) +function bb_preg_quote($str, $delimiter) { $text = preg_quote($str); $text = str_replace($delimiter, '\\' . $delimiter, $text); @@ -1928,7 +1928,7 @@ function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = '' // Critical errors mean we cannot rely on _ANY_ DB information being // available so we're going to dump out a simple echo'd statement if (!$msg_text) $msg_text = $lang['A_CRITICAL_ERROR']; - if (!$msg_title) $msg_title = 'phpBB : Critical Error'; + if (!$msg_title) $msg_title = 'BB : Critical Error'; break; } // Add on DEBUG info if we've enabled debug mode and this is an error. This @@ -1981,7 +1981,7 @@ function bb_simple_die ($txt) die($txt); } -function phpbb_realpath($path) +function bb_realpath($path) { return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path); } diff --git a/upload/includes/functions_report_admin.php b/upload/includes/functions_report_admin.php index 9244ec214..ff0a155de 100644 --- a/upload/includes/functions_report_admin.php +++ b/upload/includes/functions_report_admin.php @@ -78,7 +78,7 @@ function report_modules_inactive($mode = 'all', $module = null) while ($file = @readdir($dir)) { - if (!preg_match('#(.*)\.' . phpbb_preg_quote('php', '#') . '$#', $file, $matches)) + if (!preg_match('#(.*)\.' . bb_preg_quote('php', '#') . '$#', $file, $matches)) { continue; } diff --git a/upload/includes/functions_selects.php b/upload/includes/functions_selects.php index 1109aea6a..f29811aa6 100644 --- a/upload/includes/functions_selects.php +++ b/upload/includes/functions_selects.php @@ -15,7 +15,7 @@ function language_select ($default, $select_name = "language", $dirname="languag $lang = array(); while ( $file = readdir($dir) ) { - if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath(BB_ROOT . $dirname . '/' . $file)) && !is_link(@phpbb_realpath(BB_ROOT . $dirname . '/' . $file))) + if (preg_match('#^lang_#i', $file) && !is_file(@bb_realpath(BB_ROOT . $dirname . '/' . $file)) && !is_link(@bb_realpath(BB_ROOT . $dirname . '/' . $file))) { $filename = trim(str_replace("lang_", "", $file)); $displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename); diff --git a/upload/includes/page_footer.php b/upload/includes/page_footer.php index f5ed8777d..953fe2016 100644 --- a/upload/includes/page_footer.php +++ b/upload/includes/page_footer.php @@ -9,7 +9,6 @@ if (!empty($template)) $template->assign_vars(array( 'SIMPLE_FOOTER' => !empty($gen_simple_header), 'POWERED' => base64_decode($lang['POWERED']), - 'TRANSLATION_INFO' => isset($lang['TRANSLATION_INFO']) ? $lang['TRANSLATION_INFO'] : '', 'SHOW_ADMIN_LINK' => (IS_ADMIN && !defined('IN_ADMIN')), 'ADMIN_LINK_HREF' => "admin/index.php", diff --git a/upload/includes/sql_parse.php b/upload/includes/sql_parse.php index 45e29ce20..65e3f48c9 100644 --- a/upload/includes/sql_parse.php +++ b/upload/includes/sql_parse.php @@ -1,32 +1,4 @@ tags + // Replace tags $search = array('', ''); $replace = array('<'.'?php ', ' ?'.'>'); $code = str_replace($search, $replace, $code); diff --git a/upload/includes/ucp/usercp_avatar.php b/upload/includes/ucp/usercp_avatar.php index f8cf3445a..a250c564d 100644 --- a/upload/includes/ucp/usercp_avatar.php +++ b/upload/includes/ucp/usercp_avatar.php @@ -39,7 +39,7 @@ function user_avatar_delete ($avatar_type, $avatar_file) $avatar_file = basename($avatar_file); if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' ) { - if ( @file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file)) ) + if ( @file_exists(@bb_realpath('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file)) ) { @unlink('./' . $bb_cfg['avatar_path'] . '/' . $avatar_file); } @@ -52,8 +52,8 @@ function user_avatar_gallery ($mode, &$errors, $avatar_filename, $avatar_categor { global $bb_cfg; - $avatar_filename = phpbb_ltrim(basename($avatar_filename), "'"); - $avatar_category = phpbb_ltrim(basename($avatar_category), "'"); + $avatar_filename = bb_ltrim(basename($avatar_filename), "'"); + $avatar_category = bb_ltrim(basename($avatar_category), "'"); if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename)) { @@ -64,7 +64,7 @@ function user_avatar_gallery ($mode, &$errors, $avatar_filename, $avatar_categor return ''; } - if ( file_exists(@phpbb_realpath($bb_cfg['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') ) + if ( file_exists(@bb_realpath($bb_cfg['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') ) { return array('user_avatar' => DB()->escape($avatar_category . '/' . $avatar_filename), 'user_avatar_type' => USER_AVATAR_GALLERY); } @@ -83,7 +83,7 @@ function user_avatar_upload ($mode, $avatar_mode, &$current_avatar, &$current_ty $width = $height = 0; $type = ''; - if ( ( file_exists(@phpbb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) ) + if ( ( file_exists(@bb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) ) { if ( $avatar_filesize <= $bb_cfg['avatar_filesize'] && $avatar_filesize > 0 ) { diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php index 766d9305a..cdbf08349 100644 --- a/upload/includes/ucp/usercp_register.php +++ b/upload/includes/ucp/usercp_register.php @@ -152,12 +152,12 @@ switch ($mode) { $template->assign_block_vars('switch_avatar_block', array()); - if ($bb_cfg['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_path']))) + if ($bb_cfg['allow_avatar_upload'] && file_exists(@bb_realpath('./' . $bb_cfg['avatar_path']))) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array()); } - if ($bb_cfg['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $bb_cfg['avatar_gallery_path']))) + if ($bb_cfg['allow_avatar_local'] && file_exists(@bb_realpath('./' . $bb_cfg['avatar_gallery_path']))) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array()); } diff --git a/upload/language/lang_english/lang_main.php b/upload/language/lang_english/lang_main.php index 0c25d53f0..5255a5b20 100644 --- a/upload/language/lang_english/lang_main.php +++ b/upload/language/lang_english/lang_main.php @@ -2,7 +2,6 @@ setlocale(LC_ALL, 'eu_US.UTF-8'); $lang['CONTENT_ENCODING'] = 'UTF-8'; -$lang['TRANSLATION_INFO'] = ''; // // Common, these terms are used @@ -95,6 +94,7 @@ $lang['CLICK_RETURN_GROUP'] = 'Click %sHere%s to return to group information'; $lang['ADMIN_PANEL'] = 'Go to Administration Panel'; $lang['ALL_CACHE'] = 'All cache'; $lang['ALL_CACHE_CLEARED'] = 'Cache has been cleared'; +$lang['ALL_TEMPLATE_CLEARED'] = 'Template cache has been cleared'; $lang['DATASTORE'] = 'Datastore'; $lang['DATASTORE_CLEARED'] = 'Datastore has been cleared'; $lang['BOARD_DISABLE'] = 'Sorry, but this board is currently unavailable. Please try again later.'; diff --git a/upload/language/lang_russian/lang_main.php b/upload/language/lang_russian/lang_main.php index 87c970077..63cc05854 100644 --- a/upload/language/lang_russian/lang_main.php +++ b/upload/language/lang_russian/lang_main.php @@ -1,7 +1,6 @@ = 0) text = "\n" + text + "\n"; return text; } - } // Emulation of innerText for Mozilla. @@ -441,5 +440,4 @@ function transliterate (msg, e) if (e) e.disabled = false; }, 1); } - -// Translit END +// Translit END \ No newline at end of file diff --git a/upload/templates/admin/admin_groups.tpl b/upload/templates/admin/admin_groups.tpl index 4473c7fac..076a978b6 100644 --- a/upload/templates/admin/admin_groups.tpl +++ b/upload/templates/admin/admin_groups.tpl @@ -23,7 +23,7 @@ {L_GROUP_MODERATOR}: -   +   {L_GROUP_STATUS}: diff --git a/upload/templates/admin/admin_ug_auth.tpl b/upload/templates/admin/admin_ug_auth.tpl index 1d0ce49dc..34d2cf2ff 100644 --- a/upload/templates/admin/admin_ug_auth.tpl +++ b/upload/templates/admin/admin_ug_auth.tpl @@ -284,7 +284,7 @@ function mark_changed (f_id, acl_id)

- +

diff --git a/upload/templates/admin/admin_user_ban.tpl b/upload/templates/admin/admin_user_ban.tpl index d5d6e51ac..4ffbd74c8 100644 --- a/upload/templates/admin/admin_user_ban.tpl +++ b/upload/templates/admin/admin_user_ban.tpl @@ -12,7 +12,7 @@ {L_USERNAME}: - {S_HIDDEN_FIELDS} + {S_HIDDEN_FIELDS} {L_UNBAN_USERNAME} diff --git a/upload/templates/admin/index.tpl b/upload/templates/admin/index.tpl index 0d17296d6..2027983cd 100644 --- a/upload/templates/admin/index.tpl +++ b/upload/templates/admin/index.tpl @@ -10,16 +10,9 @@ - - + + - - - <body bgcolor="#FFFFFF" text="#000000"> - <p>Sorry, your browser doesn't seem to support frames</p> - </body> - - @@ -62,18 +55,21 @@ table.forumline { margin: 0 auto; }
@@ -82,23 +78,23 @@ ajax.callback.manage_user = function(data) { {L_CLEAR_CACHE}: - {L_DATASTORE},  - {L_ALL_CACHE},  - {L_TEMPLATES} + {L_DATASTORE},  + {L_ALL_CACHE},  + {L_TEMPLATES} {L_UPDATE}: - {L_USER_LEVELS} - {L_INDEXER} + {L_USER_LEVELS} + {L_INDEXER} {L_SYNCHRONIZE}: - {L_TOPICS},  - {L_USER_POSTS_COUNT} + {L_TOPICS},  + {L_USER_POSTS_COUNT} @@ -116,13 +112,15 @@ ajax.callback.manage_user = function(data) { {L_TP_VERSION}: - {$bb_cfg['tp_version']} ({$bb_cfg['tp_release_state']}) + {$bb_cfg['tp_version']} [{$bb_cfg['tp_release_state']}] {L_TP_RELEASE_DATE}: {$bb_cfg['tp_release_date']} +
+

{L_FORUM_STATS}

@@ -163,6 +161,7 @@ ajax.callback.manage_user = function(data) {
{GZIP_COMPRESSION}
+

{L_WHOSONLINE}

@@ -197,5 +196,4 @@ ajax.callback.manage_user = function(data) { - - + \ No newline at end of file diff --git a/upload/templates/default/groupcp.tpl b/upload/templates/default/groupcp.tpl index d7744787d..9b4746fcb 100644 --- a/upload/templates/default/groupcp.tpl +++ b/upload/templates/default/groupcp.tpl @@ -171,7 +171,7 @@

- +

diff --git a/upload/templates/default/posting.tpl b/upload/templates/default/posting.tpl index 50a6170fd..6b54ed19c 100644 --- a/upload/templates/default/posting.tpl +++ b/upload/templates/default/posting.tpl @@ -79,7 +79,7 @@ {L_USERNAME}   - + @@ -105,7 +105,7 @@ - {L_MORE_EMOTICONS} + {L_MORE_EMOTICONS} diff --git a/upload/templates/default/search.tpl b/upload/templates/default/search.tpl index 848a073a6..0b29cb93c 100644 --- a/upload/templates/default/search.tpl +++ b/upload/templates/default/search.tpl @@ -29,7 +29,7 @@

  - +

{L_AUTHOR}
-

style="color: red" class="post" type="text" size="16" maxlength="{POSTER_NAME_MAX}" name="{POSTER_NAME_NAME}" value="{POSTER_NAME_VAL}" />

+

style="color: red" class="post" type="text" size="16" maxlength="{POSTER_NAME_MAX}" name="{POSTER_NAME_NAME}" value="{POSTER_NAME_VAL}" />