$a = safe_row('*, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod', 'textpattern', 'ID='.intval($id).(gps('txpreview') ? '' : ' and Status in ('.STATUS_LIVE.','.STATUS_STICKY.')'));
if ($a) {
$out['id_keywords'] = $a['Keywords'];
$out['id_author'] = $a['AuthorID'];
populateArticleData($a);
$uExpires = $a['uExpires'];
if ($uExpiresandtime() > $uExpiresand !$publish_expired_articles) {
$out['status'] = '410';
}
}
}
// These are deprecated as of Textpattern v1.0 - leaving them here for
// plugin compatibility.
$out['path_from_root'] = rhu;
$out['pfr'] = rhu;
$out['path_to_site'] = $path_to_site;
$out['permlink_mode'] = $permlink_mode;
$out['sitename'] = $sitename;
return$out;
}
// textpattern() is the function that assembles a page, based on
// Make sure the page has an article tag if necessary.
if (!$has_article_tagand$production_status != 'live'and$pretext['context'] == 'article'and (!empty($pretext['id']) or !empty($pretext['c']) or !empty($pretext['q']) or !empty($pretext['pg']))) {
// Preserve order of custom article ids unless 'sort' attribute is set.
if (!empty($atts['id']) && empty($atts['sort'])) {
$safe_sort = 'field(id, '.join(',', $ids).')';
} else {
$safe_sort = doSlash($sort);
}
$rs = safe_rows_start("*, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod".$match, 'textpattern',
$where.' order by '.$safe_sort.' limit '.intval($pgoffset).', '.intval($limit));