diff options
| author | Nils Adermann <naderman@naderman.de> | 2009-08-13 14:51:47 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2009-08-13 14:51:47 +0000 |
| commit | 4525d1cb733e893762e87a4f597f8489a9917191 (patch) | |
| tree | 81059ffd44149c2da899a32825cb0e353eb6d276 /phpBB/install | |
| parent | 929fd29ce13ad42235b58f327b694a00780ebe5e (diff) | |
| download | forums-4525d1cb733e893762e87a4f597f8489a9917191.tar forums-4525d1cb733e893762e87a4f597f8489a9917191.tar.gz forums-4525d1cb733e893762e87a4f597f8489a9917191.tar.bz2 forums-4525d1cb733e893762e87a4f597f8489a9917191.tar.xz forums-4525d1cb733e893762e87a4f597f8489a9917191.zip | |
- links to send statistics after install and update
- link back to ACP main from send statistics
- improved language / better explanation (incl. Bug #48555)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9969 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/database_update.php | 43 | ||||
| -rw-r--r-- | phpBB/install/install_install.php | 2 |
2 files changed, 44 insertions, 1 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index e77a170240..76de50186d 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1284,6 +1284,49 @@ function change_database_data(&$no_updates, $version) } $db->sql_freeresult($result); + // Also install the "Send statistics" module + $sql = 'SELECT module_id + FROM ' . MODULES_TABLE . " + WHERE module_class = 'acp' + AND module_langname = 'ACP_SERVER_CONFIGURATION' + AND module_mode = '' + AND module_basename = ''"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $category_id = (int) $row['module_id']; + + // Check if we actually need to add the feed module or if it is already added. ;) + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_class = 'acp' + AND module_langname = 'ACP_SEND_STATISTICS' + AND module_mode = 'questionnaire' + AND module_auth = 'acl_a_server' + AND parent_id = {$category_id}"; + $result2 = $db->sql_query($sql); + $row2 = $db->sql_fetchrow($result2); + $db->sql_freeresult($result2); + + if (!$row2) + { + $module_data = array( + 'module_basename' => 'send_statistics', + 'module_enabled' => 1, + 'module_display' => 1, + 'parent_id' => $category_id, + 'module_class' => 'acp', + 'module_langname' => 'ACP_SEND_STATISTICS', + 'module_mode' => 'send_statistics', + 'module_auth' => 'acl_a_server', + ); + + $_module->update_module_data($module_data, true); + } + } + $db->sql_freeresult($result); + $_module->remove_cache_file(); // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index d820239c17..6a7b6ca121 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1958,7 +1958,7 @@ class install_install extends module 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], - 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx), + 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=questionnaire'), )); } |
