Post scheduler
This commit is contained in:
parent
66bcaa33e3
commit
12fe1779af
|
@ -22,7 +22,7 @@ $_newPages = $dbPages->regenerate();
|
|||
$_draftPosts = array();
|
||||
foreach($posts as $Post)
|
||||
{
|
||||
if(!$Post->published()) {
|
||||
if($Post->draft()) {
|
||||
array_push($_draftPosts, $Post);
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +34,3 @@ foreach($pages as $Page)
|
|||
array_push($_draftPages, $Page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,12 @@ class Post extends fileContent
|
|||
return ( ($this->getField('status')==='published') && ($this->getField('date')>$currentDate) );
|
||||
}
|
||||
|
||||
// Returns TRUE if the post is draft, FALSE otherwise.
|
||||
public function draft()
|
||||
{
|
||||
return ($this->getField('status')=='draft');
|
||||
}
|
||||
|
||||
public function username()
|
||||
{
|
||||
return $this->getField('username');
|
||||
|
|
Loading…
Reference in New Issue