mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Moved director rules from main.php into _config.php so that they work with cli-script
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54636 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
98bee3e50f
commit
c03e56137b
17
_config.php
17
_config.php
@ -73,4 +73,21 @@ Security::set_password_encryption_algorithm('sha1', true);
|
||||
define('EMAIL_BOUNCEHANDLER_KEY', '1aaaf8fb60ea253dbf6efa71baaacbb3');
|
||||
|
||||
|
||||
// Default director
|
||||
Director::addRules(10, array(
|
||||
'Security/$Action/$ID' => 'Security',
|
||||
'db/$Action' => 'DatabaseAdmin',
|
||||
'$Controller/$Action/$ID/$OtherID' => '*',
|
||||
'images/$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||
'' => 'RootURLController',
|
||||
'sitemap.xml' => 'GoogleSitemap',
|
||||
'api/v1/$ClassName/$ID' => 'RestfulServer',
|
||||
'dev/$Action/$NestedAction' => 'DevelopmentAdmin'
|
||||
));
|
||||
|
||||
Director::addRules(1, array(
|
||||
'$URLSegment/$Action/$ID/$OtherID' => 'ModelAsController',
|
||||
));
|
||||
|
||||
|
||||
?>
|
16
main.php
16
main.php
@ -120,22 +120,6 @@ if(isset($_GET['debug_profile'])) Profiler::mark('all_execution');
|
||||
|
||||
if(isset($_GET['debug_profile'])) Profiler::mark('main.php init');
|
||||
|
||||
// Default director
|
||||
Director::addRules(10, array(
|
||||
'Security/$Action/$ID' => 'Security',
|
||||
'db/$Action' => 'DatabaseAdmin',
|
||||
'$Controller/$Action/$ID/$OtherID' => '*',
|
||||
'images/$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||
'' => 'RootURLController',
|
||||
'sitemap.xml' => 'GoogleSitemap',
|
||||
'api/v1/$ClassName/$ID' => 'RestfulServer',
|
||||
'dev/$Action/$NestedAction' => 'DevelopmentAdmin'
|
||||
));
|
||||
|
||||
Director::addRules(1, array(
|
||||
'$URLSegment/$Action/$ID/$OtherID' => 'ModelAsController',
|
||||
));
|
||||
|
||||
// Load error handlers
|
||||
Debug::loadErrorHandlers();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user