if(!is_object($title)) {
$title = Title::newFromText( $name );
if(!is_object($title)) {
- $title = Title::newFromText( '<error: link target missing>' );
+ $title = Title::newFromText( '--error: link target missing--' );
}
}
}
}
# "." and ".." conflict with the directories of those namesa
- if ( $r === "." || $r === ".." || strpos( $r, "./" ) !== false ) {
+ if ( strpos( $r, "." ) !== false &&
+ ( $r === "." || $r === ".." ||
+ strpos( $r, "./" ) === 0 ||
+ strpos( $r, "/./" !== false ) ||
+ strpos( $r, "/../" !== false ) ) )
+ {
return false;
}