cvs: pear /Text_Wiki/Text Wiki.php

From: Date: Thu, 02 Mar 2006 04:04:59 +0000
Subject: cvs: pear /Text_Wiki/Text Wiki.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38838@lists.php.net to get a copy of this message
justinpatrin Thu Mar 2 04:04:59 2006 UTC Modified files: /pear/Text_Wiki/Text Wiki.php Log: Check in factory using @fopen($file, 'r', true) instead of looping over include_path http://cvs.php.net/viewcvs.cgi/pear/Text_Wiki/Text/Wiki.php?r1=1.43&r2=1.44&diff_format=u Index: pear/Text_Wiki/Text/Wiki.php diff -u pear/Text_Wiki/Text/Wiki.php:1.43 pear/Text_Wiki/Text/Wiki.php:1.44 --- pear/Text_Wiki/Text/Wiki.php:1.43 Thu Mar 2 01:55:27 2006 +++ pear/Text_Wiki/Text/Wiki.php Thu Mar 2 04:04:59 2006 @@ -9,7 +9,7 @@ * @package Text_Wiki * @author Paul M. Jones <pmjones@php.net> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Wiki.php,v 1.43 2006/03/02 01:55:27 justinpatrin Exp $ + * @version CVS: $Id: Wiki.php,v 1.44 2006/03/02 04:04:59 justinpatrin Exp $ * @link http://pear.php.net/package/Text_Wiki */ @@ -432,17 +432,19 @@ $class = 'Text_Wiki_' . $parser; $file = str_replace('_', '/', $class).'.php'; if (!class_exists($class)) { - $exists = false; + /*$exists = false; foreach (split(PATH_SEPARATOR, get_include_path()) as $path) { if (file_exists($path.'/'.$file) && is_readable($path.'/'.$file)) { $exists = true; break; } - } - if (!$exists) { + }*/ + $fp = @fopen($file, 'r', true); + if ($fp === false) { return PEAR::raiseError('Could not find file '.$file.' in include_path'); } + fclose($fp); include_once($file); if (!class_exists($class)) { return PEAR::raiseError('Class '.$class.' does not exist after including '.$file);

« previous php.pear.cvs (#38838) next »