forked from GNUsocial/gnu-social
[BugFix] Plugins ExtendedProfile and OverwriteThemeBackground - admin is identical to system path names.
This commit is contained in:
parent
693c3168da
commit
c3ba2e0f94
@ -192,10 +192,10 @@ class Nickname
|
||||
*/
|
||||
public static function isSystemPath($str)
|
||||
{
|
||||
$paths = array();
|
||||
$paths = [];
|
||||
|
||||
// All directory and file names in site root should be blacklisted
|
||||
$d = dir(INSTALLDIR);
|
||||
$d = dir(PUBLICDIR);
|
||||
while (false !== ($entry = $d->read())) {
|
||||
$paths[$entry] = true;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ include_once __DIR__ . '/lib/profiletools.php';
|
||||
|
||||
class ExtendedProfilePlugin extends Plugin
|
||||
{
|
||||
const PLUGIN_VERSION = '3.0.0';
|
||||
const PLUGIN_VERSION = '3.0.1';
|
||||
|
||||
public function onPluginVersion(array &$versions): bool
|
||||
{
|
||||
@ -75,7 +75,7 @@ class ExtendedProfilePlugin extends Plugin
|
||||
['action' => 'profiledetailsettings']
|
||||
);
|
||||
$m->connect(
|
||||
'admin/profilefields',
|
||||
'panel/profilefields',
|
||||
['action' => 'profilefieldsAdminPanel']
|
||||
);
|
||||
|
||||
|
@ -127,7 +127,7 @@ class ProfilefieldsAdminForm extends AdminForm
|
||||
|
||||
public function action(): string
|
||||
{
|
||||
return '/admin/profilefields';
|
||||
return common_local_url('profilefieldsAdminPanel');
|
||||
}
|
||||
|
||||
public function formData(): void
|
||||
@ -158,7 +158,7 @@ class ProfilefieldsAdminForm extends AdminForm
|
||||
$this->out->elementStart('div');
|
||||
$this->out->element(
|
||||
'a',
|
||||
array('href' => '/admin/profilefields?edit=' . $field->id),
|
||||
['href' => common_local_url('profilefieldsAdminPanel').'?edit=' . $field->id],
|
||||
$field->title
|
||||
);
|
||||
$this->out->text(' (' . $field->type . '): ' . $field->description);
|
||||
|
@ -33,7 +33,7 @@ defined('GNUSOCIAL') || die();
|
||||
*/
|
||||
class OverwriteThemeBackgroundPlugin extends Plugin
|
||||
{
|
||||
const PLUGIN_VERSION = '0.1.0';
|
||||
const PLUGIN_VERSION = '0.1.1';
|
||||
|
||||
/**
|
||||
* Route urls
|
||||
@ -46,7 +46,7 @@ class OverwriteThemeBackgroundPlugin extends Plugin
|
||||
{
|
||||
$m->connect('plugins/OverwriteThemeBackground/css/my_custom_theme_bg',
|
||||
['action' => 'OverwriteThemeBackgroundCSS']);
|
||||
$m->connect('admin/overwritethemebackground',
|
||||
$m->connect('panel/overwritethemebackground',
|
||||
['action' => 'overwritethemebackgroundAdminPanel']);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user