mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 11:36:20 +05:30
Add last modified time
Add last modified time variable (eg. $p->lastMod). Add fallback just in case the tags count not the same.
This commit is contained in:
parent
38533939d0
commit
f4cf4e4435
3 changed files with 163 additions and 152 deletions
|
|
@ -818,9 +818,9 @@ function migrate($title, $time, $tags, $content, $url, $user, $source)
|
|||
$post_tagmd = rtrim($post_tagmd, ',');
|
||||
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
|
||||
if (!empty($source)) {
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . "\n" . '<!--tag' . $post_tagmd . 'tag-->' . "\n\n" . $content . "\n\n" . 'Source: <a target="_blank" href="' . $source . '">' . $title . '</a>';
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . "\n" . '<!--tag ' . $post_tagmd . ' tag-->' . "\n\n" . $content . "\n\n" . 'Source: <a target="_blank" href="' . $source . '">' . $title . '</a>';
|
||||
} else {
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . "\n" . '<!--tag' . $post_tagmd . 'tag-->' . "\n\n" . $content;
|
||||
$post_content = '<!--t ' . $post_title . ' t-->' . "\n" . '<!--tag ' . $post_tagmd . ' tag-->' . "\n\n" . $content;
|
||||
}
|
||||
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue