/**
* Notify the callback function of a revision
- * @param $revision |WikiRevision object
+ * @param $revision WikiRevision object
* @return bool|mixed
*/
private function revisionCallback( $revision ) {
/**
* Primary entry point
+ * @return bool
*/
public function doImport() {
$this->reader->read();
$origTitle = Title::newFromText( $workTitle );
if( !is_null( $this->mTargetNamespace ) && !is_null( $origTitle ) ) {
- $title = Title::makeTitle( $this->mTargetNamespace,
+ # makeTitleSafe, because $origTitle can have a interwiki (different setting of interwiki map)
+ # and than dbKey can begin with a lowercase char
+ $title = Title::makeTitleSafe( $this->mTargetNamespace,
$origTitle->getDBkey() );
} else {
$title = Title::newFromText( $workTitle );
* @return string
*/
static function registerSource( $source ) {
- $id = wfGenerateToken();
+ $id = wfRandomString();
self::$sourceRegistrations[$id] = $source;