forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zero-24/cspj4
update com_csp
- Loading branch information
Showing
303 changed files
with
5,115 additions
and
4,258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# A list of files to ignore from linting | ||
*.js | ||
!*.es6.js | ||
!build/**/*.js | ||
# A list of files to ignore from linting | ||
*.js | ||
!*.es6.js | ||
!build/**/*.js | ||
*.vue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
administrator/components/com_admin/Extension/AdminComponent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_content | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
namespace Joomla\Component\Admin\Administrator\Extension; | ||
|
||
defined('JPATH_PLATFORM') or die; | ||
|
||
use Joomla\CMS\Extension\BootableExtensionInterface; | ||
use Joomla\CMS\Extension\MVCComponent; | ||
use Joomla\CMS\HTML\HTMLRegistryAwareTrait; | ||
use Joomla\Component\Admin\Administrator\Service\HTML\Directory; | ||
use Joomla\Component\Admin\Administrator\Service\HTML\PhpSetting; | ||
use Joomla\Component\Admin\Administrator\Service\HTML\System; | ||
use Psr\Container\ContainerInterface; | ||
|
||
/** | ||
* Component class for com_admin | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
class AdminComponent extends MVCComponent implements BootableExtensionInterface | ||
{ | ||
use HTMLRegistryAwareTrait; | ||
|
||
/** | ||
* Booting the extension. This is the function to set up the environment of the extension like | ||
* registering new class loaders, etc. | ||
* | ||
* If required, some initial set up can be done from services of the container, eg. | ||
* registering HTML services. | ||
* | ||
* @param ContainerInterface $container The container | ||
* | ||
* @return void | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function boot(ContainerInterface $container) | ||
{ | ||
$this->getRegistry()->register('system', new System); | ||
$this->getRegistry()->register('phpsetting', new PhpSetting); | ||
$this->getRegistry()->register('directory', new Directory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_content | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Dispatcher\DispatcherFactoryInterface; | ||
use Joomla\CMS\Extension\ComponentInterface; | ||
use Joomla\CMS\Extension\Service\Provider\DispatcherFactory; | ||
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory; | ||
use Joomla\CMS\HTML\Registry; | ||
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface; | ||
use Joomla\Component\Admin\Administrator\Extension\AdminComponent; | ||
use Joomla\DI\Container; | ||
use Joomla\DI\ServiceProviderInterface; | ||
|
||
/** | ||
* The admin service provider. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
return new class implements ServiceProviderInterface | ||
{ | ||
/** | ||
* Registers the service provider with a DI container. | ||
* | ||
* @param Container $container The DI container. | ||
* | ||
* @return void | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
public function register(Container $container) | ||
{ | ||
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Admin')); | ||
$container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Admin')); | ||
|
||
$container->set( | ||
ComponentInterface::class, | ||
function (Container $container) | ||
{ | ||
$component = new AdminComponent($container->get(DispatcherFactoryInterface::class)); | ||
|
||
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class)); | ||
$component->setRegistry($container->get(Registry::class)); | ||
|
||
return $component; | ||
} | ||
); | ||
} | ||
}; |
1 change: 1 addition & 0 deletions
1
administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-03-05.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `#__modules` CHANGE `content` `content` TEXT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "#__modules" ALTER COLUMN "content" DROP NOT NULL; |
17 changes: 17 additions & 0 deletions
17
administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- | ||
-- Table structure for table `#__csp` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS "#__csp" ( | ||
"id" int(11) NOT NULL AUTO_INCREMENT, | ||
"document_uri" varchar(500) NOT NULL DEFAULT '', | ||
"blocked_uri" varchar(500) NOT NULL DEFAULT '', | ||
"directive" varchar(500) NOT NULL DEFAULT '', | ||
"created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, | ||
"modified" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, | ||
"published" smallint DEFAULT 0 NOT NULL, | ||
PRIMARY KEY ("id") | ||
); | ||
|
||
INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state", "namespace") VALUES | ||
(35, 'com_csp', 'component', 'com_csp', ' ', 0, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0, 'Joomla\\Component\\Csp'); |
Oops, something went wrong.