We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 7793d3b7 authored by Evan Prodromou's avatar Evan Prodromou

Merge branch 'testing' of gitorious.org:statusnet/mainline into testing

parents 682e11bb b71a09a1
......@@ -2,6 +2,13 @@ $(document).ready(
function() {
var form = $('#form_new_bookmark');
form.append('<input type="hidden" name="ajax" value="1"/>');
function doClose() {
self.close();
// If in popup blocker situation, we'll have to redirect back.
setTimeout(function() {
window.location = $('#url').val();
}, 100);
}
form.ajaxForm({dataType: 'xml',
timeout: '60000',
beforeSend: function(formData) {
......@@ -11,12 +18,12 @@ $(document).ready(
error: function (xhr, textStatus, errorThrown) {
form.removeClass('processing');
form.find('#submit').removeClass('disabled');
self.close();
doClose();
},
success: function(data, textStatus) {
form.removeClass('processing');
form.find('#submit').removeClass('disabled');
self.close();
doClose();
}});
}
......
......@@ -21,5 +21,17 @@ class UUIDTest extends PHPUnit_Framework_TestCase
$this->assertEquals(0x4000, hexdec(substr($result, 14, 4)) & 0xF000);
$this->assertEquals(0x8000, hexdec(substr($result, 19, 4)) & 0xC000);
}
public function testUnique()
{
$reps = 100;
$ids = array();
for ($i = 0; $i < $reps; $i++) {
$ids[] = UUID::gen();
}
$this->assertEquals(count($ids), count(array_unique($ids)), "UUIDs must be unique");
}
}
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