From 82e912bfac11ed01c14f511de58e28a3f3a530f8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 23 Mar 2013 04:16:05 -0700 Subject: [PATCH] Possible forum upgrade fix --- e107_plugins/forum/forum_update.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/e107_plugins/forum/forum_update.php b/e107_plugins/forum/forum_update.php index dbc41cb84..e6d5badc8 100644 --- a/e107_plugins/forum/forum_update.php +++ b/e107_plugins/forum/forum_update.php @@ -167,19 +167,21 @@ function step2() } else { - $text = "
- + $text = " +
"; } $ns->tablerender('Step 2: Forum table creation', $mes->render(). $text); } -// DEPRECATED - Done automatically via plugin-class. -/* +// FIXME - use e107::getPlugin()->manage_extended_field('add', $name, $attrib, $source) + function step3() { $e107 = e107::getInstance(); + $ns = e107::getRender(); + $stepCaption = 'Step 3: Extended user field creation'; if(!isset($_POST['create_extended'])) { @@ -192,15 +194,19 @@ function step3() "; - $e107->ns->tablerender($stepCaption, $text); + + $ns->tablerender($stepCaption, $text); return; } + require_once(e_HANDLER.'user_extended_class.php'); $ue = new e107_user_extended; + $fieldList = array( - 'plugin_forum_posts' => EUF_INTEGER, - 'plugin_forum_viewed' => EUF_TEXTAREA + 'plugin_forum_posts' => EUF_INTEGER, + 'plugin_forum_viewed' => EUF_TEXTAREA ); + $failed = false; foreach($fieldList as $fieldName => $fieldType) { @@ -216,6 +222,7 @@ function step3() $failed = true; } } + if($failed) { $text .= ' @@ -227,15 +234,16 @@ function step3() { $text .= "

-
+
"; } - $e107->ns->tablerender($stepCaption, $text); + + $ns->tablerender($stepCaption, $text); } -*/ + function step4() { global $pref;