Переглянути джерело

Nah... Lets do this properly...

Signed-off-by: Suki <[email protected]>
Suki 12 роки тому
батько
коміт
84a0cef02c
2 змінених файлів з 2 додано та 8 видалено
  1. 1 1
      Sources/Display.php
  2. 1 7
      index.php

+ 1 - 1
Sources/Display.php

@@ -1306,7 +1306,7 @@ function prepareDisplayContext($reset = false)
 }
 
 /**
- * Downloads an attachment or avatar, and increments the download count.
+ * Downloads an attachment, and increments the download count.
  * It requires the view_attachments permission. (not for avatars!)
  * It disables the session parser, and clears any previous output.
  * It depends on the attachmentUploadDir setting being correct.

+ 1 - 7
index.php

@@ -40,13 +40,6 @@ foreach (array('db_character_set', 'cachedir') as $variable)
 // Load the settings...
 require_once(dirname(__FILE__) . '/Settings.php');
 
-// Displaying attached avatars
-if(strpos($_SERVER['QUERY_STRING'], 'action=dlattach') !== false && strpos($_SERVER['QUERY_STRING'], 'type=avatar') !== false)
-{
-  require($sourcedir. '/Avatar.php');
-  exit;
-}
-
 // Make absolutely sure the cache directory is defined.
 if ((empty($cachedir) || !file_exists($cachedir)) && file_exists($boarddir . '/cache'))
 	$cachedir = $boarddir . '/cache';
@@ -282,6 +275,7 @@ function smf_main()
 		'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'),
 		'disregardtopic' => array('Notify.php', 'TopicDisregard'),
 		'dlattach' => array('Display.php', 'Download'),
+		'dlavatar' => array('Avatar.php', 'Download'),
 		'editpoll' => array('Poll.php', 'EditPoll'),
 		'editpoll2' => array('Poll.php', 'EditPoll2'),
 		'emailuser' => array('SendTopic.php', 'EmailUser'),