From a5c028005db63a95c7e5ebd863566513ec9b940d Mon Sep 17 00:00:00 2001 From: avl Date: Fri, 9 Jan 2009 17:53:16 +0200 Subject: [PATCH] Filters fix --- ipf/admin/media/js/jquery.jsuggest.js | 1 - ipf/admin/model.php | 6 ++---- ipf/auth/app.php | 1 - ipf/session/middleware.php | 6 +++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ipf/admin/media/js/jquery.jsuggest.js b/ipf/admin/media/js/jquery.jsuggest.js index 74058a8..b81c9c0 100644 --- a/ipf/admin/media/js/jquery.jsuggest.js +++ b/ipf/admin/media/js/jquery.jsuggest.js @@ -126,7 +126,6 @@ $(jC).hide(); iniVal = textBox.value; }); - }; $.fn.jSuggest.defaults = { diff --git a/ipf/admin/model.php b/ipf/admin/model.php index 4ac7e73..7d1e555 100644 --- a/ipf/admin/model.php +++ b/ipf/admin/model.php @@ -9,8 +9,6 @@ class ListFilter{ } function IsChoice($id){ - if (!$id) - return false; foreach($this->choices as &$ch){ if ($ch['id']==$id) return true; @@ -276,7 +274,6 @@ class IPF_Admin_Model{ $data = $o->getData(); foreach($o->getTable()->getRelations() as $rname=>$rel){ $pk = $rel->getTable()->getIdentifier(); - //print $pk; if (array_search($rname,$this->fields())){ if ($rel->getType()==IPF_ORM_Relation::MANY_AGGREGATE){ $data[$rname] = array(); @@ -329,8 +326,9 @@ class IPF_Admin_Model{ $param_name = 'filter_'.$f->local; if (isset($request->GET[$param_name])){ $id = $request->GET[$param_name]; - if ($f->IsChoice($id)) + if ($f->IsChoice($id)){ $this->q->where($f->local.'='.$id); + } } } } diff --git a/ipf/auth/app.php b/ipf/auth/app.php index f119f45..5511bae 100644 --- a/ipf/auth/app.php +++ b/ipf/auth/app.php @@ -12,7 +12,6 @@ class IPF_Auth_App extends IPF_Application{ $request->user = $user; $request->session->clear(); $request->session->setData('login_time', gmdate('Y-m-d H:i:s')); - $user->last_login = gmdate('Y-m-d H:i:s'); $user->save(); } diff --git a/ipf/session/middleware.php b/ipf/session/middleware.php index 8ee294d..f70674f 100644 --- a/ipf/session/middleware.php +++ b/ipf/session/middleware.php @@ -28,7 +28,7 @@ class IPF_Session_Middleware } } else $request->user = $user; - } else + } else $request->user = $user; if (isset($data['IPF_SESSION_KEY'])) { @@ -56,7 +56,7 @@ class IPF_Session_Middleware } return $response; } - + protected function _encodeData($data) { if ('' == ($key = IPF::get('secret_key'))) { @@ -93,4 +93,4 @@ function IPF_Session_Middleware_ContextPreProcessor($request) Pluf_Signal::connect('Pluf_Template_Context_Request::construct', array('Pluf_Middleware_Session', 'processContext')); -*/ \ No newline at end of file +*/ \ No newline at end of file -- 2.49.0