1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 19:00:26 +02:00

More progress on forum upgrade

This commit is contained in:
mcfly
2008-12-23 20:48:24 +00:00
parent 61eb377350
commit 39d67c11f1
2 changed files with 133 additions and 84 deletions

View File

@@ -9,8 +9,8 @@
* Message Handler * Message Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_class.php,v $
* $Revision: 1.33 $ * $Revision: 1.34 $
* $Date: 2008-12-20 23:59:00 $ * $Date: 2008-12-23 20:48:24 $
* $Author: mcfly_e107 $ * $Author: mcfly_e107 $
* *
*/ */
@@ -118,9 +118,9 @@ class e107forum
$e107 = e107::getInstance(); $e107 = e107::getInstance();
if(!$this->userViewed) if(!$this->userViewed)
{ {
if(isset($e107->currentUser['user_plugin_forum_views'])) if(isset($e107->currentUser['user_plugin_forum_viewed']))
{ {
$this->userViewed = explode('.', $e107->currentUser['user_plugin_forum_viewed']); $this->userViewed = explode(',', $e107->currentUser['user_plugin_forum_viewed']);
} }
} }
return (is_array($this->userViewed) && in_array($threadId, $this->userViewed)); return (is_array($this->userViewed) && in_array($threadId, $this->userViewed));
@@ -549,7 +549,7 @@ class e107forum
$extra = " AND thread_forum_id IN($forumList)"; $extra = " AND thread_forum_id IN($forumList)";
} }
$qry = 'thread_lastpost > '.USERLV.$extra; $qry = 'thread_lastpost > '.USERLV.$extra;
if ($e107->sql->db_Select('forum_thread', 'thread_id', $qry)) if ($e107->sql->db_Select('forum_thread', 'thread_id', $qry))
{ {
while ($row = $e107->sql->db_Fetch(MYSQL_ASSOC)) while ($row = $e107->sql->db_Fetch(MYSQL_ASSOC))
@@ -613,7 +613,7 @@ class e107forum
function forumGetForumList() function forumGetForumList()
{ {
$e107 = e107::getInstance(); $e107 = e107::getInstance();
$qry = ' $qry = '
SELECT f.*, u.user_name FROM `#forum` AS f SELECT f.*, u.user_name FROM `#forum` AS f
LEFT JOIN `#user` AS u ON f.forum_lastpost_user IS NOT NULL AND u.user_id = f.forum_lastpost_user LEFT JOIN `#user` AS u ON f.forum_lastpost_user IS NOT NULL AND u.user_id = f.forum_lastpost_user
@@ -743,7 +743,7 @@ class e107forum
return false; return false;
} }
} }
function thread_user($post_info) function thread_user($post_info)
{ {
if($post_info['user_name']) if($post_info['user_name'])
@@ -757,12 +757,12 @@ class e107forum
} }
} }
function track($which, $uid, $threadId) function track($which, $uid, $threadId, $force=false)
{ {
$e107 = e107::getInstance(); $e107 = e107::getInstance();
global $pref; global $pref;
if (!varsettrue($pref['forum_track'])) { return false; } if (!varsettrue($pref['forum_track']) && !$force) { return false; }
$threadId = (int)$threadId; $threadId = (int)$threadId;
$uid = (int)$uid; $uid = (int)$uid;
@@ -951,15 +951,15 @@ class e107forum
AND f.forum_class IN (".USERCLASS_LIST.") AND f.forum_class IN (".USERCLASS_LIST.")
{$viewed} {$viewed}
ORDER BY ft.thread_datestamp DESC LIMIT 0, ".intval($count); ORDER BY ft.thread_datestamp DESC LIMIT 0, ".intval($count);
$qry = " $qry = "
SELECT t.*, u.user_name FROM `#forum_thread` AS t SELECT t.*, u.user_name FROM `#forum_thread` AS t
LEFT JOIN `#user` AS u ON u.user_id = t.thread_lastuser LEFT JOIN `#user` AS u ON u.user_id = t.thread_lastuser
WHERE t.thread_lastpost > ".USERLV. " WHERE t.thread_lastpost > ".USERLV. "
{$viewed} {$viewed}
ORDER BY t.thread_lastpost DESC LIMIT 0, ".(int)$count; ORDER BY t.thread_lastpost DESC LIMIT 0, ".(int)$count;
if($e107->sql->db_Select_gen($qry)) if($e107->sql->db_Select_gen($qry))
{ {
$ret = $e107->sql->db_getList(); $ret = $e107->sql->db_getList();
@@ -1031,7 +1031,7 @@ class e107forum
} }
} }
} }
function getUserCounts() function getUserCounts()
{ {
global $sql; global $sql;
@@ -1131,8 +1131,8 @@ class e107forum
} }
$BACKLINK = $BREADCRUMB; $BACKLINK = $BREADCRUMB;
} }
function threadDelete($threadId, $updateForumLastpost = true) function threadDelete($threadId, $updateForumLastpost = true)
{ {
$e107 = e107::getInstance(); $e107 = e107::getInstance();
@@ -1140,7 +1140,7 @@ class e107forum
{ {
// delete poll if there is one // delete poll if there is one
$e107->sql->db_Delete('poll', 'poll_datestamp='.$threadId); $e107->sql->db_Delete('poll', 'poll_datestamp='.$threadId);
//decrement user post counts //decrement user post counts
if ($postCount = $this->threadGetUserPostcount($threadId)) if ($postCount = $this->threadGetUserPostcount($threadId))
{ {
@@ -1149,7 +1149,7 @@ class e107forum
$e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-'.$v.',0) WHERE user_id='.$k); $e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-'.$v.',0) WHERE user_id='.$k);
} }
} }
// delete all posts // delete all posts
$qry = 'SELECT post_id FROM `#forum_post` WHERE post_thread = '.$threadId; $qry = 'SELECT post_id FROM `#forum_post` WHERE post_thread = '.$threadId;
if($e107->sql->db_Select_gen($qry)) if($e107->sql->db_Select_gen($qry))
@@ -1164,16 +1164,16 @@ class e107forum
$this->postDelete($postId, false); $this->postDelete($postId, false);
} }
} }
// delete the thread itself // delete the thread itself
$e107->sql->db_Delete('forum_thread', 'thread_id='.$threadId); $e107->sql->db_Delete('forum_thread', 'thread_id='.$threadId);
//Delete any thread tracking //Delete any thread tracking
$e107->sql->db_Delete('forum_track', 'track_thread='.$threadId); $e107->sql->db_Delete('forum_track', 'track_thread='.$threadId);
// update forum with correct thread/reply counts // update forum with correct thread/reply counts
$e107->sql->db_Update('forum', "forum_threads=GREATEST(forum_threads-1,0), forum_replies=GREATEST(forum_replies-{$threadInfo['thread_total_replies']},0) WHERE forum_id=".$threadInfo['thread_forum_id']); $e107->sql->db_Update('forum', "forum_threads=GREATEST(forum_threads-1,0), forum_replies=GREATEST(forum_replies-{$threadInfo['thread_total_replies']},0) WHERE forum_id=".$threadInfo['thread_forum_id']);
if($updateForumLastpost) if($updateForumLastpost)
{ {
// update lastpost info // update lastpost info
@@ -1182,7 +1182,7 @@ class e107forum
return $threadInfo['thread_total_replies']; return $threadInfo['thread_total_replies'];
} }
} }
function postDelete($postId, $updateCounts = true) function postDelete($postId, $updateCounts = true)
{ {
$postId = (int)$postId; $postId = (int)$postId;
@@ -1192,16 +1192,16 @@ class e107forum
echo 'NOT FOUND!'; return; echo 'NOT FOUND!'; return;
} }
$row = $e107->sql->db_Fetch(MYSQL_ASSOC); $row = $e107->sql->db_Fetch(MYSQL_ASSOC);
//delete attachments if they exist //delete attachments if they exist
if($row['post_attachments']) if($row['post_attachments'])
{ {
$this->postDeleteAttachments('post', $postId); $this->postDeleteAttachments('post', $postId);
} }
// delete post // delete post
$e107->sql->db_Delete('forum_post', 'post_id='.$postId); $e107->sql->db_Delete('forum_post', 'post_id='.$postId);
if($updateCounts) if($updateCounts)
{ {
//decrement user post counts //decrement user post counts
@@ -1212,19 +1212,19 @@ class e107forum
// update thread with correct reply counts // update thread with correct reply counts
$e107->sql->db_Update('forum_thread', "thread_total_replies=GREATEST(thread_total_replies-1,0) WHERE thread_id=".$row['post_thread']); $e107->sql->db_Update('forum_thread', "thread_total_replies=GREATEST(thread_total_replies-1,0) WHERE thread_id=".$row['post_thread']);
// update forum with correct thread/reply counts // update forum with correct thread/reply counts
$e107->sql->db_Update('forum', "forum_replies=GREATEST(forum_replies-1,0) WHERE forum_id=".$row['post_forum']); $e107->sql->db_Update('forum', "forum_replies=GREATEST(forum_replies-1,0) WHERE forum_id=".$row['post_forum']);
// update thread lastpost info // update thread lastpost info
$this->forumUpdateLastpost('thread', $row['post_thread']); $this->forumUpdateLastpost('thread', $row['post_thread']);
// update forum lastpost info // update forum lastpost info
$this->forumUpdateLastpost('forum', $row['post_forum']); $this->forumUpdateLastpost('forum', $row['post_forum']);
} }
return $threadInfo['thread_total_replies']; return $threadInfo['thread_total_replies'];
} }
} }

View File

@@ -9,8 +9,8 @@
* Message Handler * Message Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_update.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_update.php,v $
* $Revision: 1.8 $ * $Revision: 1.9 $
* $Date: 2008-12-20 23:59:00 $ * $Date: 2008-12-23 20:48:24 $
* $Author: mcfly_e107 $ * $Author: mcfly_e107 $
* *
*/ */
@@ -129,9 +129,9 @@ function step2()
require_once(e_HANDLER.'db_table_admin_class.php'); require_once(e_HANDLER.'db_table_admin_class.php');
$db = new db_table_admin; $db = new db_table_admin;
$tabList = array('forum' => 'forum_new', 'forum_thread' => '', 'forum_post' => '', 'forum_track' => ''); $tabList = array('forum' => 'forum_new', 'forum_thread' => '', 'forum_post' => '', 'forum_track' => '');
$ret = ''; $ret = '';
$failed = false; $failed = false;
$text = ''; $text = '';
foreach($tabList as $name => $rename) foreach($tabList as $name => $rename)
@@ -223,7 +223,7 @@ function step3()
"; ";
} }
$e107->ns->tablerender($stepCaption, $text); $e107->ns->tablerender($stepCaption, $text);
} }
function step4() function step4()
@@ -255,7 +255,7 @@ function step4()
{ {
require_once(e_HANDLER.'user_extended_class.php'); require_once(e_HANDLER.'user_extended_class.php');
$ue = new e107_user_extended; $ue = new e107_user_extended;
while($row = $db->db_Fetch(MYSQL_ASSOC)) while($row = $db->db_Fetch(MYSQL_ASSOC))
{ {
$result['usercount']++; $result['usercount']++;
@@ -265,8 +265,8 @@ function step4()
$viewed = trim($viewed, '.'); $viewed = trim($viewed, '.');
$tmp = preg_split('#\.+#', $viewed); $tmp = preg_split('#\.+#', $viewed);
$viewed = implode(',', $tmp); $viewed = implode(',', $tmp);
$realm = $row['user_realm']; $realm = $row['user_realm'];
$realm - str_replace('USERREALM', '', $realm); $realm - str_replace('USERREALM', '', $realm);
$realm = trim($realm, '-.'); $realm = trim($realm, '-.');
@@ -284,7 +284,7 @@ function step4()
$ue->user_extended_setvalue($userId, 'plugin_forum_viewed', mysql_real_escape_string($viewed)); $ue->user_extended_setvalue($userId, 'plugin_forum_viewed', mysql_real_escape_string($viewed));
$result['viewcount']++; $result['viewcount']++;
} }
if(is_array($trackList) && count($trackList)) if(is_array($trackList) && count($trackList))
{ {
foreach($trackList as $threadId) foreach($trackList as $threadId)
@@ -298,14 +298,14 @@ function step4()
$tmp['track_thread'] = $threadId; $tmp['track_thread'] = $threadId;
$tmp['_FIELD_TYPES']['track_userid'] = 'int'; $tmp['_FIELD_TYPES']['track_userid'] = 'int';
$tmp['_FIELD_TYPES']['track_thread'] = 'int'; $tmp['_FIELD_TYPES']['track_thread'] = 'int';
$e107->sql->db_Insert('forum_track', $tmp); $e107->sql->db_Insert('forum_track', $tmp);
} }
} }
} }
} }
} }
$text .= " $text .= "
User data move results:<br /> User data move results:<br />
Number of users processed: {$result['usercount']} <br /> Number of users processed: {$result['usercount']} <br />
@@ -318,7 +318,7 @@ function step4()
"; ";
$e107->ns->tablerender($stepCaption, $text); $e107->ns->tablerender($stepCaption, $text);
} }
function step5() function step5()
@@ -353,7 +353,7 @@ function step5()
$ftypes['_FIELD_TYPES']['forum_threadclass'] = 'int'; $ftypes['_FIELD_TYPES']['forum_threadclass'] = 'int';
$counts = array('parens' => 0, 'forums' => 0, 'subs' => 0); $counts = array('parens' => 0, 'forums' => 0, 'subs' => 0);
if($e107->sql->db_Select('forum')) if($e107->sql->db_Select('forum'))
{ {
$forumList = $e107->sql->db_getList(); $forumList = $e107->sql->db_getList();
@@ -362,7 +362,7 @@ function step5()
if($forum['forum_parent'] == 0) if($forum['forum_parent'] == 0)
{ {
$counts['parents']++; $counts['parents']++;
} }
elseif($forum['forum_sub'] != 0) elseif($forum['forum_sub'] != 0)
{ {
$counts['subs']++; $counts['subs']++;
@@ -371,14 +371,14 @@ function step5()
{ {
$counts['forums']++; $counts['forums']++;
} }
$tmp = $forum; $tmp = $forum;
$tmp['forum_threadclass'] = $tmp['forum_postclass']; $tmp['forum_threadclass'] = $tmp['forum_postclass'];
$tmp['forum_options'] = '_NULL_'; $tmp['forum_options'] = '_NULL_';
$tmp['_FIELD_TYPES'] = $ftypes['_FIELD_TYPES']; $tmp['_FIELD_TYPES'] = $ftypes['_FIELD_TYPES'];
$e107->sql->db_Insert('forum_new', $tmp); $e107->sql->db_Insert('forum_new', $tmp);
} }
$text = " $text = "
Forum data move results:<br /> Forum data move results:<br />
Number of forum parents processed: {$counts['parents']} <br /> Number of forum parents processed: {$counts['parents']} <br />
@@ -390,20 +390,20 @@ function step5()
$result = $e107->sql->db_Select_gen('RENAME TABLE `#forum` TO `#forum_old` '); $result = $e107->sql->db_Select_gen('RENAME TABLE `#forum` TO `#forum_old` ');
$text .= "Rename forum to forum_old -> ".($result ? 'Passed' : 'Failed!'); $text .= "Rename forum to forum_old -> ".($result ? 'Passed' : 'Failed!');
$text .= '<br />'; $text .= '<br />';
$result = $e107->sql->db_Select_gen('RENAME TABLE `#forum_new` TO `#forum` '); $result = $e107->sql->db_Select_gen('RENAME TABLE `#forum_new` TO `#forum` ');
$text .= "Rename forum_new to forum -> ".($result ? 'Passed' : 'Failed!'); $text .= "Rename forum_new to forum -> ".($result ? 'Passed' : 'Failed!');
$text .= '<br />'; $text .= '<br />';
$text .= " $text .= "
<br /><br /> <br /><br />
<form method='post'> <form method='post'>
<input class='button' type='submit' name='nextStep[6]' value='Proceed to step 6' /> <input class='button' type='submit' name='nextStep[6]' value='Proceed to step 6' />
</form> </form>
"; ";
$e107->ns->tablerender($stepCaption, $text); $e107->ns->tablerender($stepCaption, $text);
} }
} }
@@ -412,13 +412,13 @@ function step6()
global $f; global $f;
$e107 = e107::getInstance(); $e107 = e107::getInstance();
$stepCaption = 'Step 6: Thread and post data'; $stepCaption = 'Step 6: Thread and post data';
$threadLimit = 300; $threadLimit = 5000;
$lastThread = varset($f->updateInfo['lastThread'], 0); $lastThread = varset($f->updateInfo['lastThread'], 0);
if(!isset($_POST['move_thread_data'])) if(!isset($_POST['move_thread_data']))
{ {
$count = $e107->sql->db_Count('forum_t', '(*)', "WHERE thread_parent = 0 AND thread_id > {$lastThread}"); $count = $e107->sql->db_Count('forum_t', '(*)', "WHERE thread_parent = 0 AND thread_id > {$lastThread}");
$text = " $text = "
This step will copy all of your existing forum threads and posts into the new `forum_thread` and `forum_post` tables.<br /><br /> This step will copy all of your existing forum threads and posts into the new `forum_thread` and `forum_post` tables.<br /><br />
Depending on your forum size and speed of server, this could take some time. This routine will attempt to do it in steps in order to Depending on your forum size and speed of server, this could take some time. This routine will attempt to do it in steps in order to
@@ -442,7 +442,7 @@ function step6()
} }
$qry = " $qry = "
SELECT thread_id FROM `#forum_t` SELECT thread_id FROM `#forum_t`
WHERE thread_parent = 0 WHERE thread_parent = 0
AND thread_id > {$lastThread} AND thread_id > {$lastThread}
ORDER BY thread_id ASC ORDER BY thread_id ASC
@@ -455,6 +455,7 @@ function step6()
$text = ''; $text = '';
foreach($threadList as $t) foreach($threadList as $t)
{ {
set_time_limit(30);
$id = (int)$t['thread_id']; $id = (int)$t['thread_id'];
$result = $f->migrateThread($id); $result = $f->migrateThread($id);
if($result === false) if($result === false)
@@ -483,23 +484,59 @@ function step6()
"; ";
$e107->ns->tablerender($stepCaption, $text); $e107->ns->tablerender($stepCaption, $text);
} }
else }
{ else
$text .= " {
Thread migration is complete!! $text .= "
<br /><br /> Thread migration is complete!!
<form method='post'> <br /><br />
<input class='button' type='submit' name='nextStep[7]' value='Proceed to step 7' /> <form method='post'>
</form> <input class='button' type='submit' name='nextStep[7]' value='Proceed to step 7' />
"; </form>
";
$e107->ns->tablerender($stepCaption, $text); $e107->ns->tablerender($stepCaption, $text);
} }
}
} function step7()
{
$e107 = e107::getInstance();
$stepCaption = 'Step 7: Calculate user post counts';
if(!isset($_POST['calculate_usercounts']))
{
$text = "
This step will calculate post count information for all users
<br /><br />
<form method='post'>
<input class='button' type='submit' name='calculate_usercounts' value='Proceed with post count calculation' />
</form>
";
$e107->ns->tablerender($stepCaption, $text);
return;
}
global $forum;
require_once(e_HANDLER.'user_extended_class.php');
$ue = new e107_user_extended;
$counts = $forum->getUserCounts();
foreach($counts as $uid => $count)
{
$ue->user_extended_setvalue($uid, 'user_plugin_forum_posts', $count, 'int');
}
// var_dump($counts);
$text .= "
Successfully recalculated forum posts for ".count($counts)." users.
<br /><br />
<form method='post'>
<input class='button' type='submit' name='nextStep[8]' value='Proceed to step 8' />
</form>
";
$e107->ns->tablerender($stepCaption, $text);
} }
@@ -520,7 +557,7 @@ class forumUpgrade
e_PLUGIN.'forum/attachments/', e_PLUGIN.'forum/attachments/',
e_PLUGIN.'forum/attachments/thumb' e_PLUGIN.'forum/attachments/thumb'
); );
foreach($dirs as $dir) foreach($dirs as $dir)
{ {
if(!file_exists($dir)) if(!file_exists($dir))
@@ -563,14 +600,14 @@ class forumUpgrade
$qry = "UPDATE `#generic` Set gen_chardata = '{$info}' WHERE gen_type = 'forumUpgrade'"; $qry = "UPDATE `#generic` Set gen_chardata = '{$info}' WHERE gen_type = 'forumUpgrade'";
$e107->sql->db_Select_gen($qry); $e107->sql->db_Select_gen($qry);
} }
function setNewVersion() function setNewVersion()
{ {
$e107 = e107::getInstance(); $e107 = e107::getInstance();
$e107->sql->db_Update('plugin',"plugin_version = '{$this->newVersion}' WHERE plugin_name='Forum'"); $e107->sql->db_Update('plugin',"plugin_version = '{$this->newVersion}' WHERE plugin_name='Forum'");
return "Forum Version updated to version: {$this->newVersion} <br />"; return "Forum Version updated to version: {$this->newVersion} <br />";
} }
function migrateThread($threadId) function migrateThread($threadId)
{ {
global $forum; global $forum;
@@ -598,7 +635,7 @@ class forumUpgrade
} }
return false; return false;
} }
function addThread(&$post) function addThread(&$post)
{ {
global $forum; global $forum;
@@ -614,12 +651,20 @@ class forumUpgrade
$userInfo = $this->getUserInfo($post['thread_user']); $userInfo = $this->getUserInfo($post['thread_user']);
$thread['thread_user'] = $userInfo['user_id']; $thread['thread_user'] = $userInfo['user_id'];
$thread['thread_user_anon'] = $userInfo['anon_name']; $thread['thread_user_anon'] = $userInfo['anon_name'];
// If thread marked as 'tracked by starter', we must convert to using forum_track table
if($thread['thread_active'] == 99 && $thread['thread_user'] > 0)
{
$forum->track('add', $thread['thread_user'], $thread['thread_id'], true);
$thread['thread_active'] = 1;
}
$thread['_FIELD_TYPES'] = $forum->fieldTypes['forum_thread']; $thread['_FIELD_TYPES'] = $forum->fieldTypes['forum_thread'];
$thread['_FIELD_TYPES']['thread_name'] = 'escape'; //use escape to prevent double entities $thread['_FIELD_TYPES']['thread_name'] = 'escape'; //use escape to prevent double entities
return $e107->sql->db_Insert('forum_thread', $thread); return $e107->sql->db_Insert('forum_thread', $thread);
// print_a($thread); // print_a($thread);
} }
function addPost(&$post) function addPost(&$post)
{ {
global $forum; global $forum;
@@ -636,13 +681,13 @@ class forumUpgrade
$newPost['post_user'] = $userInfo['user_id']; $newPost['post_user'] = $userInfo['user_id'];
$newPost['post_user_anon'] = $userInfo['anon_name']; $newPost['post_user_anon'] = $userInfo['anon_name'];
$newPost['post_ip'] = $userInfo['user_ip']; $newPost['post_ip'] = $userInfo['user_ip'];
$newPost['_FIELD_TYPES'] = $forum->fieldTypes['forum_post']; $newPost['_FIELD_TYPES'] = $forum->fieldTypes['forum_post'];
$newPost['_FIELD_TYPES']['post_entry'] = 'escape'; //use escape to prevent double entities $newPost['_FIELD_TYPES']['post_entry'] = 'escape'; //use escape to prevent double entities
// print_a($newPost); // print_a($newPost);
return $e107->sql->db_Insert('forum_post', $newPost); return $e107->sql->db_Insert('forum_post', $newPost);
} }
function getUserInfo(&$info) function getUserInfo(&$info)
{ {
$e107 = e107::getInstance(); $e107 = e107::getInstance();
@@ -652,7 +697,7 @@ class forumUpgrade
'user_ip' => '_NULL_', 'user_ip' => '_NULL_',
'anon_name' => '_NULL_' 'anon_name' => '_NULL_'
); );
if(count($tmp) == 2) if(count($tmp) == 2)
{ {
$id = (int)$tmp[0]; $id = (int)$tmp[0];
@@ -672,12 +717,19 @@ class forumUpgrade
} }
else else
{ {
$ret['anon_name'] = 'Unknown'; if(is_numeric($info) && $info > 0)
{
$ret['user_id'] = $info;
}
else
{
$ret['anon_name'] = 'Unknown';
}
} }
return $ret; return $ret;
} }
} }
@@ -685,7 +737,7 @@ class forumUpgrade
function forum_update_adminmenu() function forum_update_adminmenu()
{ {
global $currentStep; global $currentStep;
$var[1]['text'] = '1 - Permissions'; $var[1]['text'] = '1 - Permissions';
$var[1]['link'] = '#'; $var[1]['link'] = '#';
@@ -713,12 +765,9 @@ function forum_update_adminmenu()
$var[9]['text'] = '9 - Migrate any attachments'; $var[9]['text'] = '9 - Migrate any attachments';
$var[9]['link'] = '#'; $var[9]['link'] = '#';
$var[10]['text'] = '10 - Migrate any attachments'; $var[10]['text'] = '10 - Delete old forum data';
$var[10]['link'] = '#'; $var[10]['link'] = '#';
$var[11]['text'] = '11 - Delete old forum data';
$var[11]['link'] = '#';
for($i=1; $i < $currentStep; $i++) for($i=1; $i < $currentStep; $i++)
{ {