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