From 7d70f2f0f2551178fe40d0ab61976f8b345ccdd1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 25 Mar 2026 12:45:44 +0100 Subject: [PATCH] Zotlabs\Extend\Route: Set method visibility Make `Route::set()` private. It is not referenced outside of the class itself, and is also unsafe as it uncritically replaces the system routes with whatever value it was passed. The remaining functions are set to public visibility. --- Zotlabs/Extend/Route.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Extend/Route.php b/Zotlabs/Extend/Route.php index c218ef460..a704850c5 100644 --- a/Zotlabs/Extend/Route.php +++ b/Zotlabs/Extend/Route.php @@ -65,7 +65,7 @@ class Route { * @see {@link Zotlabs::Extend::Route.unregister() unregister()} * @see {@link Zotlabs::Extend::Route.unregister_by_file() unregister_by_file()} */ - static function register($file,$modname) { + public static function register($file,$modname) { $rt = self::get(); foreach ($rt as $r) { @@ -95,7 +95,7 @@ class Route { * @see {@link Zotlabs::Extend::Route.register() register()} * @see {@link Zotlabs::Extend::Route.unregister_by_file() unregister_by_file()} */ - static function unregister($file,$modname) { + public static function unregister($file,$modname) { $rt = self::get(); if($rt) { $n = []; @@ -124,7 +124,7 @@ class Route { * @see {@link Zotlabs::Extend::Route.register() register()} * @see {@link Zotlabs::Extend::Route.unregister() unregister()} */ - static function unregister_by_file($file) { + public static function unregister_by_file($file) { $rt = self::get(); if($rt) { $n = []; @@ -144,11 +144,11 @@ class Route { * containing two elements, the file, and the module * name. */ - static function get() { + public static function get() { return Config::Get('system','routes',[]); } - static function set($r) { + private static function set($r) { return Config::Set('system','routes',$r); } }