-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php_orig
37 lines (34 loc) · 1.16 KB
/
index.php_orig
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
36
37
<?php
/**
* @package Engine_Core
* @version $Id: index.php 9764 2012-08-17 00:04:31Z matthew $
* @copyright Copyright (c) 2008 Webligo Developments
* @license http://www.socialengine.com/license/
*/
// Check version
if( version_compare(phpversion(), '5.2.11', '<') ) {
printf('PHP 5.2.11 is required, you have %s', phpversion());
exit(1);
}
// Constants
define('_ENGINE_R_BASE', dirname($_SERVER['SCRIPT_NAME']));
define('_ENGINE_R_FILE', $_SERVER['SCRIPT_NAME']);
define('_ENGINE_R_REL', 'application');
////////////////////////////////////////////////////////
//customization for rest api - Greg Cook - 20170718
//original code starts here
//define('_ENGINE_R_TARG', 'index.php');
//original code ends here
//modified code begins here
//getRequestUri = htmlspecialchars($_SERVER['REQUEST_URI']);
//if(isset($getRequestUri) && !empty($getRequestUri) && strstr($getRequestUri, "api/rest")){
// define('_ENGINE_R_TARG', 'siteapi.php');
//else {
// define('_ENGINE_R_TARG', 'index.php');
//}
//modifified code ends here
//end of customization
// Main
include dirname(__FILE__) . DIRECTORY_SEPARATOR
. _ENGINE_R_REL . DIRECTORY_SEPARATOR
. _ENGINE_R_TARG;