Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
8d89a63
Move load_users_data() after we fetch session info
Galex3 Jul 26, 2025
b9b9407
Optimize code to only call load_users_data() once
Galex3 Jul 27, 2025
85bd6e6
Fix circular dependency
Galex3 Jul 27, 2025
e4f46ce
Improve italian translation
Leinad4Mind Jul 27, 2025
2aeef96
Merge branch 'add-italian'
Jul 27, 2025
e1b56b7
Merge branch 'Fix-mime-type'
Jul 27, 2025
5762de9
Merge branch 'acp-import-fix'
Jul 27, 2025
33ec960
Merge branch 'fix-pagination-on-search'
Jul 27, 2025
c8e30b5
Merge branch 'Other-fixes'
Jul 27, 2025
29b3268
Merge branch 'Add-es-language'
Jul 27, 2025
4624a72
Merge branch 'fix-comments'
Jul 27, 2025
556cc2a
Merge branch 'new-fixes'
Jul 27, 2025
75da6b7
Merge branch 'prepare-new-release'
Jul 27, 2025
fa66316
Add missing album_desc
Leinad4Mind Jul 27, 2025
8a67c2a
Update README.md
Leinad4Mind Jul 27, 2025
e67bf68
Merge branch 'prune-orphan'
Jul 27, 2025
e6eb281
Merge pull request #10 from Galex3/fix-who-is-online-empty
Leinad4Mind Jul 27, 2025
724bbcb
Merge pull request #10 from Galex3/fix-who-is-online-empty
Leinad4Mind Jul 27, 2025
4b88138
Revert some changes and fix who is online not displaying
Galex3 Jul 27, 2025
d483472
Revert some changes
Galex3 Jul 27, 2025
371c16c
Merge branch 'prepare-new-release'
Jul 28, 2025
bc52781
Add features and clean readme
Jul 28, 2025
cd9ae75
Merge pull request #11 from Galex3/fix-who-is-online-empty
Leinad4Mind Jul 28, 2025
e6da53c
Merge branch 'who-is-online'
Jul 28, 2025
083a41d
Fix eslint
Jul 28, 2025
8a019d1
Sanitise first_char
Jul 28, 2025
636716e
Fix deprecated SPDX license identifier
Jul 28, 2025
5066ea4
Add missing revert schema
Jul 28, 2025
381f2b8
remove unnecessary htmlspecialchars
Jul 28, 2025
3365ab3
Remove stripslashes, doing more harm then good
Jul 28, 2025
1327f42
Refactor recent_count method, preventing possible sql injection warning
Jul 28, 2025
6c63ad6
Fix more eslint
Jul 28, 2025
49ff610
Fix eslint on translations
Jul 28, 2025
4964edb
Refactor get_parents method fixing unserialize use
Jul 28, 2025
ed80629
Add missing license file to exif addon extension
Jul 28, 2025
4de51d6
Fix request_var to request variable
Jul 28, 2025
d0e90b8
Safer unserialize
Jul 28, 2025
1212b16
Keep unserialize but safer
Jul 28, 2025
1ebe4a4
Escape on template instead
Jul 28, 2025
d7aa354
Add missing license file to acp cleanup and import adons
Jul 28, 2025
f75c044
Fix eslint
Jul 28, 2025
21245ea
Improve tests and project structure
Jul 28, 2025
2a7bc0e
Move tests too
Jul 28, 2025
730e484
Fix typos
Jul 28, 2025
1be6921
Fix travis
Jul 28, 2025
90a9ad3
Fix tests path
Jul 28, 2025
9c1c202
Fix path
Jul 28, 2025
b69638e
rollback for further tests
Jul 28, 2025
3bc4497
Change placeholders logic for mariaDB compatible code
Jul 28, 2025
f8bc8d3
Fix sql injection warnings
Jul 28, 2025
b3c5a0e
More improves
Jul 28, 2025
817cdda
Refactor structure again to test EPV again
Jul 28, 2025
0f631bf
Fix pagination on index
Jul 28, 2025
df9168e
test epv
Jul 28, 2025
0b552d7
fix eslint
Jul 28, 2025
675b171
More fixes
Jul 28, 2025
ba1cd1c
Fix explain translations
Jul 28, 2025
772f86f
Improve german files
Jul 28, 2025
97b58a0
Improve permissions module
Jul 28, 2025
9ec2796
Fix translations
Jul 28, 2025
d824c44
Fix permissions module
Jul 28, 2025
659c7fd
Fix test
Jul 28, 2025
027c534
Fix test error
Jul 28, 2025
689a2df
Fix test error
Jul 28, 2025
cd3512f
Fix tests yml
Jul 29, 2025
6a39f80
Code improvements
Jul 30, 2025
c711711
Merge remote-tracking branch 'upstream/master'
Jul 30, 2025
f1593e8
Fix typos
Jul 31, 2025
3056fab
Refactor acp gallery logs module
Jul 31, 2025
f3a6881
Fix pagination properly
Jul 31, 2025
bc0a3f8
Fix count
Jul 31, 2025
1691e1f
build acp list according item per page
Jul 31, 2025
cadd0ab
refactor moderate controller
Jul 31, 2025
786d647
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
3fadf1f
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
29397ef
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
deaf7ca
Merge branch 'improvements'
Jul 31, 2025
c108aa9
Fix all typos
Jul 31, 2025
f9fb603
Merge branch 'fix-typos'
Jul 31, 2025
d405f91
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
0acc32a
Extra improvements
Jul 31, 2025
d1a58c1
Fix image controller
Jul 31, 2025
f52f9ea
Fix meta refresh on approval
Jul 31, 2025
4169c75
Improve code
Jul 31, 2025
22aa9b8
New feature: Poster can see unapproved images
Jul 31, 2025
5985542
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
8e92de6
Fix error epv
Jul 31, 2025
922e662
Merge branch 'fix-meta-refresh-approval'
Jul 31, 2025
fa99568
Merge branch 'poster-unapproved-image'
Jul 31, 2025
f7d6f25
Merge remote-tracking branch 'upstream/master'
Jul 31, 2025
faff0c4
Clean
Jul 31, 2025
531cc3d
Merge branch 'poster-unapproved-image'
Jul 31, 2025
b1352a1
Fix
Jul 31, 2025
d1375a4
clean
Jul 31, 2025
bfb8c34
Merge branch 'poster-unapproved-image'
Jul 31, 2025
97ce4d9
clean
Jul 31, 2025
0e79469
Merge branch 'fix-moderation-issue'
Aug 1, 2025
8b52c24
Merge branch 'poster-unapproved-image'
Aug 1, 2025
3814c59
Merge remote-tracking branch 'upstream/master'
Aug 1, 2025
5ae388c
Fix all typos on comments
Aug 2, 2025
9119c01
Fix auth typo
Aug 2, 2025
e4fc86b
Fix unapproved typo
Aug 2, 2025
0225260
Fix typos
Aug 2, 2025
15b3287
Revert last 2 commits
Aug 2, 2025
32799b3
Fix typos properly
Aug 2, 2025
9dab49b
More typos
Aug 2, 2025
f15a24d
Revert "Fix auth typo"
Aug 2, 2025
1f85684
Merge remote-tracking branch 'upstream/master'
Aug 2, 2025
458593b
Fix gitattributes
Aug 2, 2025
9bf7092
Add ints to constants
Aug 2, 2025
fbc9528
Fix more typos
Aug 2, 2025
4109655
Fix image
Aug 2, 2025
3d41fd8
Fix bug that rised after bad merged
Aug 2, 2025
4e74a05
Improve some code
Aug 2, 2025
b36d4f1
Fix acp pagination
Aug 2, 2025
9b89002
Merge branch 'fix-acp-pagination'
Aug 2, 2025
6dc5f06
Merge remote-tracking branch 'origin/extrafixes'
Aug 2, 2025
ebbdcb7
Improve ACP Cleanup
Aug 2, 2025
80465b2
Improve ACP Import
Aug 2, 2025
7c501bc
Improve Exif
Aug 2, 2025
876be87
Improve Core
Aug 2, 2025
5d19425
Improve index and album controlers
Aug 2, 2025
d91017d
Improve ACP Import
Aug 2, 2025
7cd8a7b
Improve Exif
Aug 2, 2025
c47929f
Fix spaces to tabs
Aug 2, 2025
d4c3dc2
Fix EPV
Aug 2, 2025
0c9c1ae
Fix search controller
Aug 2, 2025
d99e4f6
Merge remote-tracking branch 'upstream/master'
Aug 3, 2025
ba18f9f
Merge branch 'extrafixes'
Aug 3, 2025
51569cd
Merge remote-tracking branch 'upstream/master'
Aug 3, 2025
1874fa8
Fix
Aug 3, 2025
b7f208d
Fix polaroid prosilver bug
Aug 5, 2025
77be43f
Fix action keys on disapprove
Aug 5, 2025
89d35dc
Merge branch 'fix--new-issues'
Aug 5, 2025
ba1f346
Attempt to fix verify json
Aug 5, 2025
057712f
space
Aug 5, 2025
9ca2fd0
Fix comments count after bad merge
Aug 5, 2025
1aacec5
Uniformize copyright structure
Aug 5, 2025
de7ae01
Merge branch 'uniform-structure'
Aug 6, 2025
955f4c1
Merge remote-tracking branch 'upstream/master'
Aug 6, 2025
7032f46
Fix missing translations
Aug 6, 2025
ef96d65
Add missing translations
Aug 6, 2025
27cd4f1
Improvements configs
Aug 6, 2025
d8eefc1
Merge remote-tracking branch 'upstream/master'
Aug 7, 2025
77aebde
Prevent uninstall core if sub.ext are installed
Aug 9, 2025
5d6d6da
Prevent uninstall core if sub.ext are installed
Aug 9, 2025
fbdadc0
preventing before purging not disabling
Aug 9, 2025
1493f31
Better translations
Aug 9, 2025
3b2b373
Fix epv
Aug 9, 2025
69f816e
Fix epv
Aug 9, 2025
dd7b5bb
Merge branch 'improve-disable-step'
Aug 9, 2025
b460f00
clean
Aug 9, 2025
c40bcd1
Improve migrations
Aug 10, 2025
df82ea2
Fix import error on uninstall
Aug 10, 2025
1899845
Improve enabling/disabling/purging
Aug 10, 2025
34f4076
typo
Aug 10, 2025
2d78fc0
Fixes
Aug 10, 2025
08afa05
Fix acp cleanup
Aug 10, 2025
a9b7b4e
Fix typos
Aug 10, 2025
ece3d3e
fix typo
Aug 10, 2025
eefb4c1
Fix image_exif_data for MariaDB
Aug 10, 2025
402f4e6
fix space to tabs
Aug 10, 2025
ad864c7
Fix comments
Aug 10, 2025
d7658d1
rename
Aug 10, 2025
9e0779d
Fix Undefined index on delete comment
Aug 10, 2025
b2da2a0
Fix image name on report image
Aug 10, 2025
559fffd
Fix epv
Aug 10, 2025
f845a3e
Fix - Remove configs and permissions when delete
Aug 10, 2025
3c3168c
Fix missing notification on purge/enable
Aug 10, 2025
e2bd9f3
Fix extra line
Aug 10, 2025
6f0eb59
Fix comment count after deleting image
Aug 10, 2025
d4c86fd
Fix empty line on gallery configuration acp
Aug 10, 2025
39eb19d
Hide for now
Aug 10, 2025
767d7a6
Fix missing configs for correct unninstalling
Aug 10, 2025
eebc1c8
Fix space
Aug 10, 2025
215d3a2
Fix ip bug
Aug 10, 2025
99111a7
Some improvements on viewimage
Aug 10, 2025
20957af
clean var dump
Aug 10, 2025
fc4a868
Solve conflicts with some extensions
Aug 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions acpcleanup/acp/main_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,29 @@

namespace phpbbgallery\acpcleanup\acp;

/**
* ACP Module Info class
*/
class main_info
{
function module()
/**
* Returns module information
*
* @return array Module information
*/
public function module(): array
{
return array(
'filename' => 'main_module',
'title' => 'PHPBB_GALLERY',
'version' => '1.0.0',
'modes' => array(
'cleanup' => array(
'title' => 'ACP_GALLERY_CLEANUP',
'auth' => 'acl_a_gallery_cleanup && ext_phpbbgallery/acpcleanup',
'cat' => array('PHPBB_GALLERY')
),
),
);
return [
'filename' => '\phpbbgallery\acpcleanup\acp\main_module',
'title' => 'PHPBB_GALLERY',
'version' => '1.0.0',
'modes' => [
'cleanup' => [
'title' => 'ACP_GALLERY_CLEANUP',
'auth' => 'acl_a_gallery_cleanup && ext_phpbbgallery/acpcleanup',
'cat' => ['PHPBB_GALLERY'],
],
],
];
}
}
32 changes: 23 additions & 9 deletions acpcleanup/acp/main_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,42 @@

class main_module
{
var $u_action;
public string $u_action;

function main($id, $mode)
public function main(string $id, string $mode): void
{
global $auth, $cache, $config, $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_ext_gallery;
global $auth, $cache, $config, $db, $template, $request, $user, $phpEx, $phpbb_root_path, $phpbb_ext_gallery;

$user->add_lang_ext('phpbbgallery/core', array('gallery_acp', 'gallery'));
//$user->add_lang_ext('phpbbgallery/acpcleanup', 'cleanup');
$this->tpl_name = 'gallery_cleanup';

add_form_key('acp_gallery');

$submit = $request->is_set_post('submit');

if ($submit && !check_form_key('acp_gallery'))
{
trigger_error($user->lang('FORM_INVALID') . adm_back_link($this->u_action), E_USER_WARNING);
}

$this->page_title = $user->lang['ACP_GALLERY_CLEANUP'];
$this->cleanup();
$this->cleanup($submit);
}

function cleanup()
/**
* Cleanup gallery files and database entries
*
* @param array $missing_entries Files to clean
* @param bool $move_to_import Whether to move files to import dir
* @return array Messages about cleanup results
* @throws \RuntimeException On file operation errors
*/
public function cleanup(bool $submit = false): void
{
global $auth, $cache, $db, $template, $user, $phpbb_ext_gallery, $table_prefix, $phpbb_container, $request;

$delete = (isset($_POST['delete'])) ? true : false;
$prune = (isset($_POST['prune'])) ? true : false;
$submit = (isset($_POST['submit'])) ? true : false;
$delete = $request->is_set_post('delete');
$prune = $request->is_set_post('prune');

$missing_sources = $request->variable('source', array(0));
$missing_entries = $request->variable('entry', array(''), true);
Expand Down
13 changes: 1 addition & 12 deletions acpcleanup/adm/style/gallery_cleanup.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,10 @@ <h1>{ACP_GALLERY_TITLE}</h1>

<p class="submit-buttons">
<input class="button1" type="submit" name="prune" value="{L_PRUNE}" />
{S_FORM_TOKEN}
</p>
</fieldset>
<!-- ENDIF -->
<p>{S_FORM_TOKEN}</p>
</form>

<!--
I request you retain the full copyright notice below including the link to www.flying-bits.org.
This not only gives respect to the large amount of time given freely by the developer
but also helps build interest, traffic and use of phpBB Gallery. If you (honestly) cannot retain
the full copyright I ask you at least leave in place the "Powered by phpBB Gallery" line, with
"phpBB Gallery" linked to www.flying-bits.org. If you refuse to include even this then support on my
forums may be affected.

phpBB Gallery, nickvergessen : 2009
Powered by phpBB Gallery (http://www.flying-bits.org/) &copy; 2007, 2009 nickvergessen (http://www.flying-bits.org/)
//-->
<!-- INCLUDE overall_footer.html -->
4 changes: 2 additions & 2 deletions acpcleanup/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
}
],
"require": {
"php": ">=5.3"
"php": ">=7.1"
},
"extra": {
"display-name": "phpBB Gallery Add-on: ACP Cleanup",
"soft-require": {
"phpbb/phpbb": ">=3.1.0-RC2,<3.3.0@dev"
"phpbb/phpbb": ">=3.2.0,<4.0.0@dev"
}
},
"version-check": {
Expand Down
8 changes: 4 additions & 4 deletions acpcleanup/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
tables.phpbbgallery.albums: '%core.table_prefix%gallery_albums'
tables.phpbbgallery.images: '%core.table_prefix%gallery_images'
phpbbgallery.tables.gallery_albums: '%core.table_prefix%gallery_albums'
phpbbgallery.tables.gallery_images: '%core.table_prefix%gallery_images'

services:
phpbbgallery.acpcleanup.cleanup:
Expand All @@ -16,5 +16,5 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.moderate'
- '%tables.phpbbgallery.albums%'
- '%tables.phpbbgallery.images%'
- '%phpbbgallery.tables.gallery_albums%'
- '%phpbbgallery.tables.gallery_images%'
55 changes: 51 additions & 4 deletions acpcleanup/ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,59 @@
* @license GPL-2.0-only
*/

// this file is not really needed, when empty it can be omitted
// however you can override the default methods and add custom
// installation logic

namespace phpbbgallery\acpcleanup;

class ext extends \phpbb\extension\base
{
/**
* Check whether or not the extension can be enabled.
* Checks dependencies and requirements.
*
* @return bool
*/
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
$user = $this->container->get('user');

$core_ext = 'phpbbgallery/core';

// Check if core is installed (enabled or disabled)
$is_enabled = $manager->is_enabled($core_ext);
$is_disabled = $manager->is_disabled($core_ext);

if (!$is_enabled && !$is_disabled)
{
// Core not installed at all
$user->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
trigger_error($user->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
return false;
}

if ($is_disabled)
{
// Core installed but disabled — enable it automatically
$manager->enable($core_ext);
}

// If here, core is either enabled or just enabled now
return true;
}

/**
* Perform additional tasks on extension enable
*
* @param mixed $old_state State returned by previous call of this method
* @return mixed Returns false after last step, otherwise temporary state
*/
public function enable_step($old_state)
{
if (empty($old_state))
{
$this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
$this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']);
}

return parent::enable_step($old_state);
}
}
File renamed without changes.
9 changes: 6 additions & 3 deletions acpcleanup/language/bg/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Почистване на галерия',
'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Тук можете да изтриете малко останки.',

Expand Down Expand Up @@ -78,4 +78,7 @@
'MOVE_TO_USER' => 'Премести при потребител',
'MOVE_TO_USER_EXP' => 'Изображенията и коментарите ще бъдат преместеи като такива на посочения потребител. Ако не посочите потребител - Гост е зададен по-подразбиране',
'CLEAN_USER_NOT_FOUND' => 'Желаният от вас потребител не е открит!',
));

'GALLERY_CORE_NOT_FOUND' => 'Първо трябва да бъде инсталирано и активирано разширението phpBB Gallery Core.',
'EXTENSION_ENABLE_SUCCESS' => 'Разширението е активирано успешно.',
]);
Empty file.
9 changes: 6 additions & 3 deletions acpcleanup/language/de/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Galerie bereinigen',

'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Hier kannst Du einige Reste löschen.',
Expand Down Expand Up @@ -79,4 +79,7 @@
'MOVE_TO_USER' => 'Wechseln zu Benutzer',
'MOVE_TO_USER_EXP' => 'Bilder und Kommentare werden als diejenigen des Benutzers verschoben werden, die Du definiert hast. Wenn Keine ausgewählt wird - wird Gast verwendet.',
'CLEAN_USER_NOT_FOUND' => 'Der von Ihnen ausgewählte Benutzer existiert nicht!',
));

'GALLERY_CORE_NOT_FOUND' => 'Die phpBB Gallery Core-Erweiterung muss zuerst installiert und aktiviert werden.',
'EXTENSION_ENABLE_SUCCESS' => 'Die Erweiterung wurde erfolgreich aktiviert.',
]);
Empty file.
9 changes: 6 additions & 3 deletions acpcleanup/language/en/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Cleanup gallery',

'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Here you can delete some remains.',
Expand Down Expand Up @@ -78,4 +78,7 @@
'MOVE_TO_USER' => 'Move to user',
'MOVE_TO_USER_EXP' => 'Images and comments will be moved as those of user you have defined. If none is selected - Anonymous will be used.',
'CLEAN_USER_NOT_FOUND' => 'The user you selected does not exists!',
));

'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
Empty file.
9 changes: 6 additions & 3 deletions acpcleanup/language/fr/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Nettoyage de la galerie',

'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Ici vous pouvez nettoyer la Galerie.',
Expand Down Expand Up @@ -79,4 +79,7 @@
'MOVE_TO_USER' => 'Attribuer à l’utilisateur',
'MOVE_TO_USER_EXP' => 'Les images et les commentaires seront attribués à l’utilisateur que vous avez défini. Si aucun n’est sélectionné - “Anonyme“ sera utilisé.',
'CLEAN_USER_NOT_FOUND' => 'L’utilisateur sélectionné n’existe pas!',
));

'GALLERY_CORE_NOT_FOUND' => 'L’extension phpBB Gallery Core doit d’abord être installée et activée.',
'EXTENSION_ENABLE_SUCCESS' => 'L’extension a été activée avec succès.',
]);
Empty file.
9 changes: 6 additions & 3 deletions acpcleanup/language/it/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Pulisci galleria',

'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Puoi cancellare alcuni rimasugli, da qui.',
Expand Down Expand Up @@ -79,4 +79,7 @@
'MOVE_TO_USER' => 'Sposta all\'utente',
'MOVE_TO_USER_EXP' => 'Immagini e commenti verranno spostati come fossero dell\'utente che hai definito. Se non ne vengono selezionati verra\' usato l\'utente anonimo.',
'CLEAN_USER_NOT_FOUND' => 'L\'utente selezionato non esiste!',
));

'GALLERY_CORE_NOT_FOUND' => 'L\'estensione phpBB Gallery Core deve essere prima installata e abilitata.',
'EXTENSION_ENABLE_SUCCESS' => 'L\'estensione è stata abilitata con successo.',
]);
Empty file.
9 changes: 6 additions & 3 deletions acpcleanup/language/ru/info_acp_gallery_cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}

$lang = array_merge($lang, array(
$lang = array_merge($lang, [
'ACP_GALLERY_CLEANUP' => 'Очистить галерею',

'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Здесь вы можете удалить некоторые остатки.',
Expand Down Expand Up @@ -79,4 +79,7 @@
'MOVE_TO_USER' => 'Move to user',
'MOVE_TO_USER_EXP' => 'Images and comments will be moved as those of user you have defined. If none is selected - Anonymous will be used.',
'CLEAN_USER_NOT_FOUND' => 'The user you selected does not exists!',
));

'GALLERY_CORE_NOT_FOUND' => 'Сначала необходимо установить и включить расширение phpBB Gallery Core.',
'EXTENSION_ENABLE_SUCCESS' => 'Расширение успешно включено.',
]);
32 changes: 17 additions & 15 deletions acpcleanup/migrations/m1_init.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@

namespace phpbbgallery\acpcleanup\migrations;

class m1_init extends \phpbb\db\migration\migration
use phpbb\db\migration\migration;

class m1_init extends migration
{
static public function depends_on()
{
return array('\phpbbgallery\core\migrations\release_1_2_0');
return ['\phpbbgallery\core\migrations\release_1_2_0'];
}

public function update_data()
{
return array(
array('permission.add', array('a_gallery_cleanup', true, 'a_board')),
array('module.add', array(
'acp',
'PHPBB_GALLERY',
array(
'module_basename' => '\phpbbgallery\acpcleanup\acp\main_module',
'module_langname' => 'ACP_GALLERY_CLEANUP',
'module_mode' => 'cleanup',
'module_auth' => 'ext_phpbbgallery/acpcleanup && acl_a_gallery_cleanup',
)
)),
);
return [
['permission.add', ['a_gallery_cleanup', true, 'a_board']],
['module.add', [
'acp',
'PHPBB_GALLERY',
[
'module_basename' => '\phpbbgallery\acpcleanup\acp\main_module',
'module_langname' => 'ACP_GALLERY_CLEANUP',
'module_mode' => 'cleanup',
'module_auth' => 'ext_phpbbgallery/acpcleanup && acl_a_gallery_cleanup',
]
]],
];
}
}
Loading
Loading