// Post mediam, add 12 hours.
$match[4] = $match[4] + 12;
}
-
+
$ts = mktime($match[4], $match[5], $match[6], $match[1], $match[2], $match[3]);
$this->debug('Matched string date format: ' . $ts);
}
if ($ts <= 1) {
$ts = time();
}
-
+
return $ts;
}
case 'PRIMARY CATEGORY':
case 'CATEGORY':
- $cat_found = false;
- if ( is_array($this->categories) ) {
- for ( $y=0 ; $y<sizeof($this->categories) ; $y++ ) {
- if ( $this->categories[$y]['category_name'] == $data ) {
- $cat_found = true;
- break;
- }
- }
- if ( $cat_found){
- if (!in_array($this->categories[$y]['categoryid'], $entry['categories']) ) {
- //$entries[$n]['categories'][] = $categories[$y]['categoryid'];
- $entry['categories'][] = $this->categories[$y]['categoryid'];
- }
- }else {
- $tasks[] = sprintf(CREATE_CATEGORY, htmlspecialchars($data));
- }
- }
- break;
+ $categories = explode("\0", $data);
+ foreach($categories AS $data) {
+ $data = trim($data);
+ $cat_found = false;
+ if (is_array($this->categories)) {
+ for ( $y=0 ; $y<sizeof($this->categories) ; $y++ ) {
+ if ( $this->categories[$y]['category_name'] == $data ) {
+ $cat_found = true;
+ break;
+ }
+ }
+ if ($cat_found) {
+ if (!in_array($this->categories[$y]['categoryid'], $entry['categories']) ) {
+ //$entries[$n]['categories'][] = $categories[$y]['categoryid'];
+ $entry['categories'][] = $this->categories[$y]['categoryid'];
+ }
+ } else {
+ $tasks[] = sprintf(CREATE_CATEGORY, htmlspecialchars($data));
+ }
+ }
+ }
+ break;
}
}
$entry['props'] = $entryprops;
$comment[$c_el] = $content;
} else {
$this->debug("Appending to entry: $line");
- $entry[$c_el] = $content;
+ if (isset($entry[$c_el])) {
+ $entry[$c_el] .= "\0" . $content;
+ } else {
+ $entry[$c_el] = $content;
+ }
}
}
} elseif ($is_comment || $is_trackback) {
$entry['authorid'] = $serendipity['authorid'];
$entry['author'] = $serendipity['realname'];
}
-
+
if (!isset($entry['isdraft'])) {
$entry['isdraft'] = 'false';
}