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