- # For now, PHPTAL 1.0.x must be installed via PEAR in system dir.
- require_once 'PEAR.php';
- require_once 'PHPTAL.php';
+ # PEAR and PHPTAL 1.0.x must be installed and in include_path
+}
+
+@include_once 'PEAR.php';
+if( !class_exists( 'PEAR' ) ) {
+ wfDebug( 'PHPTAL-based skin couldn\'t include PEAR.php' );
+} else {
+
+// PHPTAL may be in the libs dir direct, or under HTML/Template.
+// Try them both to be safe.
+@include_once 'HTML/Template/PHPTAL.php';
+if( !class_exists( 'PHPTAL' ) ) {
+ @include_once 'PHPTAL.php';