summaryrefslogtreecommitdiffstats
path: root/settings/personal.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-04-28 08:33:45 +0200
committerGitHub <noreply@github.com>2017-04-28 08:33:45 +0200
commit3fd75e288cf62551d4e7a300f178a763bd3d406f (patch)
tree215de0216df4696917836a60ace024169155bb9b /settings/personal.php
parenta809aa51cd52d8fee93689452dd86d90ac4f9ad7 (diff)
parentd6e7cee60779d85d05264ba360463ab9eabc7d35 (diff)
downloadnextcloud-server-3fd75e288cf62551d4e7a300f178a763bd3d406f.tar.gz
nextcloud-server-3fd75e288cf62551d4e7a300f178a763bd3d406f.zip
Merge pull request #4569 from nextcloud/fix-icons
Fix icons in sidebar on personal page
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,