This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via ff70b3123c63ba33ffb77b0b6730e6994fcdc422 (commit)
via 8b2496a812fea9b27f2fa37239a17aebf901b0b6 (commit)
via 687a6098124aef1893f8c300ab2a07cb624aab0c (commit)
from c76ef3976ed14e1066d09a25d4b64bd6a4494a21 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ff70b3123c63ba33ffb77b0b6730e6994fcdc422
Author: Ivan1986 <iva...@li...>
Date: Wed Jul 28 14:42:13 2010 +0400
* Добавлен параметр направления сортировки (скафолдинг)
diff --git a/lib/Modules/Scafold/ScafoldController.php b/lib/Modules/Scafold/ScafoldController.php
index d444e11..f7c5d7c 100644
--- a/lib/Modules/Scafold/ScafoldController.php
+++ b/lib/Modules/Scafold/ScafoldController.php
@@ -327,26 +327,30 @@ abstract class ScafoldController extends Controller
* Устанавливает порядок сортировки
*
* @param string $field Имя поля
+ * @param string $dir Направление сортировки (ASC|DESC|)
*/
- public function sortAction($field='')
+ public function sortAction($field='', $dir='')
{
$this->session();
//такого поля нету
if (!isset($this->fields[$field]))
QFW::$router->redirect(Url::C('index'), true);
- if (isset($_SESSION['scafold'][$this->table]['sort']) &&
- $_SESSION['scafold'][$this->table]['sort']['field'] == $field)
- $r = array(
- 'field' => $field,
- 'direction' => $_SESSION['scafold'][$this->table]['sort']['direction'] == 'ASC' ?
- 'DESC' : 'ASC',
- );
- else
- $r = array(
- 'field' => $field,
- 'direction' => 'ASC',
+ //если сортировки в этой таблице еще нет
+ if (!isset($_SESSION['scafold'][$this->table]['sort']))
+ $_SESSION['scafold'][$this->table]['sort'] = array(
+ 'field' => '',
+ 'direction' => '',
);
- $_SESSION['scafold'][$this->table]['sort'] = $r;
+ //ссылка на сортировку этой таблицы
+ $sort =&$_SESSION['scafold'][$this->table]['sort'];
+ //если не указана, то ASC или сменить ASC на DESC
+ if ($dir != 'ASC' && $dir != 'DESC')
+ $dir = ($sort['field'] == $field && $sort['direction'] == 'ASC')
+ ? 'DESC' : 'ASC';
+ $sort = array(
+ 'field' => $field,
+ 'direction' => $dir,
+ );
QFW::$router->redirect(Url::C('index'), true);
}
commit 8b2496a812fea9b27f2fa37239a17aebf901b0b6
Author: Ivan1986 <iva...@li...>
Date: Wed Jul 28 14:41:46 2010 +0400
* Новый простой пагинатор
diff --git a/application/helper/templates/pager/pager3.html b/application/helper/templates/pager/pager3.html
new file mode 100644
index 0000000..5ee3968
--- /dev/null
+++ b/application/helper/templates/pager/pager3.html
@@ -0,0 +1,11 @@
+<!-- Pageslist -->
+<div class="pageslist">
+ <?php for($page=1;$page<=$pager['all'];$page++) {?>
+ <?php if ($page==$pager['c']) {?>
+ <b><?php echo $page?></b>
+ <?php } else {?>
+ <a href="<?php echo str_replace('$',$page,$pager['url'])?>"><?php echo $page?></a>
+ <?php } ?>
+ <?php } ?>
+</div>
+<!-- /Pageslist -->
commit 687a6098124aef1893f8c300ab2a07cb624aab0c
Author: Ivan1986 <iva...@li...>
Date: Fri Jul 23 15:55:04 2010 +0400
Исправлена ошибка в memcached
diff --git a/QFW/Cacher/Memcached.php b/QFW/Cacher/Memcached.php
index 3f8112b..fd964ba 100644
--- a/QFW/Cacher/Memcached.php
+++ b/QFW/Cacher/Memcached.php
@@ -45,7 +45,7 @@ class Cacher_Memcached implements Zend_Cache_Backend_Interface
public function getStats()
{
- return $this->mc->getExtendedStats();
+ return $this->mc->getStats();
}
public function remove($id)
-----------------------------------------------------------------------
Summary of changes:
QFW/Cacher/Memcached.php | 2 +-
application/helper/templates/pager/pager3.html | 11 ++++++++
lib/Modules/Scafold/ScafoldController.php | 30 +++++++++++++----------
3 files changed, 29 insertions(+), 14 deletions(-)
create mode 100644 application/helper/templates/pager/pager3.html
hooks/post-receive
--
quickfw
|