From 650f0b40096ef913d80cd0ba939370c21deea0a7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 15 Nov 2018 23:32:07 -0500 Subject: [PATCH] Remove unused /tag route --- src/routes.php | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/routes.php b/src/routes.php index 51c6b55..16026f2 100644 --- a/src/routes.php +++ b/src/routes.php @@ -17,45 +17,6 @@ $app->get('/submit', \Friendica\Directory\Routes\Http\Submit::class); $app->get('/photo/{profile_id:[0-9]+}.jpg', \Friendica\Directory\Routes\Http\Photo::class)->setName('photo'); - -$app->get('/tag/{term}', function (Request $request, Response $response, $args) { - - $pager = new \Friendica\Directory\Content\Pager($this->l10n, $request, 20); - - $term = $args['term']; - - $sql_where = 'FROM `profile` p -JOIN `tag` t ON p.`nurl` = t.`nurl` -WHERE `term` = :term -AND NOT `hidden` -AND `available`'; - - $stmt = 'SELECT * -' . $sql_where . ' -ORDER BY `filled_fields` DESC, `last_activity` DESC, `updated` DESC LIMIT :start, :limit'; - $profiles = $this->atlas->fetchAll($stmt, [ - 'term' => $term, - 'start' => [$pager->getStart(), PDO::PARAM_INT], - 'limit' => [$pager->getItemsPerPage(), PDO::PARAM_INT] - ]); - - $stmt = 'SELECT COUNT(*) AS `total` -' . $sql_where; - $count = $this->atlas->fetchValue($stmt, ['term' => $term]); - - $vars = [ - 'term' => $term, - 'count' => $count, - 'profiles' => $profiles, - 'pager' => $pager->renderFull($count), - ]; - - $content = $this->renderer->fetch('tag.phtml', $vars); - - // Render index view - return $this->renderer->render($response, 'layout.phtml', ['baseUrl' => $request->getUri()->getBaseUrl(), 'content' => $content]); -}); - $app->get('/sync/pull/all', \Friendica\Directory\Routes\Http\SyncPull::class); $app->get('/sync/pull/since/{since}', \Friendica\Directory\Routes\Http\SyncPull::class);