X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=application%2FUpdater.php;h=f0d02814b5599654b0c6638e40e02e86068a5ab7;hb=d592daea8343bb4dfecff5d97e93699581ccc58c;hp=94b639903c7fdead5816c52fc8a358f534700d80;hpb=1dc37f9cf8397e6050c4d5d981da263e6333a849;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Updater.php b/application/Updater.php index 94b63990..f0d02814 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -218,11 +218,14 @@ class Updater /** * Update the database to use the new ID system, which replaces linkdate primary keys. - * Also, creation and update dates are now DateTime objects. + * Also, creation and update dates are now DateTime objects (done by LinkDB). * * Since this update is very sensitve (changing the whole database), the datastore will be * automatically backed up into the file datastore..php. * + * LinkDB also adds the field 'shorturl' with the precedent format (linkdate smallhash), + * which will be saved by this method. + * * @return bool true if the update is successful, false otherwise. */ public function updateMethodDatastoreIds() @@ -243,10 +246,6 @@ class Updater $links = array_reverse($links); $cpt = 0; foreach ($links as $l) { - $l['created'] = DateTime::createFromFormat('Ymd_His', $l['linkdate']); - if (! empty($l['updated'])) { - $l['updated'] = DateTime::createFromFormat('Ymd_His', $l['updated']); - } unset($l['linkdate']); $l['id'] = $cpt; $this->linkDB[$cpt++] = $l;