Commit 7d50189e authored by Zach Copley's avatar Zach Copley

FacebookBridge - Don't hinder autoloading if the Facebook ID and secret aren't set

parent de6d46ea
......@@ -179,28 +179,22 @@ class FacebookBridgePlugin extends Plugin
// Always add the admin panel route
$m->connect('admin/facebook', array('action' => 'facebookadminpanel'));
// Only add these routes if an application has been setup on
// Facebook for the plugin to use.
if ($this->hasApplication()) {
$m->connect(
'main/facebooklogin',
array('action' => 'facebooklogin')
);
$m->connect(
'main/facebookfinishlogin',
array('action' => 'facebookfinishlogin')
);
$m->connect(
'settings/facebook',
array('action' => 'facebooksettings')
);
$m->connect(
'facebook/deauthorize',
array('action' => 'facebookdeauthorize')
);
}
$m->connect(
'main/facebooklogin',
array('action' => 'facebooklogin')
);
$m->connect(
'main/facebookfinishlogin',
array('action' => 'facebookfinishlogin')
);
$m->connect(
'settings/facebook',
array('action' => 'facebooksettings')
);
$m->connect(
'facebook/deauthorize',
array('action' => 'facebookdeauthorize')
);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment