diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index 870256ff..e60a92d4 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -28,7 +28,7 @@ function updateBludit() { $date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT); if($date !== false) { - $dbPages->setPostDb($key,'date',$date); + $dbPages->setPageDb($key,'date',$date); } } diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index ef09e828..8235ed36 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -233,6 +233,15 @@ class dbPages extends dbJSON 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. public function pageExists($key) { diff --git a/bl-kernel/dbsite.class.php b/bl-kernel/dbsite.class.php index dcd90625..9a530182 100644 --- a/bl-kernel/dbsite.class.php +++ b/bl-kernel/dbsite.class.php @@ -62,7 +62,7 @@ class dbSite extends dbJSON } // Returns an array with the filters for the url. - public function uriFilters($filter='') + public function uriFilters($filter) { $filters['admin'] = '/admin/'; $filters['post'] = $this->getField('uriPost'); @@ -107,6 +107,18 @@ class dbSite extends dbJSON 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() { return $this->getField('emailFrom'); @@ -122,18 +134,6 @@ class dbSite extends dbJSON 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. public function theme() {