mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r55
Исправлена ошибка при очистке кеша шаблонов git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@55 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
c4c578a69e
commit
ec7a284567
6 changed files with 16 additions and 10 deletions
|
@ -117,6 +117,14 @@ if(isset($_GET['clear']) && !defined('DEMO_MODE'))
|
||||||
$data .= str_replace('{NUM}', $num_error, $lang['XS_CACHE_LOG_COUNT2']) . "<br />\n";
|
$data .= str_replace('{NUM}', $num_error, $lang['XS_CACHE_LOG_COUNT2']) . "<br />\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!defined('NO_XS_HEADER'))
|
||||||
|
{
|
||||||
|
$template->set_filenames(array(
|
||||||
|
'xs_header' => XS_TPL_PATH . 'xs_header.tpl',
|
||||||
|
'xs_footer' => XS_TPL_PATH . 'xs_footer.tpl',
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,10 +174,6 @@ $template->assign_vars(array(
|
||||||
|
|
||||||
if(!defined('NO_XS_HEADER'))
|
if(!defined('NO_XS_HEADER'))
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
|
||||||
'xs_header' => XS_TPL_PATH . 'xs_header.tpl',
|
|
||||||
'xs_footer' => XS_TPL_PATH . 'xs_footer.tpl',
|
|
||||||
));
|
|
||||||
$template->preparse = 'xs_header';
|
$template->preparse = 'xs_header';
|
||||||
$template->postparse = 'xs_footer';
|
$template->postparse = 'xs_footer';
|
||||||
$template->assign_block_vars('nav_left',array('ITEM' => '<a href="' . append_sid('xs_index.php') . '">' . $lang['XS_MENU'] . '</a>'));
|
$template->assign_block_vars('nav_left',array('ITEM' => '<a href="' . append_sid('xs_index.php') . '">' . $lang['XS_MENU'] . '</a>'));
|
||||||
|
|
|
@ -95,7 +95,6 @@ class sql_db
|
||||||
{
|
{
|
||||||
$server = (DBG_USER) ? $this->cfg['dbhost'] : '';
|
$server = (DBG_USER) ? $this->cfg['dbhost'] : '';
|
||||||
header("HTTP/1.0 503 Service Unavailable");
|
header("HTTP/1.0 503 Service Unavailable");
|
||||||
bb_log(' ', "db_err/connect_failed_{$this->cfg['dbhost']}");
|
|
||||||
die("Could not connect to the server $server");
|
die("Could not connect to the server $server");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2974,14 +2974,17 @@ function get_path_from_id ($id, $ext_id, $base_path, $first_div, $sec_div)
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_pm($user_id, $subject, $message)
|
function send_pm($user_id, $subject, $message)
|
||||||
{
$subject = DB()->escape($subject);
|
{
global $userdata;
|
||||||
|
|
||||||
|
$subject = DB()->escape($subject);
|
||||||
$message = DB()->escape($message);
|
$message = DB()->escape($message);
|
||||||
|
|
||||||
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
|
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
|
||||||
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$userdata['user_id']}, $user_id, ". TIMENOW .", '". USER_IP ."')");
|
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$userdata['user_id']}, $user_id, ". TIMENOW .", '". USER_IP ."')");
|
||||||
$pm_id = DB()->sql_nextid();
|
$pm_id = DB()->sql_nextid();
|
||||||
|
|
||||||
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS_TEXT ." VALUES($pm_id, '$text')");
|
DB()->sql_query("INSERT INTO " . BB_PRIVMSGS_TEXT . " (privmsgs_text_id, privmsgs_text)
|
||||||
|
VALUES ($privmsg_sent_id, '$message')");
|
||||||
|
|
||||||
DB()->sql_query("UPDATE ". BB_USERS ." SET
|
DB()->sql_query("UPDATE ". BB_USERS ." SET
|
||||||
user_new_privmsg = user_new_privmsg + 1,
|
user_new_privmsg = user_new_privmsg + 1,
|
||||||
|
|
|
@ -615,7 +615,7 @@ switch ($bb_cfg['datastore_type'])
|
||||||
$datastore = new datastore_mysql();
|
$datastore = new datastore_mysql();
|
||||||
}
|
}
|
||||||
// Cron
|
// 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') /* && !empty($_GET['cron_test_9gndjk']) */)
|
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'])
|
if (TIMENOW - $bb_cfg['cron_last_check'] > $bb_cfg['cron_check_interval'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -279,8 +279,8 @@ if ( $mode == 'read' )
|
||||||
// not the most DB friendly way but a lot easier to manage, besides the admin will be able to
|
// not the most DB friendly way but a lot easier to manage, besides the admin will be able to
|
||||||
// set limits on numbers of storable posts for users ... hopefully!
|
// set limits on numbers of storable posts for users ... hopefully!
|
||||||
//
|
//
|
||||||
$sql = "INSERT INTO " . BB_PRIVMSGS . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_bbcode, privmsgs_enable_smilies)
|
$sql = "INSERT INTO " . BB_PRIVMSGS . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
|
||||||
VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', " . $privmsg['privmsgs_enable_bbcode'] . ", " . $privmsg['privmsgs_enable_smilies'] . ")";
|
VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "')";
|
||||||
if ( !DB()->sql_query($sql) )
|
if ( !DB()->sql_query($sql) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue