From 1ead83e432413da9f0828c19a427ad586d5a23b6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Oct 2011 18:01:16 -0300 Subject: Cleanup --- muamba.handlers.inc | 21 --------------------- muamba.module | 4 ++-- muamba.views.inc | 4 ++-- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/muamba.handlers.inc b/muamba.handlers.inc index 28f5753..16c1f38 100644 --- a/muamba.handlers.inc +++ b/muamba.handlers.inc @@ -30,24 +30,3 @@ class views_handler_filter_muamba_status extends views_handler_filter_in_operato } } } - -/** - * Active transactions. - * - * @todo - */ -class views_handler_field_muamba_active extends views_handler_field_boolean { - /** - * Override parent::query() and don't alter query. - */ - function query() { - $this->field_alias = 'muamba_active_'. $this->position; - } - - /** - * Renders the field. - */ - function render($values) { - parent::render($values); - } -} diff --git a/muamba.module b/muamba.module index 1d72289..6342f49 100644 --- a/muamba.module +++ b/muamba.module @@ -285,8 +285,8 @@ function muamba_views_api() { function muamba_node_update($node) { if ($node->type == MUAMBA_NODE_TYPE) { db_update('muamba') - ->fields(array('owner' => $node->uid) - ->condition('nid', $node->nid) + ->fields(array('owner' => $node->uid)) + ->condition('nid', $node->nid, '=') ->execute(); } } diff --git a/muamba.views.inc b/muamba.views.inc index 409498a..584fbe7 100644 --- a/muamba.views.inc +++ b/muamba.views.inc @@ -111,11 +111,11 @@ function muamba_views_data() { 'title' => t('Active'), 'help' => t('Active or inactive transactions'), 'field' => array( - 'handler' => 'views_handler_field_muamba_active', + 'handler' => 'views_handler_field_boolean', 'click sortable' => TRUE, ), 'filter' => array( - 'handler' => 'views_handler_filter_muamba_active', + 'handler' => 'views_handler_filter_boolean_operator', ), 'sort' => array( 'handler' => 'views_handler_sort', -- cgit v1.2.3