Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.2.5] Fix #1654 #1659

Merged
merged 5 commits into from Dec 10, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerated build/
  • Loading branch information
sjinks committed Dec 8, 2013
commit 1234f933666a60f055bff8e692178ec42e3131c7
8 changes: 5 additions & 3 deletions build/32bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -96669,7 +96669,7 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, setCurrentPage){
phalcon_fetch_params(0, 1, 0, &page);

phalcon_update_property_this_quick(this_ptr, SL("_page"), page, 3986343137UL TSRMLS_CC);

RETURN_THISW();
}

static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
Expand Down Expand Up @@ -96739,11 +96739,13 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
array_init(page_items);
if (PHALCON_GT(n, zero)) {

if (PHALCON_LE(start, n)) {
if (PHALCON_LT(start, n)) {
phalcon_call_method_p1_key(NULL, items, "seek", start, 274276301UL);
} else {
phalcon_call_method_p1_key(NULL, items, "seek", one, 274276301UL);
phalcon_call_method_p1_key(NULL, items, "seek", zero, 274276301UL);
PHALCON_CPY_WRT(page_number, one);
PHALCON_CPY_WRT(last_show_page, zero);
PHALCON_CPY_WRT(start, zero);
}

PHALCON_INIT_VAR(i);
Expand Down
8 changes: 5 additions & 3 deletions build/64bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -96669,7 +96669,7 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, setCurrentPage){
phalcon_fetch_params(0, 1, 0, &page);

phalcon_update_property_this_quick(this_ptr, SL("_page"), page, 6953243428065UL TSRMLS_CC);

RETURN_THISW();
}

static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
Expand Down Expand Up @@ -96739,11 +96739,13 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
array_init(page_items);
if (PHALCON_GT(n, zero)) {

if (PHALCON_LE(start, n)) {
if (PHALCON_LT(start, n)) {
phalcon_call_method_p1_key(NULL, items, "seek", start, 210727673805UL);
} else {
phalcon_call_method_p1_key(NULL, items, "seek", one, 210727673805UL);
phalcon_call_method_p1_key(NULL, items, "seek", zero, 210727673805UL);
PHALCON_CPY_WRT(page_number, one);
PHALCON_CPY_WRT(last_show_page, zero);
PHALCON_CPY_WRT(start, zero);
}

PHALCON_INIT_VAR(i);
Expand Down
8 changes: 5 additions & 3 deletions build/safe/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -96669,7 +96669,7 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, setCurrentPage){
phalcon_fetch_params(0, 1, 0, &page);

phalcon_update_property_this(this_ptr, SL("_page"), page TSRMLS_CC);

RETURN_THISW();
}

static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
Expand Down Expand Up @@ -96739,11 +96739,13 @@ static PHP_METHOD(Phalcon_Paginator_Adapter_Model, getPaginate){
array_init(page_items);
if (PHALCON_GT(n, zero)) {

if (PHALCON_LE(start, n)) {
if (PHALCON_LT(start, n)) {
phalcon_call_method_p1_noret(items, "seek", start);
} else {
phalcon_call_method_p1_noret(items, "seek", one);
phalcon_call_method_p1_noret(items, "seek", zero);
PHALCON_CPY_WRT(page_number, one);
PHALCON_CPY_WRT(last_show_page, zero);
PHALCON_CPY_WRT(start, zero);
}

PHALCON_INIT_VAR(i);
Expand Down