Update UUID

This commit is contained in:
Diego Najar 2017-05-20 11:17:16 +02:00
parent 210f4c92d4
commit 7f9094b25b
1 changed files with 13 additions and 1 deletions

View File

@ -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();