diff --git a/upload/admin/admin_rebuild_search.php b/upload/admin/admin_rebuild_search.php
index 1c30cdc3c..a362c702f 100644
--- a/upload/admin/admin_rebuild_search.php
+++ b/upload/admin/admin_rebuild_search.php
@@ -201,7 +201,7 @@ if ($mode == 'submit' || $mode == 'refresh')
'search_words' => add_search_words($row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject']), true),
);
- $timer_expired = (time() > $expire_time);
+ $timer_expired = (TIMENOW > $expire_time);
$num_rows++;
}
@@ -212,7 +212,7 @@ if ($mode == 'submit' || $mode == 'refresh')
}
// find how much time the last cycle took
- $last_cycle_time = intval(time() - $start_time);
+ $last_cycle_time = intval(TIMENOW - $start_time);
// check if we had any data
if ($num_rows != 0)
@@ -222,7 +222,7 @@ if ($mode == 'submit' || $mode == 'refresh')
// insert a new session entry
$args = DB()->build_array('INSERT', array(
'end_post_id' => (int) $end_post_id,
- 'end_time' => (int) time(),
+ 'end_time' => (int) TIMENOW,
'last_cycle_time' => (int) $last_cycle_time,
'session_time' => (int) $last_cycle_time,
'session_posts' => (int) $num_rows,
@@ -240,7 +240,7 @@ if ($mode == 'submit' || $mode == 'refresh')
DB()->query("
UPDATE ". BB_SEARCH_REBUILD ." SET
end_post_id = $end_post_id,
- end_time = ". time() .",
+ end_time = ". TIMENOW .",
last_cycle_time = $last_cycle_time,
session_time = session_time + $last_cycle_time,
session_posts = session_posts + $num_rows,
@@ -255,7 +255,7 @@ if ($mode == 'submit' || $mode == 'refresh')
$template->assign_vars(array('TPL_REBUILD_SEARCH_PROGRESS' => true));
$processing_messages = '';
- $processing_messages .= ($timer_expired) ? sprintf($lang['TIMER_EXPIRED'], time() - $start_time) : '';
+ $processing_messages .= ($timer_expired) ? sprintf($lang['TIMER_EXPIRED'], TIMENOW - $start_time) : '';
$processing_messages .= ($start == 0 && $clear_search) ? $lang['CLEARED_SEARCH_TABLES'] : '';
// check if we have reached the end of our post processing
@@ -350,7 +350,7 @@ if ($mode == 'submit' || $mode == 'refresh')
'TOTAL_DETAILS' => sprintf($lang['PROCESS_DETAILS'], $total_posts_processed - $num_rows + 1, $total_posts_processed, $total_posts),
'TOTAL_PERCENT' => sprintf($lang['PERCENT_COMPLETED'], round($total_percent, 2)),
- 'LAST_CYCLE_TIME' => delta_time(time()),
+ 'LAST_CYCLE_TIME' => delta_time(TIMENOW),
'SESSION_TIME' => delta_time($last_session_data['start_time']),
'SESSION_AVERAGE_CYCLE_TIME'=> delta_time($session_average_cycle_time, 0),
'SESSION_ESTIMATED_TIME' => delta_time($session_estimated_time, 0),
@@ -399,7 +399,7 @@ else // show the input page
{
$last_saved_processing = sprintf($lang['INFO_PROCESSING_ABORTED'], $last_saved_post_id, $total_posts_processed, $last_saved_date);
// check if the interrupted cycle has finished
- if ( time() - $last_session_data['end_time'] < $last_session_data['last_cycle_time'] )
+ if ( TIMENOW - $last_session_data['end_time'] < $last_session_data['last_cycle_time'] )
{
$last_saved_processing .= '
'.$lang['INFO_PROCESSING_ABORTED_SOON'];
}
diff --git a/upload/admin/admin_user_search.php b/upload/admin/admin_user_search.php
index 11eba184d..00e8709be 100644
--- a/upload/admin/admin_user_search.php
+++ b/upload/admin/admin_user_search.php
@@ -953,7 +953,7 @@ else
$base_url .= "&search_lastvisited=true&lastvisited_type=".rawurlencode(stripslashes($lastvisited_type))."&lastvisited_days=".rawurlencode($lastvisited_days);
- $lastvisited_seconds = ( time() - ( ( ( $lastvisited_days * 24 ) * 60 ) * 60 ) );
+ $lastvisited_seconds = ( TIMENOW - ( ( ( $lastvisited_days * 24 ) * 60 ) * 60 ) );
switch($lastvisited_type)
{
diff --git a/upload/admin/index.php b/upload/admin/index.php
index 5d5bc57b4..930f97f0c 100644
--- a/upload/admin/index.php
+++ b/upload/admin/index.php
@@ -71,7 +71,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
$start_date = bb_date($bb_cfg['board_startdate']);
- $boarddays = ( time() - $bb_cfg['board_startdate'] ) / 86400;
+ $boarddays = ( TIMENOW - $bb_cfg['board_startdate'] ) / 86400;
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
@@ -133,23 +133,43 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
// in phpMyAdmin 2.2.0
//
- $dbsize = $lang['NOT_AVAILABLE'];
-
- if ( is_integer($dbsize) )
+ $sql = "SELECT VERSION() AS mysql_version";
+ if($result = DB()->sql_query($sql))
{
- if( $dbsize >= 1048576 )
+ $row = DB()->sql_fetchrow($result);
+ $version = $row['mysql_version'];
+
+ if( preg_match("/^(3\.23|4\.|5\.)/", $version) )
{
- $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 ));
- }
- else if( $dbsize >= 1024 )
- {
- $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 ));
+ $dblist = array();
+ foreach($bb_cfg['db'] as $name => $row)
+ {
$sql = "SHOW TABLE STATUS
+ FROM {$row[1]}";
+ if($result = DB()->sql_query($sql))
+ {
+ $tabledata_ary = DB()->sql_fetchrowset($result);
+
+ $dbsize = 0;
+ for($i = 0; $i < count($tabledata_ary); $i++)
+ {
+ if( @$tabledata_ary[$i]['Type'] != "MRG_MyISAM" )
+ {
+ $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
+ }
+ }
+ $dblist[] = ''. humn_size($dbsize) .'';
+ }
}
+ $dbsize = implode(' | ', $dblist);
}
else
{
- $dbsize = sprintf("%.2f Bytes", $dbsize);
+ $dbsize = $lang['Not_available'];
}
}
+ else
+ {
+ $dbsize = $lang['Not_available'];
+ }
$template->assign_vars(array(
"NUMBER_OF_POSTS" => $total_posts,
@@ -179,7 +199,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
WHERE s.session_logged_in = 1
AND u.user_id = s.session_user_id
AND u.user_id <> " . ANONYMOUS . "
- AND s.session_time >= " . ( time() - 300 ) . "
+ AND s.session_time >= " . ( TIMENOW - 300 ) . "
ORDER BY s.session_ip ASC, s.session_time DESC";
if(!$result = DB()->sql_query($sql))
{
@@ -190,7 +210,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
$sql = "SELECT session_logged_in, session_time, session_ip, session_start
FROM " . BB_SESSIONS . "
WHERE session_logged_in = 0
- AND session_time >= " . ( time() - 300 ) . "
+ AND session_time >= " . ( TIMENOW - 300 ) . "
ORDER BY session_ip ASC, session_time DESC";
if(!$result = DB()->sql_query($sql))
{
diff --git a/upload/admin/xs_config.php b/upload/admin/xs_config.php
index 948ac4c88..52b9d3b4a 100644
--- a/upload/admin/xs_config.php
+++ b/upload/admin/xs_config.php
@@ -60,7 +60,7 @@ if(isset($_POST['submit']) && !defined('DEMO_MODE'))
}
if($update_time)
{
- $bb_cfg['xs_template_time'] = time() + 10; // set time 10 seconds in future in case if some tpl file would be compiled right now with current settings
+ $bb_cfg['xs_template_time'] = TIMENOW + 10; // set time 10 seconds in future in case if some tpl file would be compiled right now with current settings
bb_update_config(array('xs_template_time' => $bb_cfg['xs_template_time']));
}
$template->assign_block_vars('switch_updated', array());
diff --git a/upload/ajax/change_tor_status.php b/upload/ajax/change_tor_status.php
index 89f9b0505..aafe3a128 100644
--- a/upload/ajax/change_tor_status.php
+++ b/upload/ajax/change_tor_status.php
@@ -69,4 +69,4 @@ if ($tor['tor_status'] != TOR_NOT_APPROVED && $tor['checked_user_id'] != $userda
change_tor_status($attach_id, $new_status);
$this->response['attach_id'] = $attach_id;
-$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' '. $lang['TOR_STATUS_NAME'][$new_status]. ' · ' . $userdata['username'] . ' · '. delta_time(time()) . $lang['BACK']. '';
\ No newline at end of file
+$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' '. $lang['TOR_STATUS_NAME'][$new_status]. ' · ' . $userdata['username'] . ' · '. delta_time(TIMENOW) . $lang['BACK']. '';
\ No newline at end of file
diff --git a/upload/ajax/posts.php b/upload/ajax/posts.php
index ff495c9fe..9dffced57 100644
--- a/upload/ajax/posts.php
+++ b/upload/ajax/posts.php
@@ -142,34 +142,6 @@ switch($this->request['type'])
$this->ajax_die(sprintf($lang['SORRY_AUTH_EDIT'], strip_tags($is_auth['auth_edit_type'])));
}
- // Запрет на редактирование раздачи юзером
- if ($post['allow_reg_tracker'] && ($post['topic_first_post_id'] == $post_id) && !IS_AM)
- {
- $tor_status = DB()->fetch_row("SELECT tor_status FROM ". BB_BT_TORRENTS ." WHERE topic_id = {$post['topic_id']} LIMIT 1", 'tor_status');
- if ($tor_status != false)
- {
- // по статусу раздачи
- if (isset($bb_cfg['tor_cannot_edit'][$tor_status]))
- {
- $this->ajax_die($lang['NOT_EDIT_TOR_STATUS'] .' - '. $lang['TOR_STATUS_NAME'][$tor_status]);
- }
- // проверенный, через время
- if ($tor_status == TOR_APPROVED)
- {
- $days_after_last_edit = $bb_cfg['dis_edit_tor_after_days'];
- $last_edit_time = max($post['post_time'], $post['post_edit_time']) + 86400*$days_after_last_edit;
- $disallowed_by_forum_perm = in_array($post['forum_id'], $bb_cfg['dis_edit_tor_forums']);
- $disallowed_by_user_opt = bf($user->opt, 'user_opt', 'allow_post_edit');
-
- if ($last_edit_time < TIMENOW && ($disallowed_by_forum_perm || $disallowed_by_user_opt))
- {
- $how_msg = ($disallowed_by_user_opt) ? $lang['EDIT_POST_NOT_1'] : $lang['EDIT_POST_NOT_2'];
- $this->ajax_die("$how_msg" .$lang['EDIT_POST_AJAX']. $lang['TOR_STATUS_NAME'][$tor_status] . $lang['AFTER_THE_LAPSE']. "$days_after_last_edit" . $lang['TOR_STATUS_DAYS']);
- }
- }
- }
- }
-
$hidden_form = '';
$hidden_form .= '';
$hidden_form .= '';
@@ -268,8 +240,7 @@ switch($this->request['type'])
$sql = "
SELECT pt.post_text
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
- WHERE
- $where_sql
+ WHERE $where_sql
AND p.post_time = ". (int) $row['last_post_time'] ."
AND pt.post_id = p.post_id
LIMIT 1
diff --git a/upload/attach_mod/includes/functions_admin.php b/upload/attach_mod/includes/functions_admin.php
index 307187d71..55ceb5cee 100644
--- a/upload/attach_mod/includes/functions_admin.php
+++ b/upload/attach_mod/includes/functions_admin.php
@@ -338,7 +338,7 @@ function search_attachments($order_by, &$total_rows)
// Search Attachment Time
if ($search_days_greater != '')
{
- $where_sql[] = ' (a.filetime < ' . ( time() - ((int) $search_days_greater * 86400)) . ') ';
+ $where_sql[] = ' (a.filetime < ' . ( TIMENOW - ((int) $search_days_greater * 86400)) . ') ';
}
// Search Forum
diff --git a/upload/attach_mod/posting_attachments.php b/upload/attach_mod/posting_attachments.php
index 86ba2e9e0..5749a6d18 100644
--- a/upload/attach_mod/posting_attachments.php
+++ b/upload/attach_mod/posting_attachments.php
@@ -61,7 +61,7 @@ class attach_parent
function get_quota_limits($userdata_quota, $user_id = 0)
{
global $attach_config;
-
+
// $priority = 'group;user';
$priority = 'user;group';
@@ -966,7 +966,7 @@ class attach_parent
{
//
// Prepare Values
- $this->filetime = time();
+ $this->filetime = TIMENOW;
$this->filename = $r_file;
diff --git a/upload/bt/includes/init_tr.php b/upload/bt/includes/init_tr.php
index a96d06b06..50c093a8f 100644
--- a/upload/bt/includes/init_tr.php
+++ b/upload/bt/includes/init_tr.php
@@ -20,7 +20,7 @@ function tracker_exit ()
$sql_total_perc = round($DBS->sql_timetotal*100/$gen_time);
$str = array();
- $str[] = substr(time(), -4, 4);
+ $str[] = substr(TIMENOW, -4, 4);
$str[] = sprintf('%.4f', $gen_time);
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_inittime, $sql_init_perc);
$str[] = sprintf('%.4f'. LOG_SEPR .'%02d%%', $DBS->sql_timetotal, $sql_total_perc);
diff --git a/upload/includes/cron/cron_check.php b/upload/includes/cron/cron_check.php
index 012a0b30f..5c211ff02 100644
--- a/upload/includes/cron/cron_check.php
+++ b/upload/includes/cron/cron_check.php
@@ -30,7 +30,7 @@ if ($cron_jobs)
require(CRON_DIR .'cron_run.php');
// Update cron_last_check
- bb_update_config(array('cron_last_check' => (time() + 10)));
+ bb_update_config(array('cron_last_check' => (TIMENOW + 10)));
}
else
{
diff --git a/upload/includes/emailer.class.php b/upload/includes/emailer.class.php
index 5625e9152..ef0d180af 100644
--- a/upload/includes/emailer.class.php
+++ b/upload/includes/emailer.class.php
@@ -177,7 +177,7 @@ class emailer
// Build header
//$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
- $this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
+ $this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(TIMENOW)) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', TIMENOW) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
// Send message ... removed $this->encode() from subject for time being
if ( $this->use_smtp )
diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php
index 306ec9787..761a8023f 100644
--- a/upload/includes/functions_post.php
+++ b/upload/includes/functions_post.php
@@ -108,7 +108,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
{
global $userdata, $post_info, $is_auth, $bb_cfg, $lang;
- $current_time = time();
+ $current_time = TIMENOW;
// Flood control
$row = null;
@@ -453,7 +453,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
return;
}
- $current_time = time();
+ $current_time = TIMENOW;
if ($mode != 'delete')
{
@@ -633,7 +633,7 @@ function insert_post ($mode, $topic_id, $forum_id = '', $old_forum_id = '', $new
$post_username = $post_subject = $post_text = $poster_ip = '';
- $post_time = $current_time = time();
+ $post_time = $current_time = TIMENOW;
$username = $userdata['username'];
$user_id = $userdata['user_id'];
diff --git a/upload/includes/functions_report.php b/upload/includes/functions_report.php
index 997b82a83..a2d96a5d1 100644
--- a/upload/includes/functions_report.php
+++ b/upload/includes/functions_report.php
@@ -144,7 +144,7 @@ function report_modules($mode = 'all', $module = null)
$module_names[$row['report_module_name']] = $row['report_module_id'];
// Delete old reports
- if ($row['report_module_prune'] && $row['report_module_last_prune'] + ($row['report_module_prune'] * 3600) < time())
+ if ($row['report_module_prune'] && $row['report_module_last_prune'] + ($row['report_module_prune'] * 3600) < TIMENOW)
{
report_prune($row['report_module_id'], $row['report_module_prune'] * 86400);
@@ -997,7 +997,7 @@ function report_prune($module_id, $prune_time)
ON rc.report_change_id = r.report_last_change
WHERE r.report_module_id = ' . (int) $module_id . '
AND r.report_status IN(' . REPORT_CLEARED . ', ' . REPORT_DELETE . ')
- AND rc.report_change_time < ' . (time() - (int) $prune_time);
+ AND rc.report_change_time < ' . (TIMENOW - (int) $prune_time);
if (!$result = DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not obtain old reports', '', __LINE__, __FILE__, $sql);
@@ -1021,7 +1021,7 @@ function report_prune($module_id, $prune_time)
// Set last prune date
//
$sql = 'UPDATE ' . BB_REPORTS_MODULES . '
- SET report_module_last_prune = ' . time() . '
+ SET report_module_last_prune = ' . TIMENOW . '
WHERE report_module_id = ' . (int) $module_id;
if (!DB()->sql_query($sql))
{
@@ -1071,7 +1071,7 @@ function report_insert($module_id, $report_subject, $report_reason, $report_titl
//
$sql = 'INSERT INTO ' . BB_REPORTS . ' (user_id, report_time, report_module_id, report_status, report_reason_id,
report_subject, report_subject_data, report_title, report_desc)
- VALUES (' . $userdata['user_id'] . ', ' . time() . ', ' . (int) $module_id . ', ' . REPORT_NEW . ', ' . (int) $report_reason . ',
+ VALUES (' . $userdata['user_id'] . ', ' . TIMENOW . ', ' . (int) $module_id . ', ' . REPORT_NEW . ', ' . (int) $report_reason . ',
' . (int) $report_subject . ", $report_subject_data_sql, '" . DB()->escape($report_title) . "',
'" . DB()->escape($report_desc) . "')";
if (!DB()->sql_query($sql))
@@ -1083,7 +1083,7 @@ function report_insert($module_id, $report_subject, $report_reason, $report_titl
$report = array(
'report_id' => $report_id,
- 'report_time' => time(),
+ 'report_time' => TIMENOW,
'report_module_id' => $module_id,
'report_reason_id' => $report_reason,
'report_subject' => $report_subject,
@@ -1189,7 +1189,7 @@ function reports_update_status($report_ids, $report_status, $comment = '', $auth
foreach ($report_ids as $report_id)
{
$sql = 'INSERT INTO ' . BB_REPORTS_CHANGES . " (report_id, user_id, report_change_time, report_status, report_change_comment)
- VALUES($report_id, " . $userdata['user_id'] . ', ' . time() . ", $report_status, '$comment')";
+ VALUES($report_id, " . $userdata['user_id'] . ', ' . TIMENOW . ", $report_status, '$comment')";
if (!DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not insert report change', __LINE__, __FILE__, $sql);
diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php
index 493d90272..c0b7d9d44 100644
--- a/upload/includes/init_bb.php
+++ b/upload/includes/init_bb.php
@@ -544,13 +544,16 @@ $datastore->enqueue(array(
'cat_forums',
));
+// Дата старта вашего проэкта
+if(!$bb_cfg['board_startdate']) bb_update_config(array('board_startdate' => TIMENOW));
+
// Cron
if ((empty($_POST) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_SERVICE') && !file_exists(CRON_RUNNING) && ($bb_cfg['cron_enabled'] || defined('START_CRON'))) || defined('FORCE_CRON'))
{
if (TIMENOW - $bb_cfg['cron_last_check'] > $bb_cfg['cron_check_interval'])
{
// Update cron_last_check
- bb_update_config(array('cron_last_check' => (time() + 10)));
+ bb_update_config(array('cron_last_check' => (TIMENOW + 10)));
define('CRON_LOG_ENABLED', true); // global ON/OFF
define('CRON_FORCE_LOG', false); // always log regardless of job settings
diff --git a/upload/includes/template.php b/upload/includes/template.php
index 477619919..014ebf997 100644
--- a/upload/includes/template.php
+++ b/upload/includes/template.php
@@ -899,7 +899,7 @@ class Template {
continue;
}
$line = '<'.'?php ';
- $filehash = md5($params_str . $this->include_count . time());
+ $filehash = md5($params_str . $this->include_count . TIMENOW);
$line .= ' $this->set_filename(\'xs_include_' . $filehash . '\', \'' . $params_str .'\', true); ';
$line .= ' $this->pparse(\'xs_include_' . $filehash . '\'); ';
$line .= ' ?'.'>';
diff --git a/upload/includes/ucp/torrent_userprofile.php b/upload/includes/ucp/torrent_userprofile.php
index 631db4740..aa83eecc5 100644
--- a/upload/includes/ucp/torrent_userprofile.php
+++ b/upload/includes/ucp/torrent_userprofile.php
@@ -10,7 +10,7 @@ if (!$profiledata['user_id'] || $profiledata['user_id'] == ANONYMOUS)
$seeding = $leeching = $releasing = array();
$profile_user_id = intval($profiledata['user_id']);
-$current_time = (isset($_GET['time']) && $_GET['time'] == 'all') ? 0 : time();
+$current_time = (isset($_GET['time']) && $_GET['time'] == 'all') ? 0 : TIMENOW;
// Get username
if (!$username = $profiledata['username'])
diff --git a/upload/language/lang_english/lang_main.php b/upload/language/lang_english/lang_main.php
index 54a2083a3..2df262541 100644
--- a/upload/language/lang_english/lang_main.php
+++ b/upload/language/lang_english/lang_main.php
@@ -13,7 +13,7 @@ $lang['TRANSLATION_INFO'] = '';
$lang['FORUM'] = 'Forum';
$lang['CATEGORY'] = 'Category';
$lang['HIDE_CAT'] = 'Hide categories';
-$lang['HIDE_CAT_MESS'] = 'Part categories hidden · Show All';
+$lang['HIDE_CAT_MESS'] = 'Part categories hidden "options Show" · Show All';
$lang['TOPIC'] = 'Topic';
$lang['TOPICS'] = 'Topics';
$lang['TOPICS_SHORT'] = 'Topics';
diff --git a/upload/language/lang_russian/lang_main.php b/upload/language/lang_russian/lang_main.php
index 9acce6e7d..4cc72f5ad 100644
--- a/upload/language/lang_russian/lang_main.php
+++ b/upload/language/lang_russian/lang_main.php
@@ -18,7 +18,7 @@ $lang['TRANSLATION_INFO'] = '';
$lang['FORUM'] = 'Форум';
$lang['CATEGORY'] = 'Категория';
$lang['HIDE_CAT'] = 'Скрыть категории';
-$lang['HIDE_CAT_MESS'] = 'Часть категорий скрыта · Показать все';
+$lang['HIDE_CAT_MESS'] = 'Часть категорий скрыта "Опциями показа" · Показать все';
$lang['TOPIC'] = 'Тема';
$lang['TOPICS'] = 'Темы';
$lang['TOPICS_SHORT'] = 'Тем';
diff --git a/upload/modcp.php b/upload/modcp.php
index 835c88c39..20eade094 100644
--- a/upload/modcp.php
+++ b/upload/modcp.php
@@ -461,7 +461,7 @@ switch ($mode)
}
$new_forum_id = intval($_POST['new_forum_id']);
- $topic_time = time();
+ $topic_time = TIMENOW;
$sql = 'SELECT forum_id FROM ' . BB_FORUMS . '
WHERE forum_id = ' . $new_forum_id;
diff --git a/upload/privmsg.php b/upload/privmsg.php
index 8be0b38bd..a9bdd4e44 100644
--- a/upload/privmsg.php
+++ b/upload/privmsg.php
@@ -913,7 +913,7 @@ else if ( $submit || $refresh || $mode != '' )
$db_row = DB()->sql_fetchrow($result);
$last_post_time = $db_row['last_post_time'];
- $current_time = time();
+ $current_time = TIMENOW;
if ( ( $current_time - $last_post_time ) < $bb_cfg['flood_interval'])
{
@@ -1000,7 +1000,7 @@ else if ( $submit || $refresh || $mode != '' )
bb_die($lang['CANNOT_SEND_PRIVMSG']);
}
- $msg_time = time();
+ $msg_time = TIMENOW;
if ( $mode != 'edit' )
{
@@ -1518,7 +1518,7 @@ else
if ( $submit_msgdays && ( !empty($_POST['msgdays']) || !empty($_GET['msgdays']) ) )
{
$msg_days = ( !empty($_POST['msgdays']) ) ? intval($_POST['msgdays']) : intval($_GET['msgdays']);
- $min_msg_time = time() - ($msg_days * 86400);
+ $min_msg_time = TIMENOW - ($msg_days * 86400);
$limit_msg_time_total = " AND privmsgs_date > $min_msg_time";
$limit_msg_time = " AND pm.privmsgs_date > $min_msg_time ";
diff --git a/upload/templates/default/index.tpl b/upload/templates/default/index.tpl
index 32156fe99..00338745e 100644
--- a/upload/templates/default/index.tpl
+++ b/upload/templates/default/index.tpl
@@ -49,7 +49,7 @@
-{L_HIDE_CAT_MESS}
+{L_HIDE_CAT_MESS}
diff --git a/upload/viewonline.php b/upload/viewonline.php
index 4c0e92df9..65a58a27f 100644
--- a/upload/viewonline.php
+++ b/upload/viewonline.php
@@ -28,7 +28,7 @@ $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT u.user_id, u.username, u.user_opt, u.user_rank, s.session_logged_in, s.session_time, s.session_ip
FROM ".BB_USERS." u, ".BB_SESSIONS." s
WHERE u.user_id = s.session_user_id
- AND s.session_time >= ".( time() - 300 ) . "
+ AND s.session_time >= ".( TIMENOW - 300 ) . "
ORDER BY u.username ASC, s.session_ip ASC";
if ( !($result = DB()->sql_query($sql)) )
{
diff --git a/upload/viewtopic.php b/upload/viewtopic.php
index c7381099d..42ff7208c 100644
--- a/upload/viewtopic.php
+++ b/upload/viewtopic.php
@@ -666,7 +666,7 @@ if ( !empty($t_data['topic_vote']) )
$view_result = 0;
}
- $poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
+ $poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < TIMENOW ) ? TRUE : 0 ) : 0;
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $t_data['topic_status'] == TOPIC_LOCKED )
{