Pages date updates
This commit is contained in:
parent
778e91166c
commit
0a71ae164a
|
@ -11,7 +11,7 @@ function updateBludit()
|
||||||
// Check if Bludit need to be update.
|
// Check if Bludit need to be update.
|
||||||
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) )
|
if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) )
|
||||||
{
|
{
|
||||||
// --- Update dates ---
|
// --- Update dates on posts ---
|
||||||
foreach($dbPosts->db as $key=>$post)
|
foreach($dbPosts->db as $key=>$post)
|
||||||
{
|
{
|
||||||
$date = Date::format($post['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
|
$date = Date::format($post['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
|
||||||
|
@ -22,6 +22,17 @@ function updateBludit()
|
||||||
|
|
||||||
$dbPosts->save();
|
$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 ---
|
// --- Update directories ---
|
||||||
$directories = array(
|
$directories = array(
|
||||||
PATH_POSTS,
|
PATH_POSTS,
|
||||||
|
|
Loading…
Reference in New Issue