Various code inspection items
- Fix class extension in Module\Admin\Item\Source - Remove useless condition in Module\Admin\Features
This commit is contained in:
parent
6df37afb82
commit
451a06a597
|
@ -5,7 +5,6 @@ namespace Friendica\Module\Admin;
|
||||||
use Friendica\Content\Feature;
|
use Friendica\Content\Feature;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Module\BaseAdminModule;
|
use Friendica\Module\BaseAdminModule;
|
||||||
|
|
||||||
|
@ -47,9 +46,6 @@ class Features extends BaseAdminModule
|
||||||
{
|
{
|
||||||
parent::content();
|
parent::content();
|
||||||
|
|
||||||
$a = self::getApp();
|
|
||||||
|
|
||||||
if (($a->argc > 1) && ($a->getArgumentValue(1) === 'features')) {
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$features = Feature::get(false);
|
$features = Feature::get(false);
|
||||||
|
|
||||||
|
@ -76,4 +72,3 @@ class Features extends BaseAdminModule
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -5,20 +5,21 @@ namespace Friendica\Module\Admin\Item;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Model;
|
use Friendica\Model;
|
||||||
|
use Friendica\Module\BaseAdminModule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||||
*/
|
*/
|
||||||
class Source extends \Friendica\BaseModule
|
class Source extends BaseAdminModule
|
||||||
|
|
||||||
{
|
{
|
||||||
public static function content()
|
public static function content()
|
||||||
{
|
{
|
||||||
if (!is_site_admin()) {
|
parent::content();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$a = self::getApp();
|
$a = self::getApp();
|
||||||
|
|
||||||
|
$guid = null;
|
||||||
if (!empty($a->argv[1])) {
|
if (!empty($a->argv[1])) {
|
||||||
$guid = $a->argv[1];
|
$guid = $a->argv[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue