diff options
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/config/db.php | 4 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/profilefield_yahoo_update_url.php | 38 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/tool/module.php | 1 | ||||
| -rw-r--r-- | phpBB/phpbb/db/tools.php | 2 | ||||
| -rw-r--r-- | phpBB/phpbb/log/log.php | 44 | ||||
| -rw-r--r-- | phpBB/phpbb/session.php | 16 | ||||
| -rw-r--r-- | phpBB/phpbb/template/twig/twig.php | 5 | 
7 files changed, 106 insertions, 4 deletions
diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php index ef20ebf62a..26489bdd34 100644 --- a/phpBB/phpbb/config/db.php +++ b/phpBB/phpbb/config/db.php @@ -145,9 +145,9 @@ class db extends \phpbb\config\config  			$sql .= " AND config_value = '" . $this->db->sql_escape($old_value) . "'";  		} -		$result = $this->db->sql_query($sql); +		$this->db->sql_query($sql); -		if (!$this->db->sql_affectedrows($result) && isset($this->config[$key])) +		if (!$this->db->sql_affectedrows() && isset($this->config[$key]))  		{  			return false;  		} diff --git a/phpBB/phpbb/db/migration/data/v31x/profilefield_yahoo_update_url.php b/phpBB/phpbb/db/migration/data/v31x/profilefield_yahoo_update_url.php new file mode 100644 index 0000000000..4df9083bdf --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/profilefield_yahoo_update_url.php @@ -0,0 +1,38 @@ +<?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 profilefield_yahoo_update_url extends \phpbb\db\migration\migration +{ +	static public function depends_on() +	{ +		return array('\phpbb\db\migration\data\v31x\v312'); +	} + +	public function update_data() +	{ +		return array( +			array('custom', array(array($this, 'update_contact_url'))), +		); +	} + +	public function update_contact_url() +	{ +		$sql = 'UPDATE ' . $this->table_prefix . "profile_fields +			SET field_contact_url = 'ymsgr:sendim?%s' +			WHERE field_name = 'phpbb_yahoo' +				AND field_contact_url = 'http://edit.yahoo.com/config/send_webmesg?.target=%s&.src=pg'"; +		$this->sql_query($sql); +	} +} diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php index db43046a95..035625b095 100644 --- a/phpBB/phpbb/db/migration/tool/module.php +++ b/phpBB/phpbb/db/migration/tool/module.php @@ -475,6 +475,7 @@ class module implements \phpbb\db\migration\tool\tool_interface  		if (!class_exists('acp_modules'))  		{  			include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext); +			$this->user->add_lang('acp/modules');  		}  		$acp_modules = new \acp_modules();  		$module = $acp_modules->get_module_infos($basename, $class, true); diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index c8d25f23a2..f523b39fb3 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -2175,7 +2175,7 @@ class tools  				}  			// no break  			case 'mysql_41': -				$statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . '(' . implode(', ', $column) . ')'; +				$statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . ' (' . implode(', ', $column) . ')';  			break;  			case 'mssql': diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 2af8b50b54..0c5205530b 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -708,6 +708,50 @@ class log implements \phpbb\log\log_interface  			}  		} +		/** +		* Allow modifying or execute extra final filter on log entries +		* +		* @event core.get_logs_after +		* @var	array	log			Array with all our log entries +		* @var	array	topic_id_list		Array of topic ids, for which we +		*									get the permission data +		* @var	array	reportee_id_list	Array of additional user IDs we +		*									get the username strings for +		* @var	string	mode		Mode of the entries we display +		* @var	bool	count_logs	Do we count all matching entries? +		* @var	int		limit		Limit the number of entries +		* @var	int		offset		Offset when fetching the entries +		* @var	mixed	forum_id	Limit entries to the forum_id, +		*							can also be an array of forum_ids +		* @var	int		topic_id	Limit entries to the topic_id +		* @var	int		user_id		Limit entries to the user_id +		* @var	int		log_time	Limit maximum age of log entries +		* @var	string	sort_by		SQL order option +		* @var	string	keywords	Will only return entries that have the +		*							keywords in log_operation or log_data +		* @var	string	profile_url	URL to the users profile +		* @var	int		log_type	The type of logs it was filtered +		* @since 3.1.3-RC1 +		*/ +		$vars = array( +			'log', +			'topic_id_list', +			'reportee_id_list', +			'mode', +			'count_logs', +			'limit', +			'offset', +			'forum_id', +			'topic_id', +			'user_id', +			'log_time', +			'sort_by', +			'keywords', +			'profile_url', +			'log_type', +		); +		extract($this->dispatcher->trigger_event('core.get_logs_after', compact($vars))); +  		return $log;  	} diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 691d0d5bef..0a6a18ffbe 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1082,7 +1082,7 @@ class session  	*/  	function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false)  	{ -		global $config, $db; +		global $config, $db, $phpbb_dispatcher;  		if (defined('IN_CHECK_BAN') || defined('SKIP_CHECK_BAN'))  		{ @@ -1196,6 +1196,20 @@ class session  		}  		$db->sql_freeresult($result); +		/** +		* Event to set custom ban type +		* +		* @event core.session_set_custom_ban +		* @var	bool		return				If $return is false this routine does not return on finding a banned user, it outputs a relevant message and stops execution +		* @var	bool		banned				Check if user already banned +		* @var	array|false	ban_row				Ban data +		* @var	string		ban_triggered_by	Method that caused ban, can be your custom method +		* @since 3.1.3-RC1 +		*/ +		$ban_row = isset($ban_row) ? $ban_row : false; +		$vars = array('return', 'banned', 'ban_row', 'ban_triggered_by'); +		extract($phpbb_dispatcher->trigger_event('core.session_set_custom_ban', compact($vars))); +  		if ($banned && !$return)  		{  			global $template, $phpbb_root_path, $phpEx; diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 5b71bb5e8a..db3a8e3571 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -115,6 +115,11 @@ class twig extends \phpbb\template\base  			)  		); +		if (defined('DEBUG')) +		{ +			$this->twig->addExtension(new \Twig_Extension_Debug()); +		} +  		$lexer = new \phpbb\template\twig\lexer($this->twig);  		$this->twig->setLexer($lexer);  | 
