File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ public function show_idea($event)
230230 'IDEA_STATUS_NAME ' => $ this ->ideas ->get_status_from_id ($ idea ['idea_status ' ]),
231231 'IDEA_STATUS_LINK ' => $ this ->helper ->route ('phpbb_ideas_list_controller ' , array ('status ' => $ idea ['idea_status ' ])),
232232
233- 'IDEA_DUPLICATE ' => $ idea ['duplicate_id ' ],
233+ 'IDEA_DUPLICATE ' => $ idea ['duplicate_id ' ] ? $ this -> ideas -> get_title ( $ idea [ ' duplicate_id ' ]) : '' ,
234234 'IDEA_RFC ' => $ idea ['rfc_link ' ],
235235 'IDEA_TICKET ' => $ idea ['ticket_id ' ],
236236 'IDEA_IMPLEMENTED ' => $ idea ['implemented_version ' ],
Original file line number Diff line number Diff line change @@ -444,6 +444,25 @@ public function set_title($idea_id, $title)
444444 return true ;
445445 }
446446
447+ /**
448+ * Get the title of an idea.
449+ *
450+ * @param int $id ID of an idea
451+ *
452+ * @return string The idea's title
453+ */
454+ public function get_title ($ id )
455+ {
456+ $ sql = 'SELECT idea_title
457+ FROM ' . $ this ->table_ideas . '
458+ WHERE idea_id = ' . (int ) $ id ;
459+ $ result = $ this ->db ->sql_query_limit ($ sql , 1 );
460+ $ idea_title = $ this ->db ->sql_fetchfield ('idea_title ' );
461+ $ this ->db ->sql_freeresult ($ result );
462+
463+ return $ idea_title ;
464+ }
465+
447466 /**
448467 * Submits a vote on an idea.
449468 *
You can’t perform that action at this time.
0 commit comments