[Openupload-svn-update] SF.net SVN: openupload:[184] trunk/plugins/mimetypes.inc.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-12-11 11:04:15
|
Revision: 184
http://openupload.svn.sourceforge.net/openupload/?rev=184&view=rev
Author: tsdogs
Date: 2008-12-11 11:04:10 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
moved the group option function to base class
Modified Paths:
--------------
trunk/plugins/mimetypes.inc.php
Modified: trunk/plugins/mimetypes.inc.php
===================================================================
--- trunk/plugins/mimetypes.inc.php 2008-12-11 11:03:20 UTC (rev 183)
+++ trunk/plugins/mimetypes.inc.php 2008-12-11 11:04:10 UTC (rev 184)
@@ -11,26 +11,9 @@
/* load the plugin configuration */
}
- function getGroup() {
- $group = app()->user->group();
- if (is_array($group)) {
- /* check for which group there is a configuration */
- foreach ($group as $g) {
- if (isset($this->config['allowed'][$g])) {
- if (count($this->config['allowed'])) {
- return $g;
- }
- }
- }
- return $group[0];
- } else {
- return $group;
- }
- }
-
function uploadForm(&$finfo,$acl) {
if ($acl!='enable') return true;
- $group = $this->getGroup();
+ $group = $this->getGroup('allowed');
if (count($this->config['allowed'][$group])==0 and count($this->config['allowed']['*'])>0) {
$this->config['allowed'][$group]=$this->config['allowed']['*'];
$this->config['message'][$group]=$this->config['message']['*'];
@@ -47,7 +30,7 @@
function uploadComplete(&$finfo,$acl) {
if ($acl!='enable') return true;
- $group = $this->getGroup();
+ $group = $this->getGroup('allowed');
if (count($this->config['allowed'][$group])==0 and count($this->config['allowed']['*'])>0) {
$this->config['allowed'][$group]=$this->config['allowed']['*'];
$this->config['message'][$group]=$this->config['message']['*'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|