dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add LinkTarget::hasFragment() helper function
[lhc/web/wiklou.git]
/
includes
/
title
/
TitleValue.php
diff --git
a/includes/title/TitleValue.php
b/includes/title/TitleValue.php
index
c8ebc2a
..
18a06ea
100644
(file)
--- a/
includes/title/TitleValue.php
+++ b/
includes/title/TitleValue.php
@@
-95,6
+95,14
@@
class TitleValue implements LinkTarget {
return $this->fragment;
}
+ /**
+ * @since 1.27
+ * @return bool
+ */
+ public function hasFragment() {
+ return $this->fragment !== '';
+ }
+
/**
* Returns the title's DB key, as supplied to the constructor,
* without namespace prefix or fragment.