@@ -121,9 +121,6 @@ private function getFullPoll(int $pollId, bool $withTimings = false): array {
121121 $ votes = $ this ->voteService ->list ($ pollId );
122122 $ timerMicro ['votes ' ] = microtime (true );
123123
124- $ orphaned = $ this ->voteService ->getOprhanedVotes ($ pollId );
125- $ timerMicro ['orphaned ' ] = microtime (true );
126-
127124 $ comments = $ this ->commentService ->list ($ pollId );
128125 $ timerMicro ['comments ' ] = microtime (true );
129126
@@ -137,8 +134,7 @@ private function getFullPoll(int $pollId, bool $withTimings = false): array {
137134 $ diffMicro ['poll ' ] = $ timerMicro ['poll ' ] - $ timerMicro ['start ' ];
138135 $ diffMicro ['options ' ] = $ timerMicro ['options ' ] - $ timerMicro ['poll ' ];
139136 $ diffMicro ['votes ' ] = $ timerMicro ['votes ' ] - $ timerMicro ['options ' ];
140- $ diffMicro ['orphaned ' ] = $ timerMicro ['orphaned ' ] - $ timerMicro ['votes ' ];
141- $ diffMicro ['comments ' ] = $ timerMicro ['comments ' ] - $ timerMicro ['orphaned ' ];
137+ $ diffMicro ['comments ' ] = $ timerMicro ['comments ' ] - $ timerMicro ['votes ' ];
142138 $ diffMicro ['shares ' ] = $ timerMicro ['shares ' ] - $ timerMicro ['comments ' ];
143139 $ diffMicro ['subscribed ' ] = $ timerMicro ['subscribed ' ] - $ timerMicro ['shares ' ];
144140
@@ -147,7 +143,6 @@ private function getFullPoll(int $pollId, bool $withTimings = false): array {
147143 'poll ' => $ poll ,
148144 'options ' => $ options ,
149145 'votes ' => $ votes ,
150- 'orphaned ' => count ($ orphaned ),
151146 'comments ' => $ comments ,
152147 'shares ' => $ shares ,
153148 'subscribed ' => $ subscribed ,
@@ -158,7 +153,6 @@ private function getFullPoll(int $pollId, bool $withTimings = false): array {
158153 'poll ' => $ poll ,
159154 'options ' => $ options ,
160155 'votes ' => $ votes ,
161- 'orphaned ' => count ($ orphaned ),
162156 'comments ' => $ comments ,
163157 'shares ' => $ shares ,
164158 'subscribed ' => $ subscribed ,
@@ -329,17 +323,4 @@ public function getParticipantsEmailAddresses(int $pollId): JSONResponse {
329323 return $ this ->response (fn () => $ this ->pollService ->getParticipantsEmailAddresses ($ pollId ));
330324 }
331325
332- /**
333- * Delete orphaned votes
334- * @param int $pollId poll id
335- */
336- #[NoAdminRequired]
337- #[OpenAPI(OpenAPI::SCOPE_IGNORE )]
338- #[FrontpageRoute(verb: 'DELETE ' , url: '/poll/{pollId}/votes/orphaned/all ' )]
339- public function deleteOrphaned (int $ pollId ): JSONResponse {
340- return $ this ->response (fn () => [
341- 'deleted ' => $ this ->voteService ->deleteOrphanedVotes ($ pollId )
342- ]);
343- }
344-
345326}
0 commit comments