small change in pagination and add missing .env template
authorymh <ymh.work@gmail.com>
Tue, 01 Dec 2015 16:49:37 +0100
changeset 22 a50cbd7d702f
parent 21 01e7e6a17317
child 23 037687868bc4
small change in pagination and add missing .env template
server/src/.env.example
server/src/app/Repositories/DocumentRepository.php
server/src/app/Repositories/RdfDocumentRepository.php
--- /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
--- 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();
 }
--- 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));