From c9f5c0164f41851d45287ad9b3f969068e8e5f27 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 25 Mar 2010 14:27:13 +0000 Subject: [PATCH] Fix smart quotes and funky ms characters in the new administrator's project editor (for title and summary) as well --- admin/project_editor.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/project_editor.php b/admin/project_editor.php index 0283778..78f62ef 100644 --- a/admin/project_editor.php +++ b/admin/project_editor.php @@ -113,16 +113,16 @@ function project_save() $title=stripslashes($_POST['title']); mysql_query("UPDATE projects SET ". - "title='".mysql_escape_string(iconv("UTF-8","ISO-8859-1",$title))."', ". - "projectdivisions_id='".$_POST['projectdivisions_id']."', ". + "title='".mysql_escape_string(iconv("UTF-8","ISO-8859-1//TRANSLIT",$title))."', ". + "projectdivisions_id='".intval($_POST['projectdivisions_id'])."', ". "language='".mysql_escape_string(stripslashes($_POST['language']))."', ". "req_table='".mysql_escape_string(stripslashes($_POST['req_table']))."', ". "req_electricity='".mysql_escape_string(stripslashes($_POST['req_electricity']))."', ". - "req_special='".mysql_escape_string(iconv("UTF-8","ISO-8859-1",stripslashes($_POST['req_special'])))."', ". - "summary='".mysql_escape_string(iconv("UTF-8","ISO-8859-1",stripslashes($_POST['summary'])))."', ". + "req_special='".mysql_escape_string(iconv("UTF-8","ISO-8859-1//TRANSLIT",stripslashes($_POST['req_special'])))."', ". + "summary='".mysql_escape_string(iconv("UTF-8","ISO-8859-1//TRANSLIT",stripslashes($_POST['summary'])))."', ". "summarycountok='$summarycountok',". "projectsort='".mysql_escape_string(stripslashes($_POST['projectsort']))."'". - "WHERE id='".$_POST['id']."'"); + "WHERE id='".intval($_POST['id'])."'"); echo mysql_error(); happy_("Project information successfully updated");