Update the thr-parent field in the item table

This commit is contained in:
Domovoy 2012-07-29 21:01:04 +02:00
parent 56f0ee4915
commit 283e91cd6a
2 changed files with 9 additions and 2 deletions

View file

@ -13,7 +13,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1418' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1154 );
define ( 'DB_UPDATE_VERSION', 1155 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1154 );
define( 'UPDATE_VERSION' , 1155 );
/**
*
@ -1344,3 +1344,10 @@ function update_1153() {
return UPDATE_SUCCESS;
}
function update_1154() {
$r = q("UPDATE `item` SET `thr-parent`=`parent-uri` WHERE `id`!=`parent` AND `thr-parent`=''");
if(!$r) return UPDATE_FAILED;
return UPDATE_SUCCESS;
}