Navigation Menu

Skip to content

Commit

Permalink
#735 Fix SMF support
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Oct 11, 2013
1 parent c5b07ea commit a3c0605
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
23 changes: 3 additions & 20 deletions forums/SMF_1_1.php
@@ -1,15 +1,15 @@
<?php

/**
* @copyright (C) 2012 FluxBB (http://fluxbb.org)
* @copyright (C) 2013 FluxBB (http://fluxbb.org)
* @license GPL - GNU General Public License (http://www.gnu.org/licenses/gpl.html)
* @package FluxBB
*/

// Define the version and database revision that this code was written for
define('FORUM_VERSION', '1.4.8');
define('FORUM_VERSION', '1.5.3');

define('FORUM_DB_REVISION', 15);
define('FORUM_DB_REVISION', 18);
define('FORUM_SI_REVISION', 2);
define('FORUM_PARSER_REVISION', 2);

Expand All @@ -27,7 +27,6 @@ class SMF_1_1 extends Forum
// 'forum_perms' => 0,
'groups' => array('membergroups', 'ID_GROUP', 'minPosts = -1 AND ID_GROUP > 3'),
'posts' => array('messages', 'ID_MSG'),
'ranks' => array('membergroups', 'ID_GROUP', 'minPosts <> -1'),
// 'reports' => array('reports', 'report_id'),
'topic_subscriptions' => array('log_notify', 'ID_TOPIC', 'ID_TOPIC > 0'),
'forum_subscriptions' => array('log_notify', 'ID_BOARD', 'ID_BOARD > 0'),
Expand Down Expand Up @@ -157,7 +156,6 @@ function convert_config()
'o_quickpost' => 1,
'o_users_online' => 1,
'o_censoring' => 0,
'o_ranks' => 1,
'o_show_dot' => 0,
'o_topic_views' => 1,
'o_quickjump' => 1,
Expand Down Expand Up @@ -304,21 +302,6 @@ function convert_posts($start_at)
return $this->redirect('messages', 'ID_MSG', $start_at);
}

function convert_ranks()
{
$result = $this->db->query_build(array(
'SELECT' => 'ID_GROUP AS id, groupName AS rank, minPosts AS min_posts',
'FROM' => 'membergroups',
'WHERE' => 'minPosts <> -1',
)) or conv_error('Unable to fetch ranks', __FILE__, __LINE__, $this->db->error());

conv_processing_message('ranks', $this->db->num_rows($result));
while ($cur_rank = $this->db->fetch_assoc($result))
{
$this->fluxbb->add_row('ranks', $cur_rank);
}
}

// function convert_reports()
// {
// $result = $this->db->query_build(array(
Expand Down
23 changes: 3 additions & 20 deletions forums/SMF_2.php
@@ -1,15 +1,15 @@
<?php

/**
* @copyright (C) 2012 FluxBB (http://fluxbb.org)
* @copyright (C) 2013 FluxBB (http://fluxbb.org)
* @license GPL - GNU General Public License (http://www.gnu.org/licenses/gpl.html)
* @package FluxBB
*/

// Define the version and database revision that this code was written for
define('FORUM_VERSION', '1.4.8');
define('FORUM_VERSION', '1.5.3');

define('FORUM_DB_REVISION', 15);
define('FORUM_DB_REVISION', 18);
define('FORUM_SI_REVISION', 2);
define('FORUM_PARSER_REVISION', 2);

Expand All @@ -27,7 +27,6 @@ class SMF_2 extends Forum
// 'forum_perms' => 0,
'groups' => array('membergroups', 'id_group', 'min_posts = -1 AND id_group > 3'),
'posts' => array('messages', 'id_msg'),
'ranks' => array('membergroups', 'id_group', 'min_posts <> -1'),
// 'reports' => array('reports', 'report_id'),
'topic_subscriptions' => array('log_notify', 'id_topic', 'id_topic > 0'),
'forum_subscriptions' => array('log_notify', 'id_board', 'id_board > 0'),
Expand Down Expand Up @@ -155,7 +154,6 @@ function convert_config()
'o_quickpost' => 1,
'o_users_online' => 1,
'o_censoring' => 0,
'o_ranks' => 1,
'o_show_dot' => 0,
'o_topic_views' => 1,
'o_quickjump' => 1,
Expand Down Expand Up @@ -302,21 +300,6 @@ function convert_posts($start_at)
return $this->redirect('messages', 'id_msg', $start_at);
}

function convert_ranks()
{
$result = $this->db->query_build(array(
'SELECT' => 'id_group AS id, group_name AS rank, min_posts',
'FROM' => 'membergroups',
'WHERE' => 'min_posts <> -1',
)) or conv_error('Unable to fetch ranks', __FILE__, __LINE__, $this->db->error());

conv_processing_message('ranks', $this->db->num_rows($result));
while ($cur_rank = $this->db->fetch_assoc($result))
{
$this->fluxbb->add_row('ranks', $cur_rank);
}
}

function convert_reports()
{
$result = $this->db->query_build(array(
Expand Down

0 comments on commit a3c0605

Please sign in to comment.