style: normalize end of files
[lhc/web/wiklou.git] / profileinfo.php
index ad02ad5..cbbf2ab 100644 (file)
@@ -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 = ' <a href="' . $url . '">[+]</a>';
+                               $extet = " <a id=\"{$anchor}\" href=\"{$url}#{$anchor}\">[+]</a>";
                        } else {
                                $extet = '';
                        }
@@ -206,13 +208,13 @@ class profile_point {
                                        $e += array( $name => $ep );
                                }
                        }
-
-                       $extet = ' <a href="' . getEscapedProfileUrl( false, false, $e ) . '">[–]</a>';
+                       $url = getEscapedProfileUrl( false, false, $e );
+                       $extet = " <a id=\"{$anchor}\" href=\"{$url}#{$anchor}\">[–]</a>";
                }
                ?>
                <tr>
                <th><div style="margin-left: <?php echo (int)$indent; ?>em;">
-                       <?php echo htmlspecialchars( $this->name() ) . $extet ?>
+                       <?php echo htmlspecialchars( str_replace( ',', ', ', $this->name() ) ) . $extet ?>
                </div></th>
                <td class="mw-profileinfo-timep"><?php echo @wfPercent( $this->time() / self::$totaltime * 100 ); ?></td>
                <td class="mw-profileinfo-memoryp"><?php echo @wfPercent( $this->memory() / self::$totalmemory * 100 ); ?></td>
@@ -347,7 +349,7 @@ function getEscapedProfileUrl( $_filter = false, $_sort = false, $_expand = fals
 
        return htmlspecialchars(
                '?' .
-               wfArrayToCGI( array(
+               wfArrayToCgi( array(
                        'filter' => $_filter ? $_filter : $filter,
                        'sort' => $_sort ? $_sort : $sort,
                        'expand' => implode( ',', array_keys( $_expand ) )