comparison class.template.php @ 1:0f40a8a39c68

Correction d'une faute de frappe dans une variable. candidate est quand meme plus comprehensible que canditate.
author Franck Deroche <webmaster@defr.net>
date Fri, 16 Mar 2007 14:09:38 +0100
parents c86959030ae8
children ad12469f4db4
comparison
equal deleted inserted replaced
0:c86959030ae8 1:0f40a8a39c68
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 function getClonedNode($node, $childNodeName) { 54 function getClonedNode($node, $childNodeName) {
55 $canditates = $node->getElementsByTagName($childNodeName); 55 $candidates = $node->getElementsByTagName($childNodeName);
56 foreach($canditates as $canditate) { 56 foreach($candidates as $candidate) {
57 if($canditate->nodeName == $childNodeName && $canditate->getAttributeNS(Template::NS, 'toClone') == 'true') { 57 if($candidate->nodeName == $childNodeName && $candidate->getAttributeNS(Template::NS, 'toClone') == 'true') {
58 $tmp = array(); 58 $tmp = array();
59 $tmp['orig'] = $canditate; 59 $tmp['orig'] = $candidate;
60 $cnode = $canditate->cloneNode(true); 60 $cnode = $candidate->cloneNode(true);
61 $cnode->removeAttribute('toClone'); 61 $cnode->removeAttribute('toClone');
62 $tmp['clone'] = $cnode; 62 $tmp['clone'] = $cnode;
63 return (object)$tmp; 63 return (object)$tmp;
64 } 64 }
65 } 65 }