]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #4143 adds a unit test for type/subtype where sql generation
authorcash <cash.costello@gmail.com>
Wed, 23 Nov 2011 16:09:42 +0000 (11:09 -0500)
committercash <cash.costello@gmail.com>
Wed, 23 Nov 2011 16:09:42 +0000 (11:09 -0500)
engine/lib/river.php
pages/river.php

index 466eca253113422afe13760766527d215d7e5049..309aeb30fb823c22dbc1e92c4b5ca01c829b8fd6 100644 (file)
@@ -610,6 +610,16 @@ function elgg_river_page_handler($page) {
        return true;
 }
 
+/**
+ * Register river unit tests
+ * @access private
+ */
+function elgg_river_test($hook, $type, $value) {
+       global $CONFIG;
+       $value[] = $CONFIG->path . 'engine/tests/api/river.php';
+       return $value;
+}
+
 /**
  * Initialize river library
  * @access private
@@ -620,6 +630,8 @@ function elgg_river_init() {
        elgg_register_menu_item('site', $item);
 
        elgg_register_widget_type('river_widget', elgg_echo('river:widget:title'), elgg_echo('river:widget:description'));
+
+       elgg_register_plugin_hook_handler('unit_test', 'system', 'elgg_river_test');
 }
 
 elgg_register_event_handler('init', 'system', 'elgg_river_init');
index 5770084aba3efdcf6e89fc3ddc8b72812202e9eb..601faf16fcdbf600e97719b2f95396a465e92b9b 100644 (file)
@@ -7,7 +7,6 @@ $options = array();
 
 $page_type = preg_replace('[\W]', '', get_input('page_type', 'all'));
 $type = preg_replace('[\W]', '', get_input('type', 'all'));
-$active_section =
 $subtype = preg_replace('[\W]', '', get_input('subtype', ''));
 if ($subtype) {
        $selector = "type=$type&subtype=$subtype";