GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 9f09b136 authored by mmn's avatar mmn

Adding crc32 to uniqueify conversation URIs

This really should be a UUID or something else totally unexpected
but I figure that crc32 is good enough for now. The reason we keep
the main structure is because some third party scripts have begun
relying upon the tag URI format to parse out domain name, type etc.
parent 72d1c3c7
......@@ -71,10 +71,11 @@ class Conversation extends Managed_DataObject
$conv = new Conversation();
$conv->created = common_sql_now();
$conv->id = $notice->id;
$conv->uri = $uri ?: sprintf('%s%s=%d:%s=%s',
$conv->uri = $uri ?: sprintf('%s%s=%d:%s=%s:%s=%x',
TagURI::mint(),
'noticeId', $notice->id,
'objectType', 'thread');
'objectType', 'thread',
'crc32', crc32($notice->content));
$result = $conv->insert();
if ($result === false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment