_taxonomy_prepare_insert
- Versions
- 4.6
_taxonomy_prepare_insert($data, $stage)
Code
modules/taxonomy.module, line 788
<?php
function _taxonomy_prepare_insert($data, $stage) {
if ($stage == 1) {
$result = implode(', ', array_keys($data));
}
else {
foreach (array_values($data) as $value) {
//Escape strings, but not integers
if (is_int($value)) {
$q[] = $value;
}
else {
$q[] = "'". str_replace('%', '%%', db_escape_string($value)) ."'";
}
}
$result = implode(', ', $q);
}
return "($result)";
}
?>Login or register to post comments 