|
@@ -373,10 +373,12 @@ PHP_METHOD(vtiful_xls, insertUrl)
|
|
|
zend_string *url = NULL;
|
|
|
zval *format_handle = NULL;
|
|
|
|
|
|
+ int argc = ZEND_NUM_ARGS();
|
|
|
+
|
|
|
ZEND_PARSE_PARAMETERS_START(3, 4)
|
|
|
Z_PARAM_LONG(row)
|
|
|
Z_PARAM_LONG(column)
|
|
|
- Z_PARAM_ZVAL(url)
|
|
|
+ Z_PARAM_STR(url)
|
|
|
Z_PARAM_OPTIONAL
|
|
|
Z_PARAM_RESOURCE(format_handle)
|
|
|
ZEND_PARSE_PARAMETERS_END();
|
|
@@ -385,7 +387,13 @@ PHP_METHOD(vtiful_xls, insertUrl)
|
|
|
|
|
|
xls_object *obj = Z_XLS_P(getThis());
|
|
|
|
|
|
- url_writer(row, column, &obj->ptr, url, zval_get_format(format_handle));
|
|
|
+ if (argc == 4) {
|
|
|
+ url_writer(row, column, &obj->ptr, url, zval_get_format(format_handle));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (argc == 3) {
|
|
|
+ url_writer(row, column, &obj->ptr, url, NULL);
|
|
|
+ }
|
|
|
}
|
|
|
/* }}} */
|
|
|
|
|
@@ -547,7 +555,7 @@ zend_function_entry xls_methods[] = {
|
|
|
PHP_ME(vtiful_xls, getHandle, NULL, ZEND_ACC_PUBLIC)
|
|
|
PHP_ME(vtiful_xls, autoFilter, xls_auto_filter_arginfo, ZEND_ACC_PUBLIC)
|
|
|
PHP_ME(vtiful_xls, insertText, xls_insert_text_arginfo, ZEND_ACC_PUBLIC)
|
|
|
- PHP_ME(vtiful_xls, insertUrl, xls_insert_text_arginfo, ZEND_ACC_PUBLIC)
|
|
|
+ PHP_ME(vtiful_xls, insertUrl, xls_insert_url_arginfo, ZEND_ACC_PUBLIC)
|
|
|
PHP_ME(vtiful_xls, insertImage, xls_insert_image_arginfo, ZEND_ACC_PUBLIC)
|
|
|
PHP_ME(vtiful_xls, insertFormula, xls_insert_formula_arginfo, ZEND_ACC_PUBLIC)
|
|
|
PHP_ME(vtiful_xls, mergeCells, xls_merge_cells_arginfo, ZEND_ACC_PUBLIC)
|