aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-23 11:09:42 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:44:01 -0500
commit09947a95e3fbd60d72203b487239ad305d2a529a (patch)
tree957903913bfc608b88b33796caafc8b6220ce777
parent9869016d603b95267bc6600d9f6a781c89238fda (diff)
downloadelgg-09947a95e3fbd60d72203b487239ad305d2a529a.tar.gz
elgg-09947a95e3fbd60d72203b487239ad305d2a529a.tar.bz2
Refs #4143 adds a unit test for type/subtype where sql generation
-rw-r--r--engine/lib/river.php12
-rw-r--r--pages/river.php1
2 files changed, 12 insertions, 1 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 466eca253..309aeb30f 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -611,6 +611,16 @@ function elgg_river_page_handler($page) {
}
/**
+ * 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');
diff --git a/pages/river.php b/pages/river.php
index 5770084ab..601faf16f 100644
--- a/pages/river.php
+++ b/pages/river.php
@@ -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";