Updater imrpoves

This commit is contained in:
dignajar 2016-01-29 13:07:29 -03:00
parent 8da7137d7b
commit 221ce7e6f7
3 changed files with 23 additions and 14 deletions

View File

@ -28,7 +28,7 @@ function updateBludit()
{ {
$date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT); $date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT);
if($date !== false) { if($date !== false) {
$dbPages->setPostDb($key,'date',$date); $dbPages->setPageDb($key,'date',$date);
} }
} }

View File

@ -233,6 +233,15 @@ class dbPages extends dbJSON
return false; return false;
} }
public function setPageDb($key, $field, $value)
{
if($this->pageExists($key)) {
$this->db[$key][$field] = $value;
}
return false;
}
// Return TRUE if the page exists, FALSE otherwise. // Return TRUE if the page exists, FALSE otherwise.
public function pageExists($key) public function pageExists($key)
{ {

View File

@ -62,7 +62,7 @@ class dbSite extends dbJSON
} }
// Returns an array with the filters for the url. // Returns an array with the filters for the url.
public function uriFilters($filter='') public function uriFilters($filter)
{ {
$filters['admin'] = '/admin/'; $filters['admin'] = '/admin/';
$filters['post'] = $this->getField('uriPost'); $filters['post'] = $this->getField('uriPost');
@ -107,6 +107,18 @@ class dbSite extends dbJSON
return $this->getField('title'); return $this->getField('title');
} }
// Returns the site slogan.
public function slogan()
{
return $this->getField('slogan');
}
// Returns the site description.
public function description()
{
return $this->getField('description');
}
public function emailFrom() public function emailFrom()
{ {
return $this->getField('emailFrom'); return $this->getField('emailFrom');
@ -122,18 +134,6 @@ class dbSite extends dbJSON
return $this->getField('timeFormat'); return $this->getField('timeFormat');
} }
// Returns the site slogan.
public function slogan()
{
return $this->getField('slogan');
}
// Returns the site description.
public function description()
{
return $this->getField('description');
}
// Returns the site theme name. // Returns the site theme name.
public function theme() public function theme()
{ {