mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Add 'source' checkbox, and add direct link to source tarballs
This commit is contained in:
@@ -37,6 +37,14 @@ if (array_key_exists('multiversion', $options)) {
|
||||
$multiversion = $options['multiversion'] === 'Y';
|
||||
}
|
||||
|
||||
$source = false;
|
||||
|
||||
if (array_key_exists('source', $options)) {
|
||||
if ($options['source'] === 'Y') {
|
||||
$source = $options['source'] === 'Y';
|
||||
}
|
||||
}
|
||||
|
||||
switch ($options['os']) {
|
||||
case 'linux':
|
||||
$defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default';
|
||||
@@ -51,16 +59,23 @@ switch ($options['os']) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ($source) {
|
||||
$file = "{$options['os']}-source";
|
||||
}
|
||||
|
||||
$version = $options['version'];
|
||||
$versionNoDot = str_replace('.', '', $version);
|
||||
|
||||
if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) {
|
||||
include __DIR__ . "/include/download-instructions/{$file}.php";
|
||||
if ($source) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
?>
|
||||
<p>
|
||||
There are no instructions yet. Try using the generic installation from source.
|
||||
There are no instructions yet. Try using the <a href="https://www.php.net/manual/en/install.php">generic installation from source</a>.
|
||||
</p>
|
||||
<?php
|
||||
return false;
|
||||
|
||||
@@ -16,6 +16,7 @@ $SIDEBAR_DATA = '
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="panel"><a href="downloads.php?source=Y">Source Tarballs</a></p>
|
||||
<p class="panel"><a href="download-docs.php">Documentation Download</a></p>
|
||||
<p class="panel"><a href="download-logos.php">PHP Logos</a></p>
|
||||
|
||||
@@ -156,13 +157,13 @@ if (!array_key_exists('osvariant', $options) || !array_key_exists($options['osva
|
||||
<input type="checkbox" id="multiversion" name="multiversion" value="Y"
|
||||
<?= array_key_exists('multiversion', $options) && $options['multiversion'] === 'Y' ? 'checked' : '' ?>/>
|
||||
</label>
|
||||
<!--
|
||||
|
||||
<label for="source" class="instructions-label">
|
||||
I want to compile everything from source:
|
||||
<input type="checkbox" id="source" name="source" value="Y"
|
||||
<?= array_key_exists('source', $options) && $options['source'] === 'Y' ? 'checked' : '' ?>/>
|
||||
</label>
|
||||
-->
|
||||
|
||||
<noscript>
|
||||
<button type="submit" class="button">Update Instructions</button>
|
||||
</noscript>
|
||||
|
||||
4
include/download-instructions/linux-source.php
Normal file
4
include/download-instructions/linux-source.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
The <a href="https://www.php.net/manual/en/install.unix.source.php">instructions for compiling from source
|
||||
on Linux</a> are described in the PHP manual.
|
||||
</p>
|
||||
4
include/download-instructions/osx-source.php
Normal file
4
include/download-instructions/osx-source.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
The <a href="https://www.php.net/manual/en/install.unix.source.php">instructions for compiling from source
|
||||
on macOS</a> are described in the PHP manual.
|
||||
</p>
|
||||
4
include/download-instructions/windows-source.php
Normal file
4
include/download-instructions/windows-source.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
The <a href="https://www.php.net/manual/en/install.windows.building.php">instructions for compiling from source
|
||||
on Windows</a> are described in the PHP manual.
|
||||
</p>
|
||||
Reference in New Issue
Block a user