diff options
110 files changed, 2289 insertions, 1954 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; diff --git a/phpBB/common.php b/phpBB/common.php index 9d2d8eb7bd..17a2ca10a1 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -1,15 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : common.php -// STARTED : Sat Feb 17, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // Remove the following line to enable this software, be sure you note what it // says before continuing diff --git a/phpBB/download.php b/phpBB/download.php index bfe7c9fa04..4de5aebf1a 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : download.php -// STARTED : Thu Apr 10, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); @@ -144,10 +143,9 @@ else } -// --------- -// FUNCTIONS -// - +/** +* Send file to browser +*/ function send_file_to_browser($attachment, $upload_dir, $category) { global $user, $db, $config, $phpbb_root_path; @@ -177,27 +175,27 @@ function send_file_to_browser($attachment, $upload_dir, $category) { $browser_version = $log_version[1]; $browser_agent = 'omniweb'; - } + } else if (ereg('(Konqueror/)(.*)(;)', $user_agent, $log_version)) { $browser_version = $log_version[2]; $browser_agent = 'konqueror'; - } + } else if (ereg('Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version) && ereg('Safari/([0-9]*)', $user_agent, $log_version2)) { $browser_version = $log_version[1] . '.' . $log_version2[1]; $browser_agent = 'safari'; - } + } else if (ereg('Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version)) { $browser_version = $log_version[1]; $browser_agent = 'mozilla'; - } + } else { $browser_version = 0; $browser_agent = 'other'; - } + } // Correct the mime type - we force application/octetstream for all files, except images // Please do not change this, it is a security precaution @@ -236,6 +234,9 @@ function send_file_to_browser($attachment, $upload_dir, $category) exit; } +/** +* Check if downloading item is allowed +*/ function download_allowed() { global $config, $user, $db; @@ -330,8 +331,4 @@ function download_allowed() return $allowed; } -// -// FUNCTIONS -// --------- - ?>
\ No newline at end of file diff --git a/phpBB/faq.php b/phpBB/faq.php index d1317663f5..fe54ab3384 100644 --- a/phpBB/faq.php +++ b/phpBB/faq.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : faq.php -// STARTED : Mon Jul 8, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/includes/acm/acm_db.php b/phpBB/includes/acm/acm_db.php index ed57e7605a..4b0cf6486c 100644 --- a/phpBB/includes/acm/acm_db.php +++ b/phpBB/includes/acm/acm_db.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : acm_db.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acm_db +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acm_db +* ACM Database Caching +*/ class acm { // Contains all loaded variables diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 60b81cb28b..17dc484cb6 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : acm_file.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package acm_file +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acm_file +* ACM File Based Caching +*/ class acm { var $vars = array(); diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php index 3a9fa90cd9..fdd5d9e8fa 100644 --- a/phpBB/includes/auth/auth_apache.php +++ b/phpBB/includes/auth/auth_apache.php @@ -1,16 +1,26 @@ <?php +/** +* Apache auth plug-in for phpBB3 +* +* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. +* +* This is for initial authentication via Apaches basic realm authentication methods, +* user data is then obtained from the integrated user table +* +* You can do any kind of checking you like here ... the return data format is +* either the resulting row of user information, an integer zero (indicating an +* inactive user) or some error string +* +* @package login +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// Apache auth plug-in for phpBB 2.2 -// $Id$ -// -// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. -// -// This is for initial authentication via Apaches basic realm authentication methods, -// user data is then obtained from the integrated user table -// -// You can do any kind of checking you like here ... the return data format is -// either the resulting row of user information, an integer zero (indicating an -// inactive user) or some error string +/** +* Login function +*/ function login_apache(&$username, &$password) { global $db; diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 998565ede5..925beb1645 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -1,15 +1,25 @@ <?php +/** +* Database auth plug-in for phpBB3 +* +* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. +* +* This is for authentication via the integrated user table +* +* You can do any kind of checking you like here ... the return data format is +* either the resulting row of user information, an integer zero (indicating an +* inactive user) or some error string +* +* @package login +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// Database auth plug-in for phpBB 2.2 -// $Id$ -// -// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. -// -// This is for authentication via the integrated user table -// -// You can do any kind of checking you like here ... the return data format is -// either the resulting row of user information, an integer zero (indicating an -// inactive user) or some error string +/** +* Login function +*/ function login_db(&$username, &$password) { global $db, $config; diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php index 13b3d2b0b1..a7c229932b 100644 --- a/phpBB/includes/auth/auth_ldap.php +++ b/phpBB/includes/auth/auth_ldap.php @@ -1,16 +1,27 @@ <?php - -// LDAP auth plug-in for phpBB 2.2 -// $Id$ -// -// Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. -// -// This is for initial authentication via an LDAP server, user information is then -// obtained from the integrated user table -// -// You can do any kind of checking you like here ... the return data format is -// either the resulting row of user information, an integer zero (indicating an -// inactive user) or some error string +/** +* +* LDAP auth plug-in for phpBB3 +* +* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. +* +* This is for initial authentication via an LDAP server, user information is then +* obtained from the integrated user table +* +* You can do any kind of checking you like here ... the return data format is +* either the resulting row of user information, an integer zero (indicating an +* inactive user) or some error string +* +* @package login +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Login function +*/ function login_ldap(&$username, &$password) { global $db, $config; @@ -52,8 +63,10 @@ function login_ldap(&$username, &$password) return false; } -// This function is used to output any required fields in the authentication -// admin panel. It also defines any required configuration table fields. +/** +* This function is used to output any required fields in the authentication +* admin panel. It also defines any required configuration table fields. +*/ function admin_ldap(&$new) { global $user; @@ -78,11 +91,13 @@ function admin_ldap(&$new) } -// Would be nice to allow syncing of 'appropriate' data when user updates -// their username, password, etc. ... should be up to the plugin what data -// is updated. -// -// $mode perhaps being one of NEW, UPDATE, DELETE +/** +* Would be nice to allow syncing of 'appropriate' data when user updates +* their username, password, etc. ... should be up to the plugin what data +* is updated. +* +* @param new|update|delete $mode defining the action to take on user updates +*/ function usercp_ldap($mode) { global $db, $config; diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 40d477cfec..b559800b65 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -1,19 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : bbcode.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// BBCODE - able to be used standalone -// - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* BBCode class +*/ class bbcode { var $bbcode_uid = ''; diff --git a/phpBB/includes/db/db2.php b/phpBB/includes/db/db2.php index da471841c1..2262210e15 100644 --- a/phpBB/includes/db/db2.php +++ b/phpBB/includes/db/db2.php @@ -1,29 +1,25 @@ <?php -/*************************************************************************** - * db2.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 dbal_db2 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if(!defined("SQL_LAYER")) { define("SQL_LAYER","db2"); +/** +* @package dbal_db2 +* DB2 Database Abstraction Layer +*/ class sql_db { diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index a31a7c3716..526dc70f5b 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -1,21 +1,26 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : firebird.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package dbal_firebird +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('SQL_LAYER')) { define('SQL_LAYER', 'firebird'); +/** +* @package dbal_firebird +* Firebird/Interbase Database Abstraction Layer +* Minimum Requirement is Firebird 1.5+/Interbase 7.1+ +*/ class sql_db { var $db_connect_id; diff --git a/phpBB/includes/db/mssql-odbc.php b/phpBB/includes/db/mssql-odbc.php index 847ae1d7a5..a0a6125aa3 100644 --- a/phpBB/includes/db/mssql-odbc.php +++ b/phpBB/includes/db/mssql-odbc.php @@ -1,21 +1,26 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mssql-odbc.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package dbal_odbc_mssql +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('SQL_LAYER')) { define('SQL_LAYER', 'mssql-odbc'); +/** +* @package dbal_odbc_mssql +* MSSQL ODBC Database Abstraction Layer for MSSQL +* Minimum Requirement is Version 2000+ +*/ class sql_db { var $db_connect_id; diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index efb0d9c833..f68a904ce8 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -1,29 +1,26 @@ <?php -/*************************************************************************** - * mssql.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : supportphpbb.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 dbal_mssql +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined("SQL_LAYER")) { define("SQL_LAYER","mssql"); +/** +* @package dbal_mssql +* MSSQL Database Abstraction Layer +* Minimum Requirement is MSSQL 2000+ +*/ class sql_db { diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index e1780eb5e7..14778a7e66 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -1,21 +1,26 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mysql.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package dbal_mysql +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('SQL_LAYER')) { define('SQL_LAYER', 'mysql'); +/** +* @package dbal_mysql +* MySQL Database Abstraction Layer +* Minimum Requirement is 3.23+/4.0+/4.1+ +*/ class sql_db { var $db_connect_id; diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php index 5cf2757b60..ac5b9552fc 100644 --- a/phpBB/includes/db/mysql4.php +++ b/phpBB/includes/db/mysql4.php @@ -1,21 +1,28 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mysql4.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package dbal_mysql4 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('SQL_LAYER')) { define('SQL_LAYER', 'mysql4'); +/** +* @package dbal_mysql4 +* MySQL4 Database Abstraction Layer +* Minimum Requirement is MySQL 4.1+ +* +* @todo Rename mysql4.php to mysqli.php to reflect the used module +*/ class sql_db { var $db_connect_id; diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 3319bca4ec..145afc7e71 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -1,29 +1,25 @@ <?php -/*************************************************************************** - * oracle.php - * ------------------- - * begin : Thrusday Feb 15, 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 dbal_oracle +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ +/** +* @ignore +*/ if(!defined("SQL_LAYER")) { define("SQL_LAYER","oracle"); +/** +* @package dbal_oracle +* Oracle Database Abstraction Layer +*/ class sql_db { diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index 61994a4a32..bd0c52ec54 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -1,29 +1,26 @@ <?php - /*************************************************************************** - * postgres7.php - * ------------------- - * begin : Saturday, Feb 13, 2001 - * copyright : (C) 2001 The phpBB Group - * email : supportphpbb.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 dbal_postgres +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined("SQL_LAYER")) { define("SQL_LAYER","postgresql"); +/** +* @package dbal_postgres +* PostgreSQL Database Abstraction Layer +* Minimum Requirement is Version 7.3+ +*/ class sql_db { diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index f28e0da69b..abeee3a358 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -1,29 +1,25 @@ <?php -/*************************************************************************** - * mysql.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 dbal_sqlite +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('SQL_LAYER')) { define('SQL_LAYER', 'sqlite'); +/** +* @package dbal_sqlite +* Sqlite Database Abstraction Layer +*/ class sql_db { var $db_connect_id; diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d4c4dee883..0e08133c23 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1,17 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001,2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Set variable, used by {@link request_var the request_var function} +*/ function set_var(&$result, $var, $type, $multibyte = false) { settype($var, $type); @@ -29,6 +28,11 @@ function set_var(&$result, $var, $type, $multibyte = false) } } +/** +* request_var +* +* Used to get passed variable +*/ function request_var($var_name, $default, $multibyte = false) { if (!isset($_REQUEST[$var_name])) @@ -66,6 +70,9 @@ function request_var($var_name, $default, $multibyte = false) } } +/** +* Set config value. Creates missing config entry. +*/ function set_config($config_name, $config_value, $is_dynamic = false) { global $db, $cache, $config; @@ -92,7 +99,9 @@ function set_config($config_name, $config_value, $is_dynamic = false) } } -// Generates an alphanumeric random string of given length +/** +* Generates an alphanumeric random string of given length +*/ function gen_rand_string($num_chars) { $chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9'); @@ -110,6 +119,10 @@ function gen_rand_string($num_chars) return $rand_str; } +/** +* Get userdata +* @param mixed $user user id or username +*/ function get_userdata($user) { global $db; @@ -123,7 +136,9 @@ function get_userdata($user) return ($row = $db->sql_fetchrow($result)) ? $row : false; } -// Create forum rules for given forum +/** +* Create forum rules for given forum +*/ function generate_forum_rules(&$forum_data) { if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link']) @@ -152,8 +167,10 @@ function generate_forum_rules(&$forum_data) ); } -// Create forum navigation links for given forum, create parent -// list if currently null, assign basic forum info to template +/** +* Create forum navigation links for given forum, create parent +* list if currently null, assign basic forum info to template +*/ function generate_forum_nav(&$forum_data) { global $db, $user, $template, $phpEx, $SID, $phpbb_root_path; @@ -194,7 +211,9 @@ function generate_forum_nav(&$forum_data) return; } -// Returns forum parents as an array. Get them from forum_data if available, or update the database otherwise +/** +* Returns forum parents as an array. Get them from forum_data if available, or update the database otherwise +*/ function get_forum_parents(&$forum_data) { global $db; @@ -234,7 +253,9 @@ function get_forum_parents(&$forum_data) return $forum_parents; } -// Obtain list of moderators of each forum +/** +* Obtain list of moderators of each forum +*/ function get_moderators(&$forum_moderators, $forum_id = false) { global $config, $template, $db, $phpEx, $SID; @@ -270,7 +291,9 @@ function get_moderators(&$forum_moderators, $forum_id = false) return; } -// User authorisation levels output +/** +* User authorisation levels output +*/ function gen_forum_auth_level($mode, $forum_id) { global $SID, $template, $auth, $user; @@ -291,6 +314,9 @@ function gen_forum_auth_level($mode, $forum_id) return; } +/** +* Generate sort selection fields +*/ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param) { global $user; @@ -326,6 +352,9 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, return; } +/** +* Generate Jumpbox +*/ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false) { global $config, $auth, $template, $user, $db, $phpEx, $SID; @@ -419,7 +448,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list return; } -// Pick a language, any language ... +/** +* Pick a language, any language ... +*/ function language_select($default = '') { global $db; @@ -440,7 +471,9 @@ function language_select($default = '') return $lang_options; } -// Pick a template/theme combo, +/** +* Pick a template/theme combo, +*/ function style_select($default = '', $all = false) { global $db; @@ -463,7 +496,9 @@ function style_select($default = '', $all = false) return $style_options; } -// Pick a timezone +/** +* Pick a timezone +*/ function tz_select($default = '') { global $sys_timezone, $user; @@ -481,7 +516,9 @@ function tz_select($default = '') return $tz_select; } -// Topic and forum watching common code +/** +* Topic and forum watching common code +*/ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id, $notify_status = 'unset', $start = 0) { global $template, $db, $user, $phpEx, $SID, $start, $phpbb_root_path; @@ -586,7 +623,9 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat return; } -// Marks a topic or form as read +/** +* Marks a topic or form as read +*/ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false) { global $config, $db, $user; @@ -759,10 +798,11 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false) } } - -// Pagination routine, generates page number sequence -// tpl_prefix is for using different pagination blocks at one page -function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = true, $tpl_prefix = '') +/** +* Pagination routine, generates page number sequence +* tpl_prefix is for using different pagination blocks at one page +*/ +function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '') { global $template, $user; @@ -813,6 +853,19 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add $page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . '&start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>'; + if ($add_prevnext_text) + { + if ($on_page != 1) + { + $page_string = '<a href="' . $base_url . '&start=' . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a> ' . $page_string; + } + + if ($on_page != $total_pages) + { + $page_string .= ' <a href="' . $base_url . '&start=' . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>'; + } + } + $template->assign_vars(array( $tpl_prefix . 'BASE_URL' => $base_url, $tpl_prefix . 'PER_PAGE' => $per_page, @@ -824,6 +877,9 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add return $page_string; } +/** +* Return current page (pagination) +*/ function on_page($num_items, $per_page, $start) { global $template, $user; @@ -835,9 +891,10 @@ function on_page($num_items, $per_page, $start) return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1)); } -// Obtain list of naughty words and build preg style replacement arrays for use by the -// calling script, note that the vars are passed as references this just makes it easier -// to return both sets of arrays +/** +* Obtain list of naughty words and build preg style replacement arrays for use by the +* calling script +*/ function obtain_word_list(&$censors) { global $db, $cache, $user; @@ -871,7 +928,9 @@ function obtain_word_list(&$censors) return true; } -// Obtain currently listed icons, re-caching if necessary +/** +* Obtain currently listed icons +*/ function obtain_icons(&$icons) { global $db, $cache; @@ -904,7 +963,9 @@ function obtain_icons(&$icons) return; } -// Obtain ranks +/** +* Obtain ranks +*/ function obtain_ranks(&$ranks) { global $db, $cache; @@ -945,7 +1006,9 @@ function obtain_ranks(&$ranks) } } -// Obtain allowed extensions +/** +* Obtain allowed extensions +*/ function obtain_attach_extensions(&$extensions, $forum_id = false) { global $db, $cache; @@ -1025,6 +1088,9 @@ function obtain_attach_extensions(&$extensions, $forum_id = false) return; } +/** +* Generate board url +*/ function generate_board_url() { global $config; @@ -1034,7 +1100,9 @@ function generate_board_url() return (($config['cookie_secure']) ? 'https://' : 'http://') . preg_replace('#^/?(.*?)/?$#', '\1', trim($config['server_name'])) . (($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '') . (($path) ? '/' . $path : ''); } -// Redirects the user to another page then exits the script nicely +/** +* Redirects the user to another page then exits the script nicely +*/ function redirect($url) { global $db, $cache, $config, $user; @@ -1072,7 +1140,9 @@ function redirect($url) exit; } -// Meta refresh assignment +/** +* Meta refresh assignment +*/ function meta_refresh($time, $url) { global $template; @@ -1082,7 +1152,9 @@ function meta_refresh($time, $url) ); } -// Build Confirm box +/** +* Build Confirm box +*/ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html') { global $user, $template, $db; @@ -1159,10 +1231,12 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo page_footer(); } -// Generate login box or verify password +/** +* Generate login box or verify password +*/ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { - global $SID, $db, $user, $template, $auth, $phpEx, $phpbb_root_path; + global $SID, $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config; $err = ''; @@ -1177,6 +1251,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa // If authentication is successful we redirect user to previous page if (($result = $auth->login($username, $password, $autologin, $viewonline, $admin)) === true) { + // If admin authentication + if ($admin) + { + add_log('admin', 'LOG_ADMIN_AUTH_SUCCESS'); + } + $redirect = request_var('redirect', "index.$phpEx$SID"); meta_refresh(3, $redirect); @@ -1184,6 +1264,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa trigger_error($message); } + if ($admin) + { + add_log('admin', 'LOG_ADMIN_AUTH_FAIL'); + } + // If we get a non-numeric (e.g. string) value we output an error if (is_string($result)) { @@ -1191,7 +1276,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa } // If we get an integer zero then we are inactive, else the username/password is wrong - $err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR']; + $err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR']; } if (!$redirect) @@ -1216,9 +1301,10 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $l_explain, - 'U_SEND_PASSWORD' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=sendpassword", - 'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=terms", - 'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=privacy", + 'U_SEND_PASSWORD' => ($config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=sendpassword" : '', + 'U_RESEND_ACTIVATION' => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=resend_act" : '', + 'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=terms", + 'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=privacy", 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, 'S_LOGIN_ACTION' => (!$admin) ? "{$phpbb_root_path}ucp.$phpEx$SID&mode=login" : "index.$phpEx$SID", @@ -1235,7 +1321,9 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa page_footer(); } -// Generate forum login box +/** +* Generate forum login box +*/ function login_forum_box(&$forum_data) { global $db, $config, $user, $template, $phpEx; @@ -1297,7 +1385,9 @@ function login_forum_box(&$forum_data) page_footer(); } -// Bump Topic Check - used by posting and viewtopic +/** +* Bump Topic Check - used by posting and viewtopic +*/ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster) { global $config, $auth, $user; @@ -1327,7 +1417,9 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po return $bump_time; } -// Censoring +/** +* Censoring +*/ function censor_text($text) { global $censors, $user; @@ -1336,7 +1428,7 @@ function censor_text($text) { $censors = array(); - // For ANONYMOUS, this option should be enabled by default + // TODO: For ANONYMOUS, this option should be enabled by default if ($user->optionget('viewcensors')) { obtain_word_list($censors); @@ -1351,7 +1443,9 @@ function censor_text($text) return $text; } -// Smiley processing +/** +* Smiley processing +*/ function smiley_text($text, $force_option = false) { global $config, $user, $phpbb_root_path; @@ -1359,7 +1453,9 @@ function smiley_text($text, $force_option = false) return ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $text) : str_replace('<img src="{SMILIES_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $text); } -// Inline Attachment processing +/** +* Inline Attachment processing +*/ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_id = 0, $preview = false) { global $config, $user; @@ -1391,7 +1487,9 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_ return array_unique($unset_tpl); } -// Check if extension is allowed to be posted within forum X (forum_id 0 == private messaging) +/** +* Check if extension is allowed to be posted within forum X (forum_id 0 == private messaging) +*/ function extension_allowed($forum_id, $extension, &$extensions) { if (!sizeof($extensions)) @@ -1425,7 +1523,9 @@ function extension_allowed($forum_id, $extension, &$extensions) return false; } -// Error and message handler, call with trigger_error if reqd +/** +* Error and message handler, call with trigger_error if reqd +*/ function msg_handler($errno, $msg_text, $errfile, $errline) { global $cache, $db, $auth, $template, $config, $user; @@ -1515,21 +1615,12 @@ function msg_handler($errno, $msg_text, $errfile, $errline) } exit; break; - -/* remove me - default: - if (defined('DEBUG_EXTRA')) - { - if (!strstr($errfile, '/cache/')) - { - echo "<b>Another Error</b>: in file <b>$errfile</b> on line <b>$errline</b>: <b>$msg_text</b><br>"; - } - } - break;*/ } } -// +/** +* Generate page header +*/ function page_header($page_title = '') { global $db, $config, $template, $SID, $user, $auth, $phpEx, $phpbb_root_path; @@ -1823,6 +1914,9 @@ function page_header($page_title = '') return; } +/** +* Generate page footer +*/ function page_footer() { global $db, $config, $template, $SID, $user, $auth, $cache, $messenger, $starttime, $phpbb_root_path, $phpEx; @@ -1878,4 +1972,4 @@ function page_footer() exit; } -?> +?>
\ No newline at end of file diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 57643c8b98..48ada3b9fc 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -1,39 +1,41 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_admin.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001,2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// Simple version of jumpbox, just lists authed forums +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Simple version of jumpbox, just lists authed forums +*/ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true) { global $db, $user, $auth; $acl = ($ignore_acl) ? '' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'); - $rowset = get_forum_list($acl, false, $ignore_nonpost, true); - $right = $cat_right = 0; - $forum_list = $padding = $holding = ''; + // This query is identical to the jumpbox one + $sql = 'SELECT forum_id, parent_id, forum_name, forum_type, left_id, right_id + FROM ' . FORUMS_TABLE . ' + ORDER BY left_id ASC'; + $result = $db->sql_query($sql); + + $right = $iteration = 0; $padding_store = array('0' => ''); + $forum_list = $padding = ''; - foreach ($rowset as $row) - { - if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || - $row['forum_id'] == $ignore_id) - { - continue; - } + // Sometimes it could happen that forums will be displayed here not be displayed within the index page + // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions. + // If this happens, the padding could be "broken" + while ($row = $db->sql_fetchrow($result)) + { if ($row['left_id'] < $right) { - $padding .= ' '; + $padding .= ' '; $padding_store[$row['parent_id']] = $padding; } else if ($row['left_id'] > $right + 1) @@ -43,35 +45,41 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = $right = $row['right_id']; - $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : ''); - - if ($row['left_id'] > $cat_right) + if ($acl && !$auth->acl_gets($acl, $row['forum_id'])) { - $holding = ''; + continue; } - if ($row['right_id'] - $row['left_id'] > 1 && $ignore_emptycat) + if ((is_array($ignore_id) && in_array($row['forum_id'], $ignore_id)) || $row['forum_id'] == $ignore_id) { - $cat_right = max($cat_right, $row['right_id']); + continue; + } - $holding .= '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>'; + if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']) && $ignore_emptycat) + { + // Non-postable forum with no subforums, don't display + continue; } - else + + if ($row['forum_type'] != FORUM_POST && $ignore_nonpost) { - $forum_list .= $holding . '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>'; - $holding = ''; + continue; } - } - if (!$right) - { - $forum_list .= '<option value="-1">' . $user->lang['NO_FORUMS'] . '</option>'; + $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? ' selected="selected"' : '') : (($row['forum_id'] == $select_id) ? ' selected="selected"' : ''); + + $forum_list .= '<option value="' . $row['forum_id'] . '"' . $selected . '>' . $padding . $row['forum_name'] . '</option>'; + + $iteration++; } + unset($padding_store); return $forum_list; } -// Generate size select form +/** +* Generate size select form +*/ function size_select($select_name, $size_compare) { global $user; @@ -92,7 +100,9 @@ function size_select($select_name, $size_compare) return ($select_field); } -// Obtain authed forums list +/** +* Obtain authed forums list +*/ function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only = FALSE, $no_cache = FALSE) { global $db, $auth; @@ -131,6 +141,9 @@ function get_forum_list($acl_list = 'f_list', $id_only = TRUE, $postable_only = return $rowset; } +/** +* Get forum branch +*/ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $include_forum = TRUE) { global $db; @@ -172,6 +185,9 @@ function get_forum_branch($forum_id, $type = 'all', $order = 'descending', $incl return $rows; } +/** +* Get physical file listing +*/ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png') { $matches = array(); @@ -206,7 +222,9 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png') return $matches; } -// Posts and topics manipulation +/* +* Move topic(s) +*/ function move_topics($topic_ids, $forum_id, $auto_sync = true) { global $db; @@ -250,6 +268,9 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true) } } +/** +* Move post(s) +*/ function move_posts($post_ids, $topic_id, $auto_sync = true) { global $db; @@ -309,6 +330,9 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) } } +/** +* Remove topic(s) +*/ function delete_topics($where_type, $where_ids, $auto_sync = TRUE) { global $db; @@ -377,6 +401,9 @@ function delete_topics($where_type, $where_ids, $auto_sync = TRUE) return $return; } +/** +* Remove post(s) +*/ function delete_posts($where_type, $where_ids, $auto_sync = TRUE) { global $db; @@ -436,10 +463,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = TRUE) return sizeof($post_ids); } -// Delete Attachments -// mode => (post, topic, attach, user) -// ids => (post_ids, topic_ids, attach_ids, user_ids) -// resync => set this to false if you are deleting posts or topics... +/** +* Delete Attachments +* mode => (post, topic, attach, user) +* ids => (post_ids, topic_ids, attach_ids, user_ids) +* resync => set this to false if you are deleting posts or topics... +*/ function delete_attachments($mode, $ids, $resync = TRUE) { global $db, $config; @@ -628,6 +657,9 @@ function delete_attachments($mode, $ids, $resync = TRUE) return $num_deleted; } +/** +* Remove topic shadows +*/ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE) { $where = (is_array($forum_id)) ? 'AND t.forum_id IN (' . implode(', ', $forum_id) . ')' : (($forum_id) ? "AND t.forum_id = $forum_id" : ''); @@ -672,7 +704,9 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = TRUE) } } -// Delete File +/** +* Delete File +*/ function phpbb_unlink($filename, $mode = 'file') { global $config, $user, $phpbb_root_path; @@ -681,22 +715,23 @@ function phpbb_unlink($filename, $mode = 'file') return @unlink($filename); } -// All-encompasing sync function -// -// Usage: -// sync('topic', 'topic_id', 123); <= resync topic #123 -// sync('topic', 'forum_id', array(2, 3)); <= resync topics from forum #2 and #3 -// sync('topic'); <= resync all topics -// sync('topic', 'range', 'topic_id BETWEEN 1 AND 60'); <= resync a range of topics/forums (only available for 'topic' and 'forum' modes) -// -// Modes: -// - topic_moved Removes topic shadows that would be in the same forum as the topic they link to -// - topic_approved Resyncs the topic_approved flag according to the status of the first post -// - post_reported Resyncs the post_reported flag, relying on actual reports -// - topic_reported Resyncs the topic_reported flag, relying on post_reported flags -// - post_attachement Same as post_reported, thanks to a quick Search/Replace -// - topic_attachement Same as topic_reported, thanks to a quick Search/Replace -// +/** +* All-encompasing sync function +* +* Usage: +* sync('topic', 'topic_id', 123); <= resync topic #123 +* sync('topic', 'forum_id', array(2, 3)); <= resync topics from forum #2 and #3 +* sync('topic'); <= resync all topics +* sync('topic', 'range', 'topic_id BETWEEN 1 AND 60'); <= resync a range of topics/forums (only available for 'topic' and 'forum' modes) +* +* Modes: +* - topic_moved Removes topic shadows that would be in the same forum as the topic they link to +* - topic_approved Resyncs the topic_approved flag according to the status of the first post +* - post_reported Resyncs the post_reported flag, relying on actual reports +* - topic_reported Resyncs the topic_reported flag, relying on post_reported flags +* - post_attachement Same as post_reported, thanks to a quick Search/Replace +* - topic_attachement Same as topic_reported, thanks to a quick Search/Replace +*/ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, $sync_extra = FALSE) { global $db; @@ -1346,7 +1381,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, } } - +/** +* Prune function +*/ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true) { global $db; @@ -1408,7 +1445,9 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync return delete_topics('topic_id', $topic_list, $auto_sync); } -// Function auto_prune(), this function now relies on passed vars +/** +* Function auto_prune(), this function now relies on passed vars +*/ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq) { global $db; @@ -1437,8 +1476,10 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr return; } -// remove_comments will strip the sql comment lines out of an uploaded sql file -// specifically for mssql and postgres type files in the install.... +/** +* remove_comments will strip the sql comment lines out of an uploaded sql file +* specifically for mssql and postgres type files in the install.... +*/ function remove_comments(&$output) { $lines = explode("\n", $output); @@ -1470,14 +1511,18 @@ function remove_comments(&$output) return $output; } -// remove_remarks will strip the sql comment lines out of an uploaded sql file +/** +* remove_remarks will strip the sql comment lines out of an uploaded sql file +*/ function remove_remarks(&$sql) { $sql = preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql)); } -// split_sql_file will split an uploaded sql file into single sql statements. -// Note: expects trim() to have already been run on $sql. +/** +* split_sql_file will split an uploaded sql file into single sql statements. +* Note: expects trim() to have already been run on $sql. +*/ function split_sql_file($sql, $delimiter) { // Split up our string into "possible" SQL statements. @@ -1565,8 +1610,10 @@ function split_sql_file($sql, $delimiter) return $output; } -// Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username -// and group names must be carried through for the moderators table +/** +* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username +* and group names must be carried through for the moderators table +*/ function cache_moderators() { global $db, $cache; @@ -1657,7 +1704,9 @@ function cache_moderators() } } -// Logging functions +/** +* Add log event +*/ function add_log() { global $db, $user; @@ -1701,6 +1750,9 @@ function add_log() return; } +/** +* View log +*/ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC') { global $db, $user, $auth, $phpEx, $SID; @@ -1773,13 +1825,13 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id $log[$i]['topic_id'] = $row['topic_id']; $log[$i]['viewforum'] = ($row['forum_id'] && $auth->acl_get('f_read', $row['forum_id'])) ? ((defined('IN_ADMIN')) ? '../' : '') . "viewforum.$phpEx$SID&f=" . $row['forum_id'] : ''; - $log[$i]['action'] = (!empty($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation'])); + $log[$i]['action'] = (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}'; if (!empty($row['log_data'])) { $log_data_ary = unserialize(stripslashes($row['log_data'])); - if (!empty($user->lang[$row['log_operation']])) + if (isset($user->lang[$row['log_operation']])) { foreach ($log_data_ary as $log_data) { @@ -1790,7 +1842,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id } else { - $log[$i]['action'] = implode('', $log_data_ary); + $log[$i]['action'] .= '<br />' . implode('', $log_data_ary); } } @@ -1846,9 +1898,12 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id return; } -// Extension of auth class for changing permissions if (class_exists('auth')) { + /** + * @package phpBB3 + * Extension of auth class for changing permissions + */ class auth_admin extends auth { // Set a user or group ACL record @@ -2115,8 +2170,10 @@ if (class_exists('auth')) } } -// Update Post Informations (First/Last Post in topic/forum) -// Should be used instead of sync() if only the last post informations are out of sync... faster +/** +* Update Post Informations (First/Last Post in topic/forum) +* Should be used instead of sync() if only the last post informations are out of sync... faster +*/ function update_post_information($type, $ids) { global $db; diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 5c55fda67c..b159adf53d 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -1,16 +1,17 @@ -<? -// ------------------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_compress.php -// STARTED : Sat Jul 19 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------------------- - +<?php +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Class for handling archives (compression/decompression) +*/ class compress { var $fp = 0; @@ -104,13 +105,17 @@ class compress } } -// Zip creation class from phpMyAdmin 2.3.0 © Tobias Ratschiller, Olivier Müller, Loïc Chapeaux, -// Marc Delisle, http://www.phpmyadmin.net/ -// -// Modified extensively by psoTFX, © phpBB Group, 2003 -// -// Based on work by Eric Mueller and Denis125 -// Official ZIP file format: http://www.pkware.com/appnote.txt +/** +* @package phpBB3 +* +* Zip creation class from phpMyAdmin 2.3.0 © Tobias Ratschiller, Olivier Müller, Loïc Chapeaux, +* Marc Delisle, http://www.phpmyadmin.net/ +* +* Modified extensively by psoTFX, © phpBB Group, 2003 +* +* Based on work by Eric Mueller and Denis125 +* Official ZIP file format: http://www.pkware.com/appnote.txt +*/ class compress_zip extends compress { var $datasec = array(); @@ -394,8 +399,12 @@ class compress_zip extends compress } } -// Tar/tar.gz compression routine -// Header/checksum creation derived from tarfile.pl, © Tom Horsley, 1994 +/** +* @package phpBB3 +* +* Tar/tar.gz compression routine +* Header/checksum creation derived from tarfile.pl, © Tom Horsley, 1994 +*/ class compress_tar extends compress { var $isgz = false; diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index e9cc61b5a6..3d5f7c3391 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1,16 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_display.php -// STARTED : Thu Nov 07, 2002 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ +/** +* Display Forums +*/ function display_forums($root_data = '', $display_moderators = TRUE) { global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators, $phpbb_root_path; @@ -335,6 +335,9 @@ function display_forums($root_data = '', $display_moderators = TRUE) return $active_forum_ary; } +/** +* Get topic author +*/ function topic_topic_author(&$topic_row) { global $phpEx, $SID, $phpbb_root_path, $user; @@ -346,6 +349,9 @@ function topic_topic_author(&$topic_row) return $topic_author; } +/** +* Generate topic pagination +*/ function topic_generate_pagination($replies, $url) { global $config, $user; @@ -380,6 +386,9 @@ function topic_generate_pagination($replies, $url) return $pagination; } +/** +* Generate topic status +*/ function topic_status(&$topic_row, $replies, $mark_time_topic, $mark_time_forum, &$folder_img, &$folder_alt, &$topic_type) { global $user, $config; @@ -472,7 +481,9 @@ function topic_status(&$topic_row, $replies, $mark_time_topic, $mark_time_forum, return $unread_topic; } -// Display Attachments +/** +* Display Attachments +*/ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_count, $force_physical = false, $return = false) { global $extensions, $template, $cache, $attachment_tpl; diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php index e0425289f2..dad000c088 100644 --- a/phpBB/includes/functions_jabber.php +++ b/phpBB/includes/functions_jabber.php @@ -1,33 +1,30 @@ <?php -/*************************************************************************** - - Class.Jabber.PHP v0.4 - (c) 2002 Carlo "Gossip" Zottmann - http://phpjabber.g-blog.net *** gossip@jabber.g-blog.net - - The FULL documentation and examples for this software can be found at - http://phpjabber.g-blog.net (not many doc comments in here, sorry) - - last modified: 27.04.2003 13:01:53 CET - - ***************************************************************************/ - -/* - Modified by psoTFX, phpBB Group, 2003. - Removed functions/support not critical to integration with phpBB - - $Id$ +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* */ -/*************************************************************************** - * - * 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 phpBB3 +* +* Class.Jabber.PHP v0.4 +* (c) 2002 Carlo "Gossip" Zottmann +* http://phpjabber.g-blog.net *** gossip@jabber.g-blog.net +* +* The FULL documentation and examples for this software can be found at +* http://phpjabber.g-blog.net (not many doc comments in here, sorry) +* +* last modified: 27.04.2003 13:01:53 CET +* +* +* Modified by psoTFX, phpBB Group, 2003. +* Removed functions/support not critical to integration with phpBB +* +*/ class Jabber { var $server; @@ -938,7 +935,10 @@ class Jabber } } -// +/** +* @package phpBB3 +* MakeXML +*/ class MakeXML extends Jabber { var $nodes; @@ -1038,7 +1038,10 @@ class MakeXML extends Jabber } } -// +/** +* @package phpBB3 +* Connector +*/ class CJP_StandardConnector { var $active_socket; diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 3dfc5897aa..1e731fecff 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_messenger.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Messenger +*/ class messenger { var $vars, $msg, $extra_headers, $replyto, $from, $subject, $necoding; @@ -230,12 +231,19 @@ class messenger $user->start(); include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); - add_log('critical', $type . '_ERROR', $msg); + add_log('critical', 'LOG_' . $type . '_ERROR', $msg); } // // Messenger methods // + function save_queue() + { + if ($this->use_queue) + { + $this->queue->save(); + } + } function msg_email() { @@ -404,7 +412,11 @@ class messenger } } -// At the moment it is only handling the email queue +/** +* @package phpBB3 +* Queue +* At the moment it is only handling the email queue +*/ class queue { var $data = array(); @@ -636,7 +648,9 @@ class queue } -// Replacement or substitute for PHP's mail command +/** +* Replacement or substitute for PHP's mail command +*/ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers = '') { global $config, $user; @@ -828,9 +842,12 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers return true; } -// SMTP Class -// Auth Mechanisms originally taken from the AUTH Modules found within the PHP Extension and Application Repository (PEAR) -// See docs/AUTHORS for more details +/** +* @package phpBB3 +* SMTP Class +* Auth Mechanisms originally taken from the AUTH Modules found within the PHP Extension and Application Repository (PEAR) +* See docs/AUTHORS for more details +*/ class smtp_class { var $server_response = ''; @@ -1171,10 +1188,12 @@ class smtp_class } } -// Encodes the given string for proper display for this encoding ... nabbed -// from php.net and modified. There is an alternative encoding method which -// may produce less output but it's questionable as to its worth in this -// scenario IMO +/** +* Encodes the given string for proper display for this encoding ... nabbed +* from php.net and modified. There is an alternative encoding method which +* may produce less output but it's questionable as to its worth in this +* scenario IMO +*/ function mail_encode($str, $encoding) { if ($encoding == '') diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 0bac9dfd76..cdb2cd6fa5 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -1,16 +1,17 @@ -<? -// ------------------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_module.php -// STARTED : Sat Oct 30 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------------------- - +<?php +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Module Class handling all types of modules +*/ class module { var $id = 0; diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 8d744cdcc9..352b7a4e4a 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1,17 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_posting.php -// STARTED : Sun Jul 14, 2002 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// Fill smiley templates (or just the variables) with smileys, either in a window or inline +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Fill smiley templates (or just the variables) with smileys, either in a window or inline +*/ function generate_smilies($mode, $forum_id) { global $SID, $auth, $db, $user, $config, $template; @@ -90,7 +89,9 @@ function generate_smilies($mode, $forum_id) } } -// Update Last Post Informations +/** +* Update Last Post Informations +*/ function update_last_post_information($type, $id) { global $db; @@ -133,7 +134,10 @@ function update_last_post_information($type, $id) return $update_sql; } -// Upload Attachment - filedata is generated here +/** +* Upload Attachment - filedata is generated here +* Uses upload class +*/ function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false) { global $auth, $user, $config, $db, $phpbb_root_path; @@ -221,8 +225,8 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage } } - // TODO - Check Free Disk Space - need testing under windows - if ($free_space = disk_free_space($phpbb_root_path . $config['upload_path'])) + // Check free disk space + if ($free_space = @disk_free_space($phpbb_root_path . $config['upload_path'])) { if ($free_space <= $file->get('filesize')) { @@ -250,7 +254,9 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage return $filedata; } -// Calculate the needed size for Thumbnail +/** +* Calculate the needed size for Thumbnail +*/ function get_img_size_format($width, $height) { // Maximum Width the Image can take @@ -272,7 +278,9 @@ function get_img_size_format($width, $height) } } -// Return supported image types +/** +* Return supported image types +*/ function get_supported_image_types($type = false) { if (@extension_loaded('gd')) @@ -327,7 +335,9 @@ function get_supported_image_types($type = false) return array('gd' => false); } -// Create Thumbnail +/** +* Create Thumbnail +*/ function create_thumbnail($source, $destination, $mimetype) { global $config; @@ -423,7 +433,9 @@ function create_thumbnail($source, $destination, $mimetype) return true; } -// DECODE TEXT -> This will/should be handled by bbcode.php eventually +/** +* DECODE TEXT -> This will/should be handled by bbcode.php eventually +*/ function decode_message(&$message, $bbcode_uid = '') { global $config; @@ -450,7 +462,9 @@ function decode_message(&$message, $bbcode_uid = '') return; } -// Generate Topic Icons for display +/** +* Generate Topic Icons for display +*/ function posting_gen_topic_icons($mode, $icon_id) { global $phpbb_root_path, $config, $template; @@ -488,7 +502,9 @@ function posting_gen_topic_icons($mode, $icon_id) return false; } -// Assign Inline attachments (build option fields) +/** +* Assign Inline attachments (build option fields) +*/ function posting_gen_inline_attachments(&$attachment_data) { global $template; @@ -510,7 +526,9 @@ function posting_gen_inline_attachments(&$attachment_data) return false; } -// Build topic types able to be selected +/** +* Build topic types able to be selected +*/ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL) { global $auth, $user, $template, $topic_type; @@ -566,6 +584,9 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL) return $toggle; } +/** +* Generate inline attachment entry +*/ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) { global $template, $config, $phpbb_root_path, $SID, $phpEx; @@ -616,7 +637,9 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) return sizeof($attachment_data); } -// Load Drafts +/** +* Load Drafts +*/ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) { global $user, $db, $template, $phpEx, $SID, $auth; @@ -717,7 +740,9 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) } } -// Topic Review +/** +* Topic Review +*/ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true) { global $user, $auth, $db, $template, $bbcode, $template; @@ -802,7 +827,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id return true; } -// User Notification +/** +* User Notification +*/ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id) { global $db, $user, $config, $phpbb_root_path, $phpEx, $auth; @@ -977,10 +1004,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id } unset($msg_list_ary); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); } // Handle the DB updates diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index cd9160ec97..d125fe315a 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1,15 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_privmsgs.php -// STARTED : Sun Apr 18, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // Define Rule processing schema // NOTE: might change @@ -100,7 +100,9 @@ $global_rule_conditions = array( RULE_IS_GROUP => 'group' ); -// Get all folder +/** +* Get all folder +*/ function get_folder($user_id, &$folder, $folder_id = false) { global $db, $user, $template; @@ -178,7 +180,9 @@ function get_folder($user_id, &$folder, $folder_id = false) return; } -// Delete Messages From Sentbox - we are doing this here because this saves us a bunch of checks and queries +/** +* Delete Messages From Sentbox - we are doing this here because this saves us a bunch of checks and queries +*/ function clean_sentbox($num_sentbox_messages) { global $db, $user, $config; @@ -207,7 +211,9 @@ function clean_sentbox($num_sentbox_messages) } } -// Check Rule against Message Informations +/** +* Check Rule against Message Informations +*/ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) { global $user, $config; @@ -252,7 +258,9 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) return false; } -// Place new messages into appropiate folder +/** +* Place new messages into appropiate folder +*/ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) { global $db, $user, $config; @@ -569,7 +577,9 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) return $num_not_moved; } -// Move PM from one to another folder +/** +* Move PM from one to another folder +*/ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_folder_id) { global $db, $user; @@ -656,7 +666,9 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol return $num_moved; } -// Update unread message status +/** +* Update unread message status +*/ function update_unread_status($unread, $msg_id, $user_id, $folder_id) { if (!$unread) @@ -753,7 +765,9 @@ function handle_mark_actions($user_id, $mark_action) return true; } -// Delete PM(s) +/** +* Delete PM(s) +*/ function delete_pm($user_id, $msg_ids, $folder_id) { global $db; @@ -884,7 +898,9 @@ function delete_pm($user_id, $msg_ids, $folder_id) } } -// Rebuild message header +/** +* Rebuild message header +*/ function rebuild_header($check_ary) { global $db; @@ -917,7 +933,9 @@ function rebuild_header($check_ary) return $address; } -// Print out/Assign recipient informations +/** +* Print out/Assign recipient informations +*/ function write_pm_addresses($check_ary, $author_id, $plaintext = false) { global $db, $user, $template, $phpbb_root_path, $SID, $phpEx; @@ -1033,7 +1051,9 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false) return $addresses; } -// Get folder status +/** +* Get folder status +*/ function get_folder_status($folder_id, $folder) { global $db, $user, $config; @@ -1067,7 +1087,9 @@ function get_folder_status($folder_id, $folder) // COMPOSE MESSAGES // -// Submit PM +/** +* Submit PM +*/ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = true) { global $db, $auth, $user, $config, $phpEx, $SID, $template; @@ -1338,7 +1360,9 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr return $data['msg_id']; } -// PM Notification +/** +* PM Notification +*/ function pm_notification($mode, $author, $recipients, $subject, $message) { global $db, $user, $config, $phpbb_root_path, $phpEx, $auth; @@ -1422,10 +1446,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message) } unset($msg_list_ary); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); unset($messenger); } diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 5a3a20e549..2133463eb7 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_profile_fields.php -// STARTED : Tue Oct 21, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Custom Profile Fields +*/ class custom_profile { var $profile_types = array(1 => 'int', 2 => 'string', 3 => 'text', 4 => 'bool', 5 => 'dropdown', 6 => 'date'); @@ -714,6 +715,10 @@ class custom_profile } } +/** +* @package phpBB3 +* Custom Profile Fields ACP +*/ class custom_profile_admin extends custom_profile { var $vars = array(); diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index bdb4e92ade..0fd772377b 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -1,21 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_upload.php -// STARTED : Sun Mar 6, 2005 -// COPYRIGHT : © 2005 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// Upload Class responsible for handling all file uploads -// - -// Single File +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Responsible for holding all file relevant informations, as well as doing file-specific operations. +* The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on. +*/ class filespec { var $filename = ''; @@ -41,9 +38,6 @@ class filespec /** * File Class * - * Responsible for holding all file relevant informations, as well as doing file-specific operations. - * The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on. - * * @access private * */ @@ -80,7 +74,6 @@ class filespec * @access public * @param real|unique $mode real creates a realname, filtering some characters, lowering every character. Unique creates an unique filename * @param string $prefix Prefix applied to filename - * */ function clean_filename($mode = 'unique', $prefix = '') { @@ -144,7 +137,6 @@ class filespec * @access public * @param string $destination_path Destination path, for example $config['avatar_path'] * @param octal $chmod Permission mask for chmodding the file after a successful move - * */ function move_file($destination, $chmod = 0666) { @@ -256,7 +248,10 @@ class filespec } } -// Class for assigning error messages before a real filespec class can be assigned +/** +* @package phpBB3 +* Class for assigning error messages before a real filespec class can be assigned +*/ class fileerror extends filespec { function fileerror($error_msg) @@ -265,6 +260,12 @@ class fileerror extends filespec } } +/** +* @package phpBB3 +* File upload class +* +* Init class (all parameters optional and able to be set/overwritten seperatly) - scope is global and valid for all uploads +*/ class fileupload { var $allowed_extensions = array(); @@ -276,9 +277,6 @@ class fileupload var $error_prefix = ''; /** - * File upload class - * - * Init class (all parameters optional and able to be set/overwritten seperatly) - scope is global and valid for all uploads * * @param string $error_prefix Used error messages will get prefixed by this string * @param array $allowed_extensions Array of allowed extensions, for example array('jpg', 'jpeg', 'gif', 'png') @@ -347,7 +345,6 @@ class fileupload * @access public * @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified) * @return object $file Object "filespec" is returned, all further operations can be done with this object - * */ function form_upload($form_name) { @@ -405,7 +402,6 @@ class fileupload * @access public * @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif * @return object $file Object "filespec" is returned, all further operations can be done with this object - * */ function remote_upload($upload_url) { diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 1a49b0a5a3..eba83b4d79 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1,22 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : functions_user.php -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// User functions -// - -// Obtain user_ids from usernames or vice versa. Returns false on -// success else the error string +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Obtain user_ids from usernames or vice versa. Returns false on +* success else the error string +*/ function user_get_id_name(&$user_id_ary, &$username_ary) { global $db; @@ -66,7 +61,9 @@ function user_get_id_name(&$user_id_ary, &$username_ary) return false; } -// Updates a username across all relevant tables/fields +/** +* Updates a username across all relevant tables/fields +*/ function user_update_name($old_name, $new_name) { global $config, $db; @@ -95,6 +92,9 @@ function user_update_name($old_name, $new_name) } } +/** +* Remove User +*/ function user_delete($mode, $user_id) { global $config, $db, $user, $auth; @@ -207,8 +207,10 @@ function user_delete($mode, $user_id) return false; } -// Flips user_type from active to inactive and vice versa, handles -// group membership updates +/** +* Flips user_type from active to inactive and vice versa, handles +* group membership updates +*/ function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false) { global $db, $user, $auth; @@ -293,6 +295,9 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username return false; } +/** +* Ban User +*/ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason) { global $db, $user, $auth; @@ -570,6 +575,9 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas return false; } +/** +* Unban User +*/ function user_unban($mode, $ban) { global $db, $user, $auth; @@ -631,7 +639,9 @@ function user_unban($mode, $ban) } -// Whois facility +/** +* Whois facility +*/ function user_ipwhois($ip) { $ipwhois = ''; @@ -673,12 +683,13 @@ function user_ipwhois($ip) return $ipwhois; } -// -// Data validation ... used primarily but not exclusively by -// ucp modules -// -// "Master" function for validating a range of data types +/** +* Data validation ... used primarily but not exclusively by +* ucp modules +* +* "Master" function for validating a range of data types +*/ function validate_data($data, $val_ary) { $error = array(); @@ -705,6 +716,9 @@ function validate_data($data, $val_ary) return $error; } +/** +* Validate String +*/ function validate_string($string, $optional = false, $min = 0, $max = 0) { if (empty($string) && $optional) @@ -724,6 +738,9 @@ function validate_string($string, $optional = false, $min = 0, $max = 0) return false; } +/** +* Validate Number +*/ function validate_num($num, $optional = false, $min = 0, $max = 1E99) { if (empty($num) && $optional) @@ -743,6 +760,9 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99) return false; } +/** +* Validate Match +*/ function validate_match($string, $optional = false, $match) { if (empty($string) && $optional) @@ -757,9 +777,11 @@ function validate_match($string, $optional = false, $match) return false; } -// Check to see if the username has been taken, or if it is disallowed. -// Also checks if it includes the " character, which we don't allow in usernames. -// Used for registering, changing names, and posting anonymously with a username +/** +* Check to see if the username has been taken, or if it is disallowed. +* Also checks if it includes the " character, which we don't allow in usernames. +* Used for registering, changing names, and posting anonymously with a username +*/ function validate_username($username) { global $config, $db, $user; @@ -825,12 +847,9 @@ function validate_username($username) return false; } -// TODO? -// Ability to limit types of email address ... not by banning, seperate table -// capability to require (or deny) use of certain addresses when user is -// registering from certain IP's/hosts - -// Check to see if email address is banned or already present in the DB +/** +* Check to see if email address is banned or already present in the DB +*/ function validate_email($email) { global $config, $db, $user; @@ -875,10 +894,9 @@ function validate_email($email) return false; } -// -// Avatar functions -// - +/** +* Remove avatar +*/ function avatar_delete($id) { global $phpbb_root_path, $config, $db, $user; @@ -891,6 +909,9 @@ function avatar_delete($id) return false; } +/** +* Remote avatar linkage +*/ function avatar_remote($data, &$error) { global $config, $db, $user, $phpbb_root_path; @@ -930,6 +951,9 @@ function avatar_remote($data, &$error) return array(AVATAR_REMOTE, $data['remotelink'], $width, $height); } +/** +* Avatar upload using the upload class +*/ function avatar_upload($data, &$error) { global $phpbb_root_path, $config, $db, $user; @@ -959,6 +983,9 @@ function avatar_upload($data, &$error) return array(AVATAR_UPLOAD, $file->get('realname'), $file->get('width'), $file->get('height')); } +/** +* Avatar Gallery +*/ function avatar_gallery($category, &$error) { global $config, $phpbb_root_path, $user; @@ -1015,8 +1042,10 @@ function avatar_gallery($category, &$error) // Usergroup functions // -// Add or edit a group. If we're editing a group we only update user -// parameters such as rank, etc. if they are changed +/** +* Add or edit a group. If we're editing a group we only update user +* parameters such as rank, etc. if they are changed +*/ function group_create($group_id, $type, $name, $desc) { global $phpbb_root_path, $config, $db, $user, $file_upload; @@ -1093,6 +1122,9 @@ function group_create($group_id, $type, $name, $desc) return (sizeof($error)) ? $error : false; } +/** +* Group Delete +*/ function group_delete($group_id, $group_name = false) { global $db; @@ -1162,6 +1194,9 @@ function group_delete($group_id, $group_name = false) return false; } +/** +* Add user(s) to group +*/ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0) { global $db, $auth; @@ -1355,9 +1390,11 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, return false; } -// Remove a user/s from a given group. When we remove users we update their -// default group_id. We do this by examining which "special" groups they belong -// to. The selection is made based on a reasonable priority system +/** +* Remove a user/s from a given group. When we remove users we update their +* default group_id. We do this by examining which "special" groups they belong +* to. The selection is made based on a reasonable priority system +*/ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false) { global $db, $auth; @@ -1485,7 +1522,9 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, return false; } -// This is used to promote (to leader), demote or set as default a member/s +/** +* This is used to promote (to leader), demote or set as default a member/s +*/ function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false) { global $db, $auth; @@ -1622,8 +1661,10 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna return false; } -// Obtain either the members of a specified group or the groups to -// which the specified users are members +/** +* Obtain either the members of a specified group or the groups to +* which the specified users are members +*/ function group_memberships($group_id = false, $user_id_ary = false) { global $db; diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 7de44547e3..6478d02d54 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -1,20 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_forum.php -// STARTED : Thu Jul 08, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// TODO: -// - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* MCP Forum View +*/ function mcp_forum_view($id, $mode, $action, $url, $forum_info) { global $SID, $phpEx, $phpbb_root_path, $config; @@ -199,6 +195,9 @@ function mcp_forum_view($id, $mode, $action, $url, $forum_info) unset($topic_rows); } +/** +* Resync topics +*/ function mcp_resync_topics($topic_ids) { global $auth, $db, $template, $phpEx, $user, $SID, $phpbb_root_path; diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index b86afa74bb..2aafb49180 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -1,23 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_front.php -// STARTED : Thu Jul 08, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// TODO: -// - add list of forums user is moderator in (with links to common management facilities) -// - add statistics (how many reports handled, how many posts locked/moved... etc.? - -// those would be only valid from the time the log is valid (and not purged) -// - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* MCP Front Panel +*/ function mcp_front_view($id, $mode, $action, $url) { global $SID, $phpEx, $phpbb_root_path, $config; diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 743b745f8f..a86bc7c8fc 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_main.php -// STARTED : Mon Sep 02, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package mcp +* mcp_main +* Handling mcp actions +*/ class mcp_main extends module { @@ -196,10 +198,9 @@ class mcp_main extends module } } - - - -// Lock/Unlock Topic/Post +/** +* Lock/Unlock Topic/Post +*/ function lock_unlock($mode, $ids) { global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path; @@ -272,7 +273,9 @@ function lock_unlock($mode, $ids) } } -// Change Topic Type +/** +* Change Topic Type +*/ function change_topic_type($mode, $topic_ids) { global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path; @@ -376,7 +379,9 @@ function change_topic_type($mode, $topic_ids) } } -// Move Topic +/** +* Move Topic +*/ function mcp_move_topic($topic_ids) { global $auth, $user, $db, $template; @@ -523,7 +528,9 @@ function mcp_move_topic($topic_ids) } } -// Delete Topics +/** +* Delete Topics +*/ function mcp_delete_topic($topic_ids) { global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path; @@ -581,7 +588,9 @@ function mcp_delete_topic($topic_ids) } } -// Delete Posts +/** +* Delete Posts +*/ function mcp_delete_post($post_ids) { global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path; @@ -690,7 +699,9 @@ function mcp_delete_post($post_ids) } } -// Fork Topic +/** +* Fork Topic +*/ function mcp_fork_topic($topic_ids) { global $auth, $user, $db, $template, $config; diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index cb853aaef6..65ef3f7805 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -1,16 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_post.php -// STARTED : Thu Jul 08, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Handling actions in post details screen +*/ function mcp_post_details($id, $mode, $action, $url) { global $SID, $phpEx, $phpbb_root_path, $config; diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 1948a9bd49..c62e29ee38 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_queue.php -// STARTED : Mon Sep 02, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package mcp +* mcp_queue +* Handling the moderation queue +*/ class mcp_queue extends module { @@ -460,12 +462,9 @@ function approve_post($post_id_list) $messenger->send($post_data['user_notify_type']); $messenger->reset(); - - if ($messenger->queue) - { - $messenger->queue->save(); - } } + + $messenger->save_queue(); } // Send out normal user notifications @@ -669,12 +668,9 @@ function disapprove_post($post_id_list) $messenger->send($post_data['user_notify_type']); $messenger->reset(); - - if ($messenger->queue) - { - $messenger->queue->save(); - } } + + $messenger->save_queue(); } unset($post_info, $disapprove_reason); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 48677b63aa..e73ddb51ad 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -1,20 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp_topic.php -// STARTED : Thu Jul 08, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// TODO: -// - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* View topic in MCP +*/ function mcp_topic_view($id, $mode, $action, $url) { global $SID, $phpEx, $phpbb_root_path, $config; @@ -215,6 +211,9 @@ function mcp_topic_view($id, $mode, $action, $url) ); } +/** +* Split topic +*/ function split_topic($mode, $topic_id, $to_forum_id, $subject) { global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth; @@ -392,7 +391,9 @@ function split_topic($mode, $topic_id, $to_forum_id, $subject) } } -// Merge selected posts into selected topic +/** +* Merge selected posts into selected topic +*/ function merge_posts($topic_id, $to_topic_id) { global $db, $template, $user, $phpEx, $SID, $phpbb_root_path, $auth; diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 195368dc35..a8c10c45f0 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1,16 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : message_parser.php -// STARTED : Fri Feb 28, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ if (!defined('IN_PHPBB')) { exit; @@ -35,10 +35,11 @@ if (!class_exists('bbcode')) include($phpbb_root_path . 'includes/bbcode.' . $phpEx); } -// BBCODE_FIRSTPASS -// - -// BBCODE first pass class (functions for parsing messages for db storage) +/** +* @package phpBB3 +* BBCODE FIRSTPASS +* BBCODE first pass class (functions for parsing messages for db storage) +*/ class bbcode_firstpass extends bbcode { var $message = ''; @@ -600,11 +601,11 @@ class bbcode_firstpass extends bbcode } } -// PARSE_MESSAGE EXTENDS BBCODE -// - -// Main message parser for posting, pm, etc. takes raw message -// and parses it for attachments, html, bbcode and smilies +/** +* @package phpBB3 +* Main message parser for posting, pm, etc. takes raw message +* and parses it for attachments, html, bbcode and smilies +*/ class parse_message extends bbcode_firstpass { var $attachment_data = array(); @@ -1144,7 +1145,11 @@ class parse_message extends bbcode_firstpass } } -// Parses a given message and updates/maintains the fulltext tables +/** +* @package phpBB3 +* Parses a given message and updates/maintains the fulltext tables +* @todo replace fulltext_search in message_parser with search modules +*/ class fulltext_search { function split_words($mode, $text) diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index fcec47a816..bdc145602b 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mysql.php -// STARTED : Fri Nov 19, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package search +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package search +* fulltext_mysql +* Search indexing for MySQL +*/ class fulltext_mysql { var $version = 4; diff --git a/phpBB/includes/search/fulltext_phpbb.php b/phpBB/includes/search/fulltext_phpbb.php index 56b467564c..c2f3e5961a 100644 --- a/phpBB/includes/search/fulltext_phpbb.php +++ b/phpBB/includes/search/fulltext_phpbb.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : fulltext.php -// STARTED : Fri Nov 19, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package search +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package search +* fulltext_phpbb +* phpBB's own db driven fulltext search +*/ class fulltext_phpbb { function fulltext_phpbb(&$error) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index d403fef745..d443e5bac1 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : session.php -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package phpBB3 +* Session class +*/ class session { var $session_id = ''; @@ -184,7 +185,7 @@ class session $db->sql_freeresult($result); // Check autologin request, is it valid? - if ($this->data === false || ($this->data['user_password'] != $autologin && !$set_autologin) || ($this->data['user_type'] == USER_INACTIVE && !$bot)) + if ($this->data === false || ($this->data['user_password'] !== $autologin && !$set_autologin) || ($this->data['user_type'] == USER_INACTIVE && !$bot)) { $autologin = ''; $this->data['user_id'] = $user_id = ANONYMOUS; @@ -475,8 +476,11 @@ class session } } -// Contains (at present) basic user methods such as configuration -// creating date/time ... keep this? +/** +* @package phpBB3 +* Contains (at present) basic user methods such as configuration +* creating date/time ... keep this? +*/ class user extends session { var $lang = array(); @@ -865,8 +869,11 @@ class user extends session } } -// Will be keeping my eye of 'other products' to ensure these things don't -// mysteriously appear elsewhere, think up your own solutions! +/** +* @package phpBB3 +* Will be keeping my eye of 'other products' to ensure these things don't +* mysteriously appear elsewhere, think up your own solutions! +*/ class auth { var $founder = false; diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 0e6cabbdce..d7a2bfa5f8 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -1,36 +1,34 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : template.php -// STARTED : Sat, Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -/* - Template class. - - Nathan Codding - Original version design and implementation - Crimsonbane - Initial caching proposal and work - psoTFX - Completion of file caching, decompilation routines and implementation of - conditionals/keywords and associated changes - - The interface was inspired by PHPLib templates, and the template file (formats are - quite similar) - - The keyword/conditional implementation is currently based on sections of code from - the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released - (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code - derived from an LGPL application may be relicenced under the GPL, this applies - to this source - - DEFINE directive inspired by a request by Cyberalien +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* */ +/** +* @package phpBB3 +* +* Template class. +* +* Nathan Codding - Original version design and implementation +* Crimsonbane - Initial caching proposal and work +* psoTFX - Completion of file caching, decompilation routines and implementation of +* conditionals/keywords and associated changes +* +* The interface was inspired by PHPLib templates, and the template file (formats are +* quite similar) +* +* The keyword/conditional implementation is currently based on sections of code from +* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released +* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code +* derived from an LGPL application may be relicenced under the GPL, this applies +* to this source +* +* DEFINE directive inspired by a request by Cyberalien +*/ class template { @@ -285,38 +283,49 @@ class template return true; } - // Change already assigned key variable pair (one-dimensional - single loop entry) - // - // $blockname : the blockname, for example 'loop' - // $vararray : the var array to insert/add or merge - // $key : (array) KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] OR - // (int) Position [the position to change or insert at directly given] - // - // If key is false the position is set to 0 - // If key is true the position is set to the last entry - // - // $mode : insert|change - // If insert, the vararray is inserted at the given position (position counting from zero). - // If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be - // replaced by the new value). - // - // Since counting begins by zero... - // inserting at the last position will result in this array: array(vararray, last positioned array) - // inserting at the position 1 will result in this array: array(first positioned array, vararray, following vars) + /** + * Change already assigned key variable pair (one-dimensional - single loop entry) + * + * Some Examples: + * <code> + * + * alter_block_array('loop', $varrarray); // Insert vararray at the end + * alter_block_array('loop', $vararray, 2); // Insert vararray at position 2 + * alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value' + * alter_block_array('loop', $vararray, false); // Insert vararray at first position + * alter_block_array('loop', $vararray, true); //Insert vararray at last position (assign_block_vars equivalence) + * + * alter_block_array('loop', $vararray, 2, 'change'); // Change/Merge vararray with existing array at position 2 + * alter_block_array('loop', $vararray, array('KEY' => 'value'), 'change'); // Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value' + * alter_block_array('loop', $vararray, false, 'change'); // Change/Merge vararray with existing array at first position + * alter_block_array('loop', $vararray, true, 'change'); // Change/Merge vararray with existing array at last position + * + * </code> + * + * @param string $blockname the blockname, for example 'loop' + * @param array $vararray the var array to insert/add or merge + * @param mixed $key Key to search for + * + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] + * + * int: Position [the position to change or insert at directly given] + * + * If key is false the position is set to 0 + * + * If key is true the position is set to the last entry + * + * @param insert|change $mode Mode to execute + * + * If insert, the vararray is inserted at the given position (position counting from zero). + * + * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). + * + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) + * + */ function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') { - // Examples: - // ('loop', $varrarray) : Insert vararray at the end - // ('loop', $vararray, 2) : Insert vararray at position 2 - // ('loop', $vararray, array('KEY' => 'value')) : Insert vararray at the position where the key 'KEY' has the value of 'value' - // ('loop', $vararray, false) : Insert vararray at first position - // ('loop', $vararray, true) : Insert vararray at last position (assign_block_vars equivalence) - - // ('loop', $vararray, 2, 'change') : Change/Merge vararray with existing array at position 2 - // ('loop', $vararray, array('KEY' => 'value'), 'change') : Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value' - // ('loop', $vararray, false, 'change') : Change/Merge vararray with existing array at first position - // ('loop', $vararray, true, 'change') : Change/Merge vararray with existing array at last position - if (strpos($blockname, '.') !== false) { // Nested blocks are not supported @@ -889,12 +898,12 @@ class template } /** - * Generates a reference to the given variable inside the given (possibly nested) - * block namespace. This is a string of the form: - * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' - * It's ready to be inserted into an "echo" line in one of the templates. - * NOTE: expects a trailing "." on the namespace. - */ + * Generates a reference to the given variable inside the given (possibly nested) + * block namespace. This is a string of the form: + * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' + * It's ready to be inserted into an "echo" line in one of the templates. + * NOTE: expects a trailing "." on the namespace. + */ function generate_block_varref($namespace, $varname, $echo = true, $defop = false) { // Strip the trailing period. @@ -912,13 +921,13 @@ class template } /** - * Generates a reference to the array of data values for the given - * (possibly nested) block namespace. This is a string of the form: - * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] - * - * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. - * NOTE: does not expect a trailing "." on the blockname. - */ + * Generates a reference to the array of data values for the given + * (possibly nested) block namespace. This is a string of the form: + * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] + * + * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. + * NOTE: does not expect a trailing "." on the blockname. + */ function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) { // Get an array of the blocks involved. diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index f7d069e5de..0241ce7974 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_activate.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_activate +* User activation +*/ class ucp_activate extends module { function ucp_activate($id, $mode) @@ -91,7 +93,7 @@ class ucp_activate extends module ); $messenger->send($row['user_notify_type']); - $messenger->queue->save(); + $messenger->save_queue(); $message = 'ACCOUNT_ACTIVE_ADMIN'; } diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index e499b3f907..2e479b0654 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -1,20 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_attachments.php -// STARTED : Mon Nov 03, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// -// * Use this for ACP integration - changeable user id -// - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_attachments +* User attachments +*/ class ucp_attachments extends module { function ucp_attachments($id, $mode) diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index fdf0b8aeaf..d50a8b72cc 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -1,23 +1,25 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_confirm.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// Note to potential users of this code ... -// -// Remember this is released under the _GPL_ and is subject -// to that licence. Do not incorporate this within software -// released or distributed in any way under a licence other -// than the GPL. We will be watching ... ;) - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_confirm +* Visual confirmation +* +* Note to potential users of this code ... +* +* Remember this is released under the _GPL_ and is subject +* to that licence. Do not incorporate this within software +* released or distributed in any way under a licence other +* than the GPL. We will be watching ... ;) +*/ class ucp_confirm extends module { function ucp_confirm($id, $mode) diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 75e0c8367e..68b6ad1c68 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_groups.php -// STARTED : Sun Jun 6, 2004 -// COPYRIGHT : © 2001, 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ +/** +* @package ucp +* ucp_groups +*/ class ucp_groups extends module { function ucp_groups($id, $mode) diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 78aad9b61b..1c7752cda8 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_main.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_main +* UCP Front Panel +*/ class ucp_main extends module { function ucp_main($id, $mode) diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 21962ea215..0ec90c3886 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -1,45 +1,44 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_pm.php -// STARTED : Sat Mar 27, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// TODO: -// -// * Review of post when replying/quoting -// * Handle delete flag (user deletes PM from outbox) -// * Report PM -// * Check Permissions (compose message - to user/group) - -/* - folder= - (int) display folder with the id used - (string) can be inbox, outbox or sentbox - - Display Unread Messages - mode=unread - Display Messages (default to inbox) - mode=view_messages - Display single message - mode=view_messages&action=view_message&p=[msg_id] or &p=[msg_id] (short linkage) - - if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab - the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make - sure the user is able to view the message. - - Composing Messages (mode=compose): - To specific user (u=[user_id]) - To specific group (g=[group_id]) - Quoting a post (action=quote&q=1&p=[post_id]) - Quoting a PM (action=quote&p=[msg_id]) - Forwarding a PM (action=forward&p=[msg_id]) - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* */ +/** +* @package ucp +* ucp_pm +* +* Private Message Class +* +* @param int $folder display folder with the id used +* @param inbox|outbox|sentbox display folder with the associated name +* +* +* Display Unread Messages - mode=unread +* Display Messages (default to inbox) - mode=view_messages +* Display single message - mode=view_messages&action=view_message&p=[msg_id] or &p=[msg_id] (short linkage) +* +* if the folder id with (&f=[folder_id]) is used when displaying messages, one query will be saved. If it is not used, phpBB needs to grab +* the folder id first in order to display the input boxes and folder names and such things. ;) phpBB always checks this against the database to make +* sure the user is able to view the message. +* +* Composing Messages (mode=compose): +* To specific user (u=[user_id]) +* To specific group (g=[group_id]) +* Quoting a post (action=quote&q=1&p=[post_id]) +* Quoting a PM (action=quote&p=[msg_id]) +* Forwarding a PM (action=forward&p=[msg_id]) +* +* +* @todo Review of post when replying/quoting +* @todo Report PM +* @todo Check Permissions (compose message - to user/group) +* +*/ class ucp_pm extends module { function ucp_pm($id, $mode) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 10d6d6baae..33ee31b22c 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1,18 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : compose.php -// STARTED : Sat Mar 27, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// * Called from ucp_pm with mode == 'compose' - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Compose private message +* Called from ucp_pm with mode == 'compose' +*/ function compose_pm($id, $mode, $action) { global $template, $db, $auth, $user; @@ -763,7 +762,9 @@ function compose_pm($id, $mode, $action) } } -// For composing messages, handle list actions +/** +* For composing messages, handle list actions +*/ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc) { global $_REQUEST; @@ -832,7 +833,9 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ } -// Return number of recipients +/** +* Return number of private message recipients +*/ function num_recipients($address_list) { $num_recipients = 0; @@ -845,7 +848,9 @@ function num_recipients($address_list) return $num_recipients; } -// Get recipient at position 'pos' +/** +* Get recipient at position 'pos' +*/ function get_recipient_pos($address_list, $position = 1) { $recipient = array(); diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index a07b8e3aee..76ba3553f9 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -1,16 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : options.php -// STARTED : Mon Apr 19, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* Execute message options +*/ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions) { global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; @@ -476,6 +476,9 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit show_defined_rules($user->data['user_id'], $check_lang, $rule_lang, $action_lang, $folder); } +/** +* Defining check option for message rules +*/ function define_check_option($hardcoded, $check_option, $check_lang) { global $template; @@ -498,6 +501,9 @@ function define_check_option($hardcoded, $check_option, $check_lang) ); } +/** +* Defining action option for message rules +*/ function define_action_option($hardcoded, $action_option, $action_lang, $folder) { global $db, $template, $user; @@ -542,6 +548,9 @@ function define_action_option($hardcoded, $action_option, $action_lang, $folder) ); } +/** +* Defining rule option for message rules +*/ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary) { global $template; @@ -564,6 +573,9 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary) ); } +/** +* Defining condition option for message rules +*/ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions) { global $db, $template; @@ -668,6 +680,9 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule ); } +/** +* Display defined message rules +*/ function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $folder) { global $db, $template; diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 8edac192ad..89fe1d53c8 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -1,18 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewfolder.php -// STARTED : Sun Apr 11, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// * Called from ucp_pm with mode == 'view_messages' && action == 'view_folder' - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* View message folder +* Called from ucp_pm with mode == 'view_messages' && action == 'view_folder' +*/ function view_folder($id, $mode, $folder_id, $folder, $type) { global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; @@ -179,8 +178,11 @@ function view_folder($id, $mode, $folder_id, $folder, $type) } } -// Get PM's in folder x from user x -// Get PM's in all folders from user x with type of x (unread, new) +/** +* Get Messages from folder/user +* +* @param unread|new|folder $type type of message +*/ function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder') { global $user, $db, $template, $config, $auth, $_POST; diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 217e0a646b..6dacb79b3b 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -1,16 +1,16 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewmessage.php -// STARTED : Mon Apr 12, 2004 -// COPYRIGHT : © 2004 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* View private message +*/ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db; @@ -222,7 +222,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) } } -// Display Message History +/** +* Display Message History +*/ function message_history($msg_id, $user_id, $message_row, $folder) { global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $SID, $auth, $bbcode; @@ -356,7 +358,9 @@ function message_history($msg_id, $user_id, $message_row, $folder) return true; } -// Get User Informations (only for message display) +/** +* Get User Informations (only for message display) +*/ function get_user_informations($user_id, $user_row) { global $config, $db, $auth, $user, $phpbb_root_path, $phpEx, $SID; diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index e90b28c46d..58c6e74e47 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_prefs.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_prefs +* Changing user preferences +*/ class ucp_prefs extends module { function ucp_prefs($id, $mode) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a558e4b2b2..b8ec6fb0f5 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_profile.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_profile +* Changing profile settings +*/ class ucp_profile extends module { function ucp_profile($id, $mode) @@ -150,7 +152,7 @@ class ucp_profile extends module $db->sql_freeresult($result); } - $messenger->queue->save(); + $messenger->save_queue(); $sql_ary += array( 'user_type' => USER_INACTIVE, diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 6dc10877fd..1a0c0e5eb9 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_register.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_register +* Board registration +*/ class ucp_register extends module { function ucp_register($id, $mode) @@ -69,7 +71,7 @@ class ucp_register extends module else { $template->assign_vars(array( - 'L_AGREEMENT' => $user->lang['UCP_AGREEMENT'], + 'L_TERMS_OF_USE' => $user->lang['TERMS_OF_USE_CONTENT'], 'S_SHOW_COPPA' => false, 'S_REGISTER_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=register") @@ -413,7 +415,7 @@ class ucp_register extends module $db->sql_freeresult($result); $code = gen_rand_string(6); - $confirm_id = md5(uniqid($user_ip)); + $confirm_id = md5(uniqid($user->ip)); $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'confirm_id' => (string) $confirm_id, diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 97dc2d5bfe..dea1027ce6 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -1,16 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_remind.php -// STARTED : Mon May 19, 2003 -// COPYRIGHT : © 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_remind +* Sending password reminders +*/ class ucp_remind extends module { function ucp_remind($id, $mode) @@ -75,10 +77,7 @@ class ucp_remind extends module ); $messenger->send($row['user_notify_type']); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); meta_refresh(3, "index.$phpEx$SID"); diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index cdc5f9ca4b..ae0d5b496c 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -1,16 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp_zebra.php -// STARTED : Sun Sep 28, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package ucp +* ucp_zebra +*/ class ucp_zebra extends module { function ucp_zebra($id, $mode) diff --git a/phpBB/index.php b/phpBB/index.php index 5c5913fe01..3914e8a5eb 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : index.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/install/install.php b/phpBB/install/install.php index deaa04fbcc..c49109c2c0 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : install.php -// STARTED : Sat Dec 17, 2002 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); // Error reporting level and runtime escaping diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index 11d0676c97..ce8795b983 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : admin.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* admin [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -201,6 +202,7 @@ $lang += array( 'log_prune_user_del_anon'=> '<b>Users Pruned and Posts Retained</b><br />%s', 'LOG_RESYNC_STATS' => '<b>Post, topic and user stats reset</b>', + 'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>', 'LOG_RESET_DATE' => '<b>Board start date reset</b>', 'LOG_RESET_ONLINE' => '<b>Most users online reset</b>', @@ -277,9 +279,6 @@ $lang += array( 'LOG_JAB_REGISTER' => '<b>Jabber account registered</b>', 'LOG_JAB_CHANGED' => '<b>Jabber account changed</b>', - 'LOG_EMAIL_ERROR' => '%s', - 'LOG_JABBER_ERROR' => '%s', - 'LOG_BOT_ADDED' => '<b>New bot added</b><br />» %s', 'LOG_BOT_UPDATED' => '<b>Existing bot updated</b><br />» %s', 'LOG_BOT_DELETE' => '<b>Deleted bot</b><br />» %s', @@ -316,6 +315,7 @@ $lang += array( 'RESET_ONLINE' => 'Reset Online', 'RESET_DATE' => 'Reset Date', 'RESYNC_STATS' => 'Resync Stats', + 'RESYNC_POSTCOUNTS' => 'Resync Postcounts', 'INACTIVE_USERS' => 'Inactive Users', 'INACTIVE_USERS_EXPLAIN'=> 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 5fdaf1f94e..1dc3784860 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : common.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* common [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// DO NOT CHANGE +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -43,6 +44,7 @@ $lang += array( '6_MONTHS' => '6 Months', '7_DAYS' => '7 Days', + 'ACCOUNT_ALREADY_ACTIVATED' => 'Your account is already activated', 'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet', 'ACP' => 'Administration Control Panel', 'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.', @@ -173,19 +175,6 @@ $lang += array( 'JUMP_PAGE' => 'Enter the page number you wish to goto', 'JUMP_TO' => 'Jump to', - 'KARMA' => array( - '-5' => 'Extremely Bad', - '-4' => 'Very Bad', - '-3' => 'Very Poor', - '-2' => 'Bad', - '-1' => 'Poor', - '0' => 'Neutral', - '1' => 'Positive', - '2' => 'Good', - '3' => 'Very Good', - '4' => 'Extremely good', - '5' => 'Excellent' - ), 'KB' => 'KB', 'LAST_POST' => 'Last Post', @@ -208,8 +197,13 @@ $lang += array( 'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few seconds but gives you increased capabilies. The board administrator may also grant additional permissions to registered users. Before you login please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.', 'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.', 'LOGOUT_USER' => 'Logout [ %s ]', + 'LOG_ADMIN_AUTH_FAIL' => '<b>Failed administration login attempt</b>', + 'LOG_ADMIN_AUTH_SUCCESS'=> '<b>Sucessful administration login</b>', 'LOG_DELETE_TOPIC' => '<b>Deleted topic</b><br />» %s', + 'LOG_EMAIL_ERROR' => '<b>Email error<br />» %s', + 'LOG_JABBER_ERROR' => '<b>Jabber error<br />» %s', 'LOG_ME_IN' => 'Log me on automatically each visit', + 'LOG_USER_FEEDBACK' => '<b>Added user feedback</b><br />» %s', 'LOG_USER_GENERAL' => '%s', 'MARK' => 'Mark', @@ -311,6 +305,7 @@ $lang += array( 'REPLY_WITH_QUOTE' => 'Reply with quote', 'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to global announcement', 'REPLYING_MESSAGE' => 'Replying to message in %s', + 'RESEND_ACTIVATION' => 'Resend activation email', 'RESET' => 'Reset', 'RETURN_INDEX' => 'Click %sHere%s to return to the index', 'RETURN_FORUM' => 'Click %sHere%s to return to the forum', diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt new file mode 100644 index 0000000000..bc4dd02d2d --- /dev/null +++ b/phpBB/language/en/email/user_resend_inactive.txt @@ -0,0 +1,21 @@ +Subject: Welcome to {SITENAME} Forums +Charset: iso-8859-1 + +{WELCOME_MSG} + +Please keep this email for your records. Your account information is as follows: + +---------------------------- +Username: {USERNAME} +---------------------------- + +Your password has been encrypted in our database. Should you forget your password you can request a new one which will be activated in the same way as this account. + +Your account is currently inactive. You cannot use it until you visit the following link: + +{U_ACTIVATE} + + +Thank you for registering. + +{EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php index 0186ce0ad1..2e857d94b5 100644 --- a/phpBB/language/en/groups.php +++ b/phpBB/language/en/groups.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : gcp.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* groups [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// DO NOT CHANGE +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 8d1f82c802..e1e9da0535 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -1,15 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : help_bbcode.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* help_bbcode [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // DEVELOPERS PLEASE NOTE // diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index 40ab168cbc..b7d72674f5 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -1,15 +1,17 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : help_faq.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* help_faq [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ // DEVELOPERS PLEASE NOTE // diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 5ed67f1922..8e8018cdc0 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* mcp [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// DO NOT CHANGE +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -98,6 +99,7 @@ $lang += array( 'LOG_UNLOCK' => '<b>Unlocked topic</b><br />» %s', 'LOG_UNLOCK_POST' => '<b>Unlocked post</b><br />» %s', 'LOG_UNRATE' => '<b>Unrated post</b><br />» %s', + 'LOG_USER_LOCK' => '<b>User locked own topic</b><br />» %s', 'LOGVIEW_VIEWTOPIC' => 'View Topic', 'LOGVIEW_VIEWLOGS' => 'View Topic Log', 'LOGVIEW_VIEWFORUM' => 'View Forum', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 7606be0887..25d68b8215 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : memberlist.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* memberlist [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 4da1335136..8aa8228256 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : posting.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* posting [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index 34052cc0d4..526b28d632 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : search.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- +/** +* +* search [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ -// DO NOT CHANGE +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 0e2cee3c7f..df3e591638 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : ucp.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* ucp [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -33,6 +34,7 @@ $lang += array( 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.', 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information', 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this forum requires account activation by the administrator. An email has been sent to them and you will be informed when your account has been activated', + 'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address', 'ADD' => 'Add', 'ADD_BCC' => 'Add [Bcc]', 'ADD_FOES' => 'Add new foes', @@ -305,6 +307,7 @@ $lang += array( 'SORT_POST_TIME' => 'Post Time', 'SORT_SIZE' => 'Filesize', + 'TERMS_OF_USE_CONTENT' => 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above, they serve only to improve your viewing pleasure. The email address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.', 'TIMEZONE' => 'Timezone', 'TO' => 'To', 'TOO_MANY_RECIPIENTS' => 'Too many recipients', @@ -312,7 +315,6 @@ $lang += array( 'UCP' => 'User Control Panel', 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will an email at the address you specified.', - 'UCP_AGREEMENT' => 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above, they serve only to improve your viewing pleasure. The email address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.', 'UCP_AIM' => 'AOL Instant Messenger', 'UCP_ATTACHMENTS' => 'Attachments', 'UCP_COPPA_BEFORE' => 'Before %s', @@ -350,6 +352,7 @@ $lang += array( 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.', 'UCP_REMIND' => 'Send password', + 'UCP_RESEND' => 'Send activation email', 'UCP_WATCHED' => 'Watched items', 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.', 'UCP_YIM' => 'Yahoo Messenger', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index 0769970918..602a98682d 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewforum.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* viewforum [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index cfb348fef1..3a5a21dd83 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -1,17 +1,18 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewtopic.php [ English ] -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL v2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// DO NOT CHANGE +/** +* +* viewtopic [English] +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* DO NOT CHANGE +*/ if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 303b21b021..360648457f 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -1,25 +1,26 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : mcp.php -// STARTED : Mon May 5, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); -// --------- -// FUNCTIONS -// +/** +* @package mcp +* MCP Module +*/ class module { var $id = 0; @@ -278,10 +279,9 @@ class module return false; } } -// -// FUNCTIONS -// --------- +/** +*/ // Start session management $user->start(); @@ -438,7 +438,9 @@ switch ($mode) // // LITTLE HELPER -// request_var, the array way +/** +* request_var, the array way +*/ function get_array($var, $default_value) { $ids = request_var($var, $default_value); @@ -463,7 +465,9 @@ function get_array($var, $default_value) return $ids; } -// Build simple hidden fields from array +/** +* Build simple hidden fields from array +*/ function build_hidden_fields($field_ary) { $s_hidden_fields = ''; @@ -486,7 +490,9 @@ function build_hidden_fields($field_ary) return $s_hidden_fields; } -// Get simple topic data +/** +* Get simple topic data +*/ function get_topic_data($topic_ids, $acl_list = false) { global $auth, $db; @@ -516,7 +522,9 @@ function get_topic_data($topic_ids, $acl_list = false) return $rowset; } -// Get simple post data +/** +* Get simple post data +*/ function get_post_data($post_ids, $acl_list = false) { global $db, $auth; @@ -549,6 +557,9 @@ function get_post_data($post_ids, $acl_list = false) return $rowset; } +/** +* Get simple forum data +*/ function get_forum_data($forum_id, $acl_list = 'f_list') { global $auth, $db; @@ -576,6 +587,9 @@ function get_forum_data($forum_id, $acl_list = 'f_list') return $rowset; } +/** +* sorting in mcp +*/ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE') { global $db, $user, $auth, $template; @@ -732,7 +746,9 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, } } -// +/** +* Validate ids +*/ function check_ids(&$ids, $table, $sql_id, $acl_list = false) { global $db, $auth; diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 3e0cffa1b8..f7eca2d264 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1,18 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : memberlist.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// TODO -// Add permission check for IM clients +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); @@ -177,7 +174,7 @@ switch ($mode) ); $messenger->send(NOTIFY_IM); - $messenger->queue->save(); + $messenger->save_queue(); $s_select = 'S_SENT_JABBER'; } @@ -591,7 +588,7 @@ switch ($mode) ); $messenger->send($row['user_notify_type']); - $messenger->queue->save(); + $messenger->save_queue(); meta_refresh(3, "index.$phpEx$SID"); $message = (!$topic_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . "index.$phpEx$SID" . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=" . $row['topic_id'] . '">', '</a>'); @@ -650,7 +647,7 @@ switch ($mode) // Additional sorting options for user search ... if search is enabled, if not // then only admins can make use of this (for ACP functionality) - $sql_where = $form = $field = ''; + $sql_from = $sql_where = $form = $field = ''; if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_'))) { $form = request_var('form', ''); @@ -669,7 +666,7 @@ switch ($mode) $count_select = request_var('count_select', 'eq'); $joined = explode('-', request_var('joined', '')); $active = explode('-', request_var('active', '')); - $count = request_var('count', 0); + $count = (request_var('count', '')) ? request_var('count', 0) : ''; $ipdomain = request_var('ip', ''); $find_key_match = array('lt' => '<', 'gt' => '>', 'eq' => '='); @@ -697,14 +694,14 @@ switch ($mode) $s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } - $sql_where .= ($username) ? " AND u.username LIKE '" . str_replace('*', '%', $db->sql_escape($username)) ."'" : ''; - $sql_where .= ($email) ? " AND u.user_email LIKE '" . str_replace('*', '%', $db->sql_escape($email)) ."' " : ''; - $sql_where .= ($icq) ? " AND u.user_icq LIKE '" . str_replace('*', '%', $db->sql_escape($icq)) ."' " : ''; - $sql_where .= ($aim) ? " AND u.user_aim LIKE '" . str_replace('*', '%', $db->sql_escape($aim)) ."' " : ''; - $sql_where .= ($yahoo) ? " AND u.user_yim LIKE '" . str_replace('*', '%', $db->sql_escape($yahoo)) ."' " : ''; - $sql_where .= ($msn) ? " AND u.user_msnm LIKE '" . str_replace('*', '%', $db->sql_escape($msn)) ."' " : ''; + $sql_where .= ($username) ? " AND u.username LIKE '" . str_replace('*', '%', $db->sql_escape($username)) . "'" : ''; + $sql_where .= ($email) ? " AND u.user_email LIKE '" . str_replace('*', '%', $db->sql_escape($email)) . "' " : ''; + $sql_where .= ($icq) ? " AND u.user_icq LIKE '" . str_replace('*', '%', $db->sql_escape($icq)) . "' " : ''; + $sql_where .= ($aim) ? " AND u.user_aim LIKE '" . str_replace('*', '%', $db->sql_escape($aim)) . "' " : ''; + $sql_where .= ($yahoo) ? " AND u.user_yim LIKE '" . str_replace('*', '%', $db->sql_escape($yahoo)) . "' " : ''; + $sql_where .= ($msn) ? " AND u.user_msnm LIKE '" . str_replace('*', '%', $db->sql_escape($msn)) . "' " : ''; $sql_where .= ($jabber) ? " AND u.user_jabber LIKE '" . str_replace('*', '%', $db->sql_escape($jabber)) . "' " : ''; - $sql_where .= ($count) ? " AND u.user_posts " . $find_key_match[$count_select] . " $count " : ''; + $sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : ''; $sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $sql_where .= (sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : ''; @@ -738,7 +735,6 @@ switch ($mode) // Are we looking at a usergroup? If so, fetch additional info // and further restrict the user info query - $sql_from = $sql_where = ''; if ($mode == 'group') { $sql = 'SELECT * @@ -970,9 +966,9 @@ make_jumpbox('viewforum.'.$phpEx); page_footer(); -// --------- -// FUNCTIONS -// +/** +* Prepare profile data +*/ function show_profile($data) { global $config, $auth, $template, $user, $ranks, $SID, $phpEx, $phpbb_root_path; @@ -983,7 +979,7 @@ function show_profile($data) $rank_title = $rank_img = ''; if (!empty($data['user_rank'])) { - $rank_title = $ranks['special'][$data['user_rank']]['rank_title']; + $rank_title = (isset($ranks['special'][$data['user_rank']]['rank_title'])) ? $ranks['special'][$data['user_rank']]['rank_title'] : ''; $rank_img = (!empty($ranks['special'][$data['user_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$data['user_rank']]['rank_image'] . '" border="0" alt="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$data['user_rank']]['rank_title'] . '" /><br />' : ''; } else @@ -1042,8 +1038,5 @@ function show_profile($data) 'S_ONLINE' => (intval($data['session_time']) >= time() - 300) ? true : false ); } -// -// FUNCTIONS -// --------- ?>
\ No newline at end of file diff --git a/phpBB/posting.php b/phpBB/posting.php index fe2f977630..4a6a8b91c1 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : posting.php -// STARTED : Sat Feb 17, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); @@ -1165,11 +1164,9 @@ if ($mode == 'reply' || $mode == 'quote') page_footer(); -// --------- -// FUNCTIONS -// - -// Delete Post +/** +* Delete Post +*/ function delete_post($mode, $post_id, $topic_id, $forum_id, &$data) { global $db, $user, $config, $auth, $phpEx, $SID; @@ -1306,7 +1303,9 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, &$data) } -// Submit Post +/** +* Submit Post +*/ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true) { global $db, $auth, $user, $config, $phpEx, $SID, $template, $phpbb_root_path; @@ -1858,8 +1857,4 @@ function upload_popup($forum_style) $template->display('popup'); } -// -// FUNCTIONS -// --------- - ?>
\ No newline at end of file diff --git a/phpBB/report.php b/phpBB/report.php index cd4727adfa..d97cf4c755 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : report.php -// STARTED : Thu Apr 3, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); @@ -355,10 +354,7 @@ function report_notification($notify_user, $report_post, $report_data) $messenger->send($notify_row['notify_type']); $messenger->reset(); - if ($messenger->queue) - { - $messenger->queue->save(); - } + $messenger->save_queue(); } else { diff --git a/phpBB/search.php b/phpBB/search.php index 91877d98cd..e218c61a62 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1,22 +1,19 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : search.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -//TODO -//Introduce phrase searching? -//Stemmers? -//Find similar? -//Relevancy? - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +* @todo Introduce phrase searching? +* @todo Stemmers? +* @todo Find similar? +* @todo Relevancy? +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/style.php b/phpBB/style.php index b9c2c27cd1..e13ced0c7a 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : style.php -// STARTED : Thu Jul 24, 2003 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subSilver/template/login_body.html index 58734462dd..d5cd8cd19f 100644 --- a/phpBB/styles/subSilver/template/login_body.html +++ b/phpBB/styles/subSilver/template/login_body.html @@ -33,7 +33,11 @@ </tr> <tr> <td><b class="gensmall">{L_PASSWORD}:</b></td> - <td><input class="post" type="password" name="password" size="25" maxlength="25" tabindex="2" /><br /><a class="gensmall" href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></td> + <td> + <input class="post" type="password" name="password" size="25" maxlength="25" tabindex="2" /> + <!-- IF U_SEND_PASSWORD --><br /><a class="gensmall" href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a><!-- ENDIF --> + <!-- IF U_RESEND_ACTIVATION --><br /><a class="gensmall" href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a><!-- ENDIF --> + </td> </tr> <!-- IF S_DISPLAY_FULL_LOGIN --> <tr> diff --git a/phpBB/styles/subSilver/template/ucp_agreement.html b/phpBB/styles/subSilver/template/ucp_agreement.html index bddda95fe0..6348b4b609 100644 --- a/phpBB/styles/subSilver/template/ucp_agreement.html +++ b/phpBB/styles/subSilver/template/ucp_agreement.html @@ -10,7 +10,7 @@ <table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th height="25">{SITENAME} - {REGISTRATION}</th> + <th height="25">{SITENAME} - {L_REGISTRATION}</th> </tr> <tr> <td class="row1" align="center"><table width="90%" cellspacing="2" cellpadding="2" border="0" align="center"> @@ -18,7 +18,7 @@ <!-- IF S_SHOW_COPPA --> <td class="gen" align="center"><br />{L_COPPA_BIRTHDAY}<br /><br /><a href="{U_COPPA_NO}">{L_COPPA_NO}</a> :: <a href="{U_COPPA_YES}">{L_COPPA_YES}</a><br /><br /></td> <!-- ELSE --> - <td><span class="genmed"><br />{L_AGREEMENT}<br /><br /></span> + <td><span class="genmed"><br />{L_TERMS_OF_USE}<br /><br /></span> <div align="center"> <input class="btnlite" type="submit" name="agreed" value="{L_AGREE}"><br /><br /> <input class="btnlite" type="submit" name="not_agreed" value="{L_NOT_AGREE}"> diff --git a/phpBB/styles/subSilver/template/ucp_resend.html b/phpBB/styles/subSilver/template/ucp_resend.html new file mode 100644 index 0000000000..86c3c99503 --- /dev/null +++ b/phpBB/styles/subSilver/template/ucp_resend.html @@ -0,0 +1,22 @@ +<!-- INCLUDE overall_header.html --> + +<form action="{S_PROFILE_ACTION}" method="post"> + +<table class="tablebg" width="50%" cellspacing="1" cellpadding="4" border="0" align="center"> + <tr> + <th colspan="2">{L_UCP_RESEND}</th> + </tr> + <tr> + <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b></td> + <td class="row2"><input type="text" class="post" name="username" size="25" maxlength="60" value="{USERNAME}" /></td> + </tr> + <tr> + <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td> + <td class="row2"><input type="text" class="post" name="email" size="25" maxlength="255" value="{EMAIL}" /></td> + </tr> + <tr> + <td class="cat" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="btnmain" /> <input type="reset" value="{L_RESET}" name="reset" class="btnlite" /></td> + </tr> +</table></form> + +<!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/ucp.php b/phpBB/ucp.php index a85155164f..515d36579e 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -1,35 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : bbcode.php -// STARTED : Thu Nov 21, 2002 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - -// TODO for 2.2: -// -// * Registration -// * Link to (additional?) registration conditions - -// * Opening tab: -// * Last visit time -// * Last active in -// * Most active in -// * New PM counter -// * Unread PM counter -// * Link/s to MCP if applicable? - -// * PM system -// * See privmsg - -// * Permissions? -// * List permissions granted to this user (in UCP and ACP UCP) - +/** +* +* @package ucp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); @@ -53,11 +33,10 @@ $user->setup('ucp'); $ucp = new module(); - - -// --------- -// FUNCTIONS -// +/** +* @package ucp +* UCP Module +*/ class module { var $id = 0; @@ -248,11 +227,6 @@ class module return false; } } -// -// FUNCTIONS -// --------- - - // Basic "global" modes switch ($mode) @@ -263,6 +237,11 @@ switch ($mode) redirect("index.$phpEx$SID"); break; + case 'resend_act': + $ucp->load('ucp', 'resend'); + $ucp->module->ucp_resend(); + break; + case 'sendpassword': $ucp->load('ucp', 'remind'); $ucp->module->ucp_remind(); @@ -304,6 +283,10 @@ switch ($mode) trigger_error($message); break; + case 'terms_of_use': + case 'privacy_statement': + break; + case 'delete_cookies': // Delete Cookies with dynamic names (do NOT delete poll cookies) if (confirm_box(true)) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 9e0e346394..1a9a91420b 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewforum.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 99ba2fa811..21a6f35f55 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewonline.php -// STARTED : Sat Dec 16, 2000 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 666034841e..7f82e55074 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1,16 +1,15 @@ <?php -// ------------------------------------------------------------- -// -// $Id$ -// -// FILENAME : viewtopic.php -// STARTED : Sat Feb 13, 2001 -// COPYRIGHT : © 2001, 2003 phpBB Group -// WWW : http://www.phpbb.com/ -// LICENCE : GPL vs2.0 [ see /docs/COPYING ] -// -// ------------------------------------------------------------- - +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +*/ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); |