manual merge of the upstream branch

This commit is contained in:
Gustavo Cruz
2015-03-05 16:49:50 -04:00
174 changed files with 27703 additions and 7810 deletions

View File

@@ -20,16 +20,7 @@ class UploadFormat extends Format
*
* @var array
*/
public static $allowedMimeTypes = array(
'image/jpeg',
'image/png',
'image/png',
'application/octet-stream',
'text/plain',
'text/xml',
'text/html',
'text/css'
);
public static $allowedMimeTypes = array();
/**
* use it to restrict uploads based on file size
* set it to 0 to allow all sizes
@@ -40,7 +31,7 @@ class UploadFormat extends Format
*
* @var int
*/
public static $maximumFileSize = 1048576;
public static $maximumFileSize = 0;
/**
* Your own validation function for validating each uploaded file
* it can return false or throw an exception for invalid file

View File

@@ -296,6 +296,11 @@ class WebApplication
list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, '');
$port = empty($port) ? '' : ";port=$port";
Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port);
if (DB_NAME != DB_RBAC_NAME) { //it's PM < 3
list($host, $port) = strpos(DB_RBAC_HOST, ':') !== false ? explode(':', DB_RBAC_HOST) : array(DB_RBAC_HOST, '');
$port = empty($port) ? '' : ";port=$port";
Services\OAuth2\Server::setDatabaseSourceRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_ADAPTER.":host=$host;dbname=".DB_RBAC_NAME.$port);
}
// Setting default OAuth Client id, for local PM Web Designer
Services\OAuth2\Server::setPmClientId($pmOauthClientId);