diff --git a/upload/admin/xs_cache.php b/upload/admin/xs_cache.php
index 175568c7f..5ae244c89 100644
--- a/upload/admin/xs_cache.php
+++ b/upload/admin/xs_cache.php
@@ -117,6 +117,14 @@ if(isset($_GET['clear']) && !defined('DEMO_MODE'))
$data .= str_replace('{NUM}', $num_error, $lang['XS_CACHE_LOG_COUNT2']) . "
\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',
+ ));
+ }
}
}
diff --git a/upload/admin/xs_include.php b/upload/admin/xs_include.php
index 9f25df27f..17686856d 100644
--- a/upload/admin/xs_include.php
+++ b/upload/admin/xs_include.php
@@ -174,10 +174,6 @@ $template->assign_vars(array(
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->postparse = 'xs_footer';
$template->assign_block_vars('nav_left',array('ITEM' => '' . $lang['XS_MENU'] . ''));
diff --git a/upload/includes/db/mysql.php b/upload/includes/db/mysql.php
index b35175c21..095bdf146 100644
--- a/upload/includes/db/mysql.php
+++ b/upload/includes/db/mysql.php
@@ -95,7 +95,6 @@ class sql_db
{
$server = (DBG_USER) ? $this->cfg['dbhost'] : '';
header("HTTP/1.0 503 Service Unavailable");
- bb_log(' ', "db_err/connect_failed_{$this->cfg['dbhost']}");
die("Could not connect to the server $server");
}
diff --git a/upload/includes/functions.php b/upload/includes/functions.php
index 96faf799d..e8dfd3b86 100644
--- a/upload/includes/functions.php
+++ b/upload/includes/functions.php
@@ -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)
-{
$subject = DB()->escape($subject);
+{
global $userdata;
+
+ $subject = DB()->escape($subject);
$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)
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$userdata['user_id']}, $user_id, ". TIMENOW .", '". USER_IP ."')");
$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
user_new_privmsg = user_new_privmsg + 1,
diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php
index a285bc898..838e73b7a 100644
--- a/upload/includes/init_bb.php
+++ b/upload/includes/init_bb.php
@@ -615,7 +615,7 @@ switch ($bb_cfg['datastore_type'])
$datastore = new datastore_mysql();
}
// 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'])
{
diff --git a/upload/privmsg.php b/upload/privmsg.php
index fe7b87ca8..233db73ec 100644
--- a/upload/privmsg.php
+++ b/upload/privmsg.php
@@ -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
// 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)
- 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'] . ")";
+ $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'] . "')";
if ( !DB()->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);