cvs: pearweb /public_html/notes/admin trans.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sun, 13 Jan 2008 21:45:09 +0000 |
| Subject: | cvs: pearweb /public_html/notes/admin trans.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-50300@lists.php.net to get a copy of this message | ||
dufuz Sun Jan 13 21:45:09 2008 UTC
Modified files:
/pearweb/public_html/notes/admin trans.php
Log:
using DB::quote instead of mysql_escape_string
http://cvs.php.net/viewvc.cgi/pearweb/public_html/notes/admin/trans.php?r1=1.15&r2=1.16&diff_format=u
Index: pearweb/public_html/notes/admin/trans.php
diff -u pearweb/public_html/notes/admin/trans.php:1.15
pearweb/public_html/notes/admin/trans.php:1.16
--- pearweb/public_html/notes/admin/trans.php:1.15 Sat Jul 21 20:33:37 2007
+++ pearweb/public_html/notes/admin/trans.php Sun Jan 13 21:45:09 2008
@@ -12,12 +12,12 @@
}
switch ($action) {
- case 'makedocbug':
+ case 'makedocbug':
if (isset($_GET['noteId'])) {
$noteId = (int)$_GET['noteId'];
-
+
$note = $manualNotes->getSingleCommentById($noteId);
-
+
$registered = 1;
$package = getPackageNameForId($note['page_url']);
$package_name = is_null($package) ? 'Documentation' : $package;
@@ -26,7 +26,7 @@
$handle = $auth_user->handle;
$sdesc = 'User note that is a documentation problem';
$ldesc = 'Manual page: ' . $note['page_url'] .
"\n\n" .
- str_replace('<br />', '',
mysql_escape_string(html_entity_decode($note['note_text'])));
+ str_replace('<br />', '',
$dbh->quote(html_entity_decode($note['note_text'])));
$package_version = null;
$php_version = 'Irrelevant';
$php_os = 'Irrelevant';
@@ -68,7 +68,7 @@
$manualNotes->deleteSingleComment($noteId);
// TODO: add error handling
-
+
$emailInfos = array(
'id' => $id,
'php_os' => $php_os,
@@ -89,7 +89,7 @@
}
break;
case 'updateapproved':
-
+
if (isset($_POST['noteIds']) && is_array($_POST['noteIds'])) {
if (isset($_POST['pending'])) {
$notes = $manualNotes->updateCommentList($_POST['noteIds'],
'pending');
@@ -107,14 +107,14 @@
}
$_GET = $_POST;
$_GET['status'] = 'approved';
-
+
include dirname(__FILE__) . '/index.php';
exit;
} else {
$error = 'Neither pending nor delete was selected';
$_GET = $_POST;
$_GET['status'] = 'approved';
-
+
include dirname(__FILE__) . '/index.php';
exit;
}
@@ -150,7 +150,7 @@
if (isset($_POST['undelete'])) {
$_GET['status'] = 'deleted';
}
-
+
include dirname(__FILE__) . '/index.php';
exit;
} else {
@@ -159,7 +159,7 @@
if (isset($_POST['undelete'])) {
$_GET['status'] = 'deleted';
}
-
+
include dirname(__FILE__) . '/index.php';
exit;
}