From b5dd77d387c64ab65a732c2b7b838fb3956fd869 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Mar 2012 22:04:04 -0500 Subject: [PATCH 1/3] Fixing Eloquent constructor bug. Signed-off-by: Taylor Otwell --- changes.md | 12 ++++++++++++ laravel/database/eloquent/query.php | 4 ++-- .../database/eloquent/relationships/relationship.php | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/changes.md b/changes.md index ec6ff4bd..761388b9 100644 --- a/changes.md +++ b/changes.md @@ -2,11 +2,23 @@ ## Laravel Change Log ## Contents +- [Laravel 3.1.2](#3.1.2) +- [Upgrading From 3.1.1](#upgrade-3.1.2) - [Laravel 3.1.1](#3.1.1) - [Upgrading From 3.1](#upgrade-3.1.1) - [Laravel 3.1](#3.1) - [Upgrading From 3.0](#upgrade-3.1) + +## Laravel 3.1.2 + +- Fixes Eloquent query method constructor conflict. + + +## Upgrade From 3.1.1 + +- Replace the **laravel** folder. + ## Laravel 3.1.1 diff --git a/laravel/database/eloquent/query.php b/laravel/database/eloquent/query.php index c4367e96..e30fe0e2 100644 --- a/laravel/database/eloquent/query.php +++ b/laravel/database/eloquent/query.php @@ -43,7 +43,7 @@ public function __construct($model) { $this->model = ($model instanceof Model) ? $model : new $model; - $this->table = $this->query(); + $this->table = $this->table(); } /** @@ -245,7 +245,7 @@ protected function model_includes() * * @return Query */ - protected function query() + protected function table() { return $this->connection()->table($this->model->table()); } diff --git a/laravel/database/eloquent/relationships/relationship.php b/laravel/database/eloquent/relationships/relationship.php index 84d02362..2ec10aa4 100644 --- a/laravel/database/eloquent/relationships/relationship.php +++ b/laravel/database/eloquent/relationships/relationship.php @@ -51,7 +51,7 @@ public function __construct($model, $associated, $foreign) // Next we'll set the fluent query builder for the relationship and // constrain the query such that it only returns the models that // are appropriate for the relationship. - $this->table = $this->query(); + $this->table = $this->table(); $this->constrain(); } From 67758b693265386b3f80e7c378bd571c38ff2f21 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Mar 2012 22:06:20 -0500 Subject: [PATCH 2/3] update change log. --- artisan | 2 +- paths.php | 2 +- public/index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/artisan b/artisan index d4261a1d..68e645ea 100644 --- a/artisan +++ b/artisan @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.1 + * @version 3.1.2 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/paths.php b/paths.php index 7558c326..7d9e1906 100644 --- a/paths.php +++ b/paths.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.1 + * @version 3.1.2 * @author Taylor Otwell * @link http://laravel.com */ diff --git a/public/index.php b/public/index.php index 20f48395..f76527dd 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,7 @@ * Laravel - A PHP Framework For Web Artisans * * @package Laravel - * @version 3.1.1 + * @version 3.1.2 * @author Taylor Otwell * @link http://laravel.com */ From b870ac09dd1ef2b4b4e86acd71f02c9b38ad0060 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Mar 2012 22:06:39 -0500 Subject: [PATCH 3/3] fix front controller. --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index f76527dd..42b6a438 100644 --- a/public/index.php +++ b/public/index.php @@ -31,4 +31,4 @@ // -------------------------------------------------------------- // Launch Laravel. // -------------------------------------------------------------- -require path('sys').'laravel.php'; +require path('sys').'laravel.php'; \ No newline at end of file