summaryrefslogtreecommitdiff
path: root/static/upload.php
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2016-05-29 17:26:36 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2016-05-29 17:26:36 +0200
commitcae3cb012812c2d7e1995301e85c8954567a499d (patch)
treea086c0e8d22fcc5b6879f87fe26981f8ab276323 /static/upload.php
parent1117f68b7a388bd53ac3f3f076c80da171d0b8a6 (diff)
upload.php: Deprecate all named functions
Deprecates diverse_array(), generate_name(), refiles() and upload_file(). These pollute the global namespace and do not follow the PSR-2 naming convention. The plan is to create a new file with a new class to share this common code, leaving upload.php only with the last lines of code that it really needs to do (calling other class functions). Acked-by: Eliot Whalan <ewhal@pantsu.cat>
Diffstat (limited to 'static/upload.php')
-rw-r--r--static/upload.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/static/upload.php b/static/upload.php
index 4b1f73d..13acb0d 100644
--- a/static/upload.php
+++ b/static/upload.php
@@ -45,6 +45,8 @@ require_once 'includes/database.inc.php';
/**
* Generates a random name for the file, retrying until we get an unused one.
*
+ * @deprecated 2.1.0 May be moved into a class, namespaced and converted to
+ * camelCase.
* @param UploadedFile $file
*
* @return string
@@ -99,6 +101,8 @@ function generate_name($file)
/**
* Handles the uploading and db entry for a file.
*
+ * @deprecated 2.1.0 May be moved into a class, namespaced and converted to
+ * camelCase.
* @param UploadedFile $file
*
* @return array
@@ -177,6 +181,8 @@ function upload_file($file)
/**
* Reorder files array by file.
*
+ * @deprecated 2.1.0 May be moved into a class, namespaced and converted to
+ * camelCase.
* @param $_FILES
*
* @return array
@@ -197,6 +203,8 @@ function diverse_array($files)
/**
* Reorganize the $_FILES array into something saner.
*
+ * @deprecated 2.1.0 May be moved into a class, namespaced and converted to
+ * camelCase.
* @param $_FILES
*
* @return array