From 78978d410b8be39e8a7c990a6dc944708a21bbf5 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 19 Nov 2012 15:34:34 +0100 Subject: [PATCH] profileinfo links now have anchors Whenever expanding a section in profileinfo, the browser would sent us to the top again which would force us to browse down to where we were. Adding basic anchors send the user directly where he was browsing. Note that HTML5 let you specify anything as an id as long as there is at least one character. Change-Id: I5b55297ce25d5c07b29610798fb39eae16d27f6a --- profileinfo.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/profileinfo.php b/profileinfo.php index ad02ad59b9..4787594116 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -192,10 +192,12 @@ class profile_point { $ex = isset( $expand[$this->name()] ); + $anchor = str_replace( '"', '', $this->name() ); + if ( !$ex ) { if ( count( $this->children ) ) { $url = getEscapedProfileUrl( false, false, $expand + array( $this->name() => true ) ); - $extet = ' [+]'; + $extet = " [+]"; } else { $extet = ''; } @@ -206,8 +208,8 @@ class profile_point { $e += array( $name => $ep ); } } - - $extet = ' [–]'; + $url = getEscapedProfileUrl( false, false, $e ); + $extet = " [–]"; } ?> -- 2.20.1