summaryrefslogtreecommitdiffstats
path: root/settings/personal.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-04-27 17:58:41 -0300
committerMorris Jobke <hey@morrisjobke.de>2017-04-27 17:58:41 -0300
commitd6e7cee60779d85d05264ba360463ab9eabc7d35 (patch)
treea70672918e9ebb53d733c8ea4769b2b401060e56 /settings/personal.php
parentf000e22a97b9bae756cc5977badeffbc7a6852e9 (diff)
downloadnextcloud-server-d6e7cee60779d85d05264ba360463ab9eabc7d35.tar.gz
nextcloud-server-d6e7cee60779d85d05264ba360463ab9eabc7d35.zip
Fix icons in sidebar on personal page
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/personal.php')
-rw-r--r--settings/personal.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/settings/personal.php b/settings/personal.php
index 2c46a9f8dd2..6cbcc330cd9 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -220,8 +220,13 @@ $formsMap = array_map(function($form){
if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
$sectionName = str_replace('</h2>', '', $sectionName);
- $anchor = strtolower($sectionName);
- $anchor = str_replace(' ', '-', $anchor);
+ if (strpos($regs['class'], 'data-anchor-name') !== false) {
+ preg_match('%.*data-anchor-name="(?P<anchor>[^"]*)"%i', $regs['class'], $matches);
+ $anchor = $matches['anchor'];
+ } else {
+ $anchor = strtolower($sectionName);
+ $anchor = str_replace(' ', '-', $anchor);
+ }
return array(
'anchor' => $anchor,