# HG changeset patch # User ymh # Date 1448984977 -3600 # Node ID a50cbd7d702f8bdd7b9510fb698bfbdc608dfc30 # Parent 01e7e6a173170f862d069e997ca89101b416a379 small change in pagination and add missing .env template diff -r 01e7e6a17317 -r a50cbd7d702f server/src/.env.example --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/src/.env.example Tue Dec 01 16:49:37 2015 +0100 @@ -0,0 +1,27 @@ +APP_ENV=local +APP_DEBUG=true +APP_KEY=SomeRandomString +APP_URL=http://corpus-parole.local + +DATABASE_DRIVER=pgsql +DB_HOST=localhost +DB_DATABASE=corpus +DB_USERNAME=corpus +DB_PASSWORD=secret + +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +MAIL_DRIVER=smtp +MAIL_HOST=mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null + +CORPUSPAROLE_COCOON_RDF_BASE_URI= +CORPUSPAROLE_COCOON_OAIPMH_URL= +CORPUSPAROLE_SESAME_QUERY_URL=http://172.16.1.5:8080/openrdf-sesame +CORPUSPAROLE_SESAME_UPDATE_URL= + +EASYRDF_HTTP_CLIENT_TIMEOUT=20 diff -r 01e7e6a17317 -r a50cbd7d702f server/src/app/Repositories/DocumentRepository.php --- a/server/src/app/Repositories/DocumentRepository.php Tue Dec 01 13:57:41 2015 +0100 +++ b/server/src/app/Repositories/DocumentRepository.php Tue Dec 01 16:49:37 2015 +0100 @@ -18,7 +18,7 @@ * @param string $pageName * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ - public function paginateAll($perPage = 15, $pageName = 'page'); + public function paginateAll($perPage = 15, $pageName = 'page', $page = null); public function getCount(); } diff -r 01e7e6a17317 -r a50cbd7d702f server/src/app/Repositories/RdfDocumentRepository.php --- a/server/src/app/Repositories/RdfDocumentRepository.php Tue Dec 01 13:57:41 2015 +0100 +++ b/server/src/app/Repositories/RdfDocumentRepository.php Tue Dec 01 16:49:37 2015 +0100 @@ -128,11 +128,13 @@ * @param string $pageName * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ - public function paginateAll($perPage = 15, $pageName = 'page') + public function paginateAll($perPage = 15, $pageName = 'page', $page = null) { assert(is_numeric($perPage)); - $page = Paginator::resolveCurrentPage($pageName); + if(is_null($page)) { + $page = Paginator::resolveCurrentPage($pageName); + } assert(is_null($page) || is_numeric($page));