|
@@ 115-181 (lines=67) @@
|
| 112 |
|
/** |
| 113 |
|
* @Route("/ec-generalstats/{project}/{username}", name="EditCounterGeneralStats") |
| 114 |
|
*/ |
| 115 |
|
public function generalStatsAction($project, $username) |
| 116 |
|
{ |
| 117 |
|
$this->setUpEditCounter($project, $username); |
| 118 |
|
|
| 119 |
|
// $revisionCounts = $this->editCounterHelper->getRevisionCounts($user->getId($project)); |
| 120 |
|
// $pageCounts = $this->editCounterHelper->getPageCounts($username, $revisionCounts['total']); |
| 121 |
|
// $logCounts = $this->editCounterHelper->getLogCounts($user->getId($project)); |
| 122 |
|
// $automatedEditsSummary = $automatedEditsHelper->getEditsSummary($user->getId($project)); |
| 123 |
|
// $topProjectsEditCounts = $this->editCounterHelper->getTopProjectsEditCounts($project->getUrl(), |
| 124 |
|
// $user->getUsername()); |
| 125 |
|
|
| 126 |
|
// Render view. |
| 127 |
|
$isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
| 128 |
|
return $this->render('editCounter/general_stats.html.twig', [ |
| 129 |
|
'xtPage' => 'ec', |
| 130 |
|
'is_sub_request' => $isSubRequest, |
| 131 |
|
'is_labs' => $this->project->getRepository()->isLabs(), |
| 132 |
|
'user' => $this->user, |
| 133 |
|
'project' => $this->project, |
| 134 |
|
'ec' => $this->editCounter, |
| 135 |
|
|
| 136 |
|
// Revision counts. |
| 137 |
|
// 'deleted_edits' => $revisionCounts['deleted'], |
| 138 |
|
// 'total_edits' => $revisionCounts['total'], |
| 139 |
|
// 'live_edits' => $revisionCounts['live'], |
| 140 |
|
// 'first_rev' => $revisionCounts['first'], |
| 141 |
|
// 'latest_rev' => $revisionCounts['last'], |
| 142 |
|
// 'days' => $revisionCounts['days'], |
| 143 |
|
// 'avg_per_day' => $revisionCounts['avg_per_day'], |
| 144 |
|
// 'rev_24h' => $revisionCounts['24h'], |
| 145 |
|
// 'rev_7d' => $revisionCounts['7d'], |
| 146 |
|
// 'rev_30d' => $revisionCounts['30d'], |
| 147 |
|
// 'rev_365d' => $revisionCounts['365d'], |
| 148 |
|
// 'rev_small' => $revisionCounts['small'], |
| 149 |
|
// 'rev_large' => $revisionCounts['large'], |
| 150 |
|
// 'with_comments' => $revisionCounts['with_comments'], |
| 151 |
|
// 'without_comments' => $revisionCounts['live'] - $revisionCounts['with_comments'], |
| 152 |
|
// 'minor_edits' => $revisionCounts['minor_edits'], |
| 153 |
|
// 'nonminor_edits' => $revisionCounts['live'] - $revisionCounts['minor_edits'], |
| 154 |
|
// 'auto_edits_total' => array_sum($automatedEditsSummary), |
| 155 |
|
// |
| 156 |
|
// // Page counts. |
| 157 |
|
// 'uniquePages' => $pageCounts['unique'], |
| 158 |
|
// 'pagesCreated' => $pageCounts['created'], |
| 159 |
|
// 'pagesMoved' => $pageCounts['moved'], |
| 160 |
|
// 'editsPerPage' => $pageCounts['edits_per_page'], |
| 161 |
|
// |
| 162 |
|
// // Log counts (keys are 'log name'-'action'). |
| 163 |
|
// 'pagesThanked' => $logCounts['thanks-thank'], |
| 164 |
|
// 'pagesApproved' => $logCounts['review-approve'], // Merged -a, -i, and -ia approvals. |
| 165 |
|
// 'pagesPatrolled' => $logCounts['patrol-patrol'], |
| 166 |
|
// 'usersBlocked' => $logCounts['block-block'], |
| 167 |
|
// 'usersUnblocked' => $logCounts['block-unblock'], |
| 168 |
|
// 'pagesProtected' => $logCounts['protect-protect'], |
| 169 |
|
// 'pagesUnprotected' => $logCounts['protect-unprotect'], |
| 170 |
|
// 'pagesDeleted' => $logCounts['delete-delete'], |
| 171 |
|
// 'pagesDeletedRevision' => $logCounts['delete-revision'], |
| 172 |
|
// 'pagesRestored' => $logCounts['delete-restore'], |
| 173 |
|
// 'pagesImported' => $logCounts['import-import'], |
| 174 |
|
// 'files_uploaded' => $logCounts['upload-upload'], |
| 175 |
|
// 'files_modified' => $logCounts['upload-overwrite'], |
| 176 |
|
// 'files_uploaded_commons' => $logCounts['files_uploaded_commons'], |
| 177 |
|
// |
| 178 |
|
// // Other projects. |
| 179 |
|
// 'top_projects_edit_counts' => $topProjectsEditCounts, |
| 180 |
|
]); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
/** |
| 184 |
|
* @Route("/ec-namespacetotals/{project}/{username}", name="EditCounterNamespaceTotals") |
|
@@ 186-199 (lines=14) @@
|
| 183 |
|
/** |
| 184 |
|
* @Route("/ec-namespacetotals/{project}/{username}", name="EditCounterNamespaceTotals") |
| 185 |
|
*/ |
| 186 |
|
public function namespaceTotalsAction($project, $username) |
| 187 |
|
{ |
| 188 |
|
$this->setUpEditCounter($project, $username); |
| 189 |
|
$isSubRequest = $this->get('request_stack')->getParentRequest() !== null; |
| 190 |
|
return $this->render('editCounter/namespace_totals.html.twig', [ |
| 191 |
|
'xtTitle' => 'namespacetotals', |
| 192 |
|
'xtPage' => 'ec', |
| 193 |
|
'is_sub_request' => $isSubRequest, |
| 194 |
|
'is_labs' => $this->project->getRepository()->isLabs(), |
| 195 |
|
'user' => $this->user, |
| 196 |
|
'project' => $this->project, |
| 197 |
|
'ec' => $this->editCounter, |
| 198 |
|
]); |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
/** |
| 202 |
|
* @Route("/ec-timecard/{project}/{username}", name="EditCounterTimeCard") |