.. note::
- Si vous voulez importer un fichier important dans wallabag, vous debez ajouter cette ligne dans votre configuration nginx ``client_max_body_size XM; # allows file uploads up to X megabytes``.
+ Si vous voulez importer un fichier important dans wallabag, vous devez ajouter cette ligne dans votre configuration nginx ``client_max_body_size XM; # allows file uploads up to X megabytes``.
+++ /dev/null
-# -*- coding: utf-8 -*-
-#
-# wallabag documentation build configuration file, created by
-# sphinx-quickstart on Fri Oct 16 06:47:23 2015.
-
-import sys
-import os
-
-extensions = []
-templates_path = ['_templates']
-source_suffix = '.rst'
-master_doc = 'index'
-project = u'wallabag-pt'
-copyright = u'2013-2016, Nicolas Lœuillet - MIT Licence'
-version = '2.0.0'
-release = version
-exclude_patterns = ['_build']
-pygments_style = 'sphinx'
-html_theme = 'default'
-html_static_path = ['_static']
-htmlhelp_basename = 'wallabagfrdoc'
-
-latex_elements = {
-}
-
-latex_documents = [
- ('index', 'wallabag-pt.tex', u'wallabag Documentation',
- u'Nicolas Lœuillet', 'manual'),
-]
-
-man_pages = [
- ('index', 'wallabagpt', u'wallabag Documentation',
- [u'Nicolas Lœuillet'], 1)
-]
-
-texinfo_documents = [
- ('index', 'wallabag', u'wallabag Documentation',
- u'Nicolas Lœuillet', 'wallabag', 'wallabag is an opensource read-it-later.',
- 'Miscellaneous'),
-]
-
-##### Guzzle sphinx theme
-
-import guzzle_sphinx_theme
-html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator'
-html_theme_path = guzzle_sphinx_theme.html_theme_path()
-html_theme = 'guzzle_sphinx_theme'
-
-# Custom sidebar templates, maps document names to template names.
-html_sidebars = {
- '**': ['logo-text.html', 'globaltoc.html', 'searchbox.html']
-}
-
-# Register the theme as an extension to generate a sitemap.xml
-extensions.append("guzzle_sphinx_theme")
+++ /dev/null
-wallabag documentation
-======================
-
-.. image:: ../img/wallabag.png
- :alt: wallabag logo
- :align: center
-
-**wallabag** É uma aplicação "leia mais tarde": Ele salva páginas da web mantendo apenas o conteúdo. Elementos como ícones de navegação ou propaganda são deletedos.
-
-A documentação principal desta aplicação é organizada em duas seções:
-
-* :ref:`doc-usuario`
-* :ref:`doc-desenvolvedor`
-
-.. _user-docs:
-
-.. toctree::
- :maxdepth: 2
- :caption: Documentação do usuário
-
- user/criar_conta
- user/login
- user/configuração
- user/primeiro_artigo
- user/importar
- user/baixar_artigos
- user/filtros
- user/tags
-
-.. _dev-docs:
-
-.. toctree::
- :maxdepth: 2
- :caption: Documentação do desenvolvedor
-
- developer/docker
+++ /dev/null
-Sphinx>=1.3.0,<1.4.0
-guzzle_sphinx_theme>=0.7.0,<0.8.0
{
$this->validateAuthentication();
- $isArchived = (int) $request->query->get('archive');
- $isStarred = (int) $request->query->get('starred');
+ $isArchived = (null === $request->query->get('archive')) ? null : (bool) $request->query->get('archive');
+ $isStarred = (null === $request->query->get('starred')) ? null : (bool) $request->query->get('starred');
$sort = $request->query->get('sort', 'created');
$order = $request->query->get('order', 'desc');
$page = (int) $request->query->get('page', 1);
$pager = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Entry')
- ->findEntries($this->getUser()->getId(), (bool) $isArchived, (bool) $isStarred, $sort, $order);
+ ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
$pager->setCurrentPage($page);
$pager->setMaxPerPage($perPage);
$form->handleRequest($request);
if ($form->isValid()) {
- // check for existing entry, if it exists, redirect to it with a message
- $existingEntry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
+ $existingEntry = $this->checkIfEntryAlreadyExists($entry);
if (false !== $existingEntry) {
$this->get('session')->getFlashBag()->add(
{
$entry = new Entry($this->getUser());
$entry->setUrl($request->get('url'));
- $this->updateEntry($entry);
+
+ if (false === $this->checkIfEntryAlreadyExists($entry)) {
+ $this->updateEntry($entry);
+ }
return $this->redirect($this->generateUrl('homepage'));
}
throw $this->createAccessDeniedException('You can not access this entry.');
}
}
+
+ /**
+ * Check for existing entry, if it exists, redirect to it with a message.
+ *
+ * @param $entry
+ *
+ * @return array|bool
+ */
+ private function checkIfEntryAlreadyExists($entry)
+ {
+ return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
+ }
}