@@ 424-439 (lines=16) @@ | ||
421 | * |
|
422 | * @return bool True if set, false if invalid. |
|
423 | */ |
|
424 | public function set_rfc($idea_id, $rfc) |
|
425 | { |
|
426 | $match = '/^https?:\/\/area51\.phpbb\.com\/phpBB\/viewtopic\.php/'; |
|
427 | if ($rfc && !preg_match($match, $rfc)) |
|
428 | { |
|
429 | return false; |
|
430 | } |
|
431 | ||
432 | $sql_ary = array( |
|
433 | 'rfc_link' => $rfc, // string is escaped by build_array() |
|
434 | ); |
|
435 | ||
436 | $this->update_idea_data($sql_ary, $idea_id, $this->table_ideas); |
|
437 | ||
438 | return true; |
|
439 | } |
|
440 | ||
441 | /** |
|
442 | * Sets the ticket ID of an idea. |
|
@@ 473-488 (lines=16) @@ | ||
470 | * |
|
471 | * @return bool True if set, false if invalid. |
|
472 | */ |
|
473 | public function set_implemented($idea_id, $version) |
|
474 | { |
|
475 | $match = '/^\d\.\d\.\d+(\-\w+)?$/'; |
|
476 | if ($version && !preg_match($match, $version)) |
|
477 | { |
|
478 | return false; |
|
479 | } |
|
480 | ||
481 | $sql_ary = array( |
|
482 | 'implemented_version' => $version, // string is escaped by build_array() |
|
483 | ); |
|
484 | ||
485 | $this->update_idea_data($sql_ary, $idea_id, $this->table_ideas); |
|
486 | ||
487 | return true; |
|
488 | } |
|
489 | ||
490 | /** |
|
491 | * Sets the title of an idea. |