Fix issue with installing and creating boards with MySQL < 5.5.3. Issue #129

This commit is contained in:
Michael Foster 2013-08-04 15:23:26 -04:00
parent 33a07e9ee0
commit b7070aeac6
2 changed files with 9 additions and 3 deletions

View file

@ -480,7 +480,12 @@ function mod_new_board() {
if (!openBoard($_POST['uri']))
error(_("Couldn't open board after creation."));
query(Element('posts.sql', array('board' => $board['uri']))) or error(db_error());
$query = Element('posts.sql', array('board' => $board['uri']));
if (mysql_version() < 50503)
$query = preg_replace('/(CHARSET=|CHARACTER SET )utf8mb4/', '$1utf8', $query);
query($query) or error(db_error());
if ($config['cache']['enabled'])
cache::delete('all_boards');