diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-04-09 12:26:45 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-04-09 12:26:45 +0000 |
commit | fc32df035889dd74f2cfc1c62bb793d36f333ec2 (patch) | |
tree | 12134eada004226d1ea5b31b420d1c63f05e7376 /phpBB/adm | |
parent | 0ba3f620d4afb963b89c532b664693c974ec4f8a (diff) | |
download | forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.gz forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.bz2 forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.xz forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.zip |
- Documentation related changes
- added resend activation email dialog
- fixed issue in session code
- log failed/successful admin re-authentication/login
- fixed simple forum dropdown box (used in mcp and posting)
git-svn-id: file:///svn/phpbb/trunk@5114 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm')
26 files changed, 348 insertions, 421 deletions
diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index cb4b2e3464..a438b16f65 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_attachments.php -// STARTED : Sun Apr 20, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { $filename = basename(__FILE__); @@ -120,7 +119,7 @@ if ($mode == 'attach') add_log('admin', 'LOG_' . strtoupper($mode) . '_CONFIG'); // Check Settings - test_upload($error, $new['upload_dir'], false); + test_upload($error, $new['upload_path'], false); if (!sizeof($error)) { @@ -420,7 +419,7 @@ if ($submit && $mode == 'orphan') } else { - upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_dir'], $upload_list[$row['post_id']]); + upload_file($row['post_id'], $row['topic_id'], $row['forum_id'], $config['upload_path'], $upload_list[$row['post_id']]); } } unset($message_parser); @@ -528,7 +527,7 @@ if ($mode == 'attach') </tr> <tr> <td class="row1" width="40%"><b><?php echo $user->lang['UPLOAD_DIR']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['UPLOAD_DIR_EXPLAIN']; ?></span></td> - <td class="row2"><input type="text" size="25" maxlength="100" name="upload_dir" class="post" value="<?php echo $new['upload_dir'] ?>" /></td> + <td class="row2"><input type="text" size="25" maxlength="100" name="upload_path" class="post" value="<?php echo $new['upload_path'] ?>" /></td> </tr> <tr> <td class="row1"><b><?php echo $user->lang['DISPLAY_ORDER']; ?>: </b><br /><span class="gensmall"><?php echo $user->lang['DISPLAY_ORDER_EXPLAIN']; ?></span></td> @@ -1188,10 +1187,10 @@ if ($mode == 'orphan') { $attach_filelist = array(); - $dir = @opendir($phpbb_root_path . $config['upload_dir']); + $dir = @opendir($phpbb_root_path . $config['upload_path']); while ($file = @readdir($dir)) { - if (is_file($phpbb_root_path . $config['upload_dir'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_dir'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file)) + if (is_file($phpbb_root_path . $config['upload_path'] . '/' . $file) && filesize($phpbb_root_path . $config['upload_path'] . '/' . $file) && $file{0} != '.' && $file != 'index.htm' && !preg_match('#^thumb\_#', $file)) { $attach_filelist[$file] = $file; } @@ -1243,12 +1242,12 @@ function marklist(match, name, status) foreach ($attach_filelist as $file) { $row_class = (++$i % 2 == 0) ? 'row2' : 'row1'; - $filesize = @filesize($phpbb_root_path . $config['upload_dir'] . '/' . $file); + $filesize = @filesize($phpbb_root_path . $config['upload_path'] . '/' . $file); $size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] ); $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); ?> <tr> - <td class="<?php echo $row_class; ?>"><a href="<?php echo $phpbb_root_path . $config['upload_dir'] . '/' . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td> + <td class="<?php echo $row_class; ?>"><a href="<?php echo $phpbb_root_path . $config['upload_path'] . '/' . $file; ?>" class="gen" target="file"><?php echo $file; ?></a></td> <td class="<?php echo $row_class; ?>"><?php echo $filesize . ' ' . $size_lang; ?></td> <td class="<?php echo $row_class; ?>"><b class="gen">ID: </b><input type="text" name="post_id[<?php echo $file; ?>]" class="post" size="7" maxlength="10" value="<?php echo (!empty($post_ids[$file])) ? $post_ids[$file] : ''; ?>" /></td> <td class="<?php echo $row_class; ?>"><input type="checkbox" name="add[<?php echo $file; ?>]" /></td> @@ -1399,7 +1398,7 @@ function download_select($select_name, $group_id = false) return $group_select; } -// Upload already uploaded file... huh? are you kidding? +/* Upload already uploaded file... huh? are you kidding? function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) { global $message_parser, $db, $user, $phpbb_root_path; @@ -1418,8 +1417,8 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) 'poster_id' => $user->data['user_id'], 'topic_id' => $topic_id, 'in_message' => 0, - 'physical_filename' => $filedata['destination_filename'], - 'real_filename' => $filedata['filename'], + 'physical_filename' => $filedata['physical_filename'], + 'real_filename' => $filedata['real_filename'], 'comment' => $message_parser->filename_data['filecomment'], 'extension' => $filedata['extension'], 'mimetype' => $filedata['mimetype'], @@ -1459,6 +1458,7 @@ function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename) echo '<span style="color:red">' . sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode("<br />\t", $filedata['error'])) . '</span><br /><br />'; } } +*/ // Search Imagick function search_imagemagick() @@ -1551,7 +1551,7 @@ function perform_site_list() $ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0; $ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6]; - if($ip_2_counter == 0 && $ip_2_end == 254) + if ($ip_2_counter == 0 && $ip_2_end == 254) { $ip_2_counter = 256; $ip_2_fragment = 256; diff --git a/phpBB/adm/admin_ban.php b/phpBB/adm/admin_ban.php index ceeaac724e..7265ea701e 100644 --- a/phpBB/adm/admin_ban.php +++ b/phpBB/adm/admin_ban.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_ban.php -// STARTED : Tue Jul 31, 2001 -// COPYRIGHT : © 2001,2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_ban')) diff --git a/phpBB/adm/admin_bbcodes.php b/phpBB/adm/admin_bbcodes.php index e0977e094e..ebd82675aa 100644 --- a/phpBB/adm/admin_bbcodes.php +++ b/phpBB/adm/admin_bbcodes.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_bbcodes.php -// STARTED : Wed Aug 20, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_bbcode')) diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php index 2a2f2a53bc..8646577b59 100644 --- a/phpBB/adm/admin_board.php +++ b/phpBB/adm/admin_board.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_board.php -// STARTED : Thu Jul 12, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { $filename = basename(__FILE__); diff --git a/phpBB/adm/admin_bots.php b/phpBB/adm/admin_bots.php index 00e2138200..994d9ba634 100644 --- a/phpBB/adm/admin_bots.php +++ b/phpBB/adm/admin_bots.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_bots.php -// STARTED : Tue Oct 15, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_server')) diff --git a/phpBB/adm/admin_database.php b/phpBB/adm/admin_database.php index 6d217fbafc..ca4cf7db9b 100644 --- a/phpBB/adm/admin_database.php +++ b/phpBB/adm/admin_database.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_database.php -// STARTED : Thu May 31, 2001 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { $filename = basename(__FILE__); diff --git a/phpBB/adm/admin_disallow.php b/phpBB/adm/admin_disallow.php index c6c1fcfa18..0f4d5e61f9 100644 --- a/phpBB/adm/admin_disallow.php +++ b/phpBB/adm/admin_disallow.php @@ -1,24 +1,15 @@ <?php -/*************************************************************************** - * admin_disallow.php - * ------------------- - * begin : Tuesday, Oct 05, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_names')) diff --git a/phpBB/adm/admin_email.php b/phpBB/adm/admin_email.php index 1f2f02059f..7c4f827d1b 100644 --- a/phpBB/adm/admin_email.php +++ b/phpBB/adm/admin_email.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_email.php -// STARTED : Thu May 31, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { $file = basename(__FILE__); @@ -161,10 +160,7 @@ if (isset($_POST['submit'])) } unset($email_list); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); if ($group_id) { diff --git a/phpBB/adm/admin_forums.php b/phpBB/adm/admin_forums.php index 2315799c99..5ec50c9832 100644 --- a/phpBB/adm/admin_forums.php +++ b/phpBB/adm/admin_forums.php @@ -1,22 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_forums.php -// STARTED : Thu Jul 12, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -/* - TODO: - - - make a function to verify and/or fix the tree? +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* */ +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_gets('a_forum', 'a_forumadd', 'a_forumdel')) diff --git a/phpBB/adm/admin_groups.php b/phpBB/adm/admin_groups.php index 91dfe2f988..ae61af33f9 100644 --- a/phpBB/adm/admin_groups.php +++ b/phpBB/adm/admin_groups.php @@ -1,20 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_groups.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001,2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// TODO -// Avatar gallery ... -// Mass user pref setting via group membership - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +* @todo Avatar gallery ... +* @todo Mass user pref setting via group membership +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_group')) diff --git a/phpBB/adm/admin_icons.php b/phpBB/adm/admin_icons.php index 8c54bb6091..be4c18a617 100644 --- a/phpBB/adm/admin_icons.php +++ b/phpBB/adm/admin_icons.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_icons.php -// STARTED : Thu Mar 13, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_icons')) diff --git a/phpBB/adm/admin_jabber.php b/phpBB/adm/admin_jabber.php index 5fe25f459f..4ae0fc583c 100644 --- a/phpBB/adm/admin_jabber.php +++ b/phpBB/adm/admin_jabber.php @@ -1,19 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_jabber.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// TODO -// Check/enter/update transport info - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +* @todo Check/enter/update transport info +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_server')) diff --git a/phpBB/adm/admin_language.php b/phpBB/adm/admin_language.php index eb99c67e6f..50f810d98e 100644 --- a/phpBB/adm/admin_language.php +++ b/phpBB/adm/admin_language.php @@ -1,15 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_language.php -// STARTED : Sat Jan 23, 2005 -// COPYRIGHT : © 2001,2005 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // TODO: // * new auth? diff --git a/phpBB/adm/admin_permissions.php b/phpBB/adm/admin_permissions.php index 7ed3b4db96..bd2e7bbd85 100644 --- a/phpBB/adm/admin_permissions.php +++ b/phpBB/adm/admin_permissions.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_permissions.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { $filename = basename(__FILE__); diff --git a/phpBB/adm/admin_phpinfo.php b/phpBB/adm/admin_phpinfo.php index afedce729c..5893d31562 100644 --- a/phpBB/adm/admin_phpinfo.php +++ b/phpBB/adm/admin_phpinfo.php @@ -1,24 +1,15 @@ <?php -/*************************************************************************** - * admin_board.php - * ------------------- - * begin : Thursday, Jul 12, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ +/** +*/ if (!empty($setmodules)) { $module['GENERAL']['PHP_INFO'] = ($auth->acl_get('a_server')) ? basename(__FILE__) . $SID : ''; diff --git a/phpBB/adm/admin_profile.php b/phpBB/adm/admin_profile.php index 482befc3b4..48c25c875a 100644 --- a/phpBB/adm/admin_profile.php +++ b/phpBB/adm/admin_profile.php @@ -1,15 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_profile.php -// STARTED : Sun Apr 20, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ /* Remind if... diff --git a/phpBB/adm/admin_prune.php b/phpBB/adm/admin_prune.php index 5a469f9a64..223ec44095 100644 --- a/phpBB/adm/admin_prune.php +++ b/phpBB/adm/admin_prune.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_prune.php -// STARTED : Mon Jul 31, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_prune')) diff --git a/phpBB/adm/admin_prune_users.php b/phpBB/adm/admin_prune_users.php index a623ac5476..55f2ca85f4 100644 --- a/phpBB/adm/admin_prune_users.php +++ b/phpBB/adm/admin_prune_users.php @@ -1,24 +1,15 @@ <?php -/*************************************************************************** - * admin_prune_users.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_userdel')) diff --git a/phpBB/adm/admin_ranks.php b/phpBB/adm/admin_ranks.php index 3eba8532a3..3c2c51dd11 100644 --- a/phpBB/adm/admin_ranks.php +++ b/phpBB/adm/admin_ranks.php @@ -1,24 +1,15 @@ <?php -/*************************************************************************** - * admin_ranks.php - * ------------------- - * begin : Thursday, Jul 12, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_ranks')) diff --git a/phpBB/adm/admin_search.php b/phpBB/adm/admin_search.php index e427b4bd54..9826c51d33 100644 --- a/phpBB/adm/admin_search.php +++ b/phpBB/adm/admin_search.php @@ -1,24 +1,15 @@ <?php -/*************************************************************************** - * admin_search.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : support@phpbb.com - * - * $Id$ - * - ***************************************************************************/ - -/*************************************************************************** - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - ***************************************************************************/ - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_search')) diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index 2800aef021..1d0d746f21 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -1,15 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_styles.php -// STARTED : Thu Aug 7 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // TODO // For M-3 diff --git a/phpBB/adm/admin_users.php b/phpBB/adm/admin_users.php index eee887de42..0b21afa380 100644 --- a/phpBB/adm/admin_users.php +++ b/phpBB/adm/admin_users.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_users.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001,2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_gets('a_user', 'a_useradd', 'a_userdel')) @@ -321,7 +320,7 @@ e_help = "<?php echo $user->lang['BBCODE_E_HELP']; ?>"; ); $messenger->send(NOTIFY_EMAIL); - $messenger->queue->save(); + $messenger->save_queue(); add_log('admin', 'LOG_USER_REACTIVATE', $username); add_log('user', $user_id, 'LOG_USER_REACTIVATE_USER'); @@ -2020,7 +2019,7 @@ if (!$auth->acl_get('a_user')) adm_page_footer(); -// Module class +/* Module class class acp_admin_users extends module { @@ -2028,5 +2027,6 @@ class acp_admin_users extends module } +*/ ?>
\ No newline at end of file diff --git a/phpBB/adm/admin_viewlogs.php b/phpBB/adm/admin_viewlogs.php index 37034d49fe..f69858f0ed 100644 --- a/phpBB/adm/admin_viewlogs.php +++ b/phpBB/adm/admin_viewlogs.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_viewlogs.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_')) @@ -54,10 +53,7 @@ $sort_dir = request_var('sd', 'd'); // Define some vars depending on which logs we're looking at $log_type = ($mode == 'admin') ? LOG_ADMIN : (($mode == 'mod') ? LOG_MOD : LOG_CRITICAL); -if ($log_type == LOG_MOD) -{ - $user->add_lang('mcp'); -} +$user->add_lang('mcp'); // Delete entries if requested and able if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) @@ -125,8 +121,24 @@ if ($mode == 'mod') } +// +// Grab log data +// +$log_data = array(); +$log_count = 0; +view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort); + ?> +<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> +<tr> + <td align="left" valign="top"> <span class="nav"><?php echo on_page($log_count, $config['topics_per_page'], $start); ?></span></td> + <td align="right" valign="top" nowrap="nowrap"> + <span class="nav"><?php echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start, true); ?></span> + </td> +</tr> +</table> + <table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td class="cat" colspan="5" height="28" align="center"><?php echo $user->lang['DISPLAY_LOG']; ?>: <?php echo $s_limit_days; ?> <?php echo $user->lang['SORT_BY']; ?>: <?php echo $s_sort_key; ?> <?php echo $s_sort_dir; ?> <input class="btnlite" type="submit" value="<?php echo $user->lang['GO']; ?>" name="sort" /></td> @@ -140,13 +152,6 @@ if ($mode == 'mod') </tr> <?php -// -// Grab log data -// -$log_data = array(); -$log_count = 0; -view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort); - $row_class = ''; if ($log_count) @@ -221,8 +226,8 @@ else ?><b><a href="javascript:marklist('list', true);"><?php echo $user->lang['MARK_ALL']; ?></a> :: <a href="javascript:marklist('list', false);"><?php echo $user->lang['UNMARK_ALL']; ?></a></b> <br /><br /><?php } - - echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start); + + echo generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&$u_sort_param", $log_count, $config['topics_per_page'], $start, true); ?></span></td> </tr> diff --git a/phpBB/adm/admin_words.php b/phpBB/adm/admin_words.php index a13b92e1f6..7f5324592f 100644 --- a/phpBB/adm/admin_words.php +++ b/phpBB/adm/admin_words.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin_words.php -// STARTED : Thu Jul 12, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ if (!empty($setmodules)) { if (!$auth->acl_get('a_words')) diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 46054fa74b..c7fd63253b 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : adm/index.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', 1); // Include files $phpbb_root_path = './../'; @@ -205,10 +204,7 @@ elseif ($pane == 'right') } while ($row = $db->sql_fetchrow($result)); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); unset($email_list); @@ -283,7 +279,6 @@ elseif ($pane == 'right') add_log('admin', 'LOG_RESYNC_STATS'); break; - // TODO: Temporary or a useful function? case 'user': if (!$auth->acl_get('a_defaults')) { @@ -291,40 +286,37 @@ elseif ($pane == 'right') } $post_count_ary = $auth->acl_getf('f_postcount'); - + $forum_ary = array(); foreach ($post_count_ary as $forum_id => $allowed) { - if ($allowed['f_read'] && $allowed['f_postcount']) + if ($allowed['f_postcount']) { $forum_ary[] = $forum_id; } } - $post_count_sql = (sizeof($forum_ary)) ? 'AND f.forum_id IN (' . implode(', ', $forum_ary) . ')' : ''; - unset($forum_ary, $post_count_ary); - $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' - WHERE user_type NOT IN (' . USER_INACTIVE . ')'; - $result = $db->sql_query($sql); - - while ($user_row = $db->sql_fetchrow($result)) + if (!sizeof($forum_ary)) { - $user_id = (int) $user_row['user_id']; - - $sql = 'SELECT COUNT(p.post_id) AS num_posts - FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f - WHERE p.poster_id = ' . $user_id . " - AND f.forum_id = p.forum_id - $post_count_sql"; - $result2 = $db->sql_query($sql); - $num_real_posts = (int) $db->sql_fetchfield('num_posts', 0, $result2); - $db->sql_freeresult($result2); - - $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = $num_real_posts WHERE user_id = $user_id"); + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0'); + } + else + { + $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id + FROM ' . POSTS_TABLE . ' + WHERE poster_id <> ' . ANONYMOUS . ' + AND forum_id IN (' . implode(', ', $forum_ary) . ') + GROUP BY poster_id'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); + } + $db->sql_freeresult($result); } - $db->sql_freeresult($result); - add_log('admin', 'LOG_RESYNC_USER'); + add_log('admin', 'LOG_RESYNC_POSTCOUNTS'); break; case 'date': @@ -333,7 +325,7 @@ elseif ($pane == 'right') trigger_error($user->lang['NO_ADMIN']); } - set_config('board_startdate', time() - 1, true); + set_config('board_startdate', time() - 1); add_log('admin', 'LOG_RESET_DATE'); break; } @@ -537,9 +529,8 @@ elseif ($pane == 'right') <td class="row2"> </td> </tr> <tr> - <td class="cat" colspan="4" align="right"><select name="action"><option value="online"><?php echo $user->lang['RESET_ONLINE']; ?></option><option value="date"><?php echo $user->lang['RESET_DATE']; ?></option><option value="stats"><?php echo $user->lang['RESYNC_STATS']; ?></option> - <!-- option value="user"><?php echo $user->lang['RESYNC_USER_POSTS']; ?></option --> - </select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td> + <td class="cat" colspan="4" align="right"><select name="action"><option value="online"><?php echo $user->lang['RESET_ONLINE']; ?></option><option value="date"><?php echo $user->lang['RESET_DATE']; ?></option><option value="stats"><?php echo $user->lang['RESYNC_STATS']; ?></option><option value="user"><?php echo $user->lang['RESYNC_POSTCOUNTS']; ?></option> + </select> <input class="btnlite" type="submit" name="submit" value="<?php echo $user->lang['SUBMIT']; ?>" /> </td> </tr> </table></form> diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php index 7b1b6e5f78..3567ec32a0 100644 --- a/phpBB/adm/pagestart.php +++ b/phpBB/adm/pagestart.php @@ -1,21 +1,20 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : pagestart.php -// STARTED : Thu Aug 2, 2001 -// COPYRIGHT : © 2001, 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ if (!defined('IN_PHPBB')) { exit; } +/** +*/ define('NEED_SID', true); define('IN_ADMIN', true); require($phpbb_root_path . 'common.'.$phpEx); @@ -324,7 +323,10 @@ function build_cfg_template($tpl_type, $config_key, $options = '') } -// General ACP module class +/** +* @package acp +* General ACP module class +*/ class module { var $id = 0; |