- actually let the user import smilies/icons paks. ;)

- fix TRUNCATE TABLE syntax (mssql does not understand TRUNCATE alone)


git-svn-id: file:///svn/phpbb/trunk@5944 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-05-20 14:20:12 +00:00
parent f77c0f0541
commit dbb6b3f6cf
5 changed files with 13 additions and 11 deletions

View file

@ -27,6 +27,7 @@ class acp_icons
$action = request_var('action', ''); $action = request_var('action', '');
$action = (isset($_POST['add'])) ? 'add' : $action; $action = (isset($_POST['add'])) ? 'add' : $action;
$action = (isset($_POST['edit'])) ? 'edit' : $action; $action = (isset($_POST['edit'])) ? 'edit' : $action;
$action = (isset($_POST['import'])) ? 'import' : $action;
$icon_id = request_var('id', 0); $icon_id = request_var('id', 0);
$this->tpl_name = 'acp_icons'; $this->tpl_name = 'acp_icons';
@ -328,7 +329,7 @@ class acp_icons
// The user has already selected a smilies_pak file // The user has already selected a smilies_pak file
if ($current == 'delete') if ($current == 'delete')
{ {
$db->sql_query("TRUNCATE $table"); $db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . $table);
switch ($mode) switch ($mode)
{ {

View file

@ -1811,8 +1811,7 @@ function cache_moderators()
global $db, $cache, $auth, $phpbb_root_path, $phpEx; global $db, $cache, $auth, $phpbb_root_path, $phpEx;
// Clear table // Clear table
$sql = (SQL_LAYER != 'sqlite') ? 'TRUNCATE ' . MODERATOR_TABLE : 'DELETE FROM ' . MODERATOR_TABLE; $db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . MODERATOR_TABLE);
$db->sql_query($sql);
// We add moderators who have forum moderator permissions without an explicit ACL_NO setting // We add moderators who have forum moderator permissions without an explicit ACL_NO setting
$hold_ary = $ug_id_ary = $sql_ary = array(); $hold_ary = $ug_id_ary = $sql_ary = array();

View file

@ -647,7 +647,7 @@ class fulltext_mysql extends search_backend
$db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ADD FULLTEXT (post_text)'); $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ADD FULLTEXT (post_text)');
} }
$db->sql_query('TRUNCATE ' . SEARCH_TABLE); $db->sql_query('TRUNCATE TABLE ' . SEARCH_TABLE);
} }
/** /**
@ -678,7 +678,7 @@ class fulltext_mysql extends search_backend
$db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' DROP INDEX post_text'); $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' DROP INDEX post_text');
} }
$db->sql_query('TRUNCATE ' . SEARCH_TABLE); $db->sql_query('TRUNCATE TABLE ' . SEARCH_TABLE);
} }
/** /**

View file

@ -990,9 +990,9 @@ class fulltext_native extends search_backend
{ {
global $db; global $db;
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE ' : 'DELETE FROM ') . SEARCH_WORD_TABLE); $db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_WORD_TABLE);
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE ' : 'DELETE FROM ') . SEARCH_MATCH_TABLE); $db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_MATCH_TABLE);
$db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE ' : 'DELETE FROM ') . SEARCH_TABLE); $db->sql_query(((SQL_LAYER != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_TABLE);
} }
/** /**

View file

@ -74,9 +74,11 @@ $lang = array_merge($lang, array(
'AFTER_ICONS' => 'After %s', 'AFTER_ICONS' => 'After %s',
'AFTER_SMILIES' => 'After %s', 'AFTER_SMILIES' => 'After %s',
'CODE' => 'Code', 'CODE' => 'Code',
'CURRENT_ICONS' => 'Current icons', 'CURRENT_ICONS' => 'Current icons',
'CURRENT_SMILIES' => 'Current smilies', 'CURRENT_ICONS_EXPLAIN' => 'Choose what to do with the currently installed icons',
'CURRENT_SMILIES' => 'Current smilies',
'CURRENT_SMILIES_EXPLAIN' => 'Choose what to do with the currently installed smilies',
'DISPLAY_ON_POSTING' => 'Display on posting', 'DISPLAY_ON_POSTING' => 'Display on posting',