| 1 |
<?php |
<?php |
| 2 |
// $Id: user_tags.module,v 1.8.2.2 2008/05/06 17:35:27 deekayen Exp $ |
// $Id: user_tags.module,v 1.8.2.3 2008/05/06 18:57:03 deekayen Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 153 |
|
|
| 154 |
// Commas and quotes in terms are special cases, so encode 'em. |
// Commas and quotes in terms are special cases, so encode 'em. |
| 155 |
if (preg_match('/,/', $term->name) || preg_match('/"/', $term->name)) { |
if (preg_match('/,/', $term->name) || preg_match('/"/', $term->name)) { |
| 156 |
$term->name = '"'.preg_replace('/"/', '""', $term->name).'"'; |
$term->name = '"'. preg_replace('/"/', '""', $term->name) .'"'; |
| 157 |
} |
} |
| 158 |
$typed_terms[] = $term->name; |
$typed_terms[] = $term->name; |
| 159 |
} |
} |
| 204 |
|
|
| 205 |
if (is_array($edit['taxonomy'])) { |
if (is_array($edit['taxonomy'])) { |
| 206 |
if (isset($edit['taxonomy']['freetags'])) { |
if (isset($edit['taxonomy']['freetags'])) { |
| 207 |
foreach ($edit['taxonomy']['freetags'] as $key => $value){ |
foreach ($edit['taxonomy']['freetags'] as $key => $value) { |
| 208 |
$vid = $key; |
$vid = $key; |
| 209 |
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; |
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; |
| 210 |
preg_match_all($regexp, $value, $matches); |
preg_match_all($regexp, $value, $matches); |