diff --git a/src/Module/Contact/Repair.php b/src/Module/Contact/Advanced.php similarity index 96% rename from src/Module/Contact/Repair.php rename to src/Module/Contact/Advanced.php index a7c68822e6..f0641076d0 100644 --- a/src/Module/Contact/Repair.php +++ b/src/Module/Contact/Advanced.php @@ -14,9 +14,9 @@ use Friendica\Network\HTTPException\ForbiddenException; use Friendica\Util\Strings; /** - * GUI for repairing contact details + * GUI for advanced contact details manipulation */ -class Repair extends BaseModule +class Advanced extends BaseModule { public static function init(array $parameters = []) { @@ -27,7 +27,7 @@ class Repair extends BaseModule public static function post(array $parameters = []) { - $cid = $parameters['contact']; + $cid = $parameters['id']; $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => local_user()]); if (empty($contact)) { @@ -82,9 +82,7 @@ class Repair extends BaseModule public static function content(array $parameters = []) { - $cid = $parameters['contact']; - - $cid = $parameters['contact']; + $cid = $parameters['id']; $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => local_user()]); if (empty($contact)) { @@ -124,7 +122,7 @@ class Repair extends BaseModule $tab_str = Contact::getTabsHTML($a, $contact, 6); - $tpl = Renderer::getMarkupTemplate('crepair.tpl'); + $tpl = Renderer::getMarkupTemplate('contact/advanced.tpl'); return Renderer::replaceMacros($tpl, [ '$tab_str' => $tab_str, '$warning' => $warning, diff --git a/static/routes.config.php b/static/routes.config.php index 73b7428468..d145fcffd4 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -87,6 +87,7 @@ return [ '[/]' => [Module\Contact::class, [R::GET]], '/{id:\d+}[/]' => [Module\Contact::class, [R::GET, R::POST]], '/{id:\d+}/archive' => [Module\Contact::class, [R::GET]], + '/{id:\d+}/advanced' => [Module\Contact\Advanced::class, [R::GET, R::POST]], '/{id:\d+}/block' => [Module\Contact::class, [R::GET]], '/{id:\d+}/conversations' => [Module\Contact::class, [R::GET]], '/{id:\d+}/drop' => [Module\Contact::class, [R::GET]], @@ -104,7 +105,6 @@ return [ ], '/credits' => [Module\Credits::class, [R::GET]], - '/crepair/{contact:\d+}' => [Module\Contact\Repair::class, [R::GET, R::POST]], '/delegation'=> [Module\Delegation::class, [R::GET, R::POST]], '/dirfind' => [Module\Search\Directory::class, [R::GET]], diff --git a/view/templates/crepair.tpl b/view/templates/contact/advanced.tpl similarity index 84% rename from view/templates/crepair.tpl rename to view/templates/contact/advanced.tpl index 77fa993e19..6c6065f1cc 100644 --- a/view/templates/crepair.tpl +++ b/view/templates/contact/advanced.tpl @@ -2,14 +2,14 @@ {{$tab_str nofilter}} -
{{$warning nofilter}}

-
+
{{$warning nofilter}}

+
{{$info nofilter}}

-
+