Fix: mb_strtolower function does not exists on all PHP versions.

Conflicts:
	htdocs/core/lib/pdf.lib.php
Fix: Log of leaves was broken on some mysql versions.