File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 34
34
$ f_category_id = gpc_get_int ( 'id ' );
35
35
$ f_project_id = gpc_get_int ( 'project_id ' );
36
36
37
- access_ensure_project_level ( config_get ( 'manage_project_threshold ' ), $ f_project_id );
38
-
39
37
$ t_row = category_get_row ( $ f_category_id );
40
38
$ t_name = category_full_name ( $ f_category_id );
41
39
$ t_project_id = $ t_row ['project_id ' ];
42
40
41
+ access_ensure_project_level ( config_get ( 'manage_project_threshold ' ), $ t_project_id );
42
+
43
43
# Get a bug count
44
44
$ t_bug_table = db_get_table ( 'mantis_bug_table ' );
45
45
$ t_query = "SELECT COUNT(id) FROM $ t_bug_table WHERE category_id= " . db_param ();
Original file line number Diff line number Diff line change 32
32
$ f_category_id = gpc_get_int ( 'id ' );
33
33
$ f_project_id = gpc_get_int ( 'project_id ' );
34
34
35
- access_ensure_project_level ( config_get ( 'manage_project_threshold ' ), $ f_project_id );
36
-
37
35
$ t_row = category_get_row ( $ f_category_id );
38
36
$ t_assigned_to = $ t_row ['user_id ' ];
39
37
$ t_project_id = $ t_row ['project_id ' ];
40
38
$ t_name = $ t_row ['name ' ];
41
39
40
+ access_ensure_project_level ( config_get ( 'manage_project_threshold ' ), $ t_project_id );
41
+
42
42
html_page_top ();
43
43
44
44
print_manage_menu ( 'manage_proj_cat_edit_page.php ' );
Original file line number Diff line number Diff line change 166
166
</tr>
167
167
<?php
168
168
$ t_categories = category_get_all_rows ( ALL_PROJECTS );
169
+ $ t_can_update_global_cat = access_has_global_level ( config_get ( 'manage_site_threshold ' ) );
169
170
170
171
if ( count ( $ t_categories ) > 0 ) {
171
172
?>
176
177
<td>
177
178
<?php echo lang_get ( 'assign_to ' ) ?>
178
179
</td>
180
+ <?php if ( $ t_can_update_global_cat ) { ?>
179
181
<td class="center">
180
182
<?php echo lang_get ( 'actions ' ) ?>
181
183
</td>
184
+ <?php } ?>
182
185
</tr>
183
186
<?php
184
187
}
185
188
186
- foreach ( $ t_categories as $ t_category ) {
189
+ foreach ( $ t_categories as $ t_category ) {
187
190
$ t_id = $ t_category ['id ' ];
188
191
?>
189
192
<!-- Repeated Info Row -->
194
197
<td>
195
198
<?php echo prepare_user_name ( $ t_category ['user_id ' ] ) ?>
196
199
</td>
200
+ <?php if ( $ t_can_update_global_cat ) { ?>
197
201
<td class="center">
198
202
<?php
199
203
$ t_id = urlencode ( $ t_id );
204
208
print_button ( "manage_proj_cat_delete.php?id= $ t_id&project_id= $ t_project_id " , lang_get ( 'delete_link ' ) );
205
209
?>
206
210
</td>
211
+ <?php } ?>
207
212
</tr>
208
213
<?php
209
214
} # end for loop
210
- ?>
211
215
216
+ if ( $ t_can_update_global_cat ) {
217
+ ?>
212
218
<!-- Add Category Form -->
213
219
<tr>
214
220
<td class="left" colspan="3">
220
226
</form>
221
227
</td>
222
228
</tr>
229
+ <?php } ?>
223
230
224
231
</table>
225
232
</div>
You can’t perform that action at this time.
0 commit comments