-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.php
More file actions
35 lines (31 loc) · 1.18 KB
/
api.php
File metadata and controls
35 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('html_errors', false);
/* Entry point for the monuments api */
require dirname( __FILE__ ) . '/autoloader.php';
require dirname( __FILE__ ) . '/includes/Defaults.php';
/**
* Look for config overrides
*
* First look in p_erfgoed's parent dir, then in p_erfgoed root.
* Otherwise, erfgoed will just use Defaults.php.
*/
//$config_override = 'database.inc';
//if ( file_exists( dirname( dirname( dirname( __FILE__ ) ) ) . "/{$config_override}" ) ) {
// require dirname( dirname( dirname( __FILE__ ) ) ) . "/{$config_override}";
//} elseif ( file_exists( dirname( dirname( __FILE__ ) ) . "/{$config_override}" ) ) {
// require dirname( dirname( __FILE__ ) ) . "/{$config_override}";
//}
/* Localization */
if ( $tsI18nDir ) {
require_once( "$tsI18nDir/ToolStart.php" );
$opts = array(
'domain' => 'MonumentsAPI', // name of your main text-domain here
'globalfunctions' => true, // defines _(), _e() and _g() as shortcut for $I18N->msg( .. )
);
$I18N = new TsIntuition( $opts );
}
Database::define($dbServer, $dbDatabase, $dbUser,
isset( $toolserver_password )? $toolserver_password : $dbPassword );
ApiMain::dispatch();