Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Jul 6, 2013
1 parent 64c5cb6 commit b49d84b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
23 changes: 20 additions & 3 deletions forums/PhpBB_3_0.php
@@ -1,15 +1,15 @@
<?php

/**
* @copyright (C) 2013 FluxBB (http://fluxbb.org)
* @copyright (C) 2012 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.5.3');
define('FORUM_VERSION', '1.4.8');

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

Expand All @@ -27,6 +27,7 @@ class PhpBB_3_0 extends Forum
// 'forum_perms' => 0,
'groups' => array('groups', 'group_id', 'group_id > 7'),
'posts' => array('posts', 'post_id'),
'ranks' => array('ranks', 'rank_id', 'rank_special = 0'),
'reports' => array('reports', 'report_id'),
'topic_subscriptions' => array('topics_watch', 'topic_id'),
'forum_subscriptions' => array('forums_watch', 'forum_id'),
Expand Down Expand Up @@ -145,6 +146,7 @@ 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 @@ -300,6 +302,21 @@ function convert_posts($start_at)
return $this->redirect('posts', 'post_id', $start_at);
}

function convert_ranks()
{
$result = $this->db->query_build(array(
'SELECT' => 'rank_id AS id, rank_title AS rank, rank_min AS min_posts',
'FROM' => 'ranks',
'WHERE' => 'rank_special = 0'
)) 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
3 changes: 2 additions & 1 deletion include/converter.class.php
@@ -1,7 +1,7 @@
<?php

/**
* @copyright (C) 2013 FluxBB (http://fluxbb.org)
* @copyright (C) 2012 FluxBB (http://fluxbb.org)
* @license GPL - GNU General Public License (http://www.gnu.org/licenses/gpl.html)
* @package FluxBB
*/
Expand Down Expand Up @@ -183,6 +183,7 @@ function generate_cache()
// Generate cache
generate_config_cache();
generate_bans_cache();
generate_ranks_cache();
generate_quickjump_cache();
generate_censoring_cache();
generate_users_info_cache();
Expand Down
2 changes: 2 additions & 0 deletions include/fluxbb.class.php
Expand Up @@ -43,6 +43,7 @@ class FluxBB
'forum_perms' => array('forum_id'),
'groups' => array('g_id', 'g_id > 4'),
'posts' => array('id'),
'ranks' => array('id'),
'reports' => array('id'),
'topic_subscriptions' => array('topic_id'),
'forum_subscriptions' => array('forum_id'),
Expand Down Expand Up @@ -122,6 +123,7 @@ function cleanup_database()
$this->db->truncate_table('groups');
$this->db->truncate_table('online');
$this->db->truncate_table('posts');
$this->db->truncate_table('ranks');
$this->db->truncate_table('reports');
$this->db->truncate_table('search_cache');
$this->db->truncate_table('search_matches');
Expand Down

0 comments on commit b49d84b

Please sign in to comment.