ALICIVIL
کاربر تازه وارد
- تاریخ عضویت
- 4 ژانویه 2004
- نوشتهها
- 43
- لایکها
- 1
Changes:
1-On line 85 of modules/Journal/index.php
remove:
//The following line made reference to non-existing uname field.//
After editing the line suggested above, your line 84 should look as follows:
printf ("<td align=center bgcolor=$bgcolor2><a href=\"modules.php?name=Private_Messages&mode=post&u=$row[user_id]\"><img src='modules/$module_name/images/chat.gif' border='0' alt='"._PRIVMSGJ2."'></a></td>", $row[joid], $row[joid]);
2-open modules/Your_Account/index.php
find:
if ($userinfo[user_avatar]) echo "<img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" alt=\"\"><br>\n";
replace with:
if ( ereg( "(http)", $userinfo[user_avatar]) )
{
echo "<img src=\"$userinfo[user_avatar]\"><br>\n";
}
else
if ($userinfo[user_avatar])
{
echo "<img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\"><br>\n";
}
3-In order to get this feature working open html/modules/Forums/profile.php file and search for this line.
include("includes/usercp_user_email.php");
replace that line with this:
include("includes/usercp_email.php");
4-Change line 1196 of modules/Forums/modcp.php from:
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start),
to:
'PAGINATION' => generate_pagination("modcp.$phpEx?sid=" . $userdata['session_id'] . "&" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start),
5-Comment out lines 233-236 from modules/Forums/common.php
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
6-open
includes/usercp_register.php
Find around line 502(it's all one line)
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', theme = '$save_nuke_theme', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
remove this part from that line
theme = '$save_nuke_theme',
also you may want to comment out all these lines which are right above that line
$sql = "SELECT * FROM ".$prefix."_bbthemes WHERE themes_id='$user_style'";
$result = $db->sql_query($sql);
$get_info = $db->sql_fetchrow($result);
$nuketheme = $get_info[template_name];
$handle=opendir('themes');
while ($file = readdir($handle)) {
if ( (ereg("[$nuketheme]",$file)) ) {
$nuke_theme_exsist = "true";
}
}
closedir($handle);
if($nuke_theme_exsist == "true"){
$save_nuke_theme = "$nuketheme";
} else {
$save_nuke_theme = "$Default_Theme";
}
7-File: admin_ug_auth.php
Change all instances of:
WHERE group_id = $group_id
to:
WHERE group_id = '$group_id'
8-open your template's admin/index.navigate.tpl and near the top find:
<a href="{U_FORUM_INDEX}" target="_parent">
and replace with:
<a href="../../../{U_FORUM_INDEX}" target="_parent">
9-Open /modules/forums/admin/index.php and change:
"U_FORUM_PREINDEX" => append_sid("index.$phpEx&popup=1"),
To:
"U_FORUM_PREINDEX" => append_sid("modules.$phpEx?name=Forums&file=index"),
10-open modules/Forums/admin/admin_ranks.php
change this
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../' . $rank_info['rank_image'] . '" />' : "",
to this
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../../../' . $rank_info['rank_image'] . '" />' : "",
11-open
modules/Forums/admin/admin_users.php
change this
$avatar = '<img src="../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
to this
$avatar = '<img src="../../../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
and also change this
$avatar = '<img src="../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
to this
$avatar = '<img src="../../../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
12-modules/Forums/admin/admin_forums.php
change
'U_VIEWCAT' => append_sid($phpbb_root_path."index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
to
'U_VIEWCAT' => ("../../../modules.php?name=Forums&file=index&c=$cat_id"))
also change
'U_VIEWFORUM' => append_sid("viewforum&" . POST_FORUM_URL . "=$forum_id"),
to
'U_VIEWFORUM' => ("../../../modules.php?name=Forums&file=viewforum&f=$forum_id"),
13-open admin/modules/content.php and replace:
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$clanguage')", $dbi);
Header("Location: admin.php?op=content");
}
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
sql_query("update ".$prefix."_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', clanguage='$clanguage' where pid='$pid'", $dbi);
Header("Location: admin.php?op=content");
}
with:
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
sql_query("insert into ".$prefix."_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$clanguage')", $dbi);
Header("Location: admin.php?op=content");
}
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
sql_query("update ".$prefix."_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', clanguage='$clanguage' where pid='$pid'", $dbi);
Header("Location: admin.php?op=content");
}
14-file: language/lang-catala.php there is a ? missing
On the first line it is:
<php
And must be:
<?php
15-User Info block - change line 114 of the block from:
$newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='5' OR privmsgs_type='1'"));
to:
$newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
16-Change all instances of $user_prefix to $prefix in includes/constants.php except for the line that refers to the users table.
17-Around line 852 of mainfile.php find:
$title2 = ereg_replace("</title>.*","",$title2);
after it add:
$title2 = stripslashes($title2);
18-Change the value of version in the bbconfig table from whatever it is now to .0.4
19-Change the value of session_length in the bbconfig table from 0 to a higher value like 3600
20-In admin/modules/encyclopedia.php change:
function encyclopedia_save($title, $description, $elanguage, $active) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_encyclopedia values(NULL, '$title', '$description', '$elanguage', '$active')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save($eid, $title, $text) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_encyclopedia_text values(NULL, '$eid', '$title', '$text', '0')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_save_edit($eid, $title, $description, $elanguage, $active) {
global $prefix, $dbi;
sql_query("update ".$prefix."_encyclopedia set title='$title', description='$description', elanguage='$elanguage', active='$active' where eid='$eid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save_edit($tid, $eid, $title, $text) {
global $prefix, $dbi;
sql_query("update ".$prefix."_encyclopedia_text set eid='$eid', title='$title', text='$text' WHERE tid='$tid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
to:
function encyclopedia_save($title, $description, $elanguage, $active) {
global $prefix, $dbi;
$title = stripslashes(FixQuotes($title));
$description = stripslashes(FixQuotes($description));
sql_query("insert into ".$prefix."_encyclopedia values(NULL, '$title', '$description', '$elanguage', '$active')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save($eid, $title, $text) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
sql_query("insert into ".$prefix."_encyclopedia_text values(NULL, '$eid', '$title', '$text', '0')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_save_edit($eid, $title, $description, $elanguage, $active) {
global $prefix, $dbi;
$title = stripslashes(FixQuotes($title));
$description = stripslashes(FixQuotes($description));
sql_query("update ".$prefix."_encyclopedia set title='$title', description='$description', elanguage='$elanguage', active='$active' where eid='$eid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save_edit($tid, $eid, $title, $text) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
sql_query("update ".$prefix."_encyclopedia_text set eid='$eid', title='$title', text='$text' WHERE tid='$tid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
Additional changes:
includes/sessions.php:
Replace around line 192:
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}
}
With:
$error = TRUE;
if (SQL_LAYER == "mysql" || SQL_LAYER == "mysql4")
{
$sql_error = $db->sql_error($result);
if ($sql_error["code"] == 1114)
{
$result = $db->sql_query('SHOW TABLE STATUS LIKE "'.SESSIONS_TABLE.'"');
$row = $db->sql_fetchrow($result);
if ($row["Type"] == "HEAP")
{
if ($row["Rows"] > 2500)
{
$delete_order = (SQL_LAYER=="mysql4") ? " ORDER BY session_time ASC" : "";
$db->sql_query("DELETE QUICK FROM ".SESSIONS_TABLE."$delete_order LIMIT 50");
}
else
{
$db->sql_query("ALTER TABLE ".SESSIONS_TABLE." MAX_ROWS=".($row["Rows"]+50));
}
if ($db->sql_query($sql))
{
$error = FALSE;
}
}
}
}
if ($error)
{
message_die(CRITICAL_ERROR, "Error creating new session", "", __LINE__, __FILE__, $sql);
}
}
}
1-On line 85 of modules/Journal/index.php
remove:
//The following line made reference to non-existing uname field.//
After editing the line suggested above, your line 84 should look as follows:
printf ("<td align=center bgcolor=$bgcolor2><a href=\"modules.php?name=Private_Messages&mode=post&u=$row[user_id]\"><img src='modules/$module_name/images/chat.gif' border='0' alt='"._PRIVMSGJ2."'></a></td>", $row[joid], $row[joid]);
2-open modules/Your_Account/index.php
find:
if ($userinfo[user_avatar]) echo "<img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\" alt=\"\"><br>\n";
replace with:
if ( ereg( "(http)", $userinfo[user_avatar]) )
{
echo "<img src=\"$userinfo[user_avatar]\"><br>\n";
}
else
if ($userinfo[user_avatar])
{
echo "<img src=\"modules/Forums/images/avatars/$userinfo[user_avatar]\"><br>\n";
}
3-In order to get this feature working open html/modules/Forums/profile.php file and search for this line.
include("includes/usercp_user_email.php");
replace that line with this:
include("includes/usercp_email.php");
4-Change line 1196 of modules/Forums/modcp.php from:
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start),
to:
'PAGINATION' => generate_pagination("modcp.$phpEx?sid=" . $userdata['session_id'] . "&" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start),
5-Comment out lines 233-236 from modules/Forums/common.php
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
6-open
includes/usercp_register.php
Find around line 502(it's all one line)
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', theme = '$save_nuke_theme', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
remove this part from that line
theme = '$save_nuke_theme',
also you may want to comment out all these lines which are right above that line
$sql = "SELECT * FROM ".$prefix."_bbthemes WHERE themes_id='$user_style'";
$result = $db->sql_query($sql);
$get_info = $db->sql_fetchrow($result);
$nuketheme = $get_info[template_name];
$handle=opendir('themes');
while ($file = readdir($handle)) {
if ( (ereg("[$nuketheme]",$file)) ) {
$nuke_theme_exsist = "true";
}
}
closedir($handle);
if($nuke_theme_exsist == "true"){
$save_nuke_theme = "$nuketheme";
} else {
$save_nuke_theme = "$Default_Theme";
}
7-File: admin_ug_auth.php
Change all instances of:
WHERE group_id = $group_id
to:
WHERE group_id = '$group_id'
8-open your template's admin/index.navigate.tpl and near the top find:
<a href="{U_FORUM_INDEX}" target="_parent">
and replace with:
<a href="../../../{U_FORUM_INDEX}" target="_parent">
9-Open /modules/forums/admin/index.php and change:
"U_FORUM_PREINDEX" => append_sid("index.$phpEx&popup=1"),
To:
"U_FORUM_PREINDEX" => append_sid("modules.$phpEx?name=Forums&file=index"),
10-open modules/Forums/admin/admin_ranks.php
change this
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../' . $rank_info['rank_image'] . '" />' : "",
to this
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../../../' . $rank_info['rank_image'] . '" />' : "",
11-open
modules/Forums/admin/admin_users.php
change this
$avatar = '<img src="../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
to this
$avatar = '<img src="../../../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
and also change this
$avatar = '<img src="../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
to this
$avatar = '<img src="../../../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
12-modules/Forums/admin/admin_forums.php
change
'U_VIEWCAT' => append_sid($phpbb_root_path."index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
to
'U_VIEWCAT' => ("../../../modules.php?name=Forums&file=index&c=$cat_id"))
also change
'U_VIEWFORUM' => append_sid("viewforum&" . POST_FORUM_URL . "=$forum_id"),
to
'U_VIEWFORUM' => ("../../../modules.php?name=Forums&file=viewforum&f=$forum_id"),
13-open admin/modules/content.php and replace:
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$clanguage')", $dbi);
Header("Location: admin.php?op=content");
}
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
sql_query("update ".$prefix."_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', clanguage='$clanguage' where pid='$pid'", $dbi);
Header("Location: admin.php?op=content");
}
with:
function content_save($title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
sql_query("insert into ".$prefix."_pages values (NULL, '$cid', '$title', '$subtitle', '$active', '$page_header', '$text', '$page_footer', '$signature', now(), '0', '$clanguage')", $dbi);
Header("Location: admin.php?op=content");
}
function content_save_edit($pid, $title, $subtitle, $page_header, $text, $page_footer, $signature, $clanguage, $active, $cid) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$subtitle = stripslashes(FixQuotes($subtitle));
sql_query("update ".$prefix."_pages set cid='$cid', title='$title', subtitle='$subtitle', active='$active', page_header='$page_header', text='$text', page_footer='$page_footer', signature='$signature', clanguage='$clanguage' where pid='$pid'", $dbi);
Header("Location: admin.php?op=content");
}
14-file: language/lang-catala.php there is a ? missing
On the first line it is:
<php
And must be:
<?php
15-User Info block - change line 114 of the block from:
$newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND privmsgs_type='5' OR privmsgs_type='1'"));
to:
$newpms = $db->sql_numrows($db->sql_query("SELECT privmsgs_to_userid FROM $prefix"._bbprivmsgs." WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')"));
16-Change all instances of $user_prefix to $prefix in includes/constants.php except for the line that refers to the users table.
17-Around line 852 of mainfile.php find:
$title2 = ereg_replace("</title>.*","",$title2);
after it add:
$title2 = stripslashes($title2);
18-Change the value of version in the bbconfig table from whatever it is now to .0.4
19-Change the value of session_length in the bbconfig table from 0 to a higher value like 3600
20-In admin/modules/encyclopedia.php change:
function encyclopedia_save($title, $description, $elanguage, $active) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_encyclopedia values(NULL, '$title', '$description', '$elanguage', '$active')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save($eid, $title, $text) {
global $prefix, $dbi;
sql_query("insert into ".$prefix."_encyclopedia_text values(NULL, '$eid', '$title', '$text', '0')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_save_edit($eid, $title, $description, $elanguage, $active) {
global $prefix, $dbi;
sql_query("update ".$prefix."_encyclopedia set title='$title', description='$description', elanguage='$elanguage', active='$active' where eid='$eid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save_edit($tid, $eid, $title, $text) {
global $prefix, $dbi;
sql_query("update ".$prefix."_encyclopedia_text set eid='$eid', title='$title', text='$text' WHERE tid='$tid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
to:
function encyclopedia_save($title, $description, $elanguage, $active) {
global $prefix, $dbi;
$title = stripslashes(FixQuotes($title));
$description = stripslashes(FixQuotes($description));
sql_query("insert into ".$prefix."_encyclopedia values(NULL, '$title', '$description', '$elanguage', '$active')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save($eid, $title, $text) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
sql_query("insert into ".$prefix."_encyclopedia_text values(NULL, '$eid', '$title', '$text', '0')", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_save_edit($eid, $title, $description, $elanguage, $active) {
global $prefix, $dbi;
$title = stripslashes(FixQuotes($title));
$description = stripslashes(FixQuotes($description));
sql_query("update ".$prefix."_encyclopedia set title='$title', description='$description', elanguage='$elanguage', active='$active' where eid='$eid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save_edit($tid, $eid, $title, $text) {
global $prefix, $dbi;
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
sql_query("update ".$prefix."_encyclopedia_text set eid='$eid', title='$title', text='$text' WHERE tid='$tid'", $dbi);
Header("Location: admin.php?op=encyclopedia");
Additional changes:
includes/sessions.php:
Replace around line 192:
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}
}
With:
$error = TRUE;
if (SQL_LAYER == "mysql" || SQL_LAYER == "mysql4")
{
$sql_error = $db->sql_error($result);
if ($sql_error["code"] == 1114)
{
$result = $db->sql_query('SHOW TABLE STATUS LIKE "'.SESSIONS_TABLE.'"');
$row = $db->sql_fetchrow($result);
if ($row["Type"] == "HEAP")
{
if ($row["Rows"] > 2500)
{
$delete_order = (SQL_LAYER=="mysql4") ? " ORDER BY session_time ASC" : "";
$db->sql_query("DELETE QUICK FROM ".SESSIONS_TABLE."$delete_order LIMIT 50");
}
else
{
$db->sql_query("ALTER TABLE ".SESSIONS_TABLE." MAX_ROWS=".($row["Rows"]+50));
}
if ($db->sql_query($sql))
{
$error = FALSE;
}
}
}
}
if ($error)
{
message_die(CRITICAL_ERROR, "Error creating new session", "", __LINE__, __FILE__, $sql);
}
}
}