-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #687 from PeterMis/olbers-2.2.0-alpha2
Olbers 2.2.0 alpha2
- Loading branch information
Showing
16 changed files
with
281 additions
and
30 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
db/migrations/20190926135518_add_setting_for_transition_auto_apply_to_layout_migration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2019 Xibo Signage Ltd | ||
* | ||
* Xibo - Digital Signage - http://www.xibo.org.uk | ||
* | ||
* This file is part of Xibo. | ||
* | ||
* Xibo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* Xibo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class AddSettingForTransitionAutoApplyToLayoutMigration extends AbstractMigration | ||
{ | ||
/** @inheritdoc */ | ||
public function change() | ||
{ | ||
// Add a setting for default value of layout->autoApplyTransitions checkbox | ||
if (!$this->fetchRow('SELECT * FROM `setting` WHERE setting = \'DEFAULT_TRANSITION_AUTO_APPLY\'')) { | ||
$this->table('setting')->insert([ | ||
[ | ||
'setting' => 'DEFAULT_TRANSITION_AUTO_APPLY', | ||
'value' => 0, | ||
'userSee' => 1, | ||
'userChange' => 1 | ||
] | ||
])->save(); | ||
} | ||
|
||
$layoutTable = $this->table('layout'); | ||
|
||
// Add a new column to Layout table - autoApplyTransitions | ||
if (!$layoutTable->hasColumn('autoApplyTransitions')) { | ||
$layoutTable | ||
->addColumn('autoApplyTransitions', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'default' => 0]) | ||
->save(); | ||
} | ||
|
||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
db/migrations/20190926140809_install_saved_reports_and_spacer_modules_migration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* Copyright (C) 2019 Xibo Signage Ltd | ||
* | ||
* Xibo - Digital Signage - http://www.xibo.org.uk | ||
* | ||
* This file is part of Xibo. | ||
* | ||
* Xibo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* Xibo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class InstallSavedReportsAndSpacerModulesMigration extends AbstractMigration | ||
{ | ||
/** @inheritdoc */ | ||
public function change() | ||
{ | ||
$modules = $this->table('module'); | ||
|
||
if (!$this->fetchRow('SELECT * FROM module WHERE module = \'savedreport\'')) { | ||
$modules->insert([ | ||
'module' => 'savedreport', | ||
'name' => 'Saved Reports', | ||
'enabled' => 1, | ||
'regionSpecific' => 0, | ||
'description' => 'A saved report to be stored in the library', | ||
'schemaVersion' => 1, | ||
'previewEnabled' => 0, | ||
'assignable' => 0, | ||
'render_as' => null, | ||
'class' => 'Xibo\Widget\SavedReport', | ||
'defaultDuration' => 10, | ||
'validExtensions' => 'json', | ||
'installName' => 'savedreport' | ||
])->save(); | ||
} | ||
|
||
if (!$this->fetchRow('SELECT * FROM module WHERE module = \'spacer\'')) { | ||
$modules->insert([ | ||
'module' => 'spacer', | ||
'name' => 'Spacer', | ||
'enabled' => 1, | ||
'regionSpecific' => 1, | ||
'description' => 'A module for making region empty for the duration', | ||
'schemaVersion' => 1, | ||
'previewEnabled' => 0, | ||
'assignable' => 1, | ||
'render_as' => 'hmtl', | ||
'class' => 'Xibo\Widget\Spacer', | ||
'defaultDuration' => 60, | ||
'validExtensions' => null, | ||
'installName' => 'spacer' | ||
])->save(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.