com web/php: Revert "Revert "Removal of left menu class prefixes for method names since they're already indented within that class name"":
include/header.inc include/shared-manual.inc
| From: | Peter Cowburn | Date: | Fri, 11 Jan 2013 21:12:32 +0000 |
| Subject: | com web/php: Revert "Revert "Removal of left menu class prefixes for method names since they're already indented within that class name"": include/header.inc include/shared-manual.inc |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15292@lists.php.net to get a copy of this message | ||
Commit: e8471162689a52950203cbb3e0a6721d41a939d1
Author: Peter Cowburn <salathe@php.net> Fri, 11 Jan 2013 21:12:32 +0000
Parents: 4996f18a2a4db2b043e997f7af4509bc60130e39
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e8471162689a52950203cbb3e0a6721d41a939d1
Log:
Revert "Revert "Removal of left menu class prefixes for method names since they're
already indented within that class name""
This reverts commit ae8aa85575ef55096e1e9831d6a0d65b93d42d8c.
Ooooooopppss!!!
Changed paths:
M include/header.inc
M include/shared-manual.inc
Diff:
diff --git a/include/header.inc b/include/header.inc
index 4d3cb02..fe2fa18 100644
--- a/include/header.inc
+++ b/include/header.inc
@@ -227,35 +227,42 @@ if (isset($shortname) && $shortname) {
</div>
<div id="layout">
-<?php
-if (!empty($SIDEBAR_DATA)) {
- echo '<aside class="tips">',
- '<div class="border first"></div>',
- '<div class="border second"></div>',
- '<div class="border third"></div>',
- '<div class="inner">',
- $SIDEBAR_DATA,
- '</div></aside>';
-}
-if (!empty($config["leftmenu"])) {
- echo "<aside class='layout-menu'><ul
class='parent-menu-list'>";
- foreach($config["leftmenu"] as $section) {
- echo "<li><a
href='{$section["link"]}'>{$section["title"]}</a>\n";
- if ($section["children"]) {
- echo "<ul class='child-menu-list'>";
- foreach($section["children"] as $item) {
- if ($item["current"]) {
- echo "<li class='current'><a
href='{$item["link"]}'>{$item["title"]}</a></li>\n";
- } else {
- echo "<li><a
href='{$item["link"]}'>{$item["title"]}</a></li>\n";
- }
- }
- echo "</ul>";
- }
- echo "</li>";
- }
- echo "</ul></aside>\n";
-}
-?>
+<?php if (!empty($SIDEBAR_DATA)): ?>
+ <aside class="tips">
+ <div class="border first"></div>
+ <div class="border second"></div>
+ <div class="border third"></div>
+ <div class="inner"><?php echo $SIDEBAR_DATA; ?></div>
+ </aside>
+<?php endif; ?>
+
+<?php if (!empty($config["leftmenu"])): ?>
+ <aside class='layout-menu'>
+
+ <ul class='parent-menu-list'>
+ <?php foreach($config['leftmenu'] as $section): ?>
+ <li>
+ <a href="<?php echo $section['link']; ?>"><?php
echo $section['title']; ?></a>
+
+ <?php if ($section['children']): ?>
+ <ul class='child-menu-list'>
+
+ <?php
+ foreach($section['children'] as $item):
+ $cleanTitle = $item['title'];
+ ?>
+ <li class="<?php echo ($item['current']) ?
'current' : ''; ?>">
+ <a href="<?php echo $item['link']; ?>"
title="<?php echo $cleanTitle; ?>"><?php echo $cleanTitle; ?></a>
+ </li>
+ <?php endforeach; ?>
+
+ </ul>
+ <?php endif; ?>
+
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ </aside>
+<?php endif; ?>
<section class="layout-content <?php echo $curr ?>">
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index e07eb32..4dfea02 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -575,12 +575,18 @@ function manual_setup_beta($setup) {
$siblings = array();
foreach($setup["toc"] as $entry) {
+ // We strip out any class prefix here, we only want method names
+ $methodname = $entry[1];
+ if(strpos($entry[1], '::') !== false) {
+ list($classname, $methodname) = explode('::', $entry[1]);
+ }
$siblings[] = array(
- "title" => $entry[1],
+ "title" => $methodname,
"link" => $entry[0],
"current" => $setup["this"][0] == $entry[0],
);
}
+
$menu = array();
foreach(array_reverse($setup["parents"]) as $parent) {
$menu[] = array(
@@ -597,7 +603,7 @@ function manual_setup_beta($setup) {
"children" => $siblings,
);
}
-
+
$_SERVER["BASE_PAGE"] = "/manual/" . $setup["head"][1] .
"/" . $setup["this"][0];
$config = array(