mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user