Skip to content
Browse files

Tests fixed. (only one error now). TODO: use drupal_static where poss…

…ible
  • Loading branch information...
1 parent 680b620 commit de36de3b7bf3abebf06cb4e8248f75712a731f8e @shakty committed Apr 17, 2012
Showing with 12 additions and 7 deletions.
  1. +4 −0 CHANGELOG
  2. +1 −1 includes/core/common.inc
  3. +1 −1 patterns.info
  4. +4 −4 patterns.module
  5. +2 −1 tests/README.md
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+7055:
+
+ - Tests are now restored
+
7054:
- Info page completed
View
2 includes/core/common.inc
@@ -28,7 +28,7 @@ function patterns_prepare_action(&$action, &$data, $actions_map) {
}
// Keep a list of which modules handle what tags.
- $tag_modules = patterns_get_tagmodules_index();
+ $tag_modules = patterns_get_tagmodules_index(NULL, $data);
$errors = array();
View
2 patterns.info
@@ -5,7 +5,7 @@ dependencies[] = libraries
core = 7.x
version = 7.x-1.x-dev
-build = 7054
+build = 7055
package = Patterns
php = 5.2
View
8 patterns.module
@@ -720,7 +720,7 @@ function patterns_start_engine($pattern, $params = array(), $mode = 'batch') {
*/
function patterns_invoke($hook, $action, &$data = NULL, $form_id = NULL, &$a = NULL) {
- $tag_modules = patterns_get_tagmodules_index();
+ $tag_modules = patterns_get_tagmodules_index(NULL, $data); // TODO: check the parameters
// Unsetting it while the module performs operations.
$tag = $data['tag'];
@@ -844,16 +844,16 @@ function patterns_get_tagmodules_index($tag_name = NULL, $data = NULL, $key = NU
}
// Part of tag
- if (!is_null($tag_name) && !is_null($key)) {
+ if (!empty($tag_name) && !empty($key)) {
return $tag_modules[$tag_name][$key];
}
// Full tag
- if (!is_null($tag_name)) {
+ if (!empty($tag_name)) {
return $tag_modules[$tag_name];
}
// All the values of key=$key from all tags
- if (!is_null($key)) {
+ if (!empty($key)) {
$out = array();
foreach ($tag_modules as $tag => $value) {
if (isset($value[$key])) {
View
3 tests/README.md
@@ -28,4 +28,5 @@ The following parts of the Patterns module still need a test. Feel free to contr
- First Install screen
- Export page
- Public page
- - Patterns D2D
+ - Patterns D2D
+ - How tagmodules and modulestag indexes are built

0 comments on commit de36de3

Please sign in to comment.
Something went wrong with that request. Please try again.