Skip to content

Commit

Permalink
pts-core: Fix class names from yesterday's changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellarabel committed Sep 25, 2015
1 parent 6e3e89e commit e5b807d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pts-core/phoromatic/pages/phoromatic_admin_config.php
Expand Up @@ -122,7 +122,7 @@ public static function render_page_process($PATH)
{
$new_dc_dir = pts_strings::add_trailing_slash($_POST['new_dc_path']);

if(pts_file_io::copy(pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH))), $new_dc_dir))
if(pts_file_io::copy(pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH))), $new_dc_dir))
{
pts_config::user_config_generate(array('CacheDirectory' => $new_dc_dir));
header('Location: /?admin');
Expand Down Expand Up @@ -256,7 +256,7 @@ public static function render_page_process($PATH)

$main .= '<hr /><h2>Download Cache Location</h2>';
$main .= '<p>The download cache is where the Phoronix Test Suite is able to make an archive of files needed by test profiles. The Phoromatic Server is then able to allow Phoronix Test Suite client systems on the intranet. To add test files to this cache on the Phoromatic Server, run <strong>phoronix-test-suite make-download-cache <em>&lt;the test identifers you wish to download and cache&gt;</em></strong>.</p>';
$main .= '<p><strong>Current Download Cache Path:</strong> ' . pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH))) . '</p>';
$main .= '<p><strong>Current Download Cache Path:</strong> ' . pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH))) . '</p>';
$main .= '<form action="' . $_SERVER['REQUEST_URI'] . '" name="update_dc_path" method="post">';
$main .= '<p><input type="text" name="new_dc_path" value="' . (isset($_POST['new_dc_path']) ? $_POST['new_dc_path'] : null) . '" /></p>';
$main .= '<p><input name="submit" value="Update Download Cache Location" type="submit" /></p>';
Expand Down
2 changes: 1 addition & 1 deletion pts-core/phoromatic/pages/phoromatic_build_suite.php
Expand Up @@ -140,7 +140,7 @@ public static function render_page_process($PATH)
<h3>Add Another Test</h3>';
$main .= '<select name="add_to_suite_select_test" id="add_to_suite_select_test" onchange="phoromatic_build_suite_test_details();">';

$dc = pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
$dc = pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
$dc_exists = is_file($dc . 'pts-download-cache.json');
if($dc_exists)
{
Expand Down
2 changes: 1 addition & 1 deletion pts-core/phoromatic/pages/phoromatic_caches.php
Expand Up @@ -42,7 +42,7 @@ public static function render_page_process($PATH)
<h2>Test Profile Download Cache</h2>
<p>Below are a list of files for verification/debugging purposes that are currently cached by the Phoromatic Server and available for Phoronix Test Suite client systems to download. These are files that are needed by various test profiles in the Phoronix Test Suite. To add more data to this Phoromatic Server cache, from the server run <strong>phoronix-test-suite make-download-cache</strong> while passing the names of any tests/suites you wish to have download and generate a cache for so they can be made available to the Phoronix Test Suite clients on your network.</p>';

$dc = pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
$dc = pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
if($dc_exists)
{
$cache_json = file_get_contents($dc . 'pts-download-cache.json');
Expand Down
2 changes: 1 addition & 1 deletion pts-core/phoromatic/pages/phoromatic_tests.php
Expand Up @@ -113,7 +113,7 @@ public static function render_page_process($PATH)
}
else
{
$dc = pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
$dc = pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)));
$dc_exists = is_file($dc . 'pts-download-cache.json');
if($dc_exists)
{
Expand Down
4 changes: 2 additions & 2 deletions pts-core/phoromatic/public_html/download-cache.php
Expand Up @@ -26,7 +26,7 @@
ini_set('memory_limit', '4G');
define('PTS_MODE', 'WEB_CLIENT');
define('PTS_AUTO_LOAD_OBJECTS', true);
error_reporting(E_ALL);
//error_reporting(E_ALL);

include('../../pts-core.php');
pts_core::init();
Expand All @@ -41,7 +41,7 @@
$requested_file = str_replace(array('..', '/'), null, $_GET['download']);

pts_logger::add_to_log($_SERVER['REMOTE_ADDR'] . ' is attempting to download ' . $requested_file . ' from the download cache');
if(($dc = pts_strings::add_trailing_slash(pts_core::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)))) && is_file($dc . $requested_file))
if(($dc = pts_strings::add_trailing_slash(pts_strings::parse_for_home_directory(pts_config::read_user_config('PhoronixTestSuite/Options/Installation/CacheDirectory', PTS_DOWNLOAD_CACHE_PATH)))) && is_file($dc . $requested_file))
{
$file_path = $dc . $requested_file;
}
Expand Down

0 comments on commit e5b807d

Please sign in to comment.