r107356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107355‎ | r107356 | r107357 >
Date:02:24, 27 December 2011
Author:aaron
Status:ok
Tags:
Comment:
Added/tweaked some FileBackend function comments
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FileBackend.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/FileBackend.php
@@ -16,7 +16,8 @@
1717 *
1818 * FS-based backends are somewhat more restrictive due to the existence of real
1919 * directory files; a regular file cannot have the same name as a directory. Other
20 - * backends with virtual directories may not have this limitation.
 20+ * backends with virtual directories may not have this limitation. Callers should
 21+ * store files in such a way that no files and directories under the same path.
2122 *
2223 * Methods should avoid throwing exceptions at all costs.
2324 * As a corollary, external dependencies should be kept to a minimum.
@@ -895,11 +896,11 @@
896897 }
897898
898899 /**
899 - * Validate a container name.
900 - * Null is returned if the name has illegal characters.
 900+ * Check if a container name is valid.
 901+ * This checks for for length and illegal characters.
901902 *
902903 * @param $container string
903 - * @return bool
 904+ * @return bool
904905 */
905906 final protected static function isValidContainerName( $container ) {
906907 // This accounts for Swift and S3 restrictions. Also note
@@ -991,8 +992,9 @@
992993
993994 /**
994995 * Resolve a relative storage path, checking if it's allowed by the backend.
995 - * This is intended for internal use, such as encoding illegal chars
996 - * or perhaps getting absolute paths (e.g. FS based backends).
 996+ * This is intended for internal use, such as encoding illegal chars or perhaps
 997+ * getting absolute paths (e.g. FS based backends). Note that the relative path
 998+ * may be the empty string (e.g. the path is simply to the container).
997999 *
9981000 * @param $container string Container the path is relative to
9991001 * @param $relStoragePath string Relative storage path

Status & tagging log