version 1.1.1.1, 2012/02/21 23:48:00
|
version 1.1.1.4, 2014/06/15 20:03:54
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 347 static PHP_FUNCTION(pspell_new)
|
Line 347 static PHP_FUNCTION(pspell_new)
|
} |
} |
|
|
manager = to_pspell_manager(ret); |
manager = to_pspell_manager(ret); |
ind = zend_list_insert(manager, le_pspell); | ind = zend_list_insert(manager, le_pspell TSRMLS_CC); |
RETURN_LONG(ind); |
RETURN_LONG(ind); |
} |
} |
/* }}} */ |
/* }}} */ |
Line 374 static PHP_FUNCTION(pspell_new_personal)
|
Line 374 static PHP_FUNCTION(pspell_new_personal)
|
PspellManager *manager; |
PspellManager *manager; |
PspellConfig *config; |
PspellConfig *config; |
|
|
if (zend_parse_parameters(argc TSRMLS_CC, "ss|sssl", &personal, &personal_len, &language, &language_len, | if (zend_parse_parameters(argc TSRMLS_CC, "ps|sssl", &personal, &personal_len, &language, &language_len, |
&spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) { |
&spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) { |
return; |
return; |
} |
} |
Line 402 static PHP_FUNCTION(pspell_new_personal)
|
Line 402 static PHP_FUNCTION(pspell_new_personal)
|
} |
} |
#endif |
#endif |
|
|
if (strlen(personal) != personal_len) { |
|
delete_pspell_config(config); |
|
RETURN_FALSE; |
|
} |
|
|
|
if (PG(safe_mode) && (!php_checkuid(personal, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { |
|
delete_pspell_config(config); |
|
RETURN_FALSE; |
|
} |
|
|
|
if (php_check_open_basedir(personal TSRMLS_CC)) { |
if (php_check_open_basedir(personal TSRMLS_CC)) { |
delete_pspell_config(config); |
delete_pspell_config(config); |
RETURN_FALSE; |
RETURN_FALSE; |
Line 462 static PHP_FUNCTION(pspell_new_personal)
|
Line 452 static PHP_FUNCTION(pspell_new_personal)
|
} |
} |
|
|
manager = to_pspell_manager(ret); |
manager = to_pspell_manager(ret); |
ind = zend_list_insert(manager, le_pspell); | ind = zend_list_insert(manager, le_pspell TSRMLS_CC); |
RETURN_LONG(ind); |
RETURN_LONG(ind); |
} |
} |
/* }}} */ |
/* }}} */ |
Line 492 static PHP_FUNCTION(pspell_new_config)
|
Line 482 static PHP_FUNCTION(pspell_new_config)
|
} |
} |
|
|
manager = to_pspell_manager(ret); |
manager = to_pspell_manager(ret); |
ind = zend_list_insert(manager, le_pspell); | ind = zend_list_insert(manager, le_pspell TSRMLS_CC); |
RETURN_LONG(ind); |
RETURN_LONG(ind); |
} |
} |
/* }}} */ |
/* }}} */ |
Line 752 static PHP_FUNCTION(pspell_config_create)
|
Line 742 static PHP_FUNCTION(pspell_config_create)
|
which is not what we want */ |
which is not what we want */ |
pspell_config_replace(config, "save-repl", "false"); |
pspell_config_replace(config, "save-repl", "false"); |
|
|
ind = zend_list_insert(config, le_pspell_config); | ind = zend_list_insert(config, le_pspell_config TSRMLS_CC); |
RETURN_LONG(ind); |
RETURN_LONG(ind); |
} |
} |
/* }}} */ |
/* }}} */ |
Line 835 static void pspell_config_path(INTERNAL_FUNCTION_PARAM
|
Line 825 static void pspell_config_path(INTERNAL_FUNCTION_PARAM
|
int value_len; |
int value_len; |
PspellConfig *config; |
PspellConfig *config; |
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &conf, &value, &value_len) == FAILURE) { | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &value, &value_len) == FAILURE) { |
return; |
return; |
} |
} |
|
|
if (strlen(value) != value_len) { |
|
RETURN_FALSE; |
|
} |
|
|
|
PSPELL_FETCH_CONFIG; |
PSPELL_FETCH_CONFIG; |
|
|
if (PG(safe_mode) && (!php_checkuid(value, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { |
|
RETURN_FALSE; |
|
} |
|
|
|
if (php_check_open_basedir(value TSRMLS_CC)) { |
if (php_check_open_basedir(value TSRMLS_CC)) { |
RETURN_FALSE; |
RETURN_FALSE; |
} |
} |
Line 892 static PHP_FUNCTION(pspell_config_repl)
|
Line 874 static PHP_FUNCTION(pspell_config_repl)
|
int repl_len; |
int repl_len; |
PspellConfig *config; |
PspellConfig *config; |
|
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &conf, &repl, &repl_len) == FAILURE) { | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &repl, &repl_len) == FAILURE) { |
return; |
return; |
} |
} |
|
|
PSPELL_FETCH_CONFIG; |
PSPELL_FETCH_CONFIG; |
|
|
pspell_config_replace(config, "save-repl", "true"); |
pspell_config_replace(config, "save-repl", "true"); |
|
|
if (strlen(repl) != repl_len) { |
|
RETURN_FALSE; |
|
} |
|
|
|
if (PG(safe_mode) && (!php_checkuid(repl, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { |
|
RETURN_FALSE; |
|
} |
|
|
|
if (php_check_open_basedir(repl TSRMLS_CC)) { |
if (php_check_open_basedir(repl TSRMLS_CC)) { |
RETURN_FALSE; |
RETURN_FALSE; |