? link_node.patch
Index: link_node.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/link_node/link_node.info,v
retrieving revision 1.1
diff -r1.1 link_node.info
3a4,5
> 
> core = 6.x
\ No newline at end of file
Index: link_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/link_node/link_node.module,v
retrieving revision 1.2
diff -r1.2 link_node.module
2,4c2,6
< /*
< This file is link_node module - It allows users to
< link a node to another node.
---
> // $Id$
> 
> /**
>  * @file Allows users to link a node to another node.
>  */
5a8
> /*
22d24
< 
64c66
<   foreach(node_get_types() as $type => $name) {
---
>   foreach (node_get_types() as $type => $name) {
67c69
<     '#title' => t("Allowed parameters for %type nodes", array('%type'=>$type)),
---
>     '#title' => t("Allowed parameters for %type nodes", array('%type' => $type)),
94c96
< 	if (module_exists('i18n') && module_exists('translation')) {
---
>         if (module_exists('i18n') && module_exists('translation')) {
98,99c100,101
<         $node = node_load(array("nid"=>$nid));
<         if($node) {
---
>         $node = node_load(array("nid" => $nid));
>         if ($node) {
101c103
<           if(!node_access("view", $node)) {
---
>           if (!node_access("view", $node)) {
109,111c111,113
< 	  if ( preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match) == 0 ){
< 	    $meta_tag_params_regexp=$meta_tag_params_regexp2 ;
< 	  }
---
>           if (preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match) == 0) {
>             $meta_tag_params_regexp=$meta_tag_params_regexp2 ;
>           }
115c117
<             for($i=0; $i<count($parm_match[1]); $i++) {  
---
>             for ($i=0; $i<count($parm_match[1]); $i++) {  
121,122c123,124
<               if(in_array($parm, $allowed_vars)) {
<                 //if($show_error_msgs) {
---
>               if (in_array($parm, $allowed_vars)) {
>                 //if ($show_error_msgs) {
128,129c130,132
<                 if($show_error_msgs) {
<                   drupal_set_message("ignoring param '$parm' for ".$node->type." as it is not valid.  Possible values are '<code>". variable_get("link_node_allowed_vars_$node->type", "") ."</code>'.");
---
>                 if ($show_error_msgs) {
>                   drupal_set_message("ignoring param '$parm' for ". $node->type ." as it is not valid. Possible values are '<code>".
>                     variable_get("link_node_allowed_vars_$node->type", "") ."</code>'.");
134,144c137,146
< 		else {
< //	var_dump("ignori ".$match[2][$key]."-".$node->type."-".$node->title);
<   //      var_dump( explode(',', variable_get("link_node_allowed_vars_$node->type", "")) );
< //	var_dump( "matches:");
< //	var_dump( $match[2][$key] );
< //	$meta_tag_params_regexp = '/,\s*([\w_-]+)\s*=\s*&quot;([^,]+)&quot;\s*/';
< //	var_dump( "==");
< //	var_dump( preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match) );
< //	var_dump( $parm_match );
< 	
< }
---
>           else {
> //  var_dump("ignori ".$match[2][$key]."-".$node->type."-".$node->title);
> //  var_dump( explode(',', variable_get("link_node_allowed_vars_$node->type", "")) );
> //  var_dump( "matches:");
> //  var_dump( $match[2][$key] );
> //  $meta_tag_params_regexp = '/,\s*([\w_-]+)\s*=\s*&quot;([^,]+)&quot;\s*/';
> //  var_dump( "==");
> //  var_dump( preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match) );
> //  var_dump( $parm_match );
>           }
146,148c148
<           //$matches_html[$key] = "thumbnail of node $node->nid goes here";
<           //$matches_html[$key] = theme("attached_node_thumbnail", $node);
<           $matches_html[$key] = theme_link_node_thumbnail($node);//."k:".$key."v:".var_dump($match);
---
>           $matches_html[$key] = theme("link_node_thumbnail", $node);
151,152c151,152
<           if($show_error_msgs) {
<             $matches_html[$key] = theme("link_node_format", t("Nonexistent node nid: ") . "$nid.");
---
>           if ($show_error_msgs) {
>             $matches_html[$key] = theme("link_node_format", t("Nonexistent node nid: ") ."$nid.");
179c179
<   $main = true;
---
>   $main = TRUE;
181c181
<   if($node->type == "image") {
---
>   if ($node->type == "image") {
184c184
<     if(function_exists("image_link_node_thumbnail")) {
---
>     if (function_exists("image_link_node_thumbnail")) {
198c198
<   return '<div class="attached_node">' . $content . "</div>\n";
---
>   return '<div class="attached_node">'. $content ."</div>\n";
205c205
<   if($op == "update") {
---
>   if ($op == "update") {
214c214
< function link_node_help($section = "admin/help#link_node") {
---
> function link_node_help($path, $arg) {
217c217
<   switch ($section) {
---
>   switch ($path) {
229,230c229,230
<       foreach(node_get_types() as $type => $name) {
<         $output .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("link_node_allowed_vars_$type", "") . "</td></tr>\n";
---
>       foreach (node_get_types() as $type => $name) {
>         $output .= "<tr><td>". t("Allowed parameters for <strong>$type</strong> nodes: ") ."</td><td>". variable_get("link_node_allowed_vars_$type", "") ."</td></tr>\n";
244,245c244,245
< function link_node_filter_tips($delta, $format, $long = false) {
<   if($long) {
---
> function link_node_filter_tips($delta, $format, $long = FALSE) {
>   if ($long) {
256,257c256,257
<     foreach(node_get_types() as $type => $name) {
<       $txt .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("link_node_allowed_vars_$type", "") . "</td></tr>\n";
---
>     foreach (node_get_types() as $type => $name) {
>       $txt .= "<tr><td>". t("Allowed parameters for <strong>$type</strong> nodes: ") ."</td><td>". variable_get("link_node_allowed_vars_$type", "") ."</td></tr>\n";
271a272,285
> 
> /**
>  * Implementation of hook_theme().
>  */
> function link_node_theme() {
>   return array(
>     'link_node_format' => array(
>       'arguments' => array('content' => NULL),
>     ),
>     'link_node_thumbnail' => array(
>       'arguments' => array('node' => NULL),
>     ),
>   );
> }
\ No newline at end of file
