don?t use array as class constant for mimetypes of questtype ?Submit? (fixes #161)
This commit is contained in:
parent
d885a4baa9
commit
b8de91c048
1 changed files with 6 additions and 6 deletions
|
|
@ -25,12 +25,6 @@
|
||||||
* @var float
|
* @var float
|
||||||
*/
|
*/
|
||||||
const SIMILARITY_MIN = 0.8;
|
const SIMILARITY_MIN = 0.8;
|
||||||
/**
|
|
||||||
* Supported mimetypes
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
const mimetypes = array('application/pdf');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required models
|
* Required models
|
||||||
|
|
@ -38,6 +32,12 @@
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $models = array('uploads');
|
public $models = array('uploads');
|
||||||
|
/**
|
||||||
|
* Supported mimetypes
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $mimetypes = array('application/pdf');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
{
|
{
|
||||||
$mimetypes = array();
|
$mimetypes = array();
|
||||||
foreach(\nre\configs\AppConfig::$mimetypes['questtypes'] as $mimetype) {
|
foreach(\nre\configs\AppConfig::$mimetypes['questtypes'] as $mimetype) {
|
||||||
if(in_array($mimetype['mimetype'], self::mimetypes)) {
|
if(in_array($mimetype['mimetype'], $this->mimetypes)) {
|
||||||
$mimetypes[] = $mimetype;
|
$mimetypes[] = $mimetype;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue