Page MenuHomePhabricator

generateSitemap.php --fspath: add detalis
Closed, ResolvedPublic

Description

In maintenance/generateSitemap.php at

--fspath=<path> The file system path to save to, e.g /tmp/sitemap/

please add

Note: "/tmp/sitemap/" is a directory that must be made before the
command is run. "/tmp/sitemap" is on the other hand a filename
prefix which will be prepended to the names of the files created.

Version: 1.11.x
Severity: trivial

Details

Reference
bz12441

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:56 PM
bzimport set Reference to bz12441.
bzimport added a subscriber: Unknown Object (MLST).

/tmp/sitemap as a prefix isn't something intended of the system. It appears that the real issue here is that the path requires a trailing /, unlike any other setting in MediaWiki. Because it requires that of the user instead of autocreating it, people mistakenly forget the / and end up creating a poor, as the bug reporter calls it 'prefix' to the filename.

I suggest some automatic code to make sure a / is used after the directory rather than calling part of the path a 'prefix'. If you want a real prefix, it should be done with a --prefix parameter, not the fspath. But that really isn't needed with the fact that wfWikiId() is used to create the filename.