diff --git a/ChangeLog b/ChangeLog index 7bf6b20..4a68cc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ [2015-??-??] - Version 1.0.2 * Fixed bug in ExcelSheet::addPictureDim() (see issue #120) + * Fixed bug in ExcelSheet::isLicensed() (see issue #122) [2015-02-26] - Version 1.0.1 * Added methods diff --git a/excel.c b/excel.c index a3a9056..96516ab 100644 --- a/excel.c +++ b/excel.c @@ -4540,6 +4540,28 @@ EXCEL_METHOD(Sheet, setColHidden) } /* }}} */ +/* {{{ proto long ExcelBook::sheetType(int sheet) + Returns type of sheet with specified index. */ +EXCEL_METHOD(Book, sheetType) +{ + zval *object = getThis(); + BookHandle book; + long index; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { + RETURN_FALSE; + } + + if (index < 0) { + RETURN_FALSE; + } + + BOOK_FROM_OBJECT(book, object); + RETURN_LONG(xlBookSheetType(book, index)); +} +/* }}} */ +#endif + /* {{{ proto bool ExcelSheet::isLicensed() Get license status */ EXCEL_METHOD(Sheet, isLicensed) @@ -4568,28 +4590,6 @@ EXCEL_METHOD(Sheet, isLicensed) } /* }}} */ -/* {{{ proto long ExcelBook::sheetType(int sheet) - Returns type of sheet with specified index. */ -EXCEL_METHOD(Book, sheetType) -{ - zval *object = getThis(); - BookHandle book; - long index; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { - RETURN_FALSE; - } - - if (index < 0) { - RETURN_FALSE; - } - - BOOK_FROM_OBJECT(book, object); - RETURN_LONG(xlBookSheetType(book, index)); -} -/* }}} */ -#endif - #if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) # define PHP_EXCEL_ARGINFO # else