doc.silverstripe.org/app/_config.php

66 lines
2.0 KiB
PHP
Raw Normal View History

<?php
global $project;
$project = 'app';
global $database;
$database = 'SS_ssdoc';
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(Director::isDev() && @$_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
)
);
2012-09-09 08:19:41 +02:00
if(Director::isLive()) {
ControllerExtension::$google_analytics_code = 'UA-84547-8';
}
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
);
// Set shared index (avoid issues with different temp paths between CLI and web users)
if(file_exists(BASE_PATH . '/.lucene-index')) {
DocumentationSearch::set_index(BASE_PATH . '/.lucene-index');
}