mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[feature/add_events] Rename override to overwrite, made docs 79 chars/line
PHPBB3-9550
This commit is contained in:
parent
008cf967ab
commit
6c6b179dd4
1 changed files with 18 additions and 17 deletions
|
@ -2239,38 +2239,39 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||||
$params = false;
|
$params = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$append_sid_override = false;
|
$append_sid_overwrite = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event can either supplement or override the append_sid() function
|
* This event can either supplement or override the append_sid() function
|
||||||
*
|
*
|
||||||
* To override this function, the event must set $append_sid_override to
|
* To override this function, the event must set $append_sid_overwrite to
|
||||||
* the new URL value, which will be returned following the event
|
* the new URL value, which will be returned following the event
|
||||||
*
|
*
|
||||||
* @event core.append_sid
|
* @event core.append_sid
|
||||||
* @var string url The url the session id needs to be
|
* @var string url The url the session id needs
|
||||||
* appended to (can have params)
|
* to be appended to (can have
|
||||||
* @var mixed params String or array of additional url
|
* params)
|
||||||
* parameters
|
* @var mixed params String or array of additional
|
||||||
* @var bool is_amp Is url using & (true) or
|
* url parameters
|
||||||
* & (false)
|
* @var bool is_amp Is url using & (true) or
|
||||||
* @var bool|string session_id Possibility to use a custom session
|
* & (false)
|
||||||
* id (string) instead of the global
|
* @var bool|string session_id Possibility to use a custom
|
||||||
* one (false)
|
* session id (string) instead of
|
||||||
* @var bool|string append_sid_override Overwrite function (string URL)
|
* the global one (false)
|
||||||
* or not (false)
|
* @var bool|string append_sid_overwrite Overwrite function (string
|
||||||
|
* URL) or not (false)
|
||||||
* @since 3.1-A1
|
* @since 3.1-A1
|
||||||
*/
|
*/
|
||||||
$vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_override');
|
$vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_overwrite');
|
||||||
extract($phpbb_dispatcher->trigger_event('core.append_sid', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.append_sid', compact($vars)));
|
||||||
|
|
||||||
if ($append_sid_override)
|
if ($append_sid_overwrite)
|
||||||
{
|
{
|
||||||
return $append_sid_override;
|
return $append_sid_overwrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following hook remains for backwards compatibility, though use of
|
// The following hook remains for backwards compatibility, though use of
|
||||||
// the event above is preferred.
|
// the event above is preferred.
|
||||||
// Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropriately.
|
// Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropriately.
|
||||||
// They could mimic most of what is within this function
|
// They could mimic most of what is within this function
|
||||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
|
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
|
||||||
|
|
Loading…
Add table
Reference in a new issue