diff options
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/avatar/driver/gravatar.php | 13 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/m_pm_report.php | 64 | ||||
| -rw-r--r-- | phpBB/phpbb/permissions.php | 5 | 
3 files changed, 80 insertions, 2 deletions
| diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php index 2082e0fd02..bb4977c30c 100644 --- a/phpBB/phpbb/avatar/driver/gravatar.php +++ b/phpBB/phpbb/avatar/driver/gravatar.php @@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver  	*/  	protected function get_gravatar_url($row)  	{ +		global $phpbb_dispatcher; +  		$url = self::GRAVATAR_URL;  		$url .=  md5(strtolower(trim($row['avatar']))); @@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver  			$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);  		} +		/** +		* Modify gravatar url +		* +		* @event core.get_gravatar_url_after +		* @var	string	row	User data or group data +		* @var	string	url	Gravatar URL +		* @since 3.1.7-RC1 +		*/ +		$vars = array('row', 'url'); +		extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars))); +  		return $url;  	}  } diff --git a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php new file mode 100644 index 0000000000..9b5710c639 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php @@ -0,0 +1,64 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class m_pm_report extends \phpbb\db\migration\migration +{ +	static public function depends_on() +	{ +		return array('\phpbb\db\migration\data\v31x\v316rc1'); +	} + +	public function update_data() +	{ +		return array( +			array('permission.add', array('m_pm_report', true, 'm_report')), +			array('custom', array( +					array($this, 'update_module_auth'), +				), +			), +		); +	} + +	public function revert_data() +	{ +		return array( +			array('permission.remove', array('m_pm_report')), +			array('custom', array( +					array($this, 'revert_module_auth'), +				), +			), +		); +	} + +	public function update_module_auth() +	{ +		$sql = 'UPDATE ' . MODULES_TABLE . " +			SET module_auth = 'acl_m_pm_report' +			WHERE module_class = 'mcp' +				AND module_basename = 'mcp_pm_reports' +				AND module_auth = 'aclf_m_report'"; +		$this->db->sql_query($sql); +	} + +	public function revert_module_auth() +	{ +		$sql = 'UPDATE ' . MODULES_TABLE . " +			SET module_auth = 'aclf_m_report' +			WHERE module_class = 'mcp' +				AND module_basename = 'mcp_pm_reports' +				AND module_auth = 'acl_m_pm_report'"; +		$this->db->sql_query($sql); +	} +} diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index 42bbe443d1..e75476f59b 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -307,8 +307,9 @@ class permissions  		'm_split'	=> array('lang' => 'ACL_M_SPLIT', 'cat' => 'topic_actions'),  		'm_merge'	=> array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'), -		'm_warn'	=> array('lang' => 'ACL_M_WARN', 'cat' => 'misc'), -		'm_ban'		=> array('lang' => 'ACL_M_BAN', 'cat' => 'misc'), +		'm_warn'		=> array('lang' => 'ACL_M_WARN', 'cat' => 'misc'), +		'm_pm_report'	=> array('lang' => 'ACL_M_PM_REPORT', 'cat' => 'misc'), +		'm_ban'			=> array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),  		// Admin Permissions  		'a_board'		=> array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'), | 
