зеркало из https://github.com/mozilla/gecko-dev.git
Fix Bustage in List Manager, when editing existing item, categories are lost.
This commit is contained in:
Родитель
e4fc9508e6
Коммит
2b7389a5e2
|
@ -58,13 +58,15 @@ function escape_string($value)
|
|||
|
||||
|
||||
|
||||
//Attempt to fix Bug 246743 (strip_tags) and Bug 248242 (htmlentities)
|
||||
//Remove HTML tags and escape enities from GET/POST vars.
|
||||
foreach ($_GET as $key => $val) {
|
||||
$_GET["$key"] = htmlentities(str_replace("\\","",strip_tags($_GET["$key"])));
|
||||
$_GET["$key"] = htmlentities(str_replace("\\","",strip_tags($_GET["$key"])));
|
||||
}
|
||||
|
||||
foreach ($_POST as $key => $val) {
|
||||
$_POST["$key"] = htmlentities(str_replace("\\","",strip_tags($_POST["$key"])));
|
||||
if (!is_array($_POST["$key"])) {
|
||||
$_POST["$key"] = htmlentities(str_replace("\\","",strip_tags($_POST["$key"])));
|
||||
}
|
||||
}
|
||||
|
||||
// Bug 250596 Fixes for incoming $_GET variables.
|
||||
|
|
|
@ -267,6 +267,7 @@ ORDER BY `Type` , `Name` ASC ";
|
|||
$authors[$v] = $row["UserEmail"];
|
||||
}
|
||||
unset($v);
|
||||
if (!$guid) { $guid = "None"; }
|
||||
|
||||
//Make Authors E-Mail Array into a Nice String
|
||||
$num_authors = count($authors);
|
||||
|
@ -298,11 +299,11 @@ ORDER BY `CatName` ASC ";
|
|||
$categories[$n] = $catid;
|
||||
}
|
||||
unset($n);
|
||||
if (!$categories) {$categories = array(); }
|
||||
|
||||
//Get the Category Table Data for the Select Box
|
||||
$sql = "SELECT `CategoryID`, `CatName` FROM `categories` WHERE `CatType` = '$type' ORDER BY `CatName` ASC";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
// $sqlnum = mysql_num_rows($sql_result);
|
||||
?>
|
||||
<TD ROWSPAN=8 VALIGN=TOP><SPAN class="global">Categories:</SPAN><BR> <SELECT NAME="categories[]" MULTIPLE="YES" SIZE="10">
|
||||
<?php
|
||||
|
|
Загрузка…
Ссылка в новой задаче