diaspora photos ?
This commit is contained in:
19
update.php
19
update.php
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1081 );
|
||||
define( 'UPDATE_VERSION' , 1082 );
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -673,4 +673,19 @@ function update_1079() {
|
||||
|
||||
function update_1080() {
|
||||
q("ALTER TABLE `fcontact` ADD `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'");
|
||||
}
|
||||
}
|
||||
|
||||
function update_1081() {
|
||||
q("ALTER TABLE `photo` ADD `guid` CHAR( 64 ) NOT NULL AFTER `contact`id`,
|
||||
ADD INDEX ( `guid` ) ");
|
||||
$r = q("SELECT distinct(`resource-id`) FROM `photo` WHERE 1 group by `id`");
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
$guid = get_guid();
|
||||
q("update `photo` set `guid` = '%s' where `resource-id` = '%s'",
|
||||
dbesc($guid),
|
||||
dbesc($rr['resource-id'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user