| Revision 3874:ab8368569446,
762 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
|
short notation for array (array() → [])
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | if (!empty($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], array('mysql','sqlite','pgsql')) |
|---|
| 3 | && is_readable(__DIR__.'/conf/config_'.$_SERVER['argv'][1].'.php')) { |
|---|
| 4 | |
|---|
| 5 | $_SERVER['DC_RC_PATH'] = __DIR__.'/conf/config_'.$_SERVER['argv'][1].'.php'; |
|---|
| 6 | } else { |
|---|
| 7 | $_SERVER['DC_RC_PATH'] = __DIR__.'/../inc/config.php'; |
|---|
| 8 | } |
|---|
| 9 | |
|---|
| 10 | if (empty($_SERVER['DC_RC_PATH'])) { |
|---|
| 11 | die('You must define DC_RC_PATH'); |
|---|
| 12 | } |
|---|
| 13 | $_SERVER['REQUEST_URI'] = 'http://localhost:1080'; |
|---|
| 14 | $_SERVER['HTTP_HOST'] = 'http'; |
|---|
| 15 | $_SERVER['SERVER_PORT'] = '1080'; |
|---|
| 16 | |
|---|
| 17 | $tmp_pwd = md5(uniqid()); // don't care, user will be deleted |
|---|
| 18 | $_POST = [ |
|---|
| 19 | 'u_login' => 'admin', |
|---|
| 20 | 'u_pwd' => $tmp_pwd, |
|---|
| 21 | 'u_pwd2' => $tmp_pwd |
|---|
| 22 | ]; |
|---|
| 23 | |
|---|
| 24 | ob_start(); |
|---|
| 25 | require_once(__DIR__.'/../admin/install/index.php'); |
|---|
| 26 | ob_end_clean(); |
|---|
Note: See
TracBrowser
for help on using the repository browser.