From db5eb7e88a1baf03a5f45cd8302a406ae04bede1 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Tue, 11 Oct 2016 09:24:56 -0400 Subject: [PATCH] roadmap fixes --- controller/action/ContentActions.class.php | 2 +- lib/thirdparty/Asana.class.php | 48 +--------------------- lib/thirdparty/Github.class.php | 2 - lib/thirdparty/Prefinery.class.php | 7 ++-- lib/tools/Os.class.php | 6 --- 5 files changed, 6 insertions(+), 59 deletions(-) diff --git a/controller/action/ContentActions.class.php b/controller/action/ContentActions.class.php index 65966291..5b2924e3 100644 --- a/controller/action/ContentActions.class.php +++ b/controller/action/ContentActions.class.php @@ -193,7 +193,7 @@ class ContentActions extends Actions public static function executeRoadmap() { - $cache = !isset($_GET['nocache']); + $cache = !Request::getParam('nocache'); $githubItems = Github::listRoadmapChangesets($cache); $projectMaxVersions = []; diff --git a/lib/thirdparty/Asana.class.php b/lib/thirdparty/Asana.class.php index d9c3fc71..218e55f6 100644 --- a/lib/thirdparty/Asana.class.php +++ b/lib/thirdparty/Asana.class.php @@ -6,52 +6,8 @@ class Asana public static function listRoadmapTasks($cache = true) { - /* - * return static::get('/projects'); - [55] => Array - ( - [id] => 158602294500138 - [name] => Browser - ) + // Use print_r(static::get('/projects')) to get project IDs - [56] => Array - ( - [id] => 158602294500137 - [name] => Daemon - ) - - [57] => Array - ( - [id] => 161514803479899 - [name] => Blockchain and Wallet - ) - - - [60] => Array - ( - [id] => 158829550589337 - [name] => Reporting and Analytics - ) - - [61] => Array - ( - [id] => 158602294500214 - [name] => Other - ) - - [62] => Array - ( - [id] => 136290697597644 - [name] => CI - ) - - [63] => Array - ( - [id] => 158602294500249 - [name] => Documentation - ) - */ -// return static::get('/projects'); $projects = [ 158602294500138 => ['LBRY Browser', 'https://github.com/lbryio/lbry-web-ui'], 158602294500137 => ['LBRY Data Network', 'https://github.com/lbryio/lbry'], @@ -127,4 +83,4 @@ class Asana class AsanaException extends Exception { -} +} \ No newline at end of file diff --git a/lib/thirdparty/Github.class.php b/lib/thirdparty/Github.class.php index 2cdf150b..19ce072f 100644 --- a/lib/thirdparty/Github.class.php +++ b/lib/thirdparty/Github.class.php @@ -114,8 +114,6 @@ class Github }); } - - return $sets; } } \ No newline at end of file diff --git a/lib/thirdparty/Prefinery.class.php b/lib/thirdparty/Prefinery.class.php index 806a3890..37d57f1a 100644 --- a/lib/thirdparty/Prefinery.class.php +++ b/lib/thirdparty/Prefinery.class.php @@ -20,10 +20,10 @@ class Prefinery 'json_data' => true, 'json_response' => true ]; - + public static function findUser($emailOrId, $useApc = true) { - $apcEnabled = extension_loaded('apc') && ini_get('apc.enabled'); + $apcEnabled = Apc::isEnabled(); if ($useApc && $apcEnabled) { $cached = apc_fetch('prefinery-user-' . $emailOrId, $success); @@ -113,8 +113,7 @@ class Prefinery { throw new PrefineryException('Update tester must be called with a tester id'); } - $apcEnabled = extension_loaded('apc') && ini_get('apc.enabled'); - if ($apcEnabled) + if (Apc::isEnabled()) { apc_delete('prefinery-user-' . $testerData['id']); } diff --git a/lib/tools/Os.class.php b/lib/tools/Os.class.php index 22e9d81c..6b58224e 100644 --- a/lib/tools/Os.class.php +++ b/lib/tools/Os.class.php @@ -1,11 +1,5 @@