mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 07:35:29 +02:00
[ticket/11700] Fix a few more comments
PHPBB3-11700
This commit is contained in:
parent
ccbb070652
commit
d626ebaf1e
@ -204,7 +204,7 @@ class db extends \phpbb\auth\provider\base
|
|||||||
{
|
{
|
||||||
$hash = phpbb_hash($password_new_format);
|
$hash = phpbb_hash($password_new_format);
|
||||||
|
|
||||||
// Update the password in the users table to the new \format and remove user_pass_convert flag
|
// Update the password in the users table to the new format and remove user_pass_convert flag
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
SET user_password = \'' . $this->db->sql_escape($hash) . '\',
|
SET user_password = \'' . $this->db->sql_escape($hash) . '\',
|
||||||
user_pass_convert = 0
|
user_pass_convert = 0
|
||||||
|
@ -30,7 +30,7 @@ class datetime extends \DateTime
|
|||||||
static protected $format_cache = array();
|
static protected $format_cache = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new \instance of \phpbb\datetime, expanded to include an argument to inject
|
* Constructs a new instance of \phpbb\datetime, expanded to include an argument to inject
|
||||||
* the user context and modify the timezone to the users selected timezone if one is not set.
|
* the user context and modify the timezone to the users selected timezone if one is not set.
|
||||||
*
|
*
|
||||||
* @param string $time String in a format accepted by strtotime().
|
* @param string $time String in a format accepted by strtotime().
|
||||||
|
@ -274,7 +274,7 @@ class driver
|
|||||||
* Correctly adjust LIKE expression for special characters
|
* Correctly adjust LIKE expression for special characters
|
||||||
* Some DBMS are handling them in a different way
|
* Some DBMS are handling them in a different way
|
||||||
*
|
*
|
||||||
* @param string $expression The expression to use. Every wildcard is escaped, \except $this->any_char and $this->one_char
|
* @param string $expression The expression to use. Every wildcard is escaped, except $this->any_char and $this->one_char
|
||||||
* @return string LIKE expression including the keyword!
|
* @return string LIKE expression including the keyword!
|
||||||
*/
|
*/
|
||||||
function sql_like_expression($expression)
|
function sql_like_expression($expression)
|
||||||
@ -452,7 +452,7 @@ class driver
|
|||||||
* @param string $field name of the sql column that shall be compared
|
* @param string $field name of the sql column that shall be compared
|
||||||
* @param array $array array of values that are allowed (IN) or not allowed (NOT IN)
|
* @param array $array array of values that are allowed (IN) or not allowed (NOT IN)
|
||||||
* @param bool $negate true for NOT IN (), false for IN () (default)
|
* @param bool $negate true for NOT IN (), false for IN () (default)
|
||||||
* @param bool $allow_empty_set If true, \allow $array to be empty, this function will return 1=1 or 1=0 then. Default to false.
|
* @param bool $allow_empty_set If true, allow $array to be empty, this function will return 1=1 or 1=0 then. Default to false.
|
||||||
*/
|
*/
|
||||||
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
|
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
|
||||||
{
|
{
|
||||||
|
@ -216,7 +216,7 @@ class release_3_0_6_rc1 extends \phpbb\db\migration\migration
|
|||||||
$group_id = $this->db->sql_nextid();
|
$group_id = $this->db->sql_nextid();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert new \user role... at the end of the chain
|
// Insert new user role... at the end of the chain
|
||||||
$sql = 'SELECT role_id
|
$sql = 'SELECT role_id
|
||||||
FROM ' . ACL_ROLES_TABLE . "
|
FROM ' . ACL_ROLES_TABLE . "
|
||||||
WHERE role_name = 'ROLE_USER_NEW_MEMBER'
|
WHERE role_name = 'ROLE_USER_NEW_MEMBER'
|
||||||
@ -241,7 +241,7 @@ class release_3_0_6_rc1 extends \phpbb\db\migration\migration
|
|||||||
$u_role = $this->db->sql_nextid();
|
$u_role = $this->db->sql_nextid();
|
||||||
|
|
||||||
// Now add the correct data to the roles...
|
// Now add the correct data to the roles...
|
||||||
// The standard role says that new \users are not able to send a PM, Mass PM, are not able to PM groups
|
// The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups
|
||||||
$sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
|
$sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
|
||||||
$this->sql_query($sql);
|
$this->sql_query($sql);
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ class release_3_0_6_rc1 extends \phpbb\db\migration\migration
|
|||||||
$this->sql_query($sql);
|
$this->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert new \forum role
|
// Insert new forum role
|
||||||
$sql = 'SELECT role_id
|
$sql = 'SELECT role_id
|
||||||
FROM ' . ACL_ROLES_TABLE . "
|
FROM ' . ACL_ROLES_TABLE . "
|
||||||
WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
|
WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
|
||||||
@ -278,7 +278,7 @@ class release_3_0_6_rc1 extends \phpbb\db\migration\migration
|
|||||||
$this->sql_query($sql);
|
$this->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set every members user_new \column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
|
// Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
|
||||||
$sql = 'SELECT 1
|
$sql = 'SELECT 1
|
||||||
FROM ' . USERS_TABLE . '
|
FROM ' . USERS_TABLE . '
|
||||||
WHERE user_new = 0';
|
WHERE user_new = 0';
|
||||||
|
@ -185,7 +185,7 @@ class dev extends \phpbb\db\migration\migration
|
|||||||
|
|
||||||
public function move_customise_modules()
|
public function move_customise_modules()
|
||||||
{
|
{
|
||||||
// Move language management to new \location in the Customise tab
|
// Move language management to new location in the Customise tab
|
||||||
// First get language module id
|
// First get language module id
|
||||||
$sql = 'SELECT module_id FROM ' . MODULES_TABLE . "
|
$sql = 'SELECT module_id FROM ' . MODULES_TABLE . "
|
||||||
WHERE module_basename = 'acp_language'";
|
WHERE module_basename = 'acp_language'";
|
||||||
|
@ -65,7 +65,7 @@ class timezone extends \phpbb\db\migration\migration
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the new \timezone for a given phpBB 3.0 timezone and
|
* Determine the new timezone for a given phpBB 3.0 timezone and
|
||||||
* "Daylight Saving Time" option
|
* "Daylight Saving Time" option
|
||||||
*
|
*
|
||||||
* @param $timezone float Users timezone in 3.0
|
* @param $timezone float Users timezone in 3.0
|
||||||
|
@ -18,7 +18,7 @@ if (!defined('IN_PHPBB'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The migrator is responsible for applying new \migrations in the correct order.
|
* The migrator is responsible for applying new migrations in the correct order.
|
||||||
*
|
*
|
||||||
* @package db
|
* @package db
|
||||||
*/
|
*/
|
||||||
@ -66,8 +66,8 @@ class exception extends \Exception
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get localised message (\with $user->lang())
|
* Get localised message (with $user->lang())
|
||||||
*
|
*
|
||||||
* @param \phpbb\user $user
|
* @param \phpbb\user $user
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -80,7 +80,7 @@ class config implements \phpbb\db\migration\tool\tool_interface
|
|||||||
* current config value
|
* current config value
|
||||||
*
|
*
|
||||||
* @param string $compare If equal to the current config value, will be
|
* @param string $compare If equal to the current config value, will be
|
||||||
* updated to the new \config value, otherwise not
|
* updated to the new config value, otherwise not
|
||||||
* @param string $config_name The name of the config setting you would
|
* @param string $config_name The name of the config setting you would
|
||||||
* like to update
|
* like to update
|
||||||
* @param mixed $config_value The value of the config setting
|
* @param mixed $config_value The value of the config setting
|
||||||
|
@ -131,7 +131,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
|
|||||||
/**
|
/**
|
||||||
* Module Add
|
* Module Add
|
||||||
*
|
*
|
||||||
* Add a new \module
|
* Add a new module
|
||||||
*
|
*
|
||||||
* @param string $class The module class(acp|mcp|ucp)
|
* @param string $class The module class(acp|mcp|ucp)
|
||||||
* @param int|string $parent The parent module_id|module_langname (0 for no parent)
|
* @param int|string $parent The parent module_id|module_langname (0 for no parent)
|
||||||
|
@ -238,7 +238,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new \permission role
|
* Add a new permission role
|
||||||
*
|
*
|
||||||
* @param string $role_name The new \role name
|
* @param string $role_name The new \role name
|
||||||
* @param sting $role_type The type (u_, m_, a_)
|
* @param sting $role_type The type (u_, m_, a_)
|
||||||
|
@ -18,7 +18,7 @@ if (!defined('IN_PHPBB'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The migrator is responsible for applying new \migrations in the correct order.
|
* The migrator is responsible for applying new migrations in the correct order.
|
||||||
*
|
*
|
||||||
* @package db
|
* @package db
|
||||||
*/
|
*/
|
||||||
|
@ -1703,7 +1703,7 @@ class tools
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add new \column
|
* Add new column
|
||||||
*/
|
*/
|
||||||
function sql_column_add($table_name, $column_name, $column_data, $inline = false)
|
function sql_column_add($table_name, $column_name, $column_data, $inline = false)
|
||||||
{
|
{
|
||||||
|
@ -380,7 +380,7 @@ class manager
|
|||||||
unset($notify_users[ANONYMOUS]);
|
unset($notify_users[ANONYMOUS]);
|
||||||
|
|
||||||
// Make sure not to send new \notifications to users who've already been notified about this item
|
// Make sure not to send new \notifications to users who've already been notified about this item
|
||||||
// This may happen when an item was added, but now new \users are able to see the item
|
// This may happen when an item was added, but now new users are able to see the item
|
||||||
$sql = 'SELECT n.user_id
|
$sql = 'SELECT n.user_id
|
||||||
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
|
||||||
WHERE n.notification_type_id = ' . (int) $notification_type_id . '
|
WHERE n.notification_type_id = ' . (int) $notification_type_id . '
|
||||||
|
@ -168,7 +168,7 @@ class quote extends \phpbb\notification\type\post
|
|||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
// Find the new \users to notify
|
// Find the new users to notify
|
||||||
$notifications = $this->find_users_for_notification($post);
|
$notifications = $this->find_users_for_notification($post);
|
||||||
|
|
||||||
// Find the notifications we must delete
|
// Find the notifications we must delete
|
||||||
|
Loading…
x
Reference in New Issue
Block a user