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