Pages date updates

This commit is contained in:
dignajar 2016-01-28 20:03:15 -03:00
parent 778e91166c
commit 0a71ae164a

View File

@ -11,7 +11,7 @@ function updateBludit()
// Check if Bludit need to be update.
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) )
{
// --- Update dates ---
// --- Update dates on posts ---
foreach($dbPosts->db as $key=>$post)
{
$date = Date::format($post['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
@ -22,6 +22,17 @@ function updateBludit()
$dbPosts->save();
// --- Update dates on pages ---
foreach($dbPages->db as $key=>$page)
{
$date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
if($date !== false) {
$dbPages->setPostDb($key,'date',$date);
}
}
$dbPages->save();
// --- Update directories ---
$directories = array(
PATH_POSTS,