mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +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:
@@ -411,6 +411,24 @@ class dbal
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run binary AND operator on DB column.
|
||||
* Results in sql statement: "{$column_name} & (1 << {$bit}) {$compare}"
|
||||
*
|
||||
* @param string $column_name The column name to use
|
||||
* @param int $bit The value to use for the AND operator, will be converted to (1 << $bit). Is used by options, using the number schema... 0, 1, 2...29
|
||||
* @param string $compare Any custom SQL code after the check (for example "= 0")
|
||||
*/
|
||||
function sql_bit_and($column_name, $bit, $compare = '')
|
||||
{
|
||||
if (method_exists($this, '_sql_bit_and'))
|
||||
{
|
||||
return $this->_sql_bit_and($column_name, $bit, $compare);
|
||||
}
|
||||
|
||||
return $column_name . ' & ' . (1 << $bit) . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run more than one insert statement.
|
||||
*
|
||||
|
Reference in New Issue
Block a user