Skip to content

Commit

Permalink
Fix lang files, add migration file to fix file image name.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcgirr83 committed Oct 22, 2020
1 parent d10fe2a commit 262e501
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 25 deletions.
47 changes: 24 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "rmcgirr83/nationalflags",
"type": "phpbb-extension",
"description": "Allows a user to be able to choose a national flag and have a top (those with the most users selecting the flag) number of flags display on the index page of a phpBB forum. Header is link to a listing of all users of a flag. Clicking on user count of the flag displays the users that have that flag set. This extension requires at least phpBB version 3.2.6. Must have version 2.0.0 of Collapsible Forum Categories to take advantage of that extension.",
"homepage": "https://github.com/rmcgirr83/nationalflags",
"version": "2.2.4",
"time": "2020-09-21",
"name": "rmcgirr83/nationalflags",
"type": "phpbb-extension",
"description": "Allows a user to be able to choose a national flag and have a top (those with the most users selecting the flag) number of flags display on the index page of a phpBB forum. Header is link to a listing of all users of a flag. Clicking on user count of the flag displays the users that have that flag set. This extension requires at least phpBB version 3.2.6. Must have version 2.0.0 of Collapsible Forum Categories to take advantage of that extension.",
"homepage": "https://github.com/rmcgirr83/nationalflags",
"version": "2.2.5",
"time": "2020-10-21",
"keywords": [
"phpbb",
"extension",
Expand All @@ -14,28 +14,29 @@
"user",
"communication"
],
"license": "GPL-2.0-only",
"authors": [
{
"name": "Rich McGirr",
"homepage": "https://paypal.me/RMcGirr83",
"role": "Developer"
}
],
"require": {
"license": "GPL-2.0-only",
"authors": [
{
"name": "Rich McGirr",
"homepage": "https://paypal.me/RMcGirr83",
"role": "Developer"
}
],
"require": {
"php": ">=7.1",
"phpbb/phpbb": ">=3.2.6",
"composer/installers": "~1.0.0"
},
"extra": {
"display-name": "National Flags",
"soft-require": {
"phpbb/phpbb": ">=3.2.6"
},
},
"extra": {
"display-name": "National Flags",
"soft-require": {
"phpbb/phpbb": ">=3.2.6"
},
"version-check": {
"host": "www.phpbb.com",
"directory": "/customise/db/extension/phpbb_3.1_national_flags",
"filename": "version_check"
"filename": "version_check",
"ssl": true
}
}
}
}
4 changes: 2 additions & 2 deletions language/en/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@
'YEMEN' => 'Yemen',
'ZAMBIA' => 'Zambia',
'ZIMBABWE' => 'Zimbabwe',
'COCOS_(KEELING)_ISLANDS ' => 'Cocos (Keeling) Islands ',
'COOK ISLANDS' => 'Cook Islands',
'COCOS_(KEELING)_ISLANDS' => 'Cocos (Keeling) Islands',
'COOK_ISLANDS' => 'Cook Islands',
'CURACAO' => 'Curaçao',
'CHRISTMAS_ISLAND' => 'Christmas Island',
'GIBRALTAR' => 'Gibraltar',
Expand Down
49 changes: 49 additions & 0 deletions migrations/m13_update_data.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
*
* @package National Flags
* @copyright (c) 2020 Rich Mcgirr (RMcGirr83)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace rmcgirr83\nationalflags\migrations;

class m13_update_data extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array('\rmcgirr83\nationalflags\migrations\m12_update_data');
}

public function update_data()
{
return array(
array('custom', array(
array(&$this, 'flag_update_image')
)),
);
}

public function flag_update_image()
{
if ($this->db_tools->sql_table_exists($this->table_prefix . 'flags'))
{
$sql_ary = [
[
'flag_name' => 'Curaçao',
'flag_image' => 'cw.png',
],
];
foreach ($sql_ary as $num => $flag)
{
$sql = 'UPDATE ' . $this->table_prefix . 'flags
SET ' . $this->db->sql_build_array('UPDATE', array(
'flag_image' => (string) $flag['flag_image'])
) .
" WHERE flag_name = '" . (string) $flag['flag_name'] . "'";
$this->db->sql_query($sql);
}
}
}
}

0 comments on commit 262e501

Please sign in to comment.