forked from GNUsocial/gnu-social
[ROUTES] Allow accept-header specification during router creation
Router: - Fix calls to connect, most of them were misusing the function's params URLMapper: - Minor fixes - Documentation - Add support for accept-header specification Plugins/*: - Fix calls to connect
This commit is contained in:
committed by
Diogo Cordeiro
parent
2032c7c1f7
commit
5c0a3102ff
@@ -111,23 +111,17 @@ class TwitterBridgePlugin extends Plugin
|
||||
*/
|
||||
public function onRouterInitialized(URLMapper $m)
|
||||
{
|
||||
$m->connect('panel/twitter', array('action' => 'twitteradminpanel'));
|
||||
$m->connect('panel/twitter', ['action' => 'twitteradminpanel']);
|
||||
|
||||
if (self::hasKeys()) {
|
||||
$m->connect(
|
||||
'twitter/authorization',
|
||||
array('action' => 'twitterauthorization')
|
||||
);
|
||||
$m->connect(
|
||||
'settings/twitter', array(
|
||||
'action' => 'twittersettings'
|
||||
)
|
||||
);
|
||||
$m->connect('twitter/authorization',
|
||||
['action' => 'twitterauthorization']);
|
||||
$m->connect('settings/twitter',
|
||||
['action' => 'twittersettings']);
|
||||
|
||||
if (common_config('twitter', 'signin')) {
|
||||
$m->connect(
|
||||
'main/twitterlogin',
|
||||
array('action' => 'twitterlogin')
|
||||
);
|
||||
$m->connect('main/twitterlogin',
|
||||
['action' => 'twitterlogin']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user