mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
- Some fixes
git-svn-id: file:///svn/phpbb/trunk@6077 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
a32c084507
commit
1cc7445017
4 changed files with 22 additions and 2 deletions
|
@ -56,7 +56,7 @@ class acp_bbcodes
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'modify':
|
case 'modify':
|
||||||
$sql = 'SELECT bbcode_id
|
$sql = 'SELECT bbcode_id, bbcode_tag
|
||||||
FROM ' . BBCODES_TABLE . '
|
FROM ' . BBCODES_TABLE . '
|
||||||
WHERE bbcode_id = ' . $bbcode_id;
|
WHERE bbcode_id = ' . $bbcode_id;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -111,6 +111,24 @@ class acp_bbcodes
|
||||||
|
|
||||||
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||||
|
|
||||||
|
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
||||||
|
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
|
||||||
|
|
||||||
|
if (($action == 'modify' && $data['bbcode_tag'] !== $row['bbcode_tag']) || ($action == 'create'))
|
||||||
|
{
|
||||||
|
$sql = 'SELECT 1 as test
|
||||||
|
FROM ' . BBCODES_TABLE . "
|
||||||
|
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
$info = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
|
||||||
|
{
|
||||||
|
trigger_error('BBCODE_INVALID_TAG_NAME');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'bbcode_tag' => $data['bbcode_tag'],
|
'bbcode_tag' => $data['bbcode_tag'],
|
||||||
'bbcode_match' => $bbcode_match,
|
'bbcode_match' => $bbcode_match,
|
||||||
|
|
|
@ -1099,7 +1099,7 @@ class acp_database
|
||||||
if ($delete)
|
if ($delete)
|
||||||
{
|
{
|
||||||
unlink($file_name);
|
unlink($file_name);
|
||||||
trigger_error($user->lang['BACKUP_SUCCESS']);
|
trigger_error($user->lang['BACKUP_DELETE']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = file_get_contents($file_name);
|
$data = file_get_contents($file_name);
|
||||||
|
|
|
@ -45,6 +45,7 @@ $lang = array_merge($lang, array(
|
||||||
'SELECT_ALL' => 'Select all',
|
'SELECT_ALL' => 'Select all',
|
||||||
'DESELECT_ALL' => 'Deselect all',
|
'DESELECT_ALL' => 'Deselect all',
|
||||||
'BACKUP_SUCCESS' => 'The backup file has been created successfully',
|
'BACKUP_SUCCESS' => 'The backup file has been created successfully',
|
||||||
|
'BACKUP_DELETE' => 'The backup file has been deleted successfully',
|
||||||
|
|
||||||
'STORE_AND_DOWNLOAD' => 'Store and Download',
|
'STORE_AND_DOWNLOAD' => 'Store and Download',
|
||||||
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. You can <u>either</u> upload the backup file via this form or upload it manually to a location on the server. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <b>WARNING</b> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.',
|
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. You can <u>either</u> upload the backup file via this form or upload it manually to a location on the server. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <b>WARNING</b> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.',
|
||||||
|
|
|
@ -36,6 +36,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'BBCODE_ADDED' => 'BBCode added successfully',
|
'BBCODE_ADDED' => 'BBCode added successfully',
|
||||||
'BBCODE_EDITED' => 'BBCode edited successfully',
|
'BBCODE_EDITED' => 'BBCode edited successfully',
|
||||||
|
'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected is invalid',
|
||||||
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist',
|
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist',
|
||||||
'BBCODE_TAG' => 'Tag',
|
'BBCODE_TAG' => 'Tag',
|
||||||
'BBCODE_USAGE' => 'BBCode usage',
|
'BBCODE_USAGE' => 'BBCode usage',
|
||||||
|
|
Loading…
Add table
Reference in a new issue