@@ -21,7 +21,7 @@ class idea_controller extends base
2121 protected $ data ;
2222
2323 /* @var \phpbb\ideas\factory\idea */
24- protected $ ideas ;
24+ protected $ entity ;
2525
2626 /**
2727 * Controller for /idea/{idea_id}
@@ -37,7 +37,7 @@ public function idea($idea_id)
3737 throw new http_exception (404 , 'IDEAS_NOT_AVAILABLE ' );
3838 }
3939
40- $ this ->data = $ this ->ideas ->get_idea ($ idea_id );
40+ $ this ->data = $ this ->entity ->get_idea ($ idea_id );
4141 if (!$ this ->data )
4242 {
4343 throw new http_exception (404 , 'IDEA_NOT_FOUND ' );
@@ -83,7 +83,7 @@ public function delete()
8383 if (confirm_box (true ))
8484 {
8585 include $ this ->root_path . 'includes/functions_admin. ' . $ this ->php_ext ;
86- $ this ->ideas ->delete ($ this ->data ['idea_id ' ], $ this ->data ['topic_id ' ]);
86+ $ this ->entity ->delete ($ this ->data ['idea_id ' ], $ this ->data ['topic_id ' ]);
8787
8888 $ redirect = $ this ->helper ->route ('phpbb_ideas_index_controller ' );
8989 $ message = $ this ->language ->lang ('IDEA_DELETED ' ) . '<br /><br /> ' . $ this ->language ->lang ('RETURN_IDEAS ' , '<a href=" ' . $ redirect . '"> ' , '</a> ' );
@@ -122,7 +122,7 @@ public function duplicate()
122122 if ($ this ->is_mod () && check_link_hash ($ this ->get_hash (), "duplicate_ {$ this ->data ['idea_id ' ]}" ))
123123 {
124124 $ duplicate = $ this ->request ->variable ('duplicate ' , 0 );
125- return $ this ->ideas ->set_duplicate ($ this ->data ['idea_id ' ], $ duplicate );
125+ return $ this ->entity ->set_duplicate ($ this ->data ['idea_id ' ], $ duplicate );
126126 }
127127
128128 return false ;
@@ -143,7 +143,7 @@ public function removevote()
143143
144144 if ($ this ->auth ->acl_get ('f_vote ' , (int ) $ this ->config ['ideas_forum_id ' ]))
145145 {
146- $ result = $ this ->ideas ->remove_vote ($ this ->data , $ this ->user ->data ['user_id ' ]);
146+ $ result = $ this ->entity ->remove_vote ($ this ->data , $ this ->user ->data ['user_id ' ]);
147147 }
148148 else
149149 {
@@ -164,7 +164,7 @@ public function rfc()
164164 if (($ this ->is_own () || $ this ->is_mod ()) && check_link_hash ($ this ->get_hash (), "rfc_ {$ this ->data ['idea_id ' ]}" ))
165165 {
166166 $ rfc = $ this ->request ->variable ('rfc ' , '' );
167- return $ this ->ideas ->set_rfc ($ this ->data ['idea_id ' ], $ rfc );
167+ return $ this ->entity ->set_rfc ($ this ->data ['idea_id ' ], $ rfc );
168168 }
169169
170170 return false ;
@@ -182,7 +182,7 @@ public function status()
182182
183183 if ($ status && $ this ->is_mod () && check_link_hash ($ this ->get_hash (), "status_ {$ this ->data ['idea_id ' ]}" ))
184184 {
185- $ this ->ideas ->set_status ($ this ->data ['idea_id ' ], $ status );
185+ $ this ->entity ->set_status ($ this ->data ['idea_id ' ], $ status );
186186 return true ;
187187 }
188188
@@ -200,7 +200,7 @@ public function ticket()
200200 if (($ this ->is_own () || $ this ->is_mod ()) && check_link_hash ($ this ->get_hash (), "ticket_ {$ this ->data ['idea_id ' ]}" ))
201201 {
202202 $ ticket = $ this ->request ->variable ('ticket ' , 0 );
203- return $ this ->ideas ->set_ticket ($ this ->data ['idea_id ' ], $ ticket );
203+ return $ this ->entity ->set_ticket ($ this ->data ['idea_id ' ], $ ticket );
204204 }
205205
206206 return false ;
@@ -217,7 +217,7 @@ public function implemented()
217217 if ($ this ->is_mod () && check_link_hash ($ this ->get_hash (), "implemented_ {$ this ->data ['idea_id ' ]}" ))
218218 {
219219 $ version = $ this ->request ->variable ('implemented ' , '' );
220- return $ this ->ideas ->set_implemented ($ this ->data ['idea_id ' ], $ version );
220+ return $ this ->entity ->set_implemented ($ this ->data ['idea_id ' ], $ version );
221221 }
222222
223223 return false ;
@@ -240,7 +240,7 @@ public function vote()
240240
241241 if ($ this ->auth ->acl_get ('f_vote ' , (int ) $ this ->config ['ideas_forum_id ' ]))
242242 {
243- $ result = $ this ->ideas ->vote ($ this ->data , $ this ->user ->data ['user_id ' ], $ vote );
243+ $ result = $ this ->entity ->vote ($ this ->data , $ this ->user ->data ['user_id ' ], $ vote );
244244 }
245245 else
246246 {
0 commit comments