-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve: #2 Formats all the code fields
- Loading branch information
Showing
7 changed files
with
89 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace oxcom\phpbbch\migrations; | ||
|
||
class format_only_ext extends \phpbb\db\migration\migration | ||
{ | ||
/** | ||
* If our config variable already exists in the db | ||
* skip this migration. | ||
*/ | ||
public function effectively_installed() | ||
{ | ||
return isset($this->config['oxcom_phpbbch_format_only']); | ||
} | ||
|
||
/** | ||
* This migration depends on phpBB's v314 migration | ||
* already being installed. | ||
*/ | ||
static public function depends_on() | ||
{ | ||
return [ | ||
'\phpbb\db\migration\data\v31x\v314', | ||
'\oxcom\phpbbch\migrations\add_module', | ||
]; | ||
} | ||
|
||
public function update_data() | ||
{ | ||
return [ | ||
['config.add', ['oxcom_phpbbch_format_only', 'N']], | ||
]; | ||
} | ||
|
||
public function revert_data() | ||
{ | ||
return [ | ||
['config.remove', ['oxcom_phpbbch_format_only']], | ||
]; | ||
} | ||
} |
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