Browse Source

rename request key from feed to mode

master
ghost 9 months ago
parent
commit
97576236a0
  1. 4
      src/Controller/MainController.php
  2. 2
      templates/default/main/index.html.twig
  3. 2
      templates/default/main/namespace.html.twig

4
src/Controller/MainController.php

@ -34,7 +34,7 @@ class MainController extends AbstractController
{ {
$index = new \Kvazar\Index\Manticore(); $index = new \Kvazar\Index\Manticore();
if ($rss = ('rss' == $request->get('feed'))) if ($rss = ('rss' == $request->get('mode')))
{ {
$response = new Response(); $response = new Response();
$response->headers->set('Content-Type', 'text/xml'); $response->headers->set('Content-Type', 'text/xml');
@ -82,7 +82,7 @@ class MainController extends AbstractController
{ {
$index = new \Kvazar\Index\Manticore(); $index = new \Kvazar\Index\Manticore();
if ($rss = ('rss' == $request->get('feed'))) if ($rss = ('rss' == $request->get('mode')))
{ {
$response = new Response(); $response = new Response();
$response->headers->set('Content-Type', 'text/xml'); $response->headers->set('Content-Type', 'text/xml');

2
templates/default/main/index.html.twig

@ -62,7 +62,7 @@
</div> </div>
<div class="t-center px-16"> <div class="t-center px-16">
<div class="pb-16 f-s-12"> <div class="pb-16 f-s-12">
<a href="{{ path('main_index',{'feed':'rss'}) }}">{{ 'RSS' | trans }}</a> <a href="{{ path('main_index',{'mode':'rss'}) }}">{{ 'RSS' | trans }}</a>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

2
templates/default/main/namespace.html.twig

@ -65,7 +65,7 @@
</div> </div>
<div class="t-center px-16"> <div class="t-center px-16">
<div class="pb-16 f-s-12"> <div class="pb-16 f-s-12">
<a href="{{ path('main_namespace',{'namespace':request.get('namespace'),'feed':'rss'}) }}">{{ 'RSS' | trans }}</a> <a href="{{ path('main_namespace',{'namespace':request.get('namespace'),'mode':'rss'}) }}">{{ 'RSS' | trans }}</a>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
Loading…
Cancel
Save