From 7f9094b25ba48cfe20963a104c3adf9c22fdd36c Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 20 May 2017 11:17:16 +0200 Subject: [PATCH] Update UUID --- bl-kernel/admin/controllers/dashboard.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index f08de032..1af9f7b2 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -32,6 +32,12 @@ function updateBludit() $checksum = md5_file(PATH_POSTS.$key.DS.FILENAME); $dbPosts->setPostDb($key, 'md5file', $checksum); } + + // UUID + if( empty($post['uuid']) ) { + $uuid = uniqid(); + $dbPosts->setPostDb($key, 'uuid', $uuid); + } } $dbPosts->save(); @@ -48,10 +54,16 @@ function updateBludit() } // Checksum - if( empty($post['md5file']) ) { + if( empty($page['md5file']) ) { $checksum = md5_file(PATH_PAGES.$key.DS.FILENAME); $dbPages->setPageDb($key, 'md5file', $checksum); } + + // UUID + if( empty($page['uuid']) ) { + $uuid = uniqid(); + $dbPages->setPostDb($key, 'uuid', $uuid); + } } $dbPages->save();