Ran phpcs and fixed a few errors and warnings
This commit is contained in:
parent
44a5cd2805
commit
410883d146
|
@ -86,13 +86,11 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) {
|
$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) {
|
||||||
|
|
||||||
$this->serveMobile = true;
|
$this->serveMobile = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// If they like the WAP 2.0 mimetype, serve them MP
|
// If they like the WAP 2.0 mimetype, serve them MP
|
||||||
if (strstr('application/vnd.wap.xhtml+xml', $type) !== false) {
|
if (strstr('application/vnd.wap.xhtml+xml', $type) !== false) {
|
||||||
$this->serveMobile = true;
|
$this->serveMobile = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// If they are a mobile device that supports WAP 2.0,
|
// If they are a mobile device that supports WAP 2.0,
|
||||||
// serve them MP
|
// serve them MP
|
||||||
|
|
||||||
|
@ -204,7 +202,6 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
|
|
||||||
function setMobileFeatures($useragent)
|
function setMobileFeatures($useragent)
|
||||||
{
|
{
|
||||||
/* List of devices that support input type="file" */
|
|
||||||
$mobiledeviceInputFileType = array(
|
$mobiledeviceInputFileType = array(
|
||||||
'nokia'
|
'nokia'
|
||||||
);
|
);
|
||||||
|
@ -243,8 +240,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
|
|
||||||
if (file_exists(theme_file('css/mp-screen.css'))) {
|
if (file_exists(theme_file('css/mp-screen.css'))) {
|
||||||
$action->cssLink('css/mp-screen.css', null, 'screen');
|
$action->cssLink('css/mp-screen.css', null, 'screen');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$action->element('link', array('rel' => 'stylesheet',
|
$action->element('link', array('rel' => 'stylesheet',
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION,
|
'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION,
|
||||||
|
@ -253,8 +249,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
|
|
||||||
if (file_exists(theme_file('css/mp-handheld.css'))) {
|
if (file_exists(theme_file('css/mp-handheld.css'))) {
|
||||||
$action->cssLink('css/mp-handheld.css', null, 'handheld');
|
$action->cssLink('css/mp-handheld.css', null, 'handheld');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$action->element('link', array('rel' => 'stylesheet',
|
$action->element('link', array('rel' => 'stylesheet',
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION,
|
'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION,
|
||||||
|
@ -303,7 +298,8 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _showPrimaryNav($action) {
|
function _showPrimaryNav($action)
|
||||||
|
{
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$connect = '';
|
$connect = '';
|
||||||
if (common_config('xmpp', 'enabled')) {
|
if (common_config('xmpp', 'enabled')) {
|
||||||
|
@ -330,8 +326,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||||
}
|
}
|
||||||
$action->menuItem(common_local_url('logout'),
|
$action->menuItem(common_local_url('logout'),
|
||||||
_('Logout'));
|
_('Logout'));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (!common_config('site', 'closed')) {
|
if (!common_config('site', 'closed')) {
|
||||||
$action->menuItem(common_local_url('register'),
|
$action->menuItem(common_local_url('register'),
|
||||||
_('Register'));
|
_('Register'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user