diff --git a/artisan b/artisan index b64b6feb..c80e3a9f 100644 --- a/artisan +++ b/artisan @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.11 + * @version 3.2.12 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/laravel/documentation/changes.md b/laravel/documentation/changes.md index b8e2d5a4..7cc76b9b 100644 --- a/laravel/documentation/changes.md +++ b/laravel/documentation/changes.md @@ -2,6 +2,8 @@ # Laravel Change Log ## Contents +- [Laravel 3.2.12](#3.2.12) +- [Upgrading From 3.2.11](#upgrade-3.2.12) - [Laravel 3.2.11](#3.2.11) - [Upgrading From 3.2.10](#upgrade-3.2.11) - [Laravel 3.2.10](#3.2.10) @@ -47,6 +49,16 @@ ## Contents - [Laravel 3.1](#3.1) - [Upgrading From 3.0](#upgrade-3.1) + +## Laravel 3.2.12 + +- Clear sections on a complete render operation. + + +### Upgrading From 3.2.11 + +- Replace the **laravel** folder. + ## Laravel 3.2.11 diff --git a/laravel/view.php b/laravel/view.php index 5ac37520..b9854d2a 100644 --- a/laravel/view.php +++ b/laravel/view.php @@ -51,6 +51,13 @@ class View implements ArrayAccess { */ public static $last; + /** + * The render operations taking place. + * + * @var int + */ + public static $render_count = 0; + /** * The Laravel view loader event name. * @@ -327,8 +334,12 @@ public static function render_each($view, array $data, $iterator, $empty = 'raw| */ public function render() { + static::$render_count++; + Event::fire("laravel.composing: {$this->view}", array($this)); + $contents = null; + // If there are listeners to the view engine event, we'll pass them // the view so they can render it according to their needs, which // allows easy attachment of other view parsers. @@ -336,10 +347,19 @@ public function render() { $result = Event::until(static::engine, array($this)); - if ( ! is_null($result)) return $result; + if ( ! is_null($result)) $contents = $result; } - return $this->get(); + if (is_null($contents)) $contents = $this->get(); + + static::$render_count--; + + if (static::$render_count == 0) + { + Section::$sections = array(); + } + + return $contents; } /** diff --git a/paths.php b/paths.php index b9ab9229..ab67c8a9 100644 --- a/paths.php +++ b/paths.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.11 + * @version 3.2.12 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/public/index.php b/public/index.php index d133794a..13644570 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.2.11 + * @version 3.2.12 * @author Taylor Otwell * @link http://laravel.com */