doc.silverstripe.org/app/_config.php

67 lines
1.9 KiB
PHP
Raw Normal View History

<?php
global $project;
$project = 'app';
global $database;
2013-02-15 12:02:11 +01:00
$database = 'SS_ss2doc';
require_once('conf/ConfigureFromEnv.php');
MySQLDatabase::set_connection_charset('utf8');
error_reporting(E_ALL);
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('docs');
if(@$_GET['db'] == "sqlite3") {
global $databaseConfig;
$databaseConfig['type'] = 'SQLite3Database';
}
DocumentationViewer::set_link_base('');
DocumentationViewer::$check_permission = false;
DocumentationService::set_automatic_registration(false);
DocumentationSearch::enable();
2012-09-09 08:19:41 +02:00
try {
2013-01-22 12:16:11 +01:00
DocumentationService::register("framework", BASE_PATH ."/src/framework_master/docs/", 'trunk');
2013-10-01 03:00:19 +02:00
DocumentationService::register("framework", BASE_PATH ."/src/framework_3.1/docs/", '3.1', false, true);
DocumentationService::register("framework", BASE_PATH ."/src/framework_3.0/docs/", '3.0');
DocumentationService::register("framework", BASE_PATH ."/src/framework_2.4/docs/", '2.4');
DocumentationService::register("framework", BASE_PATH ."/src/framework_2.3/docs/", '2.3');
} catch(InvalidArgumentException $e) {
} // Silence if path is not found (for CI environment)
DocumentationViewer::set_edit_link(
'framework',
'https://github.com/silverstripe/sapphire/edit/%version%/docs/%lang%/%path%',
array(
'rewritetrunktomaster' => true
)
);
Object::add_extension('Controller', 'ControllerExtension');
2012-09-09 08:19:41 +02:00
if(Director::isLive()) {
ControllerExtension::$google_analytics_code = 'UA-84547-8';
}
Validator::set_javascript_validation_handler('none');
DocumentationSearch::set_meta_data(array(
'ShortName' => 'SilverStripe Documentation',
'Description' => 'Documentation for SilverStripe CMS / Framework',
'Tags' => 'silverstripe sapphire php framework cms content management system'
));
DocumentationSearch::$boost_by_path = array(
// Changelogs have heaps of phrases, but are rarely relevant for content searches
'/^changelog/' => 0.05
);