Merge pull request 'release v5.1.0' (#428) from develop into master
Reviewed-on: #428
This commit is contained in:
commit
a4e459d8ed
4 changed files with 16 additions and 18 deletions
|
|
@ -1,5 +1,11 @@
|
|||
## [Unreleased]
|
||||
|
||||
## 5.1.0
|
||||
### Added
|
||||
* fix #425: allow to set a color using hex code
|
||||
### Fixed
|
||||
* #422: usage of `OC\AppFramework\Http\Request` instead of `$_SERVER`
|
||||
|
||||
## 5.0.3
|
||||
### Fixed
|
||||
* fix #422: undefined array key "HTTP_USER_AGENT"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Notice
|
|||
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
||||
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
||||
]]></description>
|
||||
<version>5.0.3</version>
|
||||
<version>5.1.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
||||
<namespace>SideMenu</namespace>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
namespace OCA\SideMenu\AppInfo;
|
||||
|
||||
use OC;
|
||||
use OC\AllConfig;
|
||||
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
||||
use OC\AppFramework\Http\Request;
|
||||
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
||||
use OC\User\User;
|
||||
use OCA\SideMenu\Service\AppRepository;
|
||||
|
|
@ -31,23 +32,12 @@ use Psr\Container\ContainerInterface;
|
|||
class Application extends App implements IBootstrap
|
||||
{
|
||||
public const APP_ID = 'side_menu';
|
||||
|
||||
public const APP_NAME = 'Custom menu';
|
||||
|
||||
/**
|
||||
* @var OC\AllConfig
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var ContentSecurityPolicyNonceManager
|
||||
*/
|
||||
protected $cspnm;
|
||||
|
||||
/**
|
||||
* @var User
|
||||
*/
|
||||
protected $user;
|
||||
protected AllConfig $config;
|
||||
protected ContentSecurityPolicyNonceManager $cspnm;
|
||||
protected Request $request;
|
||||
protected ?User $user = null;
|
||||
|
||||
public function __construct(array $urlParams = [])
|
||||
{
|
||||
|
|
@ -96,6 +86,7 @@ class Application extends App implements IBootstrap
|
|||
$this->config = \OC::$server->getConfig();
|
||||
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
||||
$this->user = \OC::$server[IUserSession::class]->getUser();
|
||||
$this->request = \OC::$server->getRequest();
|
||||
|
||||
if (!$this->isEnabled()) {
|
||||
return;
|
||||
|
|
@ -106,7 +97,7 @@ class Application extends App implements IBootstrap
|
|||
|
||||
protected function isEnabled(): bool
|
||||
{
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) {
|
||||
if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<template>
|
||||
<NcColorPicker
|
||||
v-model="model"
|
||||
:advancedFields="true"
|
||||
class="cm-settings-form-colorpicker"
|
||||
>
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue