mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-10-31 02:16:26 +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; |         $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, '/'); |         $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); |         $this->grav->redirect($base . '/' . preg_replace('|/+|', '/', $path), $this->redirectCode); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user