Project

General

Profile

« Previous | Next » 

Revision 641

Added by thorn almost 17 years ago

Removed debug-output and doubled comments from framework/functions.php

View differences:

functions.php
355 355
	static $utf8_ok=0;
356 356
	if($utf8_ok == 0) {
357 357
		++$utf8_ok;
358
		// debug XXX to be removed
359
		if($utf8_ok > 1)
360
			trigger_error("init_utf8funcs: utf8_ok > 1", E_USER_ERROR);
361
		// XXX remove end
362 358
		require_once(WB_PATH.'/framework/functions-utf8.php');
363 359
	}
364 360
}
......
367 363
// Will replace all numeric and named entities except > < ' " '  
368 364
// In case of error the returned string is unchanged, and a message is emitted.
369 365
function entities_to_umlauts($string, $charset_out=DEFAULT_CHARSET) {
370
	//init utf8-functions -- workaround to prevent functions-utf8.php and charsets_table.php (~140kB) to be loaded more than once
366
	//init utf8-functions
371 367
	init_utf8funcs();
372 368
	return entities_to_umlauts2($string, $charset_out);
373 369
}
......
375 371
// Will convert a string in $charset_in encoding to a pure ASCII string with HTML-entities.
376 372
// In case of error the returned string is unchanged, and a message is emitted.
377 373
function umlauts_to_entities($string, $charset_in=DEFAULT_CHARSET) {
378
	//init utf8-functions -- workaround to prevent functions-utf8.php and charsets_table.php (~140kB) to be loaded more than once
374
	//init utf8-functions
379 375
	init_utf8funcs();
380 376
	return umlauts_to_entities2($string, $charset_in);
381 377
}
382 378

  
383 379
// Function to convert a page title to a page filename
384 380
function page_filename($string) {
385
	//init utf8-functions -- workaround to prevent functions-utf8.php and charsets_table.php (~140kB) to be loaded more than once
381
	//init utf8-functions
386 382
	init_utf8funcs();
387 383
	$string = entities_to_7bit($string);
388 384
	// Now replace spaces with page spcacer
......
408 404

  
409 405
// Function to convert a desired media filename to a clean filename
410 406
function media_filename($string) {
411
	//init utf8-functions -- workaround to prevent functions-utf8.php and charsets_table.php (~140kB) to be loaded more than once
407
	//init utf8-functions
412 408
	init_utf8funcs();
413 409
	$string = entities_to_7bit($string);
414 410
	// Now remove all bad characters

Also available in: Unified diff