Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Commit e912a7b

Browse files
committed
Tidy up and add branding
1 parent 643b5eb commit e912a7b

8 files changed

Lines changed: 1280 additions & 201 deletions

File tree

LICENCE renamed to LICENCE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# MIT license
22

3+
Copyright (c) 2020 October CMS
4+
Copyright (c) 2015 Scott Bedard
5+
36
Permission is hereby granted, free of charge, to any person obtaining a copy of
47
this software and associated documentation files (the "Software"), to deal in
58
the Software without restriction, including without limitation the rights to

Plugin.php

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use System\Classes\PluginBase;
88
use System\Classes\CombineAssets;
99
use Illuminate\Foundation\AliasLoader;
10-
10+
use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
1111
/**
1212
* Plugin Information File
1313
*/
@@ -35,7 +35,7 @@ public function pluginDetails()
3535
}
3636

3737
/**
38-
* Register service provider, Twig extensions, and alias facade.
38+
* boot service provider, Twig extensions, and alias facade.
3939
*/
4040
public function boot()
4141
{
@@ -51,23 +51,33 @@ public function boot()
5151

5252
// Register middleware
5353
if (Config::get('app.debugAjax', false)) {
54-
$this->app['Illuminate\Contracts\Http\Kernel']->pushMiddleware(\RainLab\Debugbar\Middleware\InterpretsAjaxExceptions::class);
54+
$this->app[HttpKernelContract::class]->pushMiddleware(\RainLab\Debugbar\Middleware\InterpretsAjaxExceptions::class);
5555
}
5656

57-
// Add styling
58-
$addResources = function($controller) {
59-
$debugBar = $this->app->make(\Barryvdh\Debugbar\LaravelDebugbar::class);
60-
if ($debugBar->isEnabled()) {
61-
$controller->addCss(url(Config::get('cms.pluginsPath', '/plugins') . '/rainlab/debugbar/assets/css/debugbar.css'));
62-
}
63-
};
57+
$this->registerResourceInjection();
6458

65-
Event::listen('backend.page.beforeDisplay', $addResources, PHP_INT_MAX);
59+
$this->registerTwigExtensions();
60+
}
6661

67-
Event::listen('cms.page.beforeDisplay', $addResources, PHP_INT_MAX);
62+
/**
63+
* register the service provider
64+
*/
65+
public function register()
66+
{
67+
/*
68+
* Register asset bundles
69+
*/
70+
CombineAssets::registerCallback(function ($combiner) {
71+
$combiner->registerBundle('$/rainlab/debugbar/assets/less/debugbar.less');
72+
});
73+
}
6874

75+
/**
76+
* registerTwigExtensions
77+
*/
78+
protected function registerTwigExtensions()
79+
{
6980
Event::listen('cms.page.beforeDisplay', function ($controller, $url, $page) {
70-
// Twig extensions
7181
$twig = $controller->getTwig();
7282
if (!$twig->hasExtension(\Barryvdh\Debugbar\Twig\Extension\Debug::class)) {
7383
$twig->addExtension(new \Barryvdh\Debugbar\Twig\Extension\Debug($this->app));
@@ -77,16 +87,21 @@ public function boot()
7787
}
7888

7989
/**
80-
* Register the
90+
* registerResourceInjection adds styling to the page
8191
*/
82-
public function register()
92+
protected function registerResourceInjection()
8393
{
84-
/*
85-
* Register asset bundles
86-
*/
87-
CombineAssets::registerCallback(function ($combiner) {
88-
$combiner->registerBundle('$/rainlab/debugbar/assets/css/debugbar.less');
89-
});
94+
// Add styling
95+
$addResources = function($controller) {
96+
$debugBar = $this->app->make(\Barryvdh\Debugbar\LaravelDebugbar::class);
97+
if ($debugBar->isEnabled()) {
98+
$controller->addCss('/plugins/rainlab/debugbar/assets/css/debugbar.css');
99+
}
100+
};
101+
102+
Event::listen('backend.page.beforeDisplay', $addResources, PHP_INT_MAX);
103+
104+
Event::listen('cms.page.beforeDisplay', $addResources, PHP_INT_MAX);
90105
}
91106

92107
/**

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Security Policy
22

3-
**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
3+
**PLEASE DO NOT DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
44

55
## Supported Versions
66

7-
RainLab plugins are evergreen, no one version is singled out for security fixes because there is no way to update just one version. Builds are continually released and security fixes will always be available in the latest build.
7+
October CMS is an evergreen product, no one version is singled out for security fixes because there is no way to update just one version. Builds are continually released and security fixes will always be available in the latest build.
88

99
## Reporting a Vulnerability
1010

11-
If you discover a security vulnerability within any RainLab plugin, please send an email to Samuel Georges at hello@octobercms.com and Luke Towers at octobercms@luketowers.ca. All security vulnerabilities will be promptly addressed.
11+
If you discover a security vulnerability within October CMS, please send an email to the team at hello@octobercms.com. All security vulnerabilities will be promptly addressed.

0 commit comments

Comments
 (0)