| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 
| 7 | 7 | use Symfony\Component\HttpFoundation\Request; | 
| 8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
| 9 | 8 | use DateTime; | 
| 10 | 9 | |
| 11 | 10 | class AdminScoreController extends Controller | 
| @@ -6,11 +6,7 @@ | ||
| 6 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 
| 7 | 7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 
| 8 | 8 | use Symfony\Component\HttpFoundation\Request; | 
| 9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
| 10 | 9 | use Symfony\Component\DependencyInjection\ContainerInterface; | 
| 11 | -use AppBundle\Helper\Apihelper; | |
| 12 | -use AppBundle\Helper\PageviewsHelper; | |
| 13 | -use AppBundle\Helper\AutomatedEditsHelper; | |
| 14 | 10 | |
| 15 | 11 | class ArticleInfoController extends Controller | 
| 16 | 12 |  { | 
| @@ -164,7 +164,7 @@ | ||
| 164 | 164 | private function getRevCount() | 
| 165 | 165 |      { | 
| 166 | 166 | $query = "SELECT COUNT(*) AS count FROM " . $this->revisionTable | 
| 167 | - . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; | |
| 167 | + . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; | |
| 168 | 168 | $res = $this->conn->query($query)->fetchAll(); | 
| 169 | 169 | return $res[0]['count']; | 
| 170 | 170 | } | 
| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | |
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 
| 7 | -use Symfony\Component\HttpFoundation\Request; | |
| 8 | 7 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 
| 9 | 8 | |
| 10 | 9 | class DefaultController extends Controller | 
| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 
| 7 | 7 | use Symfony\Component\HttpFoundation\Request; | 
| 8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
| 9 | 8 | |
| 10 | 9 | class PagesController extends Controller | 
| 11 | 10 |  { | 
| @@ -4,9 +4,7 @@ | ||
| 4 | 4 | |
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 
| 7 | -use Symfony\Component\Config\Definition\Exception\Exception; | |
| 8 | 7 | use Symfony\Component\HttpFoundation\Request; | 
| 9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
| 10 | 8 | |
| 11 | 9 | class SimpleEditCounterController extends Controller | 
| 12 | 10 |  { | 
| @@ -4,10 +4,7 @@ | ||
| 4 | 4 | |
| 5 | 5 | use Doctrine\DBAL\Connection; | 
| 6 | 6 | use Psr\Cache\CacheItemPoolInterface; | 
| 7 | -use Symfony\Component\Config\Definition\Exception\Exception; | |
| 8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
| 9 | 7 | use Symfony\Component\DependencyInjection\ContainerInterface; | 
| 10 | -use Symfony\Component\VarDumper\VarDumper; | |
| 11 | 8 | |
| 12 | 9 | class AutomatedEditsHelper | 
| 13 | 10 |  { | 
| @@ -125,7 +125,7 @@ | ||
| 125 | 125 | /** @var LabsHelper $labsHelper */ | 
| 126 | 126 |          $labsHelper = $this->container->get('app.labs_helper'); | 
| 127 | 127 |          $sql = "SELECT rev_comment FROM ".$labsHelper->getTable('revision') | 
| 128 | - ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; | |
| 128 | + ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; | |
| 129 | 129 | $resultQuery = $replicas->prepare($sql); | 
| 130 | 130 |          $resultQuery->bindParam("userId", $userId); | 
| 131 | 131 | $resultQuery->execute(); | 
| @@ -390,15 +390,15 @@ | ||
| 390 | 390 | } | 
| 391 | 391 | |
| 392 | 392 | $sql = "SELECT " | 
| 393 | - . " SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6) AS `month`," | |
| 394 | - . " page_namespace," | |
| 395 | - . " COUNT(rev_id) AS `count` " | |
| 396 | -           . " FROM ".$this->labsHelper->getTable('revision') | |
| 397 | -           . "    JOIN " . $this->labsHelper->getTable('page') | |
| 398 | - . " ON (rev_page = page_id)" | |
| 399 | - . " WHERE rev_user_text = :username" | |
| 400 | - . " GROUP BY SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6), page_namespace " | |
| 401 | - . " ORDER BY rev_timestamp DESC "; | |
| 393 | + . " SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6) AS `month`," | |
| 394 | + . " page_namespace," | |
| 395 | + . " COUNT(rev_id) AS `count` " | |
| 396 | +            . " FROM ".$this->labsHelper->getTable('revision') | |
| 397 | +            . "    JOIN " . $this->labsHelper->getTable('page') | |
| 398 | + . " ON (rev_page = page_id)" | |
| 399 | + . " WHERE rev_user_text = :username" | |
| 400 | + . " GROUP BY SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6), page_namespace " | |
| 401 | + . " ORDER BY rev_timestamp DESC "; | |
| 402 | 402 | $resultQuery = $this->replicas->prepare($sql); | 
| 403 | 403 |          $resultQuery->bindParam(":username", $username); | 
| 404 | 404 | $resultQuery->execute(); |