File inc/bug.inc.php changed (mode: 100644) (index f3976a7..411a5cd) |
... |
... |
function rg_bug_next_id($db, $repo_id) |
30 |
30 |
rg_prof_start("bug_next_id"); |
rg_prof_start("bug_next_id"); |
31 |
31 |
|
|
32 |
32 |
$next_bug_id = FALSE; |
$next_bug_id = FALSE; |
33 |
|
|
|
34 |
33 |
do { |
do { |
35 |
34 |
$sql = "UPDATE bugs_max SET last_bug_id = last_bug_id + 1" |
$sql = "UPDATE bugs_max SET last_bug_id = last_bug_id + 1" |
36 |
35 |
. " WHERE repo_id = $repo_id" |
. " WHERE repo_id = $repo_id" |
|
... |
... |
function rg_bug_next_id($db, $repo_id) |
59 |
58 |
break; |
break; |
60 |
59 |
} |
} |
61 |
60 |
|
|
|
61 |
|
/* |
|
62 |
|
* Here, another client may just did the insert and commited |
|
63 |
|
* and we obtain the lock. So, we have to check if a insert |
|
64 |
|
* took place. if we |
|
65 |
|
*/ |
|
66 |
|
$sql = "SELECT 1 FROM bugs_max WHERE repo_id = $repo_id"; |
|
67 |
|
$res = rg_sql_query($db, $sql); |
|
68 |
|
if ($res === FALSE) { |
|
69 |
|
rg_bug_set_error("cannot select 1 from max table (" . rg_sql_error() . ")"); |
|
70 |
|
break; |
|
71 |
|
} |
|
72 |
|
$rows = rg_sql_num_rows($res); |
|
73 |
|
rg_sql_free_result($res); |
|
74 |
|
|
|
75 |
|
if ($rows == 1) { |
|
76 |
|
/* |
|
77 |
|
* The other client was faster than us. Just try to update |
|
78 |
|
*/ |
|
79 |
|
continue; |
|
80 |
|
} |
|
81 |
|
|
|
82 |
|
// We was faster, just insert. |
62 |
83 |
$sql = "INSERT INTO bugs_max (repo_id, last_bug_id)" |
$sql = "INSERT INTO bugs_max (repo_id, last_bug_id)" |
63 |
84 |
. " VALUES ($repo_id, 1)"; |
. " VALUES ($repo_id, 1)"; |
64 |
85 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
|
... |
... |
function rg_bug_label_insert($db, $repo_id, $bug_id, $labels) |
548 |
569 |
return $ret; |
return $ret; |
549 |
570 |
} |
} |
550 |
571 |
|
|
|
572 |
|
/* |
|
573 |
|
* Returns labels as HTML |
|
574 |
|
*/ |
|
575 |
|
function rg_bug_label_html($db, $repo_id, $bug_id) |
|
576 |
|
{ |
|
577 |
|
$labels = rg_bug_label_get($db, $repo_id, $bug_id); |
|
578 |
|
|
|
579 |
|
if (!empty($labels)) { |
|
580 |
|
$a = array(); |
|
581 |
|
foreach ($labels as $label) |
|
582 |
|
$a[] = array("label" => $label); |
|
583 |
|
} |
|
584 |
|
|
|
585 |
|
return rg_template_table("repo/bug/list_labels", $a, array()); |
|
586 |
|
} |
|
587 |
|
|
551 |
588 |
?> |
?> |
File inc/user/repo/bug/show.php changed (mode: 100644) (index dc97f45..b3e9ace) |
... |
... |
if ($doit == 0) { |
45 |
45 |
} |
} |
46 |
46 |
} |
} |
47 |
47 |
|
|
|
48 |
|
// load labels |
|
49 |
|
$labels = rg_bug_label_get($db, $ri['repo_id'], $bug_id); |
|
50 |
|
if ($labels === FALSE) |
|
51 |
|
$_tmp['HTML:labels'] = "Cannot load labels!"; |
|
52 |
|
else |
|
53 |
|
$_tmp['HTML:labels'] = rg_bug_label_html($db, $ri['repo_id'], $bug_id); |
|
54 |
|
|
48 |
55 |
// load notes |
// load notes |
49 |
56 |
$notes = rg_bug_note_list($db, $ri['repo_id'], $bug_id, 0); |
$notes = rg_bug_note_list($db, $ri['repo_id'], $bug_id, 0); |
50 |
57 |
if ($notes === FALSE) |
if ($notes === FALSE) |
File root/themes/default/main.css changed (mode: 100644) (index 92ea39b..68706a8) |
... |
... |
label { |
189 |
189 |
.error b { color: #ff0000; font-weight: bold; font-size: 11pt; } |
.error b { color: #ff0000; font-weight: bold; font-size: 11pt; } |
190 |
190 |
.error ul { padding-left: 15pt; } |
.error ul { padding-left: 15pt; } |
191 |
191 |
.error ul li {} |
.error ul li {} |
|
192 |
|
|
|
193 |
|
.labels { padding: 3px 0px; margin: 3px 0px; } |
|
194 |
|
.labels ul { list-style-type: none; } |
|
195 |
|
.labels ul li { |
|
196 |
|
display: inline; |
|
197 |
|
padding: 3px 3px; |
|
198 |
|
text-decoration: none; |
|
199 |
|
color: black; |
|
200 |
|
border: 1px solid #cccccc; |
|
201 |
|
border-radius: 4px 4px 4px 4px; |
|
202 |
|
font-size: 9pt; |
|
203 |
|
background-color: #a0d0ff; |
|
204 |
|
} |
|
205 |
|
|