From: Michael M Slusarz Date: Mon, 7 Dec 2009 07:03:57 +0000 (-0700) Subject: Add Horde_Url::setRaw(), useful for chaining X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2d8e77cca5e4dcf99a7012198165d0239af6e3c8;p=horde.git Add Horde_Url::setRaw(), useful for chaining --- diff --git a/framework/Url/lib/Horde/Url.php b/framework/Url/lib/Horde/Url.php index 7136747c5..be1fabe7c 100644 --- a/framework/Url/lib/Horde/Url.php +++ b/framework/Url/lib/Horde/Url.php @@ -184,6 +184,19 @@ class Horde_Url } /** + * Sets the $raw value. This call can be chained. + * + * @param boolean The value to set for $raw. + * + * @return Horde_Url This object, to allow chaining. + */ + public function setRaw($raw) + { + $this->raw = $raw; + return $this; + } + + /** * Creates the full URL string. * * @return string The string representation of this object. diff --git a/framework/Util/lib/Horde/Util.php b/framework/Util/lib/Horde/Util.php index 6e20a4781..607c7ec1d 100644 --- a/framework/Util/lib/Horde/Util.php +++ b/framework/Util/lib/Horde/Util.php @@ -235,9 +235,7 @@ class Horde_Util } if ($url instanceof Horde_Url) { - $url2 = $url->cAdd($parameter, $value); - $url2->raw = !$encode; - return $url2; + return $url->cAdd($parameter, $value)->setRaw(!$encode); } $horde_url = new Horde_Url($url, !$encode);