@@ -88,29 +88,9 @@ function remove_data($id, $dir = NULL)
8888 }
8989}
9090
91- function create_data ($ id , $ item = "" , $ cp = 65001 , $ utf8 = true )
91+ /* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
92+ include __DIR__ . DIRECTORY_SEPARATOR . "util_utf8.inc " ;
93+ function create_data ($ id , $ item = "" , $ cp = 65001 )
9294{
93- if ($ utf8 ) {
94- /* Keep this file ASCII, so zend.multibyte related stuff can be tasted as well. */
95- include dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "util_utf8.inc " ;
96- return create_data_from_utf8 ($ id , $ item , $ cp );
97- } else {
98-
99- $ prefix = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . $ id ;
100-
101- if (!is_dir ($ prefix )) {
102- mkdir ($ prefix );
103- }
104-
105- if (str_starts_with ($ id , "dir " )) {
106- create_verify_dir ($ prefix , $ item , $ cp );
107- } else if (str_starts_with ($ id , "file " )) {
108- /* a bit unhandy, but content can be put from outside, if needed */
109- create_verify_file ($ prefix , $ item , "dummy content " , $ cp );
110- } else {
111- echo "Item has either to start with \"dir \" or \"file \"" ;
112- }
113- }
114-
115- return $ prefix ;
95+ return create_data_from_utf8 ($ id , $ item , $ cp );
11696}
0 commit comments