From a55d46f2cbb7018e0e1d27c106ccf431753fc0b8 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <eric@unl.edu>
Date: Wed, 20 Jul 2011 22:45:00 +0000
Subject: [PATCH] [gh-148] Remove some code from [gh-124] that was mistakenly
 pushed to staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@873 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/unl.module | 48 --------------------------------
 1 file changed, 48 deletions(-)

diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module
index 5d5979f5..423e5827 100644
--- a/sites/all/modules/unl/unl.module
+++ b/sites/all/modules/unl/unl.module
@@ -882,54 +882,6 @@ function unl_still_alive()
   echo '200 Still Alive';
 }
 
-/**
- * Implementation of hook_filter_info().
- */
-function unl_filter_info() {
-  return array(
-    'unl_embed' => array(
-      'title' => 'UNL Node Embed',
-      'description' => "Allow a node's body to be embedded into another node by using tags.",
-      'process callback' => 'unl_filter_embed_process',
-      'cache' => FALSE,
-    ),
-  );
-}
-
-/**
- * Implementation of hook_filter_FILTER_process pseudo-hook
- *
- * Replace any instances of [[node:X]] in the $text with the content of node X's body.
- */
-function unl_filter_embed_process($text, $filter, $format, $langcode, $cache, $cache_id) {
-  static $processed_hashes = array();
-
-  $text_hash = hash('sha256', $text);
-  if (in_array($text_hash, array_keys($processed_hashes))) {
-    // Possible recursion detected, return the cache result.
-    return $processed_hashes[$text_hash];
-  }
-
-  // In case of recursion, set the cached result to this until we have the real result.
-  $processed_hashes[$text_hash] = 'Error: Cannot embed a node in itself..';
-
-  $matches = NULL;
-  preg_match_all('/\[\[node:([0-9]+)\]\]/', $text, $matches);
-  $node_ids = $matches[1];
-  $nodes = entity_load('node', $node_ids);
-  $replace_array = array();
-  foreach ($node_ids as $node_id) {
-    $content = node_view($nodes[$node_id]);
-    $replace_array["[[node:$node_id]]"] = PHP_EOL . "<!-- Node $node_id start -->" . PHP_EOL
-                      . render($content['body'])
-                      . PHP_EOL . "<!-- Node $node_id end -->" . PHP_EOL;
-  }
-  $text = strtr($text, $replace_array);
-  // Set the cached result to the real result.
-  $processed_hashes[$text_hash] = $text;
-  return $text;
-}
-
 /**
  * Custom function to return the current admin theme for use with hook_menu_alter().
  */
-- 
GitLab