2
0
mirror of https://github.com/boostorg/website.git synced 2026-01-19 04:42:17 +00:00

Rename/comment a few variables and functions

This commit is contained in:
Daniel James
2016-12-11 14:56:42 +00:00
parent 42e837259a
commit af5bb69290
5 changed files with 17 additions and 17 deletions

View File

@@ -21,7 +21,7 @@ class BoostDocumentation
var $path;
var $use_http_expire_date;
static function library_documentation() {
static function library_documentation_page() {
return static::documentation_page(array(
'fix_dir' => BOOST_FIX_DIR,
'archive_dir' => STATIC_DIR,
@@ -29,7 +29,7 @@ class BoostDocumentation
));
}
static function extra_documentation() {
static function extra_documentation_page() {
return static::documentation_page(array(
'boost-root' => '../libs/release/',
));

View File

@@ -12,20 +12,20 @@ class PullRequestPage {
'date' => 'By Age',
);
var $params;
var $params; // Normalised URL parameters
var $pull_requests;
var $last_updated;
var $base_uri;
var $page_view;
var $page_url_path; // URL path for this page
var $page_view; // Grouped by library, or sorted by age.
function __construct($params) {
$json_data = json_decode(
file_get_contents(BOOST_DATA_DIR.'/pull-requests.json'));
$this->pull_requests = $json_data->pull_requests;
$this->last_updated = $json_data->last_updated;
$this->base_uri = preg_replace('![#?].*!', '', $_SERVER['REQUEST_URI']);
$this->page_url_path = preg_replace('![#?].*!', '', $_SERVER['REQUEST_URI']);
$this->params = array();
foreach (self::$param_defaults as $key => $default) {
@@ -135,7 +135,7 @@ class PullRequestPage {
}
}
echo '<a href="' . html_encode($this->base_uri . $url_params) . '">',
echo '<a href="' . html_encode($this->page_url_path . $url_params) . '">',
html_encode($description), '</a>';
}
}

View File

@@ -10,7 +10,7 @@ if (strpos($_SERVER['REQUEST_URI'], '//') !== FALSE)
require_once(dirname(__FILE__) . '/../common/code/bootstrap.php');
BoostDocumentation::extra_documentation()->display_from_archive(
BoostDocumentation::extra_documentation_page()->display_from_archive(
array(
array('', '@[.](html|htm)$@i','basic','text/html')
)

View File

@@ -54,7 +54,7 @@ EOS;
return str_ireplace('</head>', $analytics.'</head>', $content);
}
BoostDocumentation::library_documentation()->display_from_archive(
BoostDocumentation::library_documentation_page()->display_from_archive(
array(
//~ special cases that can't be processed at all (some redirects)
array('','@^libs/gil/doc/.*(html|htm)$@i','raw','text/html'),

View File

@@ -38,12 +38,12 @@ class LibraryPage {
'boost-version' => 'First Release'
);
var $params;
var $params; // Normalised URL parameters
var $libs;
var $documentation_page;
var $categories;
var $base_uri;
var $page_url_path; // URL path for this page
var $view_value;
var $sort_value;
var $attribute_filter;
@@ -54,17 +54,17 @@ class LibraryPage {
$this->libs = $libs;
$this->categories = $libs->get_categories();
$this->documentation_page = BoostDocumentation::library_documentation();
$this->documentation_page = BoostDocumentation::library_documentation_page();
// To avoid confusion, only show this page when there is actual documentation.
if (!is_dir($this->documentation_page->documentation_dir())) {
BoostWeb::throw_error_404($_SERVER['REQUEST_URI']);
}
$base_uri = $_SERVER['REQUEST_URI'];
$base_uri = preg_replace('@[#?].*@', '', $base_uri);
$base_uri = preg_replace('@//+@', '/', $base_uri);
$this->base_uri = $base_uri;
$page_url_path = $_SERVER['REQUEST_URI'];
$page_url_path = preg_replace('@[#?].*@', '', $page_url_path);
$page_url_path = preg_replace('@//+@', '/', $page_url_path);
$this->page_url_path = $page_url_path;
$this->params = array();
foreach (self::$param_defaults as $key => $default) {
@@ -280,7 +280,7 @@ class LibraryPage {
}
}
echo '<a href="' . html_encode($this->base_uri . $url_params) . '">',
echo '<a href="' . html_encode($this->page_url_path . $url_params) . '">',
html_encode($description), '</a>';
}
}