aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-09-03 21:44:08 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-09-03 21:44:08 +0000
commit7ea3d109da71699ac90b13ce41c99643359d801e (patch)
treec4a361d6016f7661c290333f08bd224ef18c7950 /phpBB
parent1c2f9cdfd0493fbcc9ac40949d003e9979825a8d (diff)
downloadforums-7ea3d109da71699ac90b13ce41c99643359d801e.tar
forums-7ea3d109da71699ac90b13ce41c99643359d801e.tar.gz
forums-7ea3d109da71699ac90b13ce41c99643359d801e.tar.bz2
forums-7ea3d109da71699ac90b13ce41c99643359d801e.tar.xz
forums-7ea3d109da71699ac90b13ce41c99643359d801e.zip
Added logging abilitiy
git-svn-id: file:///svn/phpbb/trunk@4463 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/admin_bbcodes.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/phpBB/adm/admin_bbcodes.php b/phpBB/adm/admin_bbcodes.php
index b123d4862c..e8c2550644 100644
--- a/phpBB/adm/admin_bbcodes.php
+++ b/phpBB/adm/admin_bbcodes.php
@@ -3,12 +3,12 @@
//
// $Id$
//
-// FILENAME : admin_bbcodes.php
+// FILENAME : admin_bbcodes.php
// STARTED : Wed Aug 20, 2003
// COPYRIGHT : © 2001, 2003 phpBB Group
// WWW : http://www.phpbb.com/
-// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
-//
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
// -------------------------------------------------------------
if (!empty($setmodules))
@@ -196,7 +196,7 @@ switch ($mode)
HAVING MIN(b2.bbcode_id) > b1.bbcode_id + 1
ORDER BY b1.bbcode_id ASC';
$result = $db->sql_query_limit($sql, 1);
-
+
if ($row = $db->sql_fetchrow($result))
{
$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));
$lang = 'BBCODE_ADDED';
+ $log_action = 'LOG_BBCODE_ADD';
}
else
{
$db->sql_query('UPDATE ' . BBCODES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE bbcode_id = ' . $bbcode_id);
$lang = 'BBCODE_EDITED';
+ $log_action = 'LOG_BBCODE_EDIT';
}
+ add_log('admin', $log_action, $data['bbcode_tag']);
+
trigger_error($lang);
break;
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