<?xml version="1.0"?>
<?xml-stylesheet 
 href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/3641/bug">
    <title>PEAR Bug #3641</title>
    <link>http://pear.php.net/bugs/3641</link>
    <description>[Closed] Translation2 is not cloneable</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bugs/3641"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/3641/2005-03-03+11%3A37%3A26#2005-03-03+11%3A37%3A26"/>
     </rdf:Seq>
    </items>
  </channel>
    <item rdf:about="http://pear.php.net/bugs/3641">
      <title>ojai@... [2005-02-28 13:36:21]</title>
      <link>http://pear.php.net/bugs/3641</link>
      <description><![CDATA[<pre>Translation2 Bug
Reported by ojai@...
2005-02-28T18:36:21-00:00
PHP: 5.0.2 OS: Linux Debian Package Version: 

Description:
------------
Translation2 version : current CVS

Translation2 doesn't make use of a __clone() method to clone its internal object references.

Here's a patch that corrects this issue :

http://samalyse.com/ln/t2-clone.diff

I think you should add a __clone() method to the Decorator as well.

Reproduce code:
---------------
require_once 'PEAR.php';
require_once 'Translation2.php';
    
$t2 =&amp; Translation2::factory ('XML', array('filename' =&gt; 'i18n.xml'));
$t2-&gt;setLang ('en');
$t2_clone = clone ($t2);
$t2_clone-&gt;setLang('fr'); // This shouldn't change $t2
echo $t2-&gt;get('invoice','documents'); // But it does...



Expected result:
----------------
Invoice

Actual result:
--------------
Facture</pre>]]></description>
      <content:encoded><![CDATA[<pre>Translation2 Bug
Reported by ojai@...
2005-02-28T18:36:21-00:00
PHP: 5.0.2 OS: Linux Debian Package Version: 

Description:
------------
Translation2 version : current CVS

Translation2 doesn't make use of a __clone() method to clone its internal object references.

Here's a patch that corrects this issue :

http://samalyse.com/ln/t2-clone.diff

I think you should add a __clone() method to the Decorator as well.

Reproduce code:
---------------
require_once 'PEAR.php';
require_once 'Translation2.php';
    
$t2 =&amp; Translation2::factory ('XML', array('filename' =&gt; 'i18n.xml'));
$t2-&gt;setLang ('en');
$t2_clone = clone ($t2);
$t2_clone-&gt;setLang('fr'); // This shouldn't change $t2
echo $t2-&gt;get('invoice','documents'); // But it does...



Expected result:
----------------
Invoice

Actual result:
--------------
Facture</pre>]]></content:encoded>
      <dc:date>2005-02-28T18:36:21-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/3641/2005-03-03+11%3A37%3A26#2005-03-03+11%3A37%3A26">
      <title>quipo [2005-03-03 16:37]</title>
      <link>http://pear.php.net/bugs/3641#1109867846</link>
      <description><![CDATA[<pre>This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PEAR better.

--

patch applied, many thanks. I also added it to Translation2_Decorator, is it working as expected?</pre>]]></description>
      <content:encoded><![CDATA[<pre>This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PEAR better.

--

patch applied, many thanks. I also added it to Translation2_Decorator, is it working as expected?</pre>]]></content:encoded>
      <dc:date>2005-03-03T16:37:26-00:00</dc:date>
    </item>
</rdf:RDF>