aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_smilies.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-12-24 13:30:34 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-12-24 13:30:34 +0000
commit50d58b947bf5322c5c2de80a1bb0b01fef69ecfa (patch)
tree4d836f0ec936f39250137f144bb8c035066d0c13 /phpBB/admin/admin_smilies.php
parenta4f664e581fc5a2022de4f61d5efe7aba7caa824 (diff)
downloadforums-50d58b947bf5322c5c2de80a1bb0b01fef69ecfa.tar
forums-50d58b947bf5322c5c2de80a1bb0b01fef69ecfa.tar.gz
forums-50d58b947bf5322c5c2de80a1bb0b01fef69ecfa.tar.bz2
forums-50d58b947bf5322c5c2de80a1bb0b01fef69ecfa.tar.xz
forums-50d58b947bf5322c5c2de80a1bb0b01fef69ecfa.zip
Guess what? ... yep, it's those \' again
git-svn-id: file:///svn/phpbb/trunk@1688 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_smilies.php')
-rw-r--r--phpBB/admin/admin_smilies.php21
1 files changed, 6 insertions, 15 deletions
diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php
index f19f340292..7c245d5977 100644
--- a/phpBB/admin/admin_smilies.php
+++ b/phpBB/admin/admin_smilies.php
@@ -151,10 +151,8 @@ if( isset($HTTP_GET_VARS['import_pack']) || isset($HTTP_POST_VARS['import_pack']
if( !empty($replace_existing) )
{
$sql = "UPDATE " . SMILIES_TABLE . "
- SET smile_url = '$smile_data[0]',
- emoticon = '$smile_data[1]'
- WHERE code = '$smile_data[$j]'";
-
+ SET smile_url = '" . str_replace("\'", "''", $smile_data[0]) . "', emoticon = '" . str_replace("\'", "''", $smile_data[1]) . "'
+ WHERE code = '" . str_replace("\'", "''", $smile_data[$j]) . "'";
}
else
{
@@ -163,15 +161,8 @@ if( isset($HTTP_GET_VARS['import_pack']) || isset($HTTP_POST_VARS['import_pack']
}
else
{
- $sql = "INSERT INTO " . SMILIES_TABLE . " (
- code,
- smile_url,
- emoticon )
- VALUES(
- '$smile_data[$j]',
- '$smile_data[0]',
- '$smile_data[1]')";
-
+ $sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
+ VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')";
}
if( $sql != '' )
@@ -410,7 +401,7 @@ else if ( $mode != "" )
// Proceed with updating the smiley table.
//
$sql = "UPDATE " . SMILIES_TABLE . "
- SET code = '$smile_code', smile_url = '$smile_url', emoticon = '$smile_emotion'
+ SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "'
WHERE smilies_id = $smile_id";
$result = $db->sql_query($sql);
if( !$result )
@@ -440,7 +431,7 @@ else if ( $mode != "" )
// Save the data to the smiley table.
//
$sql = "INSERT INTO " . SMILIES_TABLE . " (code, smile_url, emoticon)
- VALUES ('$smile_code', '$smile_url', '$smile_emotion')";
+ VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')";
$result = $db->sql_query($sql);
if( !$result )
{