Преглед на файлове

! A more doc changes (officially bored of this now)

Spuds преди 12 години
родител
ревизия
4c67c3bf65
променени са 8 файла, в които са добавени 278 реда и са изтрити 155 реда
  1. 12 4
      Sources/ManageLanguages.php
  2. 3 1
      Sources/Profile-Actions.php
  3. 46 63
      Sources/Profile-Modify.php
  4. 102 7
      Sources/Profile-View.php
  5. 1 1
      Sources/Profile.php
  6. 101 59
      Sources/QueryString.php
  7. 12 19
      Sources/Recent.php
  8. 1 1
      Themes/default/languages/Admin.english.php

+ 12 - 4
Sources/ManageLanguages.php

@@ -822,7 +822,9 @@ function ModifyLanguage()
 			if (preg_match('~^([A-Za-z]+)\.' . $context['lang_id'] . '\.php$~', $entry, $matches) == 0)
 				continue;
 
-			//!!! Temp!
+			/**
+			 * @todo Temp!
+			 */
 			if ($matches[1] == 'EmailTemplates')
 				continue;
 
@@ -847,7 +849,9 @@ function ModifyLanguage()
 	{
 		checkSession();
 
-		// @todo: FTP Controls?
+		/**
+		 * @todo FTP Controls?
+		 */
 		require_once($sourcedir . '/Subs-Package.php');
 
 		// First, Make a backup?
@@ -1087,7 +1091,9 @@ function ModifyLanguage()
 				// Saving?
 				if (isset($save_strings[$entryKey]) && $save_strings[$entryKey] != $entryValue['entry'])
 				{
-					// !!! Fix this properly.
+					/**
+					 * @todo Fix this properly.
+					 */
 					if ($save_strings[$entryKey] == '')
 						$save_strings[$entryKey] = '\'\'';
 
@@ -1217,7 +1223,9 @@ function cleanLangString($string, $to_display = true)
 				if (!empty($matches[1]))
 				{
 					// Come up with some pseudo thing to indicate this is a var.
-					//!!! Do better than this, please!
+					/**
+					 * @todo Do better than this, please!
+					 */
 					$new_string .= '{%' . $matches[1] . '%}';
 
 					// We're not going to reparse this.

+ 3 - 1
Sources/Profile-Actions.php

@@ -430,7 +430,9 @@ function deleteAccount2($profile_vars, $post_errors, $memID)
 	// Try get more time...
 	@set_time_limit(600);
 
-	// @todo Add a way to delete pms as well?
+	/**
+	 * @todo Add a way to delete pms as well?
+	 */
 
 	if (!$context['user']['is_owner'])
 		isAllowedTo('profile_remove_any');

+ 46 - 63
Sources/Profile-Modify.php

@@ -14,66 +14,10 @@
  *
  * @version 2.0
  */
-profilevalid
+
 if (!defined('SMF'))
 	die('Hacking attempt...');
 
-/*	
-	void editBuddies(int id_member)
-
-	void editIgnoreList(int id_member)
-
-	void account(int id_member)
-
-	void forumProfile(int id_member)
-
-	void pmprefs(int id_member)
-
-	void theme(int id_member)
-
-	void authentication(int id_member, bool saving = false)
-
-	void notification(int id_member)
-
-	int list_getTopicNotificationCount(int memID)
-
-	array list_getTopicNotifications(int start, int items_per_page, string sort, int memID)
-
-	array list_getBoardNotifications(int start, int items_per_page, string sort, int memID)
-
-	void loadThemeOptions(int id_member)
-
-	void ignoreboards(int id_member)
-
-	bool profileLoadLanguages()
-
-	bool profileLoadGroups()
-
-	bool profileLoadSignatureData()
-
-	bool profileLoadAvatarData()
-
-	bool profileSaveGroups(mixed &value)
-
-	mixed profileSaveAvatarData(array &value)
-
-	mixed profileValidateSignature(mixed &value)
-
-	bool profileValidateEmail(string email, int id_member = none)
-
-	void profileReloadUser()
-
-	void profileSendActivation()
-
-	void groupMembership(int id_member)
-
-	mixed groupMembership2(array profile_vars, array post_erros, int id_member)
-
-	Adding new fields to the profile:
-	---------------------------------------------------------------------------
-		// !!!
-*/
-
 /**
  * This defines every profile field known to man.
  * 
@@ -2066,6 +2010,7 @@ function notification($memID)
  * @todo needs a description
  * 
  * @param int $memID id_member
+ * @return string $totalNotifications
  */
 function list_getTopicNotificationCount($memID)
 {
@@ -2087,6 +2032,7 @@ function list_getTopicNotificationCount($memID)
 	list ($totalNotifications) = $smcFunc['db_fetch_row']($request);
 	$smcFunc['db_free_result']($request);
 
+	// @todo make this an integer before it gets returned
 	return $totalNotifications;
 }
 
@@ -2156,6 +2102,15 @@ function list_getTopicNotifications($start, $items_per_page, $sort, $memID)
 	return $notification_topics;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $start
+ * @param int $items_per_page
+ * @param string $sort
+ * @param int $memID id_member
+ * @return array $notification_boards
+ */
 function list_getBoardNotifications($start, $items_per_page, $sort, $memID)
 {
 	global $smcFunc, $txt, $scripturl, $user_info;
@@ -2347,6 +2302,8 @@ function profileLoadLanguages()
 }
 
 /**
+ * @todo needs description
+ * 
  * @return true
  */
 function profileLoadGroups()
@@ -2441,7 +2398,11 @@ function profileLoadSignatureData()
 	return true;
 }
 
-// Load avatar context data.
+/**
+ * Load avatar context data.
+ * 
+ * @return true
+ */
 function profileLoadAvatarData()
 {
 	global $context, $cur_profile, $modSettings, $scripturl;
@@ -2501,7 +2462,12 @@ function profileLoadAvatarData()
 	return true;
 }
 
-// Save a members group.
+/**
+ * Save a members group.
+ * 
+ * @param int &$value
+ * @return true
+ */
 function profileSaveGroups(&$value)
 {
 	global $profile_vars, $old_profile, $context, $smcFunc, $cur_profile;
@@ -2599,6 +2565,10 @@ function profileSaveGroups(&$value)
 
 /**
  * The avatar is incredibly complicated, what with the options... and what not.
+ * @todo argh, the avatar here. Take this out of here!
+ * 
+ * @param array &$value
+ * @return mixed
  */
 function profileSaveAvatarData(&$value)
 {
@@ -2840,7 +2810,12 @@ function profileSaveAvatarData(&$value)
 	return false;
 }
 
-// Validate the signature!
+/**
+ * Validate the signature
+ * 
+ * @param mixed &$value
+ * @return bool|string
+ */
 function profileValidateSignature(&$value)
 {
 	global $sourcedir, $modSettings, $smcFunc, $txt;
@@ -3014,7 +2989,8 @@ function profileValidateSignature(&$value)
  * Validate an email address.
  * 
  * @param string $email
- * @param int $memID=0
+ * @param int $memID = 0
+ * @return bool|string
  */
 function profileValidateEmail($email, $memID = 0)
 {
@@ -3047,7 +3023,9 @@ function profileValidateEmail($email, $memID = 0)
 	return true;
 }
 
-// Reload a users settings.
+/**
+ * Reload a users settings.
+ */
 function profileReloadUser()
 {
 	global $sourcedir, $modSettings, $context, $cur_profile, $smcFunc, $profile_vars;
@@ -3063,7 +3041,9 @@ function profileReloadUser()
 	writeLog();
 }
 
-// Send the user a new activation email if they need to reactivate!
+/**
+ * Send the user a new activation email if they need to reactivate!
+ */
 function profileSendActivation()
 {
 	global $sourcedir, $profile_vars, $txt, $context, $scripturl, $smcFunc, $cookiename, $cur_profile, $language, $modSettings;
@@ -3216,6 +3196,9 @@ function groupMembership($memID)
 /**
  * This function actually makes all the group changes
  * 
+ * @param array $profile_vars
+ * @param array $post_errors
+ * @param int $memID id_member
  * 
  */
 function groupMembership2($profile_vars, $post_errors, $memID)

+ 102 - 7
Sources/Profile-View.php

@@ -65,7 +65,10 @@ if (!defined('SMF'))
 		// !!!
 */
 
-// View a summary.
+/**
+ * View a summary.
+ * @param int $memID id_member
+ */
 function summary($memID)
 {
 	global $context, $memberContext, $txt, $modSettings, $user_info, $user_profile, $sourcedir, $scripturl, $smcFunc;
@@ -243,8 +246,13 @@ function summary($memID)
 	loadCustomFields($memID);
 }
 
-// !!! This function needs to be split up properly.
-// Show all posts by the current user
+
+/**
+ * Show all posts by the current user
+ * @todo This function needs to be split up properly.
+ * 
+ * @param int $memID id_member
+ */
 function showPosts($memID)
 {
 	global $txt, $user_info, $scripturl, $modSettings;
@@ -566,7 +574,11 @@ function showPosts($memID)
 	}
 }
 
-// Show all the attachments of a user.
+/**
+ * Show all the attachments of a user.
+ * 
+ * @param int $memID id_member
+ */
 function showAttachments($memID)
 {
 	global $txt, $user_info, $scripturl, $modSettings, $board;
@@ -667,6 +679,11 @@ function showAttachments($memID)
 	$smcFunc['db_free_result']($request);
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID id_member
+ */
 function statPanel($memID)
 {
 	global $txt, $scripturl, $context, $user_profile, $user_info, $modSettings, $smcFunc;
@@ -847,6 +864,11 @@ function statPanel($memID)
 	ksort($context['posts_by_time']);
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID id_member
+ */
 function tracking($memID)
 {
 	global $sourcedir, $context, $txt, $scripturl, $modSettings, $user_profile;
@@ -886,6 +908,11 @@ function tracking($memID)
 	$subActions[$context['tracking_area']][0]($memID);
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID id_member
+ */
 function trackActivity($memID)
 {
 	global $scripturl, $txt, $modSettings, $sourcedir;
@@ -1100,6 +1127,13 @@ function trackActivity($memID)
 	}
 }
 
+/**
+ * Get the number of user errors
+ * 
+ * @param string $where
+ * @param array $where_vars = array()
+ * @return string number of user errors
+ */
 function list_getUserErrorCount($where, $where_vars = array())
 {
 	global $smcFunc;
@@ -1113,9 +1147,20 @@ function list_getUserErrorCount($where, $where_vars = array())
 	list ($count) = $smcFunc['db_fetch_row']($request);
 	$smcFunc['db_free_result']($request);
 
+	// @todo cast this to an integer
 	return $count;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $start
+ * @param int $items_per_page
+ * @param string $sort
+ * @param string $where
+ * @param array $where_vars
+ * @return array error messages
+ */
 function list_getUserErrors($start, $items_per_page, $sort, $where, $where_vars = array())
 {
 	global $smcFunc, $txt, $scripturl;
@@ -1149,6 +1194,13 @@ function list_getUserErrors($start, $items_per_page, $sort, $where, $where_vars
 	return $error_messages;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param string $where
+ * @param array $where_vars
+ * @return string count of messages matching the IP
+ */
 function list_getIPMessageCount($where, $where_vars = array())
 {
 	global $smcFunc;
@@ -1163,15 +1215,26 @@ function list_getIPMessageCount($where, $where_vars = array())
 	list ($count) = $smcFunc['db_fetch_row']($request);
 	$smcFunc['db_free_result']($request);
 
+	// @todo cast to integer
 	return $count;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $start
+ * @param int $items_per_page
+ * @param string $sort
+ * @param string $where
+ * @param array $where_vars
+ * @return array an array of messages
+ */
 function list_getIPMessages($start, $items_per_page, $sort, $where, $where_vars = array())
 {
 	global $smcFunc, $txt, $scripturl;
 
 	// Get all the messages fitting this where clause.
-	// !!!SLOW This query is using a filesort.
+	// @todo SLOW This query is using a filesort.
 	$request = $smcFunc['db_query']('', '
 		SELECT
 			m.id_msg, m.poster_ip, IFNULL(mem.real_name, m.poster_name) AS display_name, mem.id_member,
@@ -1205,6 +1268,11 @@ function list_getIPMessages($start, $items_per_page, $sort, $where, $where_vars
 	return $messages;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID = 0 id_member
+ */
 function TrackIP($memID = 0)
 {
 	global $user_profile, $scripturl, $txt, $user_info, $modSettings, $sourcedir;
@@ -1483,6 +1551,11 @@ function TrackIP($memID = 0)
 	}
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID id_member
+ */
 function trackEdits($memID)
 {
 	global $scripturl, $txt, $modSettings, $sourcedir, $context, $smcFunc;
@@ -1579,7 +1652,11 @@ function trackEdits($memID)
 	$context['default_list'] = 'edit_list';
 }
 
-// How many edits?
+/**
+ * How many edits?
+ * 
+ * @param int $memID id_member
+ */
 function list_getProfileEditCount($memID)
 {
 	global $smcFunc;
@@ -1600,6 +1677,15 @@ function list_getProfileEditCount($memID)
 	return $edit_count;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $start
+ * @param int $items_per_page
+ * @param string $sort
+ * @param int $memID
+ * @return array
+ */
 function list_getProfileEdits($start, $items_per_page, $sort, $memID)
 {
 	global $smcFunc, $txt, $scripturl, $context;
@@ -1679,6 +1765,11 @@ function list_getProfileEdits($start, $items_per_page, $sort, $memID)
 	return $edits;
 }
 
+/**
+ * @todo needs a description
+ * 
+ * @param int $memID id_member
+ */
 function showPermissions($memID)
 {
 	global $scripturl, $txt, $board, $modSettings;
@@ -1856,7 +1947,11 @@ function showPermissions($memID)
 	$smcFunc['db_free_result']($request);
 }
 
-// View a members warnings?
+/**
+ * View a members warnings?
+ * 
+ * @param int $memID id_member
+ */
 function viewWarning($memID)
 {
 	global $modSettings, $context, $sourcedir, $txt, $scripturl;

+ 1 - 1
Sources/Profile.php

@@ -645,7 +645,7 @@ function ModifyProfile($post_errors = array())
  * Load any custom fields for this area... no area means load all, 'summary' loads all public ones.
  *
  * @param int $memID
- * @param string $area
+ * @param string $area = 'summary'
  */
 function loadCustomFields($memID, $area = 'summary')
 {

+ 101 - 59
Sources/QueryString.php

@@ -1,6 +1,9 @@
 <?php
 
 /**
+ * This file does a lot of important stuff.  Mainly, this means it handles
+	the query string, request variables, and session management.
+ *
  * Simple Machines Forum (SMF)
  *
  * @package SMF
@@ -14,63 +17,18 @@
 if (!defined('SMF'))
 	die('Hacking attempt...');
 
-/*	This file does a lot of important stuff.  Mainly, this means it handles
-	the query string, request variables, and session management.  It contains
-	the following functions:
-
-	void cleanRequest()
-		- cleans the request variables (ENV, GET, POST, COOKIE, SERVER) and
+/**
+ * Clean the request variables - add html entities to GET and slashes if magic_quotes_gpc is Off.
+ * 
+ * What it does:
+ * - cleans the request variables (ENV, GET, POST, COOKIE, SERVER) and
 		  makes sure the query string was parsed correctly.
 		- handles the URLs passed by the queryless URLs option.
 		- makes sure, regardless of php.ini, everything has slashes.
 		- sets up $board, $topic, and $scripturl and $_REQUEST['start'].
 		- determines, or rather tries to determine, the client's IP.
+ */
 
-	array escapestring__recursive(array var)
-		- returns the var, as an array or string, with escapes as required.
-		- importantly escapes all keys and values!
-		- calls itself recursively if necessary.
-
-	array htmlspecialchars__recursive(array var)
-		- adds entities (&quot;, &lt;, &gt;) to the array or string var.
-		- importantly, does not effect keys, only values.
-		- calls itself recursively if necessary.
-
-	array urldecode__recursive(array var)
-		- takes off url encoding (%20, etc.) from the array or string var.
-		- importantly, does it to keys too!
-		- calls itself recursively if there are any sub arrays.
-
-	array unescapestring__recursive(array var)
-		- unescapes, recursively, from the array or string var.
-		- effects both keys and values of arrays.
-		- calls itself recursively to handle arrays of arrays.
-
-	array stripslashes__recursive(array var)
-		- removes slashes, recursively, from the array or string var.
-		- effects both keys and values of arrays.
-		- calls itself recursively to handle arrays of arrays.
-
-	array htmltrim__recursive(array var)
-		- trims a string or an the var array using html characters as well.
-		- does not effect keys, only values.
-		- may call itself recursively if needed.
-
-	string cleanXml(string var)
-		- removes invalid XML characters to assure the input string being
-		  parsed properly.
-
-	string ob_sessrewrite(string buffer)
-		- rewrites the URLs outputted to have the session ID, if the user
-		  is not accepting cookies and is using a standard web browser.
-		- handles rewriting URLs for the queryless URLs option.
-		- can be turned off entirely by setting $scripturl to an empty
-		  string, ''. (it wouldn't work well like that anyway.)
-		- because of bugs in certain builds of PHP, does not function in
-		  versions lower than 4.3.0 - please upgrade if this hurts you.
-*/
-
-// Clean the request variables - add html entities to GET and slashes if magic_quotes_gpc is Off.
 function cleanRequest()
 {
 	global $board, $topic, $boardurl, $scripturl, $modSettings, $smcFunc;
@@ -325,7 +283,16 @@ function cleanRequest()
 		$_SERVER['REMOTE_ADDR'] = '';
 }
 
-// Adds slashes to the array/variable.  Uses two underscores to guard against overloading.
+/**
+ * Adds slashes to the array/variable.
+ * What it does:
+ * - returns the var, as an array or string, with escapes as required.
+		- importantly escapes all keys and values!
+		- calls itself recursively if necessary.
+ *
+ * @param array|string $var
+ * @return array|string
+ */
 function escapestring__recursive($var)
 {
 	global $smcFunc;
@@ -343,7 +310,16 @@ function escapestring__recursive($var)
 	return $new_var;
 }
 
-// Adds html entities to the array/variable.  Uses two underscores to guard against overloading.
+/**
+ * Adds html entities to the array/variable.  Uses two underscores to guard against overloading.
+ * What it does:
+ * 		- adds entities (&quot;, &lt;, &gt;) to the array or string var.
+		- importantly, does not effect keys, only values.
+		- calls itself recursively if necessary.
+ * @param array|string $var
+ * @param int $level = 0
+ * @return array|string
+ */
 function htmlspecialchars__recursive($var, $level = 0)
 {
 	global $smcFunc;
@@ -358,7 +334,17 @@ function htmlspecialchars__recursive($var, $level = 0)
 	return $var;
 }
 
-// Removes url stuff from the array/variable.  Uses two underscores to guard against overloading.
+/**
+ * Removes url stuff from the array/variable.  Uses two underscores to guard against overloading.
+ * What it does:
+ * - takes off url encoding (%20, etc.) from the array or string var.
+		- importantly, does it to keys too!
+		- calls itself recursively if there are any sub arrays.
+ *
+ * @param array|string $var
+ * @param int $level = 0
+ * @return array|string
+ */
 function urldecode__recursive($var, $level = 0)
 {
 	if (!is_array($var))
@@ -373,7 +359,16 @@ function urldecode__recursive($var, $level = 0)
 
 	return $new_var;
 }
-// Unescapes any array or variable.  Two underscores for the normal reason.
+/**
+ * Unescapes any array or variable.  Uses two underscores to guard against overloading.
+ * What it does:
+ * 		- unescapes, recursively, from the array or string var.
+		- effects both keys and values of arrays.
+		- calls itself recursively to handle arrays of arrays.
+ *
+ * @param array|string $var
+ * @return array|string
+ */
 function unescapestring__recursive($var)
 {
 	global $smcFunc;
@@ -391,7 +386,17 @@ function unescapestring__recursive($var)
 	return $new_var;
 }
 
-// Remove slashes recursively...
+/**
+ * Remove slashes recursively.  Uses two underscores to guard against overloading.
+ * What it does:
+ * 		- removes slashes, recursively, from the array or string var.
+		- effects both keys and values of arrays.
+		- calls itself recursively to handle arrays of arrays.
+ * 
+ * @param array|string $var
+ * @param int $level = 0
+ * @return array|string
+ */
 function stripslashes__recursive($var, $level = 0)
 {
 	if (!is_array($var))
@@ -407,7 +412,17 @@ function stripslashes__recursive($var, $level = 0)
 	return $new_var;
 }
 
-// Trim a string including the HTML space, character 160.
+/**
+ * Trim a string including the HTML space, character 160.  Uses two underscores to guard against overloading.
+ * What it does:
+ * 		- trims a string or an the var array using html characters as well.
+		- does not effect keys, only values.
+		- may call itself recursively if needed.
+ * 
+ * @param array|string $var
+ * @param int $level = 0
+ * @return array|string
+ */
 function htmltrim__recursive($var, $level = 0)
 {
 	global $smcFunc;
@@ -423,7 +438,15 @@ function htmltrim__recursive($var, $level = 0)
 	return $var;
 }
 
-// Clean up the XML to make sure it doesn't contain invalid characters.
+/**
+ * Clean up the XML to make sure it doesn't contain invalid characters.
+ * What it does:
+ * 		- removes invalid XML characters to assure the input string being
+		  parsed properly.
+ * 
+ * @param string $string
+ * @return string
+ */
 function cleanXml($string)
 {
 	global $context;
@@ -432,6 +455,12 @@ function cleanXml($string)
 	return preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? (@version_compare(PHP_VERSION, '4.3.3') != -1 ? '\x{D800}-\x{DFFF}\x{FFFE}\x{FFFF}' : "\xED\xA0\x80-\xED\xBF\xBF\xEF\xBF\xBE\xEF\xBF\xBF") : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string);
 }
 
+/**
+ * @todo needs a description
+ *
+ * @param string $string
+ * @return string
+ */
 function JavaScriptEscape($string)
 {
 	global $scripturl;
@@ -449,7 +478,20 @@ function JavaScriptEscape($string)
 	)) . '\'';
 }
 
-// Rewrite URLs to include the session ID.
+/**
+ * Rewrite URLs to include the session ID.
+ * What it does:
+ * 		- rewrites the URLs outputted to have the session ID, if the user
+		  is not accepting cookies and is using a standard web browser.
+		- handles rewriting URLs for the queryless URLs option.
+		- can be turned off entirely by setting $scripturl to an empty
+		  string, ''. (it wouldn't work well like that anyway.)
+		- because of bugs in certain builds of PHP, does not function in
+		  versions lower than 4.3.0 - please upgrade if this hurts you.
+ * 
+ * @param string $buffer
+ * @return string
+ */
 function ob_sessrewrite($buffer)
 {
 	global $scripturl, $modSettings, $user_info, $context;

+ 12 - 19
Sources/Recent.php

@@ -1,6 +1,8 @@
 <?php
 
 /**
+ * Find and	retrieve information about recently posted topics, messages, and the like.
+ * 
  * Simple Machines Forum (SMF)
  *
  * @package SMF
@@ -14,23 +16,10 @@
 if (!defined('SMF'))
 	die('Hacking attempt...');
 
-/*	This file had one very clear purpose.  It is here expressly to find and
-	retrieve information about recently posted topics, messages, and the like.
-
-	array getLastPost()
-		// !!!
-
-	array getLastPosts(int number_of_posts)
-		// !!!
-
-	void RecentPosts()
-		// !!!
-
-	void UnreadTopics()
-		// !!!
-*/
-
-// Get the latest post.
+/**
+ * Get the latest post.
+ * @return array
+ */
 function getLastPost()
 {
 	global $user_info, $scripturl, $modSettings, $smcFunc;
@@ -77,7 +66,9 @@ function getLastPost()
 	);
 }
 
-// Find the ten most recent posts.
+/**
+ * Find the ten most recent posts.
+ */
 function RecentPosts()
 {
 	global $txt, $scripturl, $user_info, $context, $modSettings, $sourcedir, $board, $smcFunc;
@@ -419,7 +410,9 @@ function RecentPosts()
 	}
 }
 
-// Find unread topics and replies.
+/**
+ * Find unread topics and replies.
+ */
 function UnreadTopics()
 {
 	global $board, $txt, $scripturl, $sourcedir;

+ 1 - 1
Themes/default/languages/Admin.english.php

@@ -408,7 +408,7 @@ $txt['custom_avatar_enabled'] = 'Upload avatars to...';
 $txt['option_attachment_dir'] = 'Attachment directory';
 $txt['option_specified_dir'] = 'Specific directory...';
 $txt['custom_avatar_dir'] = 'Upload directory';
-$txt['custom_avatar_dir_desc'] = 'This should not be the same as the server-stored directory.';
+$txt['custom_avatar_dir_desc'] = 'This should be a valid and writable directory, different than the server-stored directory.';
 $txt['custom_avatar_url'] = 'Upload URL';
 $txt['custom_avatar_check_empty'] = 'The custom avatar directory you have specified may be empty or invalid. Please ensure these settings are correct.';
 $txt['avatar_reencode'] = 'Re-encode potentially dangerous avatars';