add support for a theme request parameter (fixes #51)
* includes/galleryfunctions.php:
  - check for request parameter theme and whether it matches an
    allowed directory name
 * includes/theme.class.php:
  - die if the theme cannot be initialized properly
			
			
This commit is contained in:
		
							parent
							
								
									ded7232146
								
							
						
					
					
						commit
						5be4c55b97
					
				
					 2 changed files with 13 additions and 4 deletions
				
			
		|  | @ -46,7 +46,13 @@ if (array_key_exists('logfile', $configuration)) { | |||
| } | ||||
| 
 | ||||
| require_once('theme.class.php'); | ||||
| $theme = new Theme($configuration['defaulttheme']); | ||||
| 
 | ||||
| if (array_key_exists('theme', $_GET) && | ||||
|     preg_match('/^[a-zA-Z0-9_-]+$/', $_GET['theme'])) { | ||||
|   $theme = new Theme($_GET['theme']); | ||||
| } else { | ||||
|   $theme = new Theme($configuration['defaulttheme']); | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Breite der Vorschaubilder. | ||||
|  |  | |||
		Reference in a new issue