From fadbbecd3effe8ee855d68d86dec0d7d356d7e61 Mon Sep 17 00:00:00 2001 From: kevinjardine Date: Thu, 16 Apr 2009 08:35:25 +0000 Subject: 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 --- engine/lib/filestore.php | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'engine/lib/filestore.php') 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; -- cgit v1.2.3