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