From de2def240a17a934a57925b20cac8f3a29471a3c Mon Sep 17 00:00:00 2001
From: Jeremy Kauffman apt
or dpkg
."
@@ -79,7 +78,6 @@ global:
sentence: Watch, read and play in a decentralized digital library controlled by the community.
tagline: Content Freedom
learn:
- 100: LBRY in 100 Seconds
art: Art in the Internet Age
essay: Read the Essay
exchange_faq: Buy/Sell LBRY Credits
@@ -237,8 +235,8 @@ social:
github: GitHub (source code)
header: Build With Us
humansheader: Humans
- humanstext: Let's create a freer, more creative world.
- robotsheader: Wanna Be Robots
+ humanstext: Join the LBRY community.
+ robotsheader: Robots
robotstext: Make with us. All LBRY code is open source.
slack: Slack (chat)
tweets: Tweets by @LBRYio
diff --git a/lib/thirdparty/Prefinery.class.php b/lib/thirdparty/Prefinery.class.php
deleted file mode 100644
index 91c1215d..00000000
--- a/lib/thirdparty/Prefinery.class.php
+++ /dev/null
@@ -1,189 +0,0 @@
- [
- 'Accept: application/json',
- 'Content-type: application/json'
- ],
- 'json_data' => true,
- 'json_response' => true
- ];
-
- public static function findUser($emailOrId, $useApc = true)
- {
- $apcEnabled = Apc::isEnabled();
- if ($useApc && $apcEnabled)
- {
- $cached = apc_fetch('prefinery-user-' . $emailOrId, $success);
- if ($success)
- {
- return $cached;
- }
- }
-
- try
- {
- $user = is_numeric($emailOrId) ? Prefinery::findTesterById($emailOrId) : Prefinery::findTesterByEmail($emailOrId);
- }
- catch (PrefineryException $e)
- {
- if (stripos($e->getMessage(), 'Tester is hidden.') === false)
- {
- throw $e;
- }
- }
-
- if ($user)
- {
- unset($user['invitation_code']); // so we dont leak it
- if ($useApc && $apcEnabled)
- {
- apc_store('prefinery-user-' . $emailOrId, $user, 3600);
- }
- }
-
- return $user;
- }
-
- protected static function findTesterById($id)
- {
- return static::get('/testers/' . (int)$id);
- }
-
- protected static function findTesterByEmail($email)
- {
- $data = static::get('/testers', ['email' => $email]);
-
- if ($data && is_array($data) && count($data))
- {
- foreach ($data as $userData) //can partial match on email, very unlikely though
- {
- if (strtolower($userData['email']) == strtolower($email))
- {
- return $userData;
- }
- }
- return $data[0];
- }
-
- return null;
- }
-
- public static function findOrCreateUser($email, $inviteCode = null, $referrerId = null)
- {
- $user = static::findUser($email);
- if (!$user)
- {
- // dont record ip for lbry.io addresses, for testing
- $ip = !preg_match('/@lbry\.io$/', $email) ? Request::getOriginalIp() : null;
- $ua = Request::getUserAgent();
- $user = Prefinery::createTester(array_filter([
- 'email' => $email,
- 'status' => $inviteCode ? static::STATE_ACTIVE : static::STATE_APPLIED, # yes, has to be ACTIVE to validate invite code
- 'invitation_code' => $inviteCode,
- 'referrer_id' => $referrerId,
- 'profile' => ['ip' => $ip, 'user_agent' => $ua]
- ]));
-
-// if ($inviteCode)
-// {
-// $user = static::updateTester(array_intersect_key($user, ['id' => null]) + ['status' => static::STATE_ACTIVE]);
-// if ($user['invitation_code'] != $inviteCode)
-// {
-// $user['is_custom_code'] = true;
-// }
-// }
-
- $user['is_custom_code'] = false;
- }
-
-// unset($user['invitation_code']); // so we dont leak it
- return $user;
- }
-
- protected static function createTester(array $testerData)
- {
- return static::post('/testers', ['tester' => array_filter($testerData)], false);
- }
-
- public static function updateTester(array $testerData)
- {
- if (!$testerData['id'])
- {
- throw new PrefineryException('Update tester must be called with a tester id');
- }
- if (Apc::isEnabled())
- {
- apc_delete('prefinery-user-' . $testerData['id']);
- }
- return static::put('/testers/' . $testerData['id'], ['tester' => array_diff_key(array_filter($testerData), ['id' => null])], false);
- }
-
- protected static function put($endpoint, array $data = [])
- {
- $apiKey = Config::get('prefinery_key');
- $options = static::$curlOptions;
- $options['headers'][] = 'X-HTTP-Method-Override: PUT';
- return static::decodePrefineryResponse(
- Curl::put(static::DOMAIN . static::PREFIX . $endpoint . '.json?api_key=' . $apiKey, $data, $options)
- );
- }
-
- protected static function get($endpoint, array $data = [])
- {
- return static::decodePrefineryResponse(
- Curl::get(static::DOMAIN . static::PREFIX . $endpoint . '.json?api_key=' . Config::get('prefinery_key'),
- $data, array_merge(static::$curlOptions, ['retry' => 3])
- )
- );
- }
-
- protected static function post($endpoint, array $data = [], bool $allowEmptyResponse = true)
- {
- return static::decodePrefineryResponse(
- Curl::post(static::DOMAIN . static::PREFIX . $endpoint . '.json?api_key=' . Config::get('prefinery_key'),
- $data, array_merge(static::$curlOptions, ['retry' => 3])
- ),
- $allowEmptyResponse
- );
- }
-
- protected static function decodePrefineryResponse($data, $allowEmptyResponse = true)
- {
- if (!$allowEmptyResponse && !$data && $data !== [])
- {
- throw new PrefineryException('Received empty or improperly encoded response.');
- }
-
- if (isset($data['error']))
- {
- throw new PrefineryException($data['error']);
- }
-
- if (isset($data['errors']))
- {
- throw new PrefineryException($data['errors'] ?
- implode("\n", array_map(function ($error) { return $error['message']; }, (array)$data['errors'])) :
- 'Received empty error array.'
- );
- }
-
- return $data;
- }
-}
-
-class PrefineryException extends Exception
-{
-}
diff --git a/lib/tools/OS.class.php b/lib/tools/OS.class.php
index ce00a676..ff88e877 100644
--- a/lib/tools/OS.class.php
+++ b/lib/tools/OS.class.php
@@ -14,7 +14,7 @@ class OS
//yes, this is probably a bad pattern
return [
OS::OS_WINDOWS => ['/windows', 'Windows', 'icon-windows', '_windows'],
- OS::OS_OSX => ['/osx', 'OS X', 'icon-apple', '_osx'],
+ OS::OS_OSX => ['/osx', 'macOS', 'icon-apple', '_osx'],
OS::OS_LINUX => ['/linux', 'Linux', 'icon-linux', '_linux'],
OS::OS_ANDROID => ['/android', 'Android', 'icon-android', '_android'],
OS::OS_IOS => ['/ios', 'iOS', 'icon-mobile', '_ios']
diff --git a/view/template/developer/_quickstartApi.php b/view/template/developer/_quickstartApi.php
index 2171dc10..1f65000b 100644
--- a/view/template/developer/_quickstartApi.php
+++ b/view/template/developer/_quickstartApi.php
@@ -3,7 +3,7 @@
When running, the LBRY daemon provides a JSON-RPC server running at http://localhost:5279/lbryapi
.
- It can be accessed by any utility capable of making HTTPS GET and POST requests, such as cURL or possibly your toaster. Psst, if you are on windows you could use PowerShell while testing, scroll down to the bottom of this page to get more info. + It can be accessed by any utility capable of making HTTPS GET and POST requests, such as cURL or possibly your toaster. On Windows? You can also use PowerShell. Learn more.
To verify the LBRY daemon is running correctly, let's try looking up a URI: @@ -54,12 +54,12 @@
You can also list all of the commands available by calling the help command.
$curl 'http://localhost:5279/lbryapi' --data '{"method":"help"}'
-If you are running Windows and would like to follow this guide you could substitute curl with a PowerShell console and the following code.
$Invoke-RestMethod -Uri 'http://localhost:5279/lbryapi' -Body 'THE_JSON_DATA' -Method POST | ConvertTo-Json
-If PowerShell does not work and you want to continue with cURL, you'll need to escape inner double quotes with a \ to pass the JSON properly via Command Prompt. +
If PowerShell does not work and you want to continue with cURL, you'll need to escape inner double quotes with a \ to pass the JSON properly via Command Prompt.
$curl "http://localhost:5279/lbryapi" --data "{\"method\":\"get\",\"params\":{\"uri\":\"what\"} }"
diff --git a/view/template/download/_betaNotice.php b/view/template/download/_betaNotice.php
deleted file mode 100644
index 6cbdc9c1..00000000
--- a/view/template/download/_betaNotice.php
+++ /dev/null
@@ -1,4 +0,0 @@
-- {{download.beta}} - {{download.curse}} -
\ No newline at end of file diff --git a/view/template/download/_linux.php b/view/template/download/_linux.php index 23589ce8..1c730d65 100644 --- a/view/template/download/_linux.php +++ b/view/template/download/_linux.php @@ -1,7 +1,7 @@ diff --git a/view/template/download/_osx.php b/view/template/download/_osx.php index 92123bfc..f4dee380 100644 --- a/view/template/download/_osx.php +++ b/view/template/download/_osx.php @@ -1,7 +1,7 @@
-
- href=""
+
+ href=""
- Developers and other technical users can try LBRY before it goes public.Know the command line?
-
Skip the real line.
{{page.refer.earn1}} '2017-06-19' ? 2.5 : 5)) ?> {{page.refer.earn2}}
-- - - $('#referral-url-input') - .focus(function() { $(this).select(); }) - .click(function() { $(this).select(); }); - -
-$prefineryUser['share_signups_count']]) ?> - - -
- diff --git a/view/template/download/_signup.php b/view/template/download/_signup.php index ab096395..c7e46f25 100644 --- a/view/template/download/_signup.php +++ b/view/template/download/_signup.php @@ -1,7 +1,8 @@ -