Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
4ec3f397
Commit
4ec3f397
authored
Dec 04, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed pagination bug affecting postgres.
parent
09c60d01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
changelog.md
changelog.md
+8
-0
query.php
laravel/database/query.php
+8
-3
index.php
public/index.php
+1
-1
No files found.
changelog.md
View file @
4ec3f397
# Laravel Change Log
## Version 2.0.5
-
Fix: Remove orderings before running pagination queries.
### Upgrading from 2.0.4
-
Replace
**laravel**
directory.
## Version 2.0.4
-
Feature: Added default parameter to File::get method.
...
...
laravel/database/query.php
View file @
4ec3f397
...
...
@@ -531,11 +531,16 @@ class Query {
*/
public
function
paginate
(
$per_page
=
20
,
$columns
=
array
(
'*'
))
{
// Calculate the current page for the request. The page number
// will be validated and adjusted by the Paginator class,
// so we can assume it is valid.
// Because some database engines may throw errors if we leave
// orderings on the query when retrieving the total number
// of records, we will remove all of the ordreings and put
// them back on the query after we have the count.
list
(
$orderings
,
$this
->
orderings
)
=
array
(
$this
->
orderings
,
null
);
$page
=
Paginator
::
page
(
$total
=
$this
->
count
(),
$per_page
);
$this
->
orderings
=
$orderings
;
return
Paginator
::
make
(
$this
->
for_page
(
$page
,
$per_page
)
->
get
(
$columns
),
$total
,
$per_page
);
}
...
...
public/index.php
View file @
4ec3f397
...
...
@@ -3,7 +3,7 @@
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @version 2.0.
4
* @version 2.0.
5
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment