|
18 | 18 | limitations under the License.
|
19 | 19 | =========================================================================*/
|
20 | 20 |
|
| 21 | +define('BASE_PATH', realpath(dirname(__FILE__))); |
| 22 | + |
| 23 | +set_include_path('.' |
| 24 | + . PATH_SEPARATOR . './library' |
| 25 | + . PATH_SEPARATOR . './core/dao/' |
| 26 | + . PATH_SEPARATOR . get_include_path()); |
| 27 | + |
21 | 28 | if(function_exists('apache_get_modules'))
|
22 | 29 | {
|
23 |
| - $modules = apache_get_modules(); |
24 |
| - $mod_rewrite = in_array('mod_rewrite', $modules); |
| 30 | + $mod_rewrite = in_array('mod_rewrite', apache_get_modules()); |
25 | 31 | }
|
26 | 32 | else
|
27 | 33 | {
|
|
31 | 37 | if(!$mod_rewrite)
|
32 | 38 | {
|
33 | 39 | echo "Please install/enable the module rewrite";
|
34 |
| - exit; |
| 40 | + exit(); |
35 | 41 | }
|
36 |
| -error_reporting(E_ALL | E_STRICT); |
37 |
| -ini_set('display_errors', 'on'); |
38 |
| -set_include_path('.' |
39 |
| - . PATH_SEPARATOR . './library' |
40 |
| - . PATH_SEPARATOR . './core/dao/' |
41 |
| - . PATH_SEPARATOR . get_include_path()); |
42 | 42 |
|
43 |
| -define('BASE_PATH', realpath(dirname(__FILE__))); |
44 |
| - |
45 |
| -if(!is_writable(BASE_PATH."/core/configs") || !is_writable(BASE_PATH."/log") || !is_writable(BASE_PATH."/data") || !is_writable(BASE_PATH."/tmp")) |
| 43 | +if(!is_writable(BASE_PATH . '/core/configs') || !is_writable(BASE_PATH . '/data') || !is_writable(BASE_PATH . '/tmp')) |
46 | 44 | {
|
47 |
| - echo "To use Midas, the following repertories have to be writable by apache: |
| 45 | + echo 'To use Midas Platform, the following folders must be writable by your web server: |
48 | 46 | <ul>
|
49 |
| - <li>".BASE_PATH."/core/configs</li> |
50 |
| - <li>".BASE_PATH."/log</li> |
51 |
| - <li>".BASE_PATH."/data</li> |
52 |
| - <li>".BASE_PATH."/tmp</li> |
53 |
| - </ul>"; |
| 47 | + <li>' . BASE_PATH . '/core/configs</li> |
| 48 | + <li>' . BASE_PATH . '/data</li> |
| 49 | + <li>' . BASE_PATH . '/tmp</li> |
| 50 | + </ul>'; |
54 | 51 | exit();
|
55 | 52 | }
|
56 | 53 |
|
57 |
| -// remember me cookie lifetime |
58 |
| -//ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 15); //15 days |
59 | 54 | define('START_TIME', microtime(true));
|
60 | 55 |
|
61 | 56 | require_once 'Zend/Loader/Autoloader.php';
|
|
64 | 59 | $loader = Zend_Loader_Autoloader::getInstance();
|
65 | 60 | $loader->registerNamespace('App_');
|
66 | 61 |
|
67 |
| -require_once(BASE_PATH . "/core/include.php"); |
| 62 | +require_once(BASE_PATH . '/core/include.php'); |
68 | 63 |
|
69 |
| -// Create application, bootstrap, and run |
70 | 64 | $application = new Zend_Application('global', CORE_CONFIG);
|
71 |
| - |
72 |
| -$application->bootstrap() |
73 |
| -->run(); |
| 65 | +$application->bootstrap()->run(); |
0 commit comments