From: Yuri Astrakhan Date: Tue, 16 Sep 2014 06:58:36 +0000 (-0400) Subject: When cloning TextContent, include model X-Git-Tag: 1.31.0-rc.0~13999^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=2beb4fc172c921245c237c4c1714d170fd8df8b7;p=lhc%2Fweb%2Fwiklou.git When cloning TextContent, include model The model id should be preserved when cloning values on save. Change-Id: I397d36af30cf1401023b761e8c41f0dc83e76c12 --- diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index d292880ba4..c479f202fb 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -160,7 +160,7 @@ class TextContent extends AbstractContent { $text = $this->getNativeData(); $pst = rtrim( $text ); - return ( $text === $pst ) ? $this : new static( $pst ); + return ( $text === $pst ) ? $this : new static( $pst, $this->getModel() ); } /**