1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Kill reST things

It doesn't even render correctly, and has gone more or less unused
This commit is contained in:
Hannes Magnusson
2013-10-27 16:42:56 -07:00
parent 75e51b72ec
commit 74bc9e6ad7
7 changed files with 9 additions and 78 deletions

View File

@@ -180,13 +180,6 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) {
exit;
}
// The rest rendering
if (strpos($URI, "reST/") === 0) {
$_GET["rel_path"] = substr($URI, 5);
include $_SERVER['DOCUMENT_ROOT'] ."/reST/index.php";
exit;
}
// php.net/42 --> likely a bug number
if (is_numeric($URI)) {
mirror_redirect("http://bugs.php.net/bug.php?id=$URI");
@@ -459,6 +452,11 @@ $external_redirects = array(
"rev" => "http://doc.php.net/php/$LANG/revcheck.php",
"release/5_3_0.php" => "/releases/5_3_0.php", // PHP 5.3.0 release announcement had a typo
"ideas.php" => "http://wiki.php.net/ideas", // BC
// We used to do reST rendering of README files
"reST/README.RELEASE_PROCESS" => "http://git.php.net/?p=php-src.git;a=blob_plain;f=README.RELEASE_PROCESS;hb=HEAD",
"reST/README.MAILINGLIST_RULES" => "http://git.php.net/?p=php-src.git;a=blob_plain;f=README.MAILINGLIST_RULES;hb=HEAD",
"reST/README.GIT-RULES" => "http://git.php.net/?p=php-src.git;a=blob_plain;f=README.GIT-RULES;hb=HEAD",
"reST/CODING_STANDARDS" => "http://git.php.net/?p=php-src.git;a=blob_plain;f=CODING_STANDARDS;hb=HEAD",
);
// ============================================================================

View File

@@ -167,7 +167,7 @@ if (isset($_POST['maillist'])) {
</ul>
<p>
And make sure you have read our
<a href="/reST/README.MAILINGLIST_RULES">Mailinglist Rules</a>.
<a href="//git.php.net/?p=php-src.git;a=blob_plain;f=README.MAILINGLIST_RULES;hb=HEAD">Mailinglist Rules</a>.
</p>
<?php

View File

@@ -1,60 +0,0 @@
<?php
// $Id$
$_SERVER['BASE_PAGE'] = 'reST/index.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
// Pregenerated (on master) cache
$rest_dir = $_SERVER['DOCUMENT_ROOT'].'/reST/cache/';
$path = isset($_GET['rel_path']) ? $_GET['rel_path'] : "";
// Set "this pages ID" (for the notes system)
$PGI["this"] = array("reST/" . ($path ? $path : "index.php"), "");
$_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE'];
$SIDEBAR_DATA = '<h3>File list</h3>
<ul class="simple" id="reSTlist">';
$restfiles = glob($rest_dir. "/*");
//$list = $lastdir = "";
$list = "";
foreach($restfiles as $filename) {
$link = basename($filename, ".rest");
$filename = basename($link);
// Only use the "last part" of the filename (i.e. README.FOOBAR => FOOBAR)
if (strpos($filename, ".") !== false) {
$filename = substr($filename, strpos($filename, ".")+1);
}
$filename = str_replace(array("-", "_"), " ", $filename);
$list .= '<li><a href="/reST/' .$link.'">'.$filename.'</a></li>'."\n";
}
if ($list) {
$SIDEBAR_DATA .= "$list</ul>";
} else {
$SIDEBAR_DATA .= "<li>No files available</li>";
}
$SIDEBAR_DATA .= "</ul>";
$filename = $rest_dir. "/" .str_replace('/', '_', $path).'.rest';
if (($k = array_search($filename, $restfiles)) === false) {
site_header("reST");
if($path) {
echo '<p class="warn">Unknown file</p>';
}
echo "<p>Please select a file from the filelist on the left</p>";
} else {
site_header(basename($path));
include $restfiles[$k];
manual_notes();
}
site_footer();

View File

@@ -43,7 +43,6 @@ site_header("Sitemap", array("current" => "help"));
<li><a href="/docs.php">Online Documentation</a></li>
<li><a href="/faq.php">Frequently Asked Questions</a></li>
<li><a href="/download-docs.php">Download documentation</a></li>
<li><a href="/reST">Internal documentations for developers</a></li>
</ul>
</li>
<li>Other support pages

View File

@@ -94,9 +94,6 @@
<url>
<loc>http://php.net/releases/</loc>
</url>
<url>
<loc>http://php.net/reST/</loc>
</url>
<url>
<loc>http://php.net/search.php</loc>
</url>

View File

@@ -50,7 +50,7 @@ $dir = dirname($_GET['url']);
if (!empty($dir) && !preg_match("!^(\\.|/)$!", $dir)) {
// Check if the specified dir is valid
$legal_dirs = array("/manual", "/include", "/stats", "/error", "/license", "/conferences", "/archive", "/releases", "/security", "/reST");
$legal_dirs = array("/manual", "/include", "/stats", "/error", "/license", "/conferences", "/archive", "/releases", "/security");
if ((preg_match("!^/manual/!", $dir) || in_array($dir, $legal_dirs)) &&
strpos($dir, "..") === FALSE) {
$page_name = $_SERVER['DOCUMENT_ROOT'] . $_GET['url'];

View File

@@ -156,8 +156,8 @@ function a($href) {
<h2>PHP Developer shortcuts</h2>
<ul>
<li>Snap downloads: <a href="http://snaps.php.net/?53">http://snaps.php.net/?53</a>
(ex: latest 5.3 snap. Use ?trunk or ?latest for latest trunk)
<li>Snap downloads: <a href="http://snaps.php.net/?55">http://snaps.php.net/?53</a>
(ex: latest 5.5 snap. Use ?latest for latest master)
</li>
<li>Changelog information: <a href="http://php.net/changelog">http://php.net/changelog</a>
(ex: latest PHP changelog. php5news = latest PHP 5 NEWS, phptrunknews = latest PHP trunk NEWS)
@@ -165,9 +165,6 @@ function a($href) {
<li>Bugs: <a href="http://php.net/42">http://php.net/42</a>
(any numeric value redirects to said bug # at bugs.php.net)
</li>
<li>reST based README info: <a href="http://php.net/reST/">http://php.net/reST/</a>
(lists several README files)
</li>
</ul>
<h2>Even smarter tricks</h2>