Skip to content

Commit

Permalink
Merge pull request #1497 from sjinks/1.2.5
Browse files Browse the repository at this point in the history
[1.2.5] Implement #987
  • Loading branch information
Phalcon committed Nov 1, 2013
2 parents b1532cf + adfe010 commit 769872b
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 118 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- Phalcon\Http\Cookie::__toString() will return a string value (#1428)
- Camelize does not ignore the last character of a string anymore (#1436)
- APC tests do not run under CLI when apc.enable_cli is 0 (#1449)
- Phalcon\Debug::uri now support both http and https (#987)
- Fixed inconsistency in Tag::stylesheetLink/javascriptInclude w.r.t local URLs (#1486)

1.2.4
- Fixed broken ACL inheritance (#905)
Expand Down
66 changes: 32 additions & 34 deletions build/32bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -6348,7 +6348,7 @@ static void phalcon_camelize(zval *return_value, const zval *str){
marker = Z_STRVAL_P(str);
len = Z_STRLEN_P(str);

for (i = 0; i < len - 1; i++) {
for (i = 0; i < len; i++) {
ch = *marker;
if (i == 0 || ch == '-' || ch == '_') {
if (ch == '-' || ch == '_') {
Expand Down Expand Up @@ -13998,17 +13998,37 @@ static PHP_METHOD(Phalcon_Http_Cookie, __toString){
PHALCON_OBS_VAR(value);
phalcon_read_property_this_quick(&value, this_ptr, SL("_value"), 2935317441UL, PH_NOISY_CC);
if (Z_TYPE_P(value) == IS_NULL) {
PHALCON_INIT_NVAR(value);
phalcon_call_method_key(value, this_ptr, "getvalue", 31703298UL);
if (FAILURE == phalcon_call_method_params(return_value, this_ptr, SL("getvalue"), 0, NULL, zend_inline_hash_func(SS("getvalue")), 1 TSRMLS_CC)) {
if (EG(exception)) {
zval *e = EG(exception);
zval *m = zend_read_property(Z_OBJCE_P(e), e, SL("message"), 1 TSRMLS_CC);

Z_ADDREF_P(m);
if (Z_TYPE_P(m) != IS_STRING) {
convert_to_string_ex(&m);
}

if (return_value_ptr) {
ALLOC_INIT_ZVAL(*return_value_ptr);
}

zend_clear_exception(TSRMLS_C);
zend_error(E_ERROR, "%s", Z_STRVAL_P(m));
zval_ptr_dtor(&m);
}
}

convert_to_string(return_value);
RETURN_MM();
}

RETURN_CCTOR(value);
RETVAL_ZVAL(value, 1, 0);
PHALCON_MM_RESTORE();
}





#ifdef HAVE_CONFIG_H
#endif

Expand Down Expand Up @@ -23995,7 +24015,7 @@ PHALCON_INIT_CLASS(Phalcon_Debug){

PHALCON_REGISTER_CLASS(Phalcon, Debug, debug, phalcon_debug_method_entry, 0);

zend_declare_property_string(phalcon_debug_ce, SL("_uri"), "http://static.phalconphp.com/debug/1.2.0/", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_string(phalcon_debug_ce, SL("_uri"), "//static.phalconphp.com/debug/1.2.0/", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_string(phalcon_debug_ce, SL("_theme"), "default", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_bool(phalcon_debug_ce, SL("_hideDocumentRoot"), 0, ZEND_ACC_PROTECTED TSRMLS_CC);
zend_declare_property_bool(phalcon_debug_ce, SL("_showBackTrace"), 1, ZEND_ACC_PROTECTED TSRMLS_CC);
Expand Down Expand Up @@ -35284,25 +35304,6 @@ static PHP_METHOD(Phalcon_Loader, getCheckedPath){



PHALCON_INIT_CLASS(Phalcon_Translate){

PHALCON_REGISTER_CLASS(Phalcon, Translate, translate, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);

return SUCCESS;
}





#ifdef HAVE_CONFIG_H
#endif







PHALCON_INIT_CLASS(Phalcon_Validation){

Expand Down Expand Up @@ -94586,7 +94587,6 @@ static PHP_METHOD(Phalcon_Logger_Formatter_Firephp, format) {




#ifdef HAVE_CONFIG_H
#endif

Expand Down Expand Up @@ -94616,7 +94616,7 @@ static PHP_METHOD(Phalcon_Logger_Formatter, getTypeString){
phalcon_fetch_params(0, 1, 0, &type);

itype = phalcon_get_intval(type);
if (itype > 0 && itype < 10) {
if (itype >= 0 && itype < 10) {
RETURN_STRING(lut[itype], 1);
}

Expand Down Expand Up @@ -95840,9 +95840,9 @@ static PHP_METHOD(Phalcon_Version, _getVersion){
array_init_size(version, 5);
add_next_index_long(version, 1);
add_next_index_long(version, 2);
add_next_index_long(version, 4);
add_next_index_long(version, 4);
add_next_index_long(version, 0);
add_next_index_long(version, 5);
add_next_index_long(version, 2);
add_next_index_long(version, 1);
RETURN_CTOR(version);
}

Expand Down Expand Up @@ -98224,7 +98224,7 @@ static PHP_METHOD(Phalcon_Tag, stylesheetLink){
}

PHALCON_INIT_NVAR(local);
ZVAL_BOOL(local, 0);
ZVAL_BOOL(local, 1);
if (phalcon_array_isset_long(params, 1)) {
PHALCON_OBS_NVAR(local);
phalcon_array_fetch_long(&local, params, 1, PH_NOISY);
Expand Down Expand Up @@ -98308,7 +98308,7 @@ static PHP_METHOD(Phalcon_Tag, javascriptInclude){
}

PHALCON_INIT_NVAR(local);
ZVAL_BOOL(local, 0);
ZVAL_BOOL(local, 1);
if (phalcon_array_isset_long(params, 1)) {
PHALCON_OBS_NVAR(local);
phalcon_array_fetch_long(&local, params, 1, PH_NOISY);
Expand Down Expand Up @@ -100261,7 +100261,6 @@ zend_class_entry *phalcon_forms_elementinterface_ce;
zend_class_entry *phalcon_forms_element_numeric_ce;
zend_class_entry *phalcon_forms_element_password_ce;
zend_class_entry *phalcon_crypt_ce;
zend_class_entry *phalcon_translate_ce;
zend_class_entry *phalcon_translate_exception_ce;
zend_class_entry *phalcon_translate_adapter_ce;
zend_class_entry *phalcon_translate_adapterinterface_ce;
Expand Down Expand Up @@ -100651,7 +100650,6 @@ static PHP_MINIT_FUNCTION(phalcon){
PHALCON_INIT(Phalcon_Forms_Element_Password);
PHALCON_INIT(Phalcon_Forms_Element_TextArea);
PHALCON_INIT(Phalcon_Crypt);
PHALCON_INIT(Phalcon_Translate);
PHALCON_INIT(Phalcon_Translate_Exception);
PHALCON_INIT(Phalcon_Translate_Adapter_NativeArray);
PHALCON_INIT(Phalcon_Crypt_Exception);
Expand Down
5 changes: 0 additions & 5 deletions build/32bits/phalcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -10065,11 +10065,6 @@ PHALCON_INIT_FUNCS(phalcon_crypt_method_entry){



zend_class_entry *phalcon_translate_ce;

PHALCON_INIT_CLASS(Phalcon_Translate);


zend_class_entry *phalcon_translate_exception_ce;

PHALCON_INIT_CLASS(Phalcon_Translate_Exception);
Expand Down
66 changes: 32 additions & 34 deletions build/64bits/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -6348,7 +6348,7 @@ static void phalcon_camelize(zval *return_value, const zval *str){
marker = Z_STRVAL_P(str);
len = Z_STRLEN_P(str);

for (i = 0; i < len - 1; i++) {
for (i = 0; i < len; i++) {
ch = *marker;
if (i == 0 || ch == '-' || ch == '_') {
if (ch == '-' || ch == '_') {
Expand Down Expand Up @@ -13998,17 +13998,37 @@ static PHP_METHOD(Phalcon_Http_Cookie, __toString){
PHALCON_OBS_VAR(value);
phalcon_read_property_this_quick(&value, this_ptr, SL("_value"), 229457268138945UL, PH_NOISY_CC);
if (Z_TYPE_P(value) == IS_NULL) {
PHALCON_INIT_NVAR(value);
phalcon_call_method_key(value, this_ptr, "getvalue", 249889516664635650UL);
if (FAILURE == phalcon_call_method_params(return_value, this_ptr, SL("getvalue"), 0, NULL, zend_inline_hash_func(SS("getvalue")), 1 TSRMLS_CC)) {
if (EG(exception)) {
zval *e = EG(exception);
zval *m = zend_read_property(Z_OBJCE_P(e), e, SL("message"), 1 TSRMLS_CC);

Z_ADDREF_P(m);
if (Z_TYPE_P(m) != IS_STRING) {
convert_to_string_ex(&m);
}

if (return_value_ptr) {
ALLOC_INIT_ZVAL(*return_value_ptr);
}

zend_clear_exception(TSRMLS_C);
zend_error(E_ERROR, "%s", Z_STRVAL_P(m));
zval_ptr_dtor(&m);
}
}

convert_to_string(return_value);
RETURN_MM();
}

RETURN_CCTOR(value);
RETVAL_ZVAL(value, 1, 0);
PHALCON_MM_RESTORE();
}





#ifdef HAVE_CONFIG_H
#endif

Expand Down Expand Up @@ -23995,7 +24015,7 @@ PHALCON_INIT_CLASS(Phalcon_Debug){

PHALCON_REGISTER_CLASS(Phalcon, Debug, debug, phalcon_debug_method_entry, 0);

zend_declare_property_string(phalcon_debug_ce, SL("_uri"), "http://static.phalconphp.com/debug/1.2.0/", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_string(phalcon_debug_ce, SL("_uri"), "//static.phalconphp.com/debug/1.2.0/", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_string(phalcon_debug_ce, SL("_theme"), "default", ZEND_ACC_PUBLIC TSRMLS_CC);
zend_declare_property_bool(phalcon_debug_ce, SL("_hideDocumentRoot"), 0, ZEND_ACC_PROTECTED TSRMLS_CC);
zend_declare_property_bool(phalcon_debug_ce, SL("_showBackTrace"), 1, ZEND_ACC_PROTECTED TSRMLS_CC);
Expand Down Expand Up @@ -35284,25 +35304,6 @@ static PHP_METHOD(Phalcon_Loader, getCheckedPath){



PHALCON_INIT_CLASS(Phalcon_Translate){

PHALCON_REGISTER_CLASS(Phalcon, Translate, translate, NULL, ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);

return SUCCESS;
}





#ifdef HAVE_CONFIG_H
#endif







PHALCON_INIT_CLASS(Phalcon_Validation){

Expand Down Expand Up @@ -94586,7 +94587,6 @@ static PHP_METHOD(Phalcon_Logger_Formatter_Firephp, format) {




#ifdef HAVE_CONFIG_H
#endif

Expand Down Expand Up @@ -94616,7 +94616,7 @@ static PHP_METHOD(Phalcon_Logger_Formatter, getTypeString){
phalcon_fetch_params(0, 1, 0, &type);

itype = phalcon_get_intval(type);
if (itype > 0 && itype < 10) {
if (itype >= 0 && itype < 10) {
RETURN_STRING(lut[itype], 1);
}

Expand Down Expand Up @@ -95840,9 +95840,9 @@ static PHP_METHOD(Phalcon_Version, _getVersion){
array_init_size(version, 5);
add_next_index_long(version, 1);
add_next_index_long(version, 2);
add_next_index_long(version, 4);
add_next_index_long(version, 4);
add_next_index_long(version, 0);
add_next_index_long(version, 5);
add_next_index_long(version, 2);
add_next_index_long(version, 1);
RETURN_CTOR(version);
}

Expand Down Expand Up @@ -98224,7 +98224,7 @@ static PHP_METHOD(Phalcon_Tag, stylesheetLink){
}

PHALCON_INIT_NVAR(local);
ZVAL_BOOL(local, 0);
ZVAL_BOOL(local, 1);
if (phalcon_array_isset_long(params, 1)) {
PHALCON_OBS_NVAR(local);
phalcon_array_fetch_long(&local, params, 1, PH_NOISY);
Expand Down Expand Up @@ -98308,7 +98308,7 @@ static PHP_METHOD(Phalcon_Tag, javascriptInclude){
}

PHALCON_INIT_NVAR(local);
ZVAL_BOOL(local, 0);
ZVAL_BOOL(local, 1);
if (phalcon_array_isset_long(params, 1)) {
PHALCON_OBS_NVAR(local);
phalcon_array_fetch_long(&local, params, 1, PH_NOISY);
Expand Down Expand Up @@ -100261,7 +100261,6 @@ zend_class_entry *phalcon_forms_elementinterface_ce;
zend_class_entry *phalcon_forms_element_numeric_ce;
zend_class_entry *phalcon_forms_element_password_ce;
zend_class_entry *phalcon_crypt_ce;
zend_class_entry *phalcon_translate_ce;
zend_class_entry *phalcon_translate_exception_ce;
zend_class_entry *phalcon_translate_adapter_ce;
zend_class_entry *phalcon_translate_adapterinterface_ce;
Expand Down Expand Up @@ -100651,7 +100650,6 @@ static PHP_MINIT_FUNCTION(phalcon){
PHALCON_INIT(Phalcon_Forms_Element_Password);
PHALCON_INIT(Phalcon_Forms_Element_TextArea);
PHALCON_INIT(Phalcon_Crypt);
PHALCON_INIT(Phalcon_Translate);
PHALCON_INIT(Phalcon_Translate_Exception);
PHALCON_INIT(Phalcon_Translate_Adapter_NativeArray);
PHALCON_INIT(Phalcon_Crypt_Exception);
Expand Down
5 changes: 0 additions & 5 deletions build/64bits/phalcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -10065,11 +10065,6 @@ PHALCON_INIT_FUNCS(phalcon_crypt_method_entry){



zend_class_entry *phalcon_translate_ce;

PHALCON_INIT_CLASS(Phalcon_Translate);


zend_class_entry *phalcon_translate_exception_ce;

PHALCON_INIT_CLASS(Phalcon_Translate_Exception);
Expand Down
Loading

0 comments on commit 769872b

Please sign in to comment.