| Revision 997,
928 bytes
checked in by strat.cristian@…, 3 years ago
(diff) |
|
Log remote IP and X-Forwarded-For header on job submit, textblock create/edit, and attachment upload. For privacy considerations, IP addresses are only displayed to admins and helpers.
- Contains database migration script.
- Adds new simplified security action. (sensitive-info)
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #! /usr/bin/env php |
|---|
| 2 | <?php |
|---|
| 3 | |
|---|
| 4 | require_once(dirname($argv[0]) . "/config.php"); |
|---|
| 5 | require_once(IA_ROOT_DIR . "common/common.php"); |
|---|
| 6 | require_once(IA_ROOT_DIR . "common/log.php"); |
|---|
| 7 | require_once(IA_ROOT_DIR . "common/db/smf.php"); |
|---|
| 8 | require_once(IA_ROOT_DIR . "common/textblock.php"); |
|---|
| 9 | require_once(IA_ROOT_DIR . "common/db/textblock.php"); |
|---|
| 10 | require_once(IA_ROOT_DIR . "common/db/user.php"); |
|---|
| 11 | db_connect(); |
|---|
| 12 | |
|---|
| 13 | $query = <<<SQL |
|---|
| 14 | SELECT * |
|---|
| 15 | FROM `ia_user` |
|---|
| 16 | SQL; |
|---|
| 17 | |
|---|
| 18 | $users = db_fetch_all($query); |
|---|
| 19 | foreach ($users as $user) { |
|---|
| 20 | $tbname = IA_USER_TEXTBLOCK_PREFIX.'/'.$user['username']; |
|---|
| 21 | if (is_normal_page_name($tbname)) { |
|---|
| 22 | if (!textblock_get_revision($tbname)) { |
|---|
| 23 | log_print("Missing textblock for {$user['username']}"); |
|---|
| 24 | $replace = array("user_id" => $user['username']); |
|---|
| 25 | textblock_copy_replace("template/newuser", $tbname, $replace, |
|---|
| 26 | "public", $user['id'], null); |
|---|
| 27 | } |
|---|
| 28 | } |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | ?> |
|---|
| 32 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.