Quantcast
Channel: WordPress.org Forums » [WP-Filebase Download Manager] Support
Viewing all articles
Browse latest Browse all 1341

talamus on "[Plugin: WP-Filebase Download Manager] Latest version (3.1.02) not showing categories and files"

$
0
0

There seems to be a problem in classes/Category.php file.
The CurUserCanAddFiles() is called with no $user parameter.

Original code is:

function CurUserCanAddFiles($user = null)
	{
		return $this->CurUserIsOwner($user) || ($user !== null && user_can($user, 'manage_options')) ;
	}

My fixed version is:

function CurUserCanAddFiles($user = null)
	{
		if(is_null($user)) $user = wp_get_current_user();
		return $this->CurUserIsOwner($user) || user_can($user, 'manage_options');
	}

Viewing all articles
Browse latest Browse all 1341

Trending Articles