mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-11-03 20:05:53 +01:00 
			
		
		
		
	Correctly set the file name including the language if set
This commit is contained in:
		@@ -1148,7 +1148,12 @@ class AdminController
 | 
			
		||||
 | 
			
		||||
        if (isset($input['type']) && !empty($input['type'])) {
 | 
			
		||||
            $type = (string) strtolower($input['type']);
 | 
			
		||||
            $name = preg_replace('|.*/|', '', $type) . '.md';
 | 
			
		||||
            $name = preg_replace('|.*/|', '', $type);
 | 
			
		||||
            $language = $this->grav['language'];
 | 
			
		||||
            if ($language->enabled()) {
 | 
			
		||||
                $name .= '.' . $language->getLanguage();
 | 
			
		||||
            }
 | 
			
		||||
            $name .= '.md';
 | 
			
		||||
            $page->name($name);
 | 
			
		||||
            $page->template($type);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user