Changed RSS to Atom feed and improve paging

This commit is contained in:
Thomas Citharel
2017-06-13 18:48:10 +02:00
committed by Jeremy Benoist
parent 522e37ad27
commit 531c8d0a5c
57 changed files with 635 additions and 564 deletions

View File

@ -28,6 +28,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
{
return [
new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']),
new \Twig_SimpleFilter('removeScheme', [$this, 'removeScheme']),
new \Twig_SimpleFilter('removeSchemeAndWww', [$this, 'removeSchemeAndWww']),
];
}
@ -46,11 +47,14 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
return preg_replace('/^www\./i', '', $url);
}
public function removeScheme($url)
{
return preg_replace('#^https?://#i', '', $url);
}
public function removeSchemeAndWww($url)
{
return $this->removeWww(
preg_replace('@^https?://@i', '', $url)
);
return $this->removeWww($this->removeScheme($url)
}
/**