aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-04-09 12:26:45 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-04-09 12:26:45 +0000
commitfc32df035889dd74f2cfc1c62bb793d36f333ec2 (patch)
tree12134eada004226d1ea5b31b420d1c63f05e7376 /phpBB/includes
parent0ba3f620d4afb963b89c532b664693c974ec4f8a (diff)
downloadforums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar
forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.gz
forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.bz2
forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.tar.xz
forums-fc32df035889dd74f2cfc1c62bb793d36f333ec2.zip
- Documentation related changes
- added resend activation email dialog - fixed issue in session code - log failed/successful admin re-authentication/login - fixed simple forum dropdown box (used in mcp and posting) git-svn-id: file:///svn/phpbb/trunk@5114 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acm/acm_db.php25
-rw-r--r--phpBB/includes/acm/acm_file.php25
-rw-r--r--phpBB/includes/auth/auth_apache.php32
-rw-r--r--phpBB/includes/auth/auth_db.php30
-rw-r--r--phpBB/includes/auth/auth_ldap.php53
-rw-r--r--phpBB/includes/bbcode.php28
-rw-r--r--phpBB/includes/db/db2.php36
-rw-r--r--phpBB/includes/db/firebird.php29
-rw-r--r--phpBB/includes/db/mssql-odbc.php29
-rw-r--r--phpBB/includes/db/mssql.php37
-rw-r--r--phpBB/includes/db/mysql.php29
-rw-r--r--phpBB/includes/db/mysql4.php31
-rw-r--r--phpBB/includes/db/oracle.php34
-rw-r--r--phpBB/includes/db/postgres.php37
-rw-r--r--phpBB/includes/db/sqlite.php36
-rw-r--r--phpBB/includes/functions.php224
-rw-r--r--phpBB/includes/functions_admin.php213
-rw-r--r--phpBB/includes/functions_compress.php53
-rw-r--r--phpBB/includes/functions_display.php35
-rw-r--r--phpBB/includes/functions_jabber.php61
-rw-r--r--phpBB/includes/functions_messenger.php63
-rw-r--r--phpBB/includes/functions_module.php27
-rw-r--r--phpBB/includes/functions_posting.php86
-rw-r--r--phpBB/includes/functions_privmsgs.php75
-rw-r--r--phpBB/includes/functions_profile_fields.php29
-rw-r--r--phpBB/includes/functions_upload.php52
-rw-r--r--phpBB/includes/functions_user.php137
-rw-r--r--phpBB/includes/mcp/mcp_forum.php31
-rw-r--r--phpBB/includes/mcp/mcp_front.php31
-rw-r--r--phpBB/includes/mcp/mcp_main.php53
-rw-r--r--phpBB/includes/mcp/mcp_post.php24
-rw-r--r--phpBB/includes/mcp/mcp_queue.php40
-rw-r--r--phpBB/includes/mcp/mcp_topic.php35
-rw-r--r--phpBB/includes/message_parser.php49
-rw-r--r--phpBB/includes/search/fulltext_mysql.php26
-rw-r--r--phpBB/includes/search/fulltext_phpbb.php26
-rw-r--r--phpBB/includes/session.php41
-rw-r--r--phpBB/includes/template.php155
-rw-r--r--phpBB/includes/ucp/ucp_activate.php28
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php30
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php40
-rw-r--r--phpBB/includes/ucp/ucp_groups.php23
-rw-r--r--phpBB/includes/ucp/ucp_main.php26
-rw-r--r--phpBB/includes/ucp/ucp_pm.php77
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php39
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php39
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php34
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php32
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php26
-rw-r--r--phpBB/includes/ucp/ucp_profile.php28
-rw-r--r--phpBB/includes/ucp/ucp_register.php30
-rw-r--r--phpBB/includes/ucp/ucp_remind.php31
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php25
53 files changed, 1473 insertions, 1092 deletions
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 . '&amp;start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
+ if ($add_prevnext_text)
+ {
+ if ($on_page != 1)
+ {
+ $page_string = '<a href="' . $base_url . '&amp;start=' . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a>&nbsp;&nbsp;' . $page_string;
+ }
+
+ if ($on_page != $total_pages)
+ {
+ $page_string .= '&nbsp;&nbsp;<a href="' . $base_url . '&amp;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&amp;mode=sendpassword",
- 'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=terms",
- 'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=privacy",
+ 'U_SEND_PASSWORD' => ($config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=sendpassword" : '',
+ 'U_RESEND_ACTIVATION' => ($config['require_activation'] != USER_ACTIVATION_NONE && $config['email_enable']) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=resend_act" : '',
+ 'U_TERMS_USE' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=terms",
+ 'U_PRIVACY' => "{$phpbb_root_path}ucp.$phpEx$SID&amp;mode=privacy",
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
'S_LOGIN_ACTION' => (!$admin) ? "{$phpbb_root_path}ucp.$phpEx$SID&amp;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 .= '&nbsp; &nbsp; &nbsp;';
+ $padding .= '&nbsp; &nbsp;';
$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&amp;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&amp;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)