Quote from: OpenGeek at Aug 07, 2008, 10:58 PM
Not sure why you were using that function, but the mapPath() function was incorrect and rather than fix it and leave many different ways to get to the paths, it is recommended that you use the constants defined for these paths:
Mainly because it’s in the documentation:
http://modxcms.com/mappath.html, whereas I couldn’t find the constants in the docs anywhere. When an API function is documented, you don’t tend to think it’s use is unsafe, or going to be removed.
Quote from: OpenGeek at Aug 07, 2008, 10:58 PMI’ve written a lot of components for MODx and never been even tempted to use mapPath(). It probably should not have been just removed (bit hasty), but it would help you transition to Revolution more easily if you went ahead and modified your use of mapPath with the configuration variables or constants above; these will always be available and always accurate. This change will allow us to solve some long-standing issues in making the manager easier to get working on more environments.
OK I’ll change to use a constant as long as they’re going to stay around. A better approach would have been to "depreciate" the function - if user has error reporting turned on, log or display a warning: "this function has been deprecated, please use MODX_BASE_PATH or $modx->config[’base_path’] instead."
The change you made could break sites completely (like my development site) - but if this was a stable release, and I’d gone and installed it over my 0.9.6.1 live site, it would have destroyed my live site.