Commit 8d4236c9 authored by Dries's avatar Dries
Browse files

- urlencode() the subjects in the admin overview page.

parent 263b7e23
...@@ -209,7 +209,7 @@ function contact_admin() { ...@@ -209,7 +209,7 @@ function contact_admin() {
$result = db_query('SELECT subject, recipients FROM {contact} ORDER BY subject'); $result = db_query('SELECT subject, recipients FROM {contact} ORDER BY subject');
$rows = array(); $rows = array();
while ($subject = db_fetch_object($result)) { while ($subject = db_fetch_object($result)) {
$rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject)); $rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. urlencode($subject->subject)), l(t('delete'), 'admin/contact/delete/'. urlencode($subject->subject)));
} }
$header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2)); $header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2));
return theme('table', $header, $rows); return theme('table', $header, $rows);
......
...@@ -209,7 +209,7 @@ function contact_admin() { ...@@ -209,7 +209,7 @@ function contact_admin() {
$result = db_query('SELECT subject, recipients FROM {contact} ORDER BY subject'); $result = db_query('SELECT subject, recipients FROM {contact} ORDER BY subject');
$rows = array(); $rows = array();
while ($subject = db_fetch_object($result)) { while ($subject = db_fetch_object($result)) {
$rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. $subject->subject), l(t('delete'), 'admin/contact/delete/'. $subject->subject)); $rows[] = array($subject->subject, $subject->recipients, l(t('edit'), 'admin/contact/edit/'. urlencode($subject->subject)), l(t('delete'), 'admin/contact/delete/'. urlencode($subject->subject)));
} }
$header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2)); $header = array(t('Subject'), t('Recipients'), array('data' => t('Operations'), 'colspan' => 2));
return theme('table', $header, $rows); return theme('table', $header, $rows);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment