Changeset 1098
- Timestamp:
- 12/27/09 02:42:00 (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
common/security.php (modified) (1 diff)
-
common/textblock.php (modified) (2 diffs)
-
www/views/textblock_header.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/security.php
r1097 r1098 222 222 223 223 // Forward security to round. 224 if ( preg_match("/^ \s* round: \s* (".IA_RE_ROUND_ID.") \s* $/xi", $textsec, $matches)) {224 if (($round_id = textblock_security_is_round($textsec))) { 225 225 require_once(IA_ROOT_DIR . "common/db/round.php"); 226 $round = round_get($ matches[1]);226 $round = round_get($round_id); 227 227 if ($round === null) { 228 228 log_warn("Bad security descriptor, ask an admin."); -
trunk/common/textblock.php
r1097 r1098 188 188 } 189 189 190 // Checks if the textblock is task and return the task_id if true or false if false190 // Checks if the textblock is task and returns the task_id if true or false if false 191 191 function textblock_security_is_task($textblock) { 192 192 if (preg_match("/^ \s* task: \s* (".IA_RE_TASK_ID.") \s* $/xi", $textblock, $matches)) { … … 196 196 } 197 197 198 // Checks if the textblock is round and returns the round_id if true or false if false 199 function textblock_security_is_round($textblock) { 200 if (preg_match("/^ \s* round: \s* (".IA_RE_ROUND_ID.") \s* $/xi", $textblock, $matches)) { 201 return $matches[1]; 202 } 203 return false; 204 } 205 206 198 207 ?> -
trunk/www/views/textblock_header.php
r1097 r1098 16 16 <li><?= format_link_access(url_task_edit_tags($task['id']), 'Editeaza tag-uri', 't') ?></li> 17 17 <?php } ?> 18 <?php if (($round_id = textblock_security_is_round($textblock['security'])) && identity_can('round-edit', $round = round_get($round_id))) { ?> 19 <li><?= format_link_access(url_round_edit($round['id']), 'Editeaza parametrii', 'p') ?></li> 20 <?php } ?> 18 21 <?php if (identity_can('textblock-edit', $textblock)) { ?> 19 <li><?= format_link_access(url_textblock_edit($textblock['name']), ($task_id) ? 'Editeaza enunt' : 'Editeaza', 'e') ?></li>22 <li><?= format_link_access(url_textblock_edit($textblock['name']), ($task_id) ? 'Editeaza enunt' : 'Editeaza', 'e') ?></li> 20 23 <?php } ?> 21 24 <?php if (identity_can('textblock-history', $textblock)) { ?>
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)