aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-16 08:35:25 +0000
committerkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-16 08:35:25 +0000
commitfadbbecd3effe8ee855d68d86dec0d7d356d7e61 (patch)
tree7b35f337ea34daec6d8fbd797cb400c4c19188d4 /engine
parent0fb942ec33afc0ca970a028931fa4692582561cb (diff)
downloadelgg-fadbbecd3effe8ee855d68d86dec0d7d356d7e61.tar.gz
elgg-fadbbecd3effe8ee855d68d86dec0d7d356d7e61.tar.bz2
Passed container_guid to any quota plugins and removed duplicate function definition.
git-svn-id: https://code.elgg.org/elgg/trunk@3214 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/filestore.php40
1 files changed, 1 insertions, 39 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index ea96bd5c9..a234b8c14 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -933,7 +933,7 @@
// Extract file from, save to default filestore (for now)
// see if a plugin has set a quota for this user
- $file_quota = trigger_plugin_hook("$plugin:quotacheck",'user',array('user'=>get_loggedin_user()));
+ $file_quota = trigger_plugin_hook("$plugin:quotacheck",'user',array('container_guid'=>$container_guid));
if (!$file_quota) {
// no, see if there is a generic quota set
$file_quota = get_plugin_setting('quota', $plugin);
@@ -1284,45 +1284,7 @@
}
}
}
-
- /**
- * Returns an overall file type from the mimetype
- *
- * @param string $mimetype The MIME type
- * @return string The overall type
- */
- function get_general_file_type($mimetype) {
- switch($mimetype) {
-
- case "application/msword":
- return "document";
- break;
- case "application/pdf":
- return "document";
- break;
-
- }
-
- if (substr_count($mimetype,'text/'))
- return "document";
-
- if (substr_count($mimetype,'audio/'))
- return "audio";
-
- if (substr_count($mimetype,'image/'))
- return "image";
-
- if (substr_count($mimetype,'video/'))
- return "video";
-
- if (substr_count($mimetype,'opendocument'))
- return "document";
-
- return "general";
-
- }
-
/// Variable holding the default datastore
$DEFAULT_FILE_STORE = NULL;