title: Rewrite Title::getBaseText() for performance/readability
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Wed, 27 Mar 2019 10:25:25 +0000 (11:25 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Wed, 27 Mar 2019 10:25:25 +0000 (11:25 +0100)
commit7de043dc87c2822508cf6ffd9a176872b231b4d2
tree2d71e227c8039cfd0ffeb3b9559e452955300a17
parent8a0f5676c92c486656b260c448c8e0284e5321ca
title: Rewrite Title::getBaseText() for performance/readability

This code does not really need to explode a path in all it's individual
segments. All it needs to know is *if* a title is a path (with at least
one slash), and then remove the last segment. That's pretty much exactly
what the code proposed in this patch now does.

Change-Id: I9cf714f7bb637ecd9e1f44340219c76ddd60ee29
includes/Title.php