Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
291
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Compare Revisions
27cf21883114bfbb043894e23ecece9e288058ca...b89e2db8efc66ab324f97caf35dd3877c842d757
Source
b89e2db8efc66ab324f97caf35dd3877c842d757
...
Target
27cf21883114bfbb043894e23ecece9e288058ca
Compare
Commits (4)
(feat): add pro payout method to settings
· 35460a67
Mark Harding
authored
1 day ago
35460a67
(chore): background fallback
· e1eb7f32
Mark Harding
authored
1 day ago
e1eb7f32
(fix): linting
· 2b5cd3de
Mark Harding
authored
9 hours ago
2b5cd3de
Merge remote-tracking branch 'origin/master' into epic/permissions-28
· b89e2db8
Brian Hatchet
authored
1 hour ago
b89e2db8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
0 deletions
+37
-0
Controllers/fs/v1/pro.php
View file @
b89e2db8
...
...
@@ -31,6 +31,10 @@ class pro implements Interfaces\FS
$contents
=
$file
->
read
();
if
(
!
$contents
)
{
$this
->
fallback
(
$pages
);
}
header
(
sprintf
(
"Content-Type: %s"
,
$asset
->
getMimeType
()));
header
(
sprintf
(
"Expires: %s"
,
date
(
'r'
,
time
()
+
864000
)));
header
(
'Pragma: public'
);
...
...
@@ -39,4 +43,25 @@ class pro implements Interfaces\FS
echo
$contents
;
exit
;
}
/**
* Fallback
* @param array $pages
* @return void
*/
private
function
fallback
(
$pages
)
:
void
{
switch
(
$pages
[
1
])
{
case
"background"
:
$bannersFs
=
new
banners
();
$bannersFs
->
get
([
$pages
[
0
]
]);
exit
;
break
;
case
"logo"
:
$avatarsFs
=
new
avatars
();
$avatarsFs
->
get
([
$pages
[
0
],
'large'
]);
exit
;
break
;
}
}
}
This diff is collapsed.
Core/Pro/Manager.php
View file @
b89e2db8
...
...
@@ -327,6 +327,10 @@ class Manager
->
save
();
}
if
(
isset
(
$values
[
'payout_method'
]))
{
$settings
->
setPayoutMethod
(
$values
[
'payout_method'
]);
}
$settings
->
setTimeUpdated
(
time
());
$this
->
setupRoutingDelegate
...
...
This diff is collapsed.
Core/Pro/Repository.php
View file @
b89e2db8
...
...
@@ -101,6 +101,7 @@ class Repository
->
setHasCustomLogo
(
$data
[
'has_custom_logo'
]
??
false
)
->
setHasCustomBackground
(
$data
[
'has_custom_background'
]
??
false
)
->
setTimeUpdated
(
$data
[
'time_updated'
]
??
0
)
->
setPayoutMethod
(
$data
[
'payout_method'
]
??
'usd'
)
;
$response
[]
=
$settings
;
...
...
@@ -150,6 +151,7 @@ class Repository
'has_custom_logo'
=>
$settings
->
hasCustomLogo
(),
'has_custom_background'
=>
$settings
->
hasCustomBackground
(),
'time_updated'
=>
$settings
->
getTimeUpdated
(),
'payout_method'
=>
$settings
->
getPayoutMethod
(),
]),
];
...
...
This diff is collapsed.
Core/Pro/Settings.php
View file @
b89e2db8
...
...
@@ -52,6 +52,8 @@ use Minds\Traits\MagicAttributes;
* @method Settings setHasCustomBackground(bool $customBackground)
* @method int getTimeUpdated()
* @method Settings setTimeUpdated(int $timeUpdated)
* @method string getPayoutMethod()
* @method Settings setPayoutMethod(string $method)
*/
class
Settings
implements
JsonSerializable
{
...
...
@@ -135,6 +137,9 @@ class Settings implements JsonSerializable
/** @var int */
protected
$timeUpdated
;
/** @var string */
protected
$payoutMethod
=
'usd'
;
/**
* @return string
*/
...
...
@@ -176,6 +181,7 @@ class Settings implements JsonSerializable
'styles'
=>
$this
->
buildStyles
(),
'published'
=>
$this
->
published
,
'time_updated'
=>
$this
->
timeUpdated
,
'payout_method'
=>
$this
->
payoutMethod
,
];
}
...
...
This diff is collapsed.