@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if(!function_exists('createGUID')) { |
|
| 3 | +if (!function_exists('createGUID')) { |
|
| 4 | 4 | /** |
| 5 | 5 | * create globally unique identifiers (guid) |
| 6 | 6 | * |
@@ -8,22 +8,22 @@ discard block |
||
| 8 | 8 | */ |
| 9 | 9 | function createGUID() |
| 10 | 10 | { |
| 11 | - srand((double)microtime() * 1000000); |
|
| 11 | + srand((double) microtime() * 1000000); |
|
| 12 | 12 | $r = rand(); |
| 13 | - $u = uniqid(getmypid() . $r . (double)microtime() * 1000000, 1); |
|
| 13 | + $u = uniqid(getmypid().$r.(double) microtime() * 1000000, 1); |
|
| 14 | 14 | $m = md5($u); |
| 15 | 15 | |
| 16 | 16 | return $m; |
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -if(!function_exists('generate_password')) { |
|
| 20 | +if (!function_exists('generate_password')) { |
|
| 21 | 21 | // Generate password |
| 22 | 22 | function generate_password($length = 10) |
| 23 | 23 | { |
| 24 | 24 | $allowable_characters = "abcdefghjkmnpqrstuvxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"; |
| 25 | 25 | $ps_len = strlen($allowable_characters); |
| 26 | - mt_srand((double)microtime() * 1000000); |
|
| 26 | + mt_srand((double) microtime() * 1000000); |
|
| 27 | 27 | $pass = ""; |
| 28 | 28 | for ($i = 0; $i < $length; $i++) { |
| 29 | 29 | $pass .= $allowable_characters[mt_rand(0, $ps_len - 1)]; |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once MODX_BASE_PATH . 'functions/tv.php'; |
|
| 3 | +include_once MODX_BASE_PATH.'functions/tv.php'; |
|
@@ -11,20 +11,20 @@ |
||
| 11 | 11 | * This file is mormally called from the installer |
| 12 | 12 | * |
| 13 | 13 | */ |
| 14 | -include_once dirname(__DIR__) . '/includes/functions/processors.php'; |
|
| 14 | +include_once dirname(__DIR__).'/includes/functions/processors.php'; |
|
| 15 | 15 | $msg = ''; |
| 16 | -$pth = dirname(dirname(__DIR__)) . '/install/'; |
|
| 16 | +$pth = dirname(dirname(__DIR__)).'/install/'; |
|
| 17 | 17 | $pth = str_replace('\\', '/', $pth); |
| 18 | 18 | |
| 19 | 19 | if (isset($_GET['rminstall'])) { |
| 20 | 20 | if (is_dir($pth)) { |
| 21 | - if (! rmdirRecursive($pth)) { |
|
| 21 | + if (!rmdirRecursive($pth)) { |
|
| 22 | 22 | $msg = 'An error occured while attempting to remove the install folder'; |
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | if ($msg) { |
| 27 | - echo "<script>alert('" . addslashes($msg) . "');</script>"; |
|
| 27 | + echo "<script>alert('".addslashes($msg)."');</script>"; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | echo "<script>window.location='../index.php?a=2';</script>"; |