mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1980 from open-sausages/pulls/4/vendorise-me-baby
Expose as vendor module
This commit is contained in:
commit
9c3b0cf9bf
@ -1,6 +0,0 @@
|
||||
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
<FilesMatch "silverstripe_version$">
|
||||
Deny from all
|
||||
</FilesMatch>
|
18
_config.php
18
_config.php
@ -7,28 +7,18 @@ use SilverStripe\CMS\Controllers\CMSPageEditController;
|
||||
use SilverStripe\CMS\Controllers\CMSPageHistoryController;
|
||||
use SilverStripe\CMS\Controllers\CMSPageSettingsController;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
|
||||
use SilverStripe\View\Parsers\ShortcodeParser;
|
||||
|
||||
/**
|
||||
* Define constants
|
||||
*
|
||||
* - CMS_DIR: Path relative to webroot, e.g. "cms"
|
||||
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
|
||||
*/
|
||||
call_user_func(function () {
|
||||
// Check if CMS is root dir, or subdir
|
||||
if (strcasecmp(__DIR__, BASE_PATH) === 0) {
|
||||
$clientPath = 'client';
|
||||
} else {
|
||||
$clientPath = basename(__DIR__) . '/client';
|
||||
}
|
||||
$module = ModuleLoader::inst()->getManifest()->getModule('silverstripe/cms');
|
||||
|
||||
// Enable insert-link to internal pages
|
||||
TinyMCEConfig::get('cms')
|
||||
->enablePlugins(array(
|
||||
'sslinkinternal' => "{$clientPath}/dist/js/TinyMCE_sslink-internal.js",
|
||||
'sslinkanchor' => "{$clientPath}/dist/js/TinyMCE_sslink-anchor.js",
|
||||
'sslinkinternal' => $module->getResource('client/dist/js/TinyMCE_sslink-internal.js')->getURL(),
|
||||
'sslinkanchor' => $module->getResource('client/dist/js/TinyMCE_sslink-anchor.js')->getURL()
|
||||
));
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "silverstripe/cms",
|
||||
"type": "silverstripe-module",
|
||||
"type": "silverstripe-vendormodule",
|
||||
"description": "The SilverStripe Content Management System",
|
||||
"homepage": "http://silverstripe.org",
|
||||
"license": "BSD-3-Clause",
|
||||
@ -25,7 +25,8 @@
|
||||
"silverstripe/framework": "^4@dev",
|
||||
"silverstripe/reports": "^4@dev",
|
||||
"silverstripe/siteconfig": "^4@dev",
|
||||
"silverstripe/versioned": "^1@dev"
|
||||
"silverstripe/versioned": "^1@dev",
|
||||
"silverstripe/vendor-plugin": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
@ -37,7 +38,11 @@
|
||||
"branch-alias": {
|
||||
"4.x-dev": "4.0.x-dev",
|
||||
"dev-master": "5.x-dev"
|
||||
}
|
||||
},
|
||||
"expose": [
|
||||
"client/dist",
|
||||
"client/lang"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "phpcs -s code/ tests/php/ tests/behat/src/",
|
||||
|
11
web.config
11
web.config
@ -1,11 +0,0 @@
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<hiddenSegments>
|
||||
<add segment="silverstripe_version" />
|
||||
</hiddenSegments>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user