Skip to content

Commit d2fefa6

Browse files
committed
Work on section handling.
1 parent 49b2d4a commit d2fefa6

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

artisan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Laravel - A PHP Framework For Web Artisans
44
*
55
* @package Laravel
6-
* @version 3.2.11
6+
* @version 3.2.12
77
* @author Taylor Otwell <taylorotwell@gmail.com>
88
* @link http://laravel.com
99
*/

laravel/documentation/changes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Contents
44

5+
- [Laravel 3.2.12](#3.2.12)
6+
- [Upgrading From 3.2.11](#upgrade-3.2.12)
57
- [Laravel 3.2.11](#3.2.11)
68
- [Upgrading From 3.2.10](#upgrade-3.2.11)
79
- [Laravel 3.2.10](#3.2.10)
@@ -47,6 +49,16 @@
4749
- [Laravel 3.1](#3.1)
4850
- [Upgrading From 3.0](#upgrade-3.1)
4951

52+
<a name="3.2.12"></a>
53+
## Laravel 3.2.12
54+
55+
- Clear sections on a complete render operation.
56+
57+
<a name="upgrade-3.2.12"></a>
58+
### Upgrading From 3.2.11
59+
60+
- Replace the **laravel** folder.
61+
5062
<a name="3.2.11"></a>
5163
## Laravel 3.2.11
5264

laravel/view.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class View implements ArrayAccess {
5151
*/
5252
public static $last;
5353

54+
/**
55+
* The render operations taking place.
56+
*
57+
* @var int
58+
*/
59+
public static $render_count = 0;
60+
5461
/**
5562
* The Laravel view loader event name.
5663
*
@@ -327,19 +334,32 @@ public static function render_each($view, array $data, $iterator, $empty = 'raw|
327334
*/
328335
public function render()
329336
{
337+
static::$render_count++;
338+
330339
Event::fire("laravel.composing: {$this->view}", array($this));
331340

341+
$contents = null;
342+
332343
// If there are listeners to the view engine event, we'll pass them
333344
// the view so they can render it according to their needs, which
334345
// allows easy attachment of other view parsers.
335346
if (Event::listeners(static::engine))
336347
{
337348
$result = Event::until(static::engine, array($this));
338349

339-
if ( ! is_null($result)) return $result;
350+
if ( ! is_null($result)) $contents = $result;
351+
}
352+
353+
if (is_null($contents)) $contents = $this->get();
354+
355+
static::$render_count--;
356+
357+
if (static::$render_count == 0)
358+
{
359+
Section::$sections = array();
340360
}
341361

342-
return $this->get();
362+
return $contents;
343363
}
344364

345365
/**

paths.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Laravel - A PHP Framework For Web Artisans
44
*
55
* @package Laravel
6-
* @version 3.2.11
6+
* @version 3.2.12
77
* @author Taylor Otwell <taylorotwell@gmail.com>
88
* @link http://laravel.com
99
*/

public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Laravel - A PHP Framework For Web Artisans
44
*
55
* @package Laravel
6-
* @version 3.2.11
6+
* @version 3.2.12
77
* @author Taylor Otwell <taylorotwell@gmail.com>
88
* @link http://laravel.com
99
*/

0 commit comments

Comments
 (0)