| @@ 122-125 (lines=4) @@ | ||
| 119 | $resultQuery->bindParam('username', $usernameParam); |
|
| 120 | $resultQuery->execute(); |
|
| 121 | ||
| 122 | if ($resultQuery->errorCode() > 0) { |
|
| 123 | $this->addFlash('notice', [ 'no-result', $username ]); |
|
| 124 | return $this->redirectToRoute('SimpleEditCounterProject', [ 'project' => $project->getDomain() ]); |
|
| 125 | } |
|
| 126 | ||
| 127 | // Fetch the result data |
|
| 128 | $results = $resultQuery->fetchAll(); |
|
| @@ 149-157 (lines=9) @@ | ||
| 146 | ||
| 147 | $text = $page->getWikitext(); |
|
| 148 | ||
| 149 | if (!isset($text)) { |
|
| 150 | $this->addFlash('notice', ['no-result', $pagename]); |
|
| 151 | return $this->redirectToRoute( |
|
| 152 | 'rfxAnalysisProject', |
|
| 153 | [ |
|
| 154 | 'project' => $projectData->getDatabaseName() |
|
| 155 | ] |
|
| 156 | ); |
|
| 157 | } |
|
| 158 | ||
| 159 | $rfx = new RFX( |
|
| 160 | $text, |
|
| @@ 171-179 (lines=9) @@ | ||
| 168 | ||
| 169 | $total = count($support) + count($oppose) + count($neutral); |
|
| 170 | ||
| 171 | if ($total === 0) { |
|
| 172 | $this->addFlash('notice', ['no-result', $pagename]); |
|
| 173 | return $this->redirectToRoute( |
|
| 174 | 'rfxAnalysisProject', |
|
| 175 | [ |
|
| 176 | 'project' => $projectData->getDatabaseName(), |
|
| 177 | ] |
|
| 178 | ); |
|
| 179 | } |
|
| 180 | ||
| 181 | $end = $rfx->getEndDate(); |
|
| 182 | ||
| @@ 199-207 (lines=9) @@ | ||
| 196 | } |
|
| 197 | $resultQuery->execute(); |
|
| 198 | ||
| 199 | if ($resultQuery->errorCode() > 0) { |
|
| 200 | $this->addFlash('notice', ['no-result', $username]); |
|
| 201 | return $this->redirectToRoute( |
|
| 202 | 'EditSummaryProject', |
|
| 203 | [ |
|
| 204 | 'project' => $project->getDomain() |
|
| 205 | ] |
|
| 206 | ); |
|
| 207 | } |
|
| 208 | ||
| 209 | // Set defaults, so we don't get variable undefined errors |
|
| 210 | $totalSummariesMajor = 0; |
|