rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.

This commit is contained in:
friendica
2013-03-21 18:25:41 -07:00
parent b3c699d49a
commit ddf5bf8968
27 changed files with 315 additions and 284 deletions

View File

@@ -394,14 +394,14 @@ function item_message_id() {
$dups = false;
$hash = random_string();
$uri = $hash . '@' . get_app()->get_hostname();
$mid = $hash . '@' . get_app()->get_hostname();
$r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1",
dbesc($uri));
$r = q("SELECT `id` FROM `item` WHERE `mid` = '%s' LIMIT 1",
dbesc($mid));
if(count($r))
$dups = true;
} while($dups == true);
return $uri;
return $mid;
}
// Generate a guaranteed unique photo ID.