diff --git a/upload/admin/.htaccess b/upload/admin/.htaccess
index c2c2cc412..91645d25f 100644
--- a/upload/admin/.htaccess
+++ b/upload/admin/.htaccess
@@ -1,8 +1,4 @@
AddDefaultCharset UTF-8
#order allow deny
#deny from all
-#allow from 127.0.0.1
-
-' : '
',
- 'CRON_TITLE' => $row['cron_title'],
- 'CRON_SCRIPT' => $row['cron_script'],
- 'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : ''. $lang['NOSELECT'] .'',
- 'RUN_DAY' => $row['run_day'],
- 'LAST_RUN' => $row['last_run'],
- 'NEXT_RUN' => $row['next_run'],
- 'RUN_COUNT' => $row['run_counter'],
- ));
- }
+ foreach ($sql as $i => $row)
+ {
+ $template->assign_block_vars('list', array(
+ 'ROW_CLASS' => !($i % 2) ? 'row2' : 'row1',
+ 'CRON_ID' => $row['cron_id'],
+ 'CRON_ACTIVE' => $row['cron_active'] ? '
' : '
',
+ 'CRON_TITLE' => $row['cron_title'],
+ 'CRON_SCRIPT' => $row['cron_script'],
+ 'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : ''. $lang['NOSELECT'] .'',
+ 'RUN_DAY' => $row['run_day'],
+ 'LAST_RUN' => $row['last_run'],
+ 'NEXT_RUN' => $row['next_run'],
+ 'RUN_COUNT' => $row['run_counter'],
+ ));
+ }
- $template->assign_vars(array(
- 'TPL_CRON_LIST' => true,
- 'S_CRON_ACTION' => "admin_cron.php",
- 'S_MODE' => 'list',
- ));
+ $template->assign_vars(array(
+ 'TPL_CRON_LIST' => true,
+ 'S_CRON_ACTION' => 'admin_cron.php',
+ 'S_MODE' => 'list',
+ ));
- //detect cron status
- if (@file_exists('../triggers/cron_running'))
- {
- $template->assign_vars(array(
- 'CRON_RUNNING' => true,
- ));
- }
- break;
+ //detect cron status
+ if (@file_exists('../triggers/cron_running'))
+ {
+ $template->assign_vars(array(
+ 'CRON_RUNNING' => true,
+ ));
+ }
+ break;
case 'repair':
- if (@file_exists('../triggers/cron_running'))
- {
- rename("../triggers/cron_running", "../triggers/cron_allowed");
- }
- redirect('admin/'.basename(__FILE__) . '?mode=list');
- break;
+ if (@file_exists('../triggers/cron_running'))
+ {
+ rename("../triggers/cron_running", "../triggers/cron_allowed");
+ }
+ redirect('admin/'.basename(__FILE__) . '?mode=list');
+ break;
case 'run':
- run_jobs($job_id);
- redirect('admin/'.basename(__FILE__) . '?mode=list');
- break;
+ run_jobs($job_id);
+ redirect('admin/'.basename(__FILE__) . '?mode=list');
+ break;
case 'edit':
- $sql = DB()->fetch_rowset("SELECT * FROM ". BB_CRON ." WHERE cron_id = $job_id");
+ $sql = DB()->fetch_rowset("SELECT * FROM ". BB_CRON ." WHERE cron_id = $job_id");
- foreach($sql as $row)
- {
- $template->assign_vars(array(
- 'CRON_ID' => $row['cron_id'],
- 'CRON_ACTIVE' => $row['cron_active'],
- 'CRON_TITLE' => $row['cron_title'],
- 'CRON_SCRIPT' => $row['cron_script'],
+ foreach ($sql as $row)
+ {
+ $template->assign_vars(array(
+ 'CRON_ID' => $row['cron_id'],
+ 'CRON_ACTIVE' => $row['cron_active'],
+ 'CRON_TITLE' => $row['cron_title'],
+ 'CRON_SCRIPT' => $row['cron_script'],
'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : '',
- 'RUN_DAY' => $row['run_day'],
- 'RUN_TIME' => $row['run_time'],
- 'RUN_ORDER' => $row['run_order'],
- 'LAST_RUN' => $row['last_run'],
- 'NEXT_RUN' => $row['next_run'],
- 'RUN_INTERVAL' => $row['run_interval'],
- 'LOG_ENABLED' => $row['log_enabled'],
- 'LOG_FILE' => $row['log_file'],
- 'LOG_SQL_QUERIES' => $row['log_sql_queries'],
- 'DISABLE_BOARD' => $row['disable_board'],
- 'RUN_COUNTER' => $row['run_counter'],
- ));
- }
+ 'RUN_DAY' => $row['run_day'],
+ 'RUN_TIME' => $row['run_time'],
+ 'RUN_ORDER' => $row['run_order'],
+ 'LAST_RUN' => $row['last_run'],
+ 'NEXT_RUN' => $row['next_run'],
+ 'RUN_INTERVAL' => $row['run_interval'],
+ 'LOG_ENABLED' => $row['log_enabled'],
+ 'LOG_FILE' => $row['log_file'],
+ 'LOG_SQL_QUERIES' => $row['log_sql_queries'],
+ 'DISABLE_BOARD' => $row['disable_board'],
+ 'RUN_COUNTER' => $row['run_counter'],
+ ));
+ }
- $run_day = array($lang['DELTA_TIME']['INTERVALS']['mday'][0] => 0);
- for($i=1; $i<=28; $i++)
- {
- $run_day[$i] = $i;
- }
+ $run_day = array($lang['DELTA_TIME']['INTERVALS']['mday'][0] => 0);
+ for ($i = 1; $i <= 28; $i++)
+ {
+ $run_day[$i] = $i;
+ }
- $schedule = array($lang['SCHEDULE']['select'] => 0);
- foreach ($lang['SCHEDULE'] as $type => $key)
- {
- $schedule[$key] = $type;
- }
+ $schedule = array($lang['SCHEDULE']['select'] => 0);
+ foreach ($lang['SCHEDULE'] as $type => $key)
+ {
+ $schedule[$key] = $type;
+ }
- $template->assign_vars(array(
- 'TPL_CRON_EDIT' => true,
- 'S_CRON_ACTION' => "admin_cron.php",
- 'S_MODE' => 'edit',
- 'SCHEDULE' => build_select('schedule', $schedule, $row['schedule']),
- 'RUN_DAY' => build_select('run_day', $run_day, $row['run_day']),
- 'L_CRON_EDIT_HEAD' => $lang['CRON_EDIT_HEAD_EDIT'],
- ));
- break;
+ $template->assign_vars(array(
+ 'TPL_CRON_EDIT' => true,
+ 'S_CRON_ACTION' => 'admin_cron.php',
+ 'S_MODE' => 'edit',
+ 'SCHEDULE' => build_select('schedule', $schedule, $row['schedule']),
+ 'RUN_DAY' => build_select('run_day', $run_day, $row['run_day']),
+ 'L_CRON_EDIT_HEAD' => $lang['CRON_EDIT_HEAD_EDIT'],
+ ));
+ break;
case 'add':
- $run_day = array($lang['DELTA_TIME']['INTERVALS']['mday'][0] => 0);
- for($i=1; $i<=28; $i++)
- {
- $run_day[$i] = $i;
- }
+ $run_day = array($lang['DELTA_TIME']['INTERVALS']['mday'][0] => 0);
+ for ($i = 1; $i <= 28; $i++)
+ {
+ $run_day[$i] = $i;
+ }
- $schedule = array();
- foreach ($lang['SCHEDULE'] as $type => $key)
- {
- $schedule[$key] = $type;
- }
+ $schedule = array();
+ foreach ($lang['SCHEDULE'] as $type => $key)
+ {
+ $schedule[$key] = $type;
+ }
- $template->assign_vars(array(
- 'TPL_CRON_EDIT' => true,
- 'S_CRON_ACTION' => "admin_cron.php",
- 'S_MODE' => 'add',
- 'SCHEDULE' => build_select('schedule', $schedule, 'select', null, null),
- 'RUN_DAY' => build_select('run_day', $run_day, 0, null, null),
- 'L_CRON_EDIT_HEAD' => $lang['CRON_EDIT_HEAD_ADD'],
+ $template->assign_vars(array(
+ 'TPL_CRON_EDIT' => true,
+ 'S_CRON_ACTION' => 'admin_cron.php',
+ 'S_MODE' => 'add',
+ 'SCHEDULE' => build_select('schedule', $schedule, 'select', null, null),
+ 'RUN_DAY' => build_select('run_day', $run_day, 0, null, null),
+ 'L_CRON_EDIT_HEAD' => $lang['CRON_EDIT_HEAD_ADD'],
'CRON_ID' => 'none',
- 'CRON_ACTIVE' => 1,
- 'CRON_TITLE' => '',
- 'CRON_SCRIPT' => '',
- 'RUN_TIME' => '',
- 'RUN_ORDER' => 255,
- 'LAST_RUN' => '0000-00-00 00:00:00',
- 'NEXT_RUN' => '0000-00-00 00:00:00',
- 'RUN_INTERVAL' => '',
- 'LOG_ENABLED' => 0,
- 'LOG_FILE' => '',
- 'LOG_SQL_QUERIES' => 0,
- 'DISABLE_BOARD' => 0,
- 'RUN_COUNTER' => 0,
- ));
- break;
+ 'CRON_ACTIVE' => 1,
+ 'CRON_TITLE' => '',
+ 'CRON_SCRIPT' => '',
+ 'RUN_TIME' => '',
+ 'RUN_ORDER' => 255,
+ 'LAST_RUN' => '0000-00-00 00:00:00',
+ 'NEXT_RUN' => '0000-00-00 00:00:00',
+ 'RUN_INTERVAL' => '',
+ 'LOG_ENABLED' => 0,
+ 'LOG_FILE' => '',
+ 'LOG_SQL_QUERIES' => 0,
+ 'DISABLE_BOARD' => 0,
+ 'RUN_COUNTER' => 0,
+ ));
+ break;
case 'delete':
delete_jobs($job_id);
-
$message = $lang['JOB_REMOVED'] . '
' . sprintf($lang['CLICK_RETURN_JOBS'], '', '') . '
' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '');
- message_die(GENERAL_MESSAGE, $message);
- break;
+ message_die(GENERAL_MESSAGE, $message);
+ break;
}
if ($submit)
@@ -234,4 +232,4 @@ if ($submit)
}
}
-print_page('admin_cron.tpl', 'admin');
+print_page('admin_cron.tpl', 'admin');
\ No newline at end of file
diff --git a/upload/attach_mod/displaying_torrent.php b/upload/attach_mod/displaying_torrent.php
index 55307d9ec..cdab70ce2 100644
--- a/upload/attach_mod/displaying_torrent.php
+++ b/upload/attach_mod/displaying_torrent.php
@@ -86,6 +86,11 @@ if ($tor_auth_reg || $tor_auth_del)
$tracker_link = ($tor_reged) ? $unreg_tor_url : $reg_tor_url;
}
+if ($bb_cfg['torrent_style'])
+{
+ $display_name = '['.$domain_name.'].t' . $bt_topic_id . '.torrent';
+}
+
if (!$tor_reged)
{
$template->assign_block_vars('postrow.attach.tor_not_reged', array(
diff --git a/upload/config.php b/upload/config.php
index a9f47ec04..24f6e400f 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
-$bb_cfg['tp_release_date'] = '31-07-2013';
-$bb_cfg['tp_release_state'] = 'R526';
+$bb_cfg['tp_release_date'] = '01-08-2013';
+$bb_cfg['tp_release_state'] = 'R527';
// Database
$charset = 'utf8';
@@ -177,7 +177,8 @@ $bb_cfg['show_tor_info_in_dl_list'] = true;
$bb_cfg['allow_dl_list_names_mode'] = true;
// Torrents
-$bb_cfg['torrent_sign'] = ''; // e.g. "[yoursite.com]"
+$bb_cfg['torrent_sign'] = ''; // e.g. "[yoursite.com]"
+$bb_cfg['torrent_style'] = true;
$bb_cfg['tor_help_links'] = '';
// Сколько дней сохранять торрент зарегистрированным / Days to keep torrent registered, if:
diff --git a/upload/includes/functions_dev.php b/upload/includes/functions_dev.php
index f2d57a43e..f14b0f55c 100644
--- a/upload/includes/functions_dev.php
+++ b/upload/includes/functions_dev.php
@@ -2,7 +2,7 @@
function get_sql_log ()
{
- global $bb_cfg, $DBS, $CACHES, $sphinx, $datastore;
+ global $DBS, $CACHES, $sphinx, $datastore;
$log = '';
@@ -10,20 +10,22 @@ function get_sql_log ()
{
$log .= !empty($db_obj) ? get_sql_log_html($db_obj, "$srv_name [MySQL]") : '';
}
+
foreach ($CACHES->obj as $cache_name => $cache_obj)
{
- if(!empty($cache_obj->db))
+ if (!empty($cache_obj->db))
{
$log .= get_sql_log_html($cache_obj->db, "cache: $cache_name [{$cache_obj->db->engine}]");
- }
- elseif(!empty($cache_obj->engine))
- {
- $log .= get_sql_log_html($cache_obj, "cache: $cache_name [{$cache_obj->engine}]");
- }
+ }
+ elseif (!empty($cache_obj->engine))
+ {
+ $log .= get_sql_log_html($cache_obj, "cache: $cache_name [{$cache_obj->engine}]");
+ }
}
$log .= !empty($sphinx) ? get_sql_log_html($sphinx, '$sphinx') : '';
- if(!empty($datastore->db->dbg))
+
+ if (!empty($datastore->db->dbg))
{
$log .= get_sql_log_html($datastore->db, '$datastore ['.$datastore->engine.']');
}
@@ -32,7 +34,7 @@ function get_sql_log ()
$log .= get_sql_log_html($datastore, '$datastore ['.$datastore->engine.']');
}
- return $log;
+ return $log;
}
function get_sql_log_html ($db_obj, $log_name)
@@ -64,4 +66,4 @@ function get_sql_log_html ($db_obj, $log_name)