Fix AutoloadGenerator to work on MediaWiki-Vagrant (again)
authorBryan Davis <bd808@wikimedia.org>
Sat, 20 Dec 2014 19:05:29 +0000 (12:05 -0700)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 20 Dec 2014 21:45:43 +0000 (21:45 +0000)
commit5e2c34fec35ac2863c4cba40ad49e47837ccd4e6
treebdf7336e3700cfce70f71129a964c5f2fdf185fd
parentf9594826a97edbe30d57cc4410d46d33c41e6888
Fix AutoloadGenerator to work on MediaWiki-Vagrant (again)

The patch set from I5d502b5 re-introduced the use of realpath() within
AutoloadGenerator::readFile() as part of a set of changes to ensure that
path separators are normalized across Unix and Windows systems. As noted
previously in I4623b3d, the use of realpath() in this function will
cause fatal exceptions to be thrown when a file such as
LocalSettings.php is a symlink to a file outside to $IP.

This patch separates the path normalization functionality from
realpath() expansion and uses only the path normalization component
within AutoloadGenerator::readFile(). It also introduces a cautionary
comment in AutoloadGenerator::readFile() that will hopefully keep
realpath() from being reintroduced there.

Change-Id: I4923dfa8370a7bd6077f42ff4c437d7293fdad66
includes/utils/AutoloadGenerator.php