aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-10-07 18:01:16 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-10-07 18:01:16 -0300
commit1ead83e432413da9f0828c19a427ad586d5a23b6 (patch)
treeb0b45ae44de2b0cb69f0a587ce9176dd78bd0f3b
parentaf9f953bd66ebf3c276a13ff0259519301e2959a (diff)
downloadmuamba-1ead83e432413da9f0828c19a427ad586d5a23b6.tar.gz
muamba-1ead83e432413da9f0828c19a427ad586d5a23b6.tar.bz2
Cleanup
-rw-r--r--muamba.handlers.inc21
-rw-r--r--muamba.module4
-rw-r--r--muamba.views.inc4
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',