_quote() function clashes with node_assist

DamienMcKenna - July 11, 2008 - 13:46
Project:Addnode
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

Seeing as node_assist is still a requirement, the _quote() function in addnode clashes with the one in node_assist. Here's a replacement that verifies if the function exists first.

<?php
// avoid conflicts with other modules
if (!function_exists('_quote')) {
  function
_quote(&$item, $key) {
   
$item = "'$item'";
  }
}
?>

For completeness sake it also needs to be changed in node_assist.

FYI the patch was created using svn from our local import of the code, but it will probably be quicker to just use the code above.

AttachmentSize
addnode.module.patch637 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.