diff options
author | Friendika <info@friendika.com> | 2011-11-01 16:08:07 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-01 16:08:07 -0700 |
commit | 573670fa0c8a3d8f111430985d263499b79a6ac0 (patch) | |
tree | 901718877c62abe3d6cc3bfb2050fa6a5126dac3 /update.php | |
parent | ae7425dadb2e8e2911f405631e332965066a916b (diff) | |
download | volse-hubzilla-573670fa0c8a3d8f111430985d263499b79a6ac0.tar.gz volse-hubzilla-573670fa0c8a3d8f111430985d263499b79a6ac0.tar.bz2 volse-hubzilla-573670fa0c8a3d8f111430985d263499b79a6ac0.zip |
more social graph stuff
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/update.php b/update.php index aa78c3c2e..cdadb2e38 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1100 ); +define( 'UPDATE_VERSION' , 1101 ); /** * @@ -846,6 +846,22 @@ function update_1099() { } +function update_1100() { + q("ALTER TABLE `contact` ADD `nurl` CHAR( 255 ) NOT NULL AFTER `url` "); + q("alter table contact add index (`nurl`) "); + + require_once('include/text.php'); + + $r = q("select id, url from contact where url != '' and nurl = '' "); + if(count($r)) { + foreach($r as $rr) { + q("update contact set nurl = '%s' where id = %d limit 1", + dbesc(normalise_link($rr['url'])), + intval($rr['id']) + ); + } + } +} |