mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 12:28:06 +01:00
migration to change setting name
This commit is contained in:
parent
aff41cd523
commit
bf6d0c996f
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m201020_130431_fix_default_file_setting_value
|
||||
*/
|
||||
class m201020_130431_fix_default_file_setting_value extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->update('setting', ['name' => 'excludeMediaFilesPreview'], ['name' => 'hideImageFileInfo', 'module_id' => 'file']);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
echo "m201020_130431_fix_default_file_setting_value cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m201020_130431_fix_default_file_setting_value cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
@ -6,6 +6,13 @@ use Yii;
|
||||
|
||||
/**
|
||||
* FileSettingsForm
|
||||
* @property integer $maxFileSize
|
||||
* @property integer $maxPreviewImageWidth
|
||||
* @property integer $maxPreviewImageHeight
|
||||
* @property integer $excludeMediaFilesPreview Exclude media files from stream attachment list
|
||||
* @property integer $useXSendfile
|
||||
* @property string $allowedExtensions
|
||||
*
|
||||
* @since 0.5
|
||||
*/
|
||||
class FileSettingsForm extends \yii\base\Model
|
||||
@ -56,7 +63,7 @@ class FileSettingsForm extends \yii\base\Model
|
||||
'useXSendfile' => Yii::t('AdminModule.settings', 'Use X-Sendfile for File Downloads'),
|
||||
'maxPreviewImageWidth' => Yii::t('AdminModule.settings', 'Maximum preview image width (in pixels, optional)'),
|
||||
'maxPreviewImageHeight' => Yii::t('AdminModule.settings', 'Maximum preview image height (in pixels, optional)'),
|
||||
'excludeMediaFilesPreview' => Yii::t('AdminModule.settings', 'Exclude media files in stream attachment list'),
|
||||
'excludeMediaFilesPreview' => Yii::t('AdminModule.settings', 'Exclude media files from stream attachment list'),
|
||||
'allowedExtensions' => Yii::t('AdminModule.settings', 'Allowed file extensions'),
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user