mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 20:40:24 +02:00
ok, i am very sorry, but this needs to be fixed.
Generally, our config table is not really suited for holding large datasets. Because feed settings for the forums to enable news feeds and excluded forums rely on the forums itself we have decided to introduce a forum_options table where custom options can be stored. Additionally, for this to work across all DBMS we support, we added a new method to the DBAL for the bitwise AND operator. Also moved the forum/topic feed template variable to the location where they belong to (forum and topic view) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9965 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -69,7 +69,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
$acl = ($ignore_acl) ? '' : (($only_acl_post) ? 'f_post' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'));
|
||||
|
||||
// This query is identical to the jumpbox one
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
ORDER BY left_id ASC';
|
||||
$result = $db->sql_query($sql, 600);
|
||||
@@ -1364,15 +1364,15 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_id_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
case 'topic_approved':
|
||||
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
@@ -1409,15 +1409,15 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$db->sql_query($sql);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
case 'post_reported':
|
||||
$post_ids = $post_reported = array();
|
||||
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
||||
$sql = 'SELECT p.post_id, p.post_reported
|
||||
FROM ' . POSTS_TABLE . " p
|
||||
$where_sql
|
||||
@@ -1468,7 +1468,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
WHERE ' . $db->sql_in_set('post_id', $post_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
@@ -1481,7 +1481,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_ids = $topic_reported = array();
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
||||
$sql = 'SELECT DISTINCT(t.topic_id)
|
||||
FROM ' . POSTS_TABLE . " t
|
||||
$where_sql_and t.post_reported = 1";
|
||||
@@ -1514,7 +1514,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
@@ -1522,7 +1522,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$post_ids = $post_attachment = array();
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
||||
$sql = 'SELECT p.post_id, p.post_attachment
|
||||
FROM ' . POSTS_TABLE . " p
|
||||
$where_sql
|
||||
@@ -1573,7 +1573,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
WHERE ' . $db->sql_in_set('post_id', $post_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
@@ -1619,15 +1619,15 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'forum':
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
||||
// 1: Get the list of all forums
|
||||
$sql = 'SELECT f.*
|
||||
FROM ' . FORUMS_TABLE . " f
|
||||
@@ -1828,7 +1828,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
break;
|
||||
|
||||
@@ -1836,7 +1836,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data = $post_ids = $approved_unapproved_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
||||
$sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
|
||||
FROM ' . TOPICS_TABLE . " t
|
||||
$where_sql";
|
||||
@@ -2160,7 +2160,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
unset($topic_data);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
|
||||
// if some topics have been resync'ed then resync parent forums
|
||||
// except when we're only syncing a range, we don't want to sync forums during
|
||||
// batch processing.
|
||||
|
Reference in New Issue
Block a user