|
17 | 17 | */ |
18 | 18 | class idea extends base |
19 | 19 | { |
20 | | - /** @var string */ |
21 | | - protected $profile_url; |
22 | | - |
23 | 20 | /** |
24 | 21 | * Returns the specified idea. |
25 | 22 | * |
@@ -58,18 +55,6 @@ public function get_idea_by_topic_id($id) |
58 | 55 | return $this->get_idea($idea_id); |
59 | 56 | } |
60 | 57 |
|
61 | | - /** |
62 | | - * Returns the status name from the status ID specified. |
63 | | - * |
64 | | - * @param int $id ID of the status. |
65 | | - * |
66 | | - * @return string|bool The status name if it exists, false otherwise. |
67 | | - */ |
68 | | - public function get_status_from_id($id) |
69 | | - { |
70 | | - return $this->language->lang(array_search($id, ext::$statuses)); |
71 | | - } |
72 | | - |
73 | 58 | /** |
74 | 59 | * Updates the status of an idea. |
75 | 60 | * |
@@ -437,28 +422,12 @@ public function get_voters($id) |
437 | 422 |
|
438 | 423 | // Process the username for the template now, so it is |
439 | 424 | // ready to use in AJAX responses and DOM injections. |
| 425 | + $profile_url = append_sid(generate_board_url() . "/memberlist.{$this->php_ext}", array('mode' => 'viewprofile')); |
440 | 426 | foreach ($rows as &$row) |
441 | 427 | { |
442 | | - $row['user'] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $this->profile_url()); |
| 428 | + $row['user'] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url); |
443 | 429 | } |
444 | 430 |
|
445 | 431 | return $rows; |
446 | 432 | } |
447 | | - |
448 | | - /** |
449 | | - * Helper to generate the user profile URL with an |
450 | | - * absolute URL, which helps avoid problems when |
451 | | - * used in AJAX requests. |
452 | | - * |
453 | | - * @return string User profile URL |
454 | | - */ |
455 | | - protected function profile_url() |
456 | | - { |
457 | | - if (!isset($this->profile_url)) |
458 | | - { |
459 | | - $this->profile_url = append_sid(generate_board_url() . "/memberlist.{$this->php_ext}", array('mode' => 'viewprofile')); |
460 | | - } |
461 | | - |
462 | | - return $this->profile_url; |
463 | | - } |
464 | 433 | } |
0 commit comments