mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
Added logging abilitiy
git-svn-id: file:///svn/phpbb/trunk@4463 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1c2f9cdfd0
commit
7ea3d109da
1 changed files with 18 additions and 5 deletions
|
@ -3,12 +3,12 @@
|
||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
//
|
//
|
||||||
// FILENAME : admin_bbcodes.php
|
// FILENAME : admin_bbcodes.php
|
||||||
// STARTED : Wed Aug 20, 2003
|
// STARTED : Wed Aug 20, 2003
|
||||||
// COPYRIGHT : © 2001, 2003 phpBB Group
|
// COPYRIGHT : © 2001, 2003 phpBB Group
|
||||||
// WWW : http://www.phpbb.com/
|
// WWW : http://www.phpbb.com/
|
||||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
//
|
//
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
|
@ -196,7 +196,7 @@ switch ($mode)
|
||||||
HAVING MIN(b2.bbcode_id) > b1.bbcode_id + 1
|
HAVING MIN(b2.bbcode_id) > b1.bbcode_id + 1
|
||||||
ORDER BY b1.bbcode_id ASC';
|
ORDER BY b1.bbcode_id ASC';
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
|
||||||
if ($row = $db->sql_fetchrow($result))
|
if ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$bbcode_id = $row['bbcode_id'] + 1;
|
$bbcode_id = $row['bbcode_id'] + 1;
|
||||||
|
@ -227,18 +227,31 @@ switch ($mode)
|
||||||
|
|
||||||
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
$db->sql_query('INSERT INTO ' . BBCODES_TABLE . $db->sql_build_array('INSERT', $sql_ary));
|
||||||
$lang = 'BBCODE_ADDED';
|
$lang = 'BBCODE_ADDED';
|
||||||
|
$log_action = 'LOG_BBCODE_ADD';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->sql_query('UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . $bbcode_id);
|
$db->sql_query('UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . $bbcode_id);
|
||||||
$lang = 'BBCODE_EDITED';
|
$lang = 'BBCODE_EDITED';
|
||||||
|
$log_action = 'LOG_BBCODE_EDIT';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_log('admin', $log_action, $data['bbcode_tag']);
|
||||||
|
|
||||||
trigger_error($lang);
|
trigger_error($lang);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
$sql = 'SELECT bbcode_tag
|
||||||
|
FROM ' . BBCODES_TABLE . "
|
||||||
|
WHERE bbcode_id = $bbcode_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
if ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||||
|
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
|
||||||
|
}
|
||||||
|
|
||||||
// No break here
|
// No break here
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue