Browse Source

Add safety checks to erver-stored avatars too

Signed-off-by: Suki <[email protected]>
Suki 10 years ago
parent
commit
24a36584db
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Sources/ManageAttachments.php

+ 6 - 0
Sources/ManageAttachments.php

@@ -337,6 +337,12 @@ function ManageAvatarSettings($return_config = false)
 		if (empty($_POST['custom_avatar_url']))
 			$_POST['custom_avatar_url'] = $boardurl .'/custom_avatar';
 
+		if (empty($_POST['avatar_directory']))
+			$_POST['avatar_directory'] = $boarddir .'/avatars';
+
+		if (empty($_POST['avatar_url']))
+			$_POST['avatar_url'] = $boardurl .'/avatars';
+
 		call_integration_hook('integrate_save_avatar_settings');
 
 		saveDBSettings($config_vars);