com web/php: 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: | Paul Dragoonis | Date: | Tue, 08 Jan 2013 17:07:04 +0000 |
| Subject: | com web/php: 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-15242@lists.php.net to get a copy of this message | ||
Commit: 16a31cfa93e9bc1042310c61f8172dccacdb94ad
Author: Paul Dragoonis <dragoonis@gmail.com> Tue, 8 Jan 2013 17:07:04 +0000
Parents: 9f44618c52fcaa75bcb9ffc9e2b786cd1eab9828
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=16a31cfa93e9bc1042310c61f8172dccacdb94ad
Log:
Removal of left menu class prefixes for method names since they're already indented within that
class name
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(