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.3.0] Fix #1263 #1271

Merged
merged 3 commits into from Sep 23, 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
Next Next commit
displayTo() is an alias of setDefault()
(cherry picked from commit 29c91a1)

Conflicts:
	ext/tag.c
  • Loading branch information
sjinks committed Sep 22, 2013
commit 9441ef509c4981f4343a55f0548f29f9138c4fb2
13 changes: 1 addition & 12 deletions ext/tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,7 @@ PHP_METHOD(Phalcon_Tag, setDefaults){
* @param string $id
* @param string $value
*/
PHP_METHOD(Phalcon_Tag, displayTo){

zval *id, *value, *default_value;

PHALCON_MM_GROW();

phalcon_fetch_params(1, 2, 0, &id, &value);

PHALCON_INIT_VAR(default_value);
phalcon_call_self_p2(default_value, this_ptr, "setdefault", id, value);
RETURN_CCTOR(default_value);
}
PHALCON_DOC_METHOD(Phalcon_Tag, displayTo)

/**
* Check if a helper has a default value set using Phalcon\Tag::setDefault or value from $_POST
Expand Down
8 changes: 1 addition & 7 deletions ext/tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ PHP_METHOD(Phalcon_Tag, getEscaperService);
PHP_METHOD(Phalcon_Tag, setAutoescape);
PHP_METHOD(Phalcon_Tag, setDefault);
PHP_METHOD(Phalcon_Tag, setDefaults);
PHP_METHOD(Phalcon_Tag, displayTo);
PHP_METHOD(Phalcon_Tag, hasValue);
PHP_METHOD(Phalcon_Tag, getValue);
PHP_METHOD(Phalcon_Tag, resetInput);
Expand Down Expand Up @@ -82,11 +81,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_tag_setdefaults, 0, 0, 1)
ZEND_ARG_INFO(0, values)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_tag_displayto, 0, 0, 2)
ZEND_ARG_INFO(0, id)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_tag_hasvalue, 0, 0, 1)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -225,7 +219,7 @@ PHALCON_INIT_FUNCS(phalcon_tag_method_entry){
PHP_ME(Phalcon_Tag, setAutoescape, arginfo_phalcon_tag_setautoescape, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, setDefault, arginfo_phalcon_tag_setdefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, setDefaults, arginfo_phalcon_tag_setdefaults, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, displayTo, arginfo_phalcon_tag_displayto, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_MALIAS(Phalcon_Tag, displayTo, setDefault, arginfo_phalcon_tag_setdefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, hasValue, arginfo_phalcon_tag_hasvalue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, getValue, arginfo_phalcon_tag_getvalue, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Phalcon_Tag, resetInput, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
Expand Down