mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-10-29 01:06:38 +01:00 
			
		
		
		
	Make sure we always have the language code in the URL
This commit is contained in:
		| @@ -117,6 +117,11 @@ class AdminController | ||||
|         } | ||||
|  | ||||
|         $base = $this->admin->base; | ||||
|  | ||||
|         if ($base[3] !== '/') { | ||||
|             $base = '/' . $this->grav['session']->admin_lang . $base; | ||||
|         } | ||||
|  | ||||
|         $path = trim(substr($this->redirect, 0, strlen($base)) == $base ? substr($this->redirect, strlen($base)) : $this->redirect, '/'); | ||||
|  | ||||
|         $this->grav->redirect($base . '/' . preg_replace('|/+|', '/', $path), $this->redirectCode); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user