From 0cdc3033979021f03c9dd41b62138b1305ef46c8 Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Tue, 7 Feb 2012 20:25:05 -0500 Subject: [PATCH] Just more comments. --- ext/upload/main.php | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index 938a27fa..571a56af 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -1,5 +1,5 @@ get_bool("upload_anon") || !$user->is_anonymous()); } - // Helper function based on the one from the online PHP Documentation - // which is licensed under Creative Commons Attribution 3.0 License - // TODO: Make these messages user/admin editable + /** + * Returns a descriptive error message for the specified PHP error code. + * + * This is a helper function based on the one from the online PHP Documentation + * which is licensed under Creative Commons Attribution 3.0 License + * + * TODO: Make these messages user/admin editable + * + * @param $error_code PHP error code (int) + * @retval String + */ private function upload_error_message($error_code) { switch ($error_code) { case UPLOAD_ERR_INI_SIZE: @@ -247,6 +261,10 @@ class Upload extends SimpleExtension { } } + /** + * Handle an upload. + * @retval bool TRUE on upload successful. + */ private function try_upload($file, $tags, $source, $replace='') { global $page; global $config; @@ -293,6 +311,10 @@ class Upload extends SimpleExtension { return $ok; } + /** + * Handle an transload. + * @retval bool TRUE on transload successful. + */ private function try_transload($url, $tags, $source, $replace='') { global $page; global $config;