]> git.agnieray.net Git - galette.git/commitdiff
Rename method
authorJohan Cwiklinski <johan@x-tnd.be>
Wed, 8 Jun 2022 17:35:45 +0000 (19:35 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Wed, 8 Jun 2022 17:35:45 +0000 (19:35 +0200)
galette/lib/Galette/Controllers/Crud/MailingsController.php
galette/lib/Galette/Controllers/Crud/MembersController.php
galette/lib/Galette/Controllers/Crud/SavedSearchesController.php
galette/lib/Galette/Controllers/HistoryController.php
galette/lib/Galette/Core/Pagination.php

index c9c61d91ddc7ef01f5282aef004fa097209b66b9..74ddb53d4b650c6be7670b2443578be77fd73fee 100644 (file)
@@ -498,10 +498,10 @@ class MailingsController extends CrudController
         $this->session->filter_mailings = $filters;
 
         //assign pagination variables to the template and add pagination links
-        $mailhist->filters->setSmartyPagination($this->router, $this->view);
+        $mailhist->filters->setViewPagination($this->router, $this->view);
         $history_list = $mailhist->getHistory();
         //assign pagination variables to the template and add pagination links
-        $mailhist->filters->setSmartyPagination($this->router, $this->view);
+        $mailhist->filters->setViewPagination($this->router, $this->view);
 
         // display page
         $this->view->render(
index 0fdb62ae2543b07b531cdef5afceda28fde1ca06..6c7749fc675d0292f9705f8917d3c79fca0c5101 100644 (file)
@@ -359,7 +359,7 @@ class MembersController extends CrudController
         $this->session->$varname = $filters;
 
         //assign pagination variables to the template and add pagination links
-        $filters->setSmartyPagination($this->router, $this->view, false);
+        $filters->setViewPagination($this->router, $this->view, false);
 
         // display page
         $this->view->render(
@@ -562,7 +562,7 @@ class MembersController extends CrudController
         $groups_list = $groups->getList();
 
         //assign pagination variables to the template and add pagination links
-        $filters->setSmartyPagination($this->router, $this->view, false);
+        $filters->setViewPagination($this->router, $this->view, false);
         $filters->setViewCommonsFilters($this->preferences, $this->view);
 
         $this->session->filter_members = $filters;
@@ -878,7 +878,7 @@ class MembersController extends CrudController
         }
 
         //assign pagination variables to the template and add pagination links
-        $filters->setSmartyPagination($this->router, $this->view, false);
+        $filters->setViewPagination($this->router, $this->view, false);
 
         $this->session->ajax_members_filters = $filters;
 
index ce03f3b1da0d3904af2ec08dcb060ac78788d551..93c982b2969de39c05d24f3af2a078f52e5d36e5 100644 (file)
@@ -191,7 +191,7 @@ class SavedSearchesController extends CrudController
         $list = $searches->getList(true);
 
         //assign pagination variables to the template and add pagination links
-        $filters->setSmartyPagination($this->router, $this->view, false);
+        $filters->setViewPagination($this->router, $this->view, false);
 
         $this->session->filter_savedsearch = $filters;
 
index e98ddd9287969464a0f7372e8e5eb45e2078d5db..57a68817d3081d2544ebb939680cd128236d9e7e 100644 (file)
@@ -101,7 +101,7 @@ class HistoryController extends AbstractController
         $logs = $this->history->getHistory();
 
         //assign pagination variables to the template and add pagination links
-        $this->history->filters->setSmartyPagination($this->router, $this->view);
+        $this->history->filters->setViewPagination($this->router, $this->view);
 
         // display page
         $this->view->render(
index f8bf1dd52e540758f24dd920f2ea1dcb8e3e70f4..b1a4a45590f41e4cb92bedea0b87b5a39f54ee7c 100644 (file)
@@ -7,7 +7,7 @@
  *
  * PHP version 5
  *
- * Copyright © 2010-2020 The Galette Team
+ * Copyright © 2010-2022 The Galette Team
  *
  * This file is part of Galette (http://galette.tuxfamily.org).
  *
@@ -28,7 +28,7 @@
  * @package   Galette
  *
  * @author    Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010-2020 The Galette Team
+ * @copyright 2010-2022 The Galette Team
  * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
  * @link      http://galette.tuxfamily.org
  * @since     Available since 0.7dev - 2010-03-03
@@ -49,7 +49,7 @@ use Laminas\Db\Sql\Select;
  * @package   Galette
  *
  * @author    Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010-2014 The Galette Team
+ * @copyright 2010-2022 The Galette Team
  * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
  * @link      http://galette.tuxfamily.org
  *
@@ -133,10 +133,10 @@ abstract class Pagination
     {
         $actual = $this->ordered;
         if ($actual == self::ORDER_ASC) {
-                $this->ordered = self::ORDER_DESC;
+            $this->ordered = self::ORDER_DESC;
         }
         if ($actual == self::ORDER_DESC) {
-                $this->ordered = self::ORDER_ASC;
+            $this->ordered = self::ORDER_ASC;
         }
     }
 
@@ -225,6 +225,22 @@ abstract class Pagination
         }
     }
 
+    /**
+     * Creates pagination links and assign some useful variables to the template
+     *
+     * @param Router $router Application instance
+     * @param mixed $view View instance
+     * @param boolean $restricted Do not permit to display all
+     *
+     * @return void
+     *
+     * @deprecated 1.0.0 use setViewPagination
+     */
+    public function setSmartyPagination(Router $router, $view, $restricted = true)
+    {
+        return $this->setViewPagination($router, $view, $restricted);
+    }
+
     /**
      * Creates pagination links and assign some useful variables to the template
      *
@@ -234,7 +250,7 @@ abstract class Pagination
      *
      * @return void
      */
-    public function setSmartyPagination(Router $router, $view, $restricted = true)
+    public function setViewPagination(Router $router, $view, $restricted = true)
     {
         $paginate = null;
         $this->view = $view;