From 8d89a63bffc5b761bf1a723047c0def9a6033cb7 Mon Sep 17 00:00:00 2001
From: Gustavo Silva
Date: Sat, 26 Jul 2025 21:16:27 +0100
Subject: [PATCH 001/138] Move load_users_data() after we fetch session info
---
core/controller/image.php | 4 ++--
core/user.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index bbcebc1f..147d5e8b 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -638,8 +638,6 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
}
$this->db->sql_freeresult($result);
- $this->load_users_data();
-
if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
{
// Load online-information
@@ -657,6 +655,8 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
$this->db->sql_freeresult($result);
}
+ $this->load_users_data();
+
foreach ($comments as $row)
{
$edit_info = '';
diff --git a/core/user.php b/core/user.php
index 961a45a8..7f25087b 100644
--- a/core/user.php
+++ b/core/user.php
@@ -612,7 +612,7 @@ public function add_user_to_cache(&$user_cache, $row)
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'contact_user' => $this->user->lang('CONTACT_USER', get_username_string('username', $user_id, $row['username'], $row['user_colour'], $row['username'])),
- 'online' => false,
+ 'online' => $user_cache[$user_id]['online'],
'jabber' => ($this->config['jab_enable'] && $row['user_jabber'] && $this->auth->acl_get('u_sendim')) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=contact&action=jabber&u=$user_id") : '',
'search' => ($this->config['load_search'] && $this->auth->acl_get('u_search')) ? append_sid("{$this->root_path}search.$this->php_ext", "author_id=$user_id&sr=posts") : '',
'author_full' => get_username_string('full', $user_id, $row['username'], $row['user_colour']),
From b9b9407e710b65a1719043506eace372c3994427 Mon Sep 17 00:00:00 2001
From: Gustavo Silva
Date: Sun, 27 Jul 2025 01:24:57 +0100
Subject: [PATCH 002/138] Optimize code to only call load_users_data() once
---
core/controller/image.php | 41 +++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index 147d5e8b..bf2d1cfd 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -449,8 +449,6 @@ public function base($image_id, $page = 0)
$this->users_id_array[$this->data['image_user_id']] = $this->data['image_user_id'];
- $this->load_users_data();
-
$user_id = $this->data['image_user_id'];
$this->users_data_array[$user_id]['username'] = ($this->data['image_username']) ? $this->data['image_username'] : $this->language->lang('GUEST');
$user_data = $this->users_data_array[$user_id] ?? [];
@@ -599,6 +597,26 @@ public function base($image_id, $page = 0)
{
$this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page'));
}
+
+ // Load online-information
+ if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
+ {
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
+ GROUP BY session_user_id';
+ $result = $this->db->sql_query($sql);
+
+ $update_time = $this->config['load_online_time'] * 60;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ $this->load_users_data();
+
return $this->helper->render('gallery/viewimage_body.html', $page_title);
}
@@ -638,25 +656,6 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
}
$this->db->sql_freeresult($result);
- if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
- {
- // Load online-information
- $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
- FROM ' . SESSIONS_TABLE . '
- WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
- GROUP BY session_user_id';
- $result = $this->db->sql_query($sql);
-
- $update_time = $this->config['load_online_time'] * 60;
- while ($row = $this->db->sql_fetchrow($result))
- {
- $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
- }
- $this->db->sql_freeresult($result);
- }
-
- $this->load_users_data();
-
foreach ($comments as $row)
{
$edit_info = '';
From 85bd6e6d7bf8f7b7aa2dbcccd08708ad4d590c46 Mon Sep 17 00:00:00 2001
From: Gustavo Silva
Date: Sun, 27 Jul 2025 02:39:35 +0100
Subject: [PATCH 003/138] Fix circular dependency
---
core/config/services.yml | 2 ++
core/controller/image.php | 4 ++--
core/notification/helper.php | 8 ++++++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/core/config/services.yml b/core/config/services.yml
index 2b4534d4..e70e4370 100644
--- a/core/config/services.yml
+++ b/core/config/services.yml
@@ -249,6 +249,8 @@ services:
- '%core.root_path%'
- '%core.php_ext%'
- '%tables.phpbbgallery.watch%'
+ calls:
+ - [set_image, ['@phpbbgallery.core.image']]
phpbbgallery.core.log:
class: phpbbgallery\core\log
arguments:
diff --git a/core/controller/image.php b/core/controller/image.php
index bf2d1cfd..af130a90 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -599,7 +599,7 @@ public function base($image_id, $page = 0)
}
// Load online-information
- if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
+ if ($this->config['load_onlinetrack'] && count($this->users_id_array))
{
$sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
FROM ' . SESSIONS_TABLE . '
@@ -614,7 +614,7 @@ public function base($image_id, $page = 0)
}
$this->db->sql_freeresult($result);
}
-
+
$this->load_users_data();
return $this->helper->render('gallery/viewimage_body.html', $page_title);
diff --git a/core/notification/helper.php b/core/notification/helper.php
index 8c280dab..d0921837 100644
--- a/core/notification/helper.php
+++ b/core/notification/helper.php
@@ -28,7 +28,7 @@ class helper
protected $image;
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user,
\phpbbgallery\core\auth\auth $gallery_auth, \phpbbgallery\core\album\loader $album_load, \phpbb\controller\helper $helper, \phpbbgallery\core\url $url,
- Container $phpbb_container, $root_path, $php_ext, $watch_table, \phpbbgallery\core\image\image $image)
+ Container $phpbb_container, $root_path, $php_ext, $watch_table)
{
$this->config = $config;
$this->db = $db;
@@ -43,7 +43,6 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
$this->root_path = $root_path;
$this->php_ext = $php_ext;
$this->watch_table = $watch_table;
- $this->image = $image;
}
/**
@@ -299,4 +298,9 @@ public function new_image($data)
$data['targets'] = $targets;
$this->notify('new_image', $data);
}
+
+ public function set_image(\phpbbgallery\core\image\image $image)
+ {
+ $this->image = $image;
+ }
}
From e4f46ce7586df0c47032ce1be8903c1ae6982810 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 27 Jul 2025 07:04:18 +0100
Subject: [PATCH 004/138] Improve italian translation
Add italian files for cleanup / import / exif
Revert "Various fixes - Thks to DreadDendy"
This reverts commit f938d760bfc5feb72469c32f68660184274587eb.
Revert "Improved sub-album moving through editing - Thks to DreadDendy"
This reverts commit bf317a4073deb7ae77ecfec4bb8176f95008579f.
Revert "Fix update image - Thks to DreadDendy"
This reverts commit 8545fb1a3324374d6b40d4c2b6f417d7abb1082a.
Fix update image - Thks to DreadDendy
Since we're updating an image no need to count uploaded files, orelse it would distort quota tracking. And since we're updating an image it means the image already exist so the uploaded_files was already updated. Should not be >=.
Improved sub-album moving through editing - Thks to DreadDendy
Various fixes - Thks to DreadDendy
Fix PSR2.Files.EndFileNewline.NoneFound
Add Italian language - thks obteo
Clean languages
---
.../language/it/info_acp_gallery_cleanup.php | 78 ++++
.../it/info_acp_gallery_acpimport.php | 42 ++
core/language/bg/info_acp_gallery.php | 1 -
core/language/de/info_acp_gallery.php | 1 -
core/language/fr/info_acp_gallery.php | 1 -
core/language/it/email/newcomment_notify.txt | 11 +
core/language/it/email/newimage_notify.txt | 11 +
core/language/it/gallery.php | 372 ++++++++++++++++
core/language/it/gallery_acp.php | 420 ++++++++++++++++++
core/language/it/gallery_mcp.php | 154 +++++++
core/language/it/gallery_notifications.php | 44 ++
core/language/it/gallery_ucp.php | 85 ++++
core/language/it/info_acp_gallery.php | 57 +++
core/language/it/info_acp_gallery_logs.php | 69 +++
core/language/it/info_ucp_gallery.php | 31 ++
core/language/it/install_gallery.php | 134 ++++++
core/language/it/permissions_gallery.php | 30 ++
core/language/nl/info_acp_gallery.php | 1 -
core/language/ru/info_acp_gallery.php | 1 -
exif/language/it/exif.php | 95 ++++
exif/language/it/index.htm | 0
21 files changed, 1633 insertions(+), 5 deletions(-)
create mode 100644 acpcleanup/language/it/info_acp_gallery_cleanup.php
create mode 100644 acpimport/language/it/info_acp_gallery_acpimport.php
create mode 100644 core/language/it/email/newcomment_notify.txt
create mode 100644 core/language/it/email/newimage_notify.txt
create mode 100644 core/language/it/gallery.php
create mode 100644 core/language/it/gallery_acp.php
create mode 100644 core/language/it/gallery_mcp.php
create mode 100644 core/language/it/gallery_notifications.php
create mode 100644 core/language/it/gallery_ucp.php
create mode 100644 core/language/it/info_acp_gallery.php
create mode 100644 core/language/it/info_acp_gallery_logs.php
create mode 100644 core/language/it/info_ucp_gallery.php
create mode 100644 core/language/it/install_gallery.php
create mode 100644 core/language/it/permissions_gallery.php
create mode 100644 exif/language/it/exif.php
create mode 100644 exif/language/it/index.htm
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
new file mode 100644
index 00000000..bb81eb49
--- /dev/null
+++ b/acpcleanup/language/it/info_acp_gallery_cleanup.php
@@ -0,0 +1,78 @@
+ 'Pulisci galleria',
+
+ 'ACP_GALLERY_CLEANUP_EXPLAIN' => 'Puoi cancellare alcuni rimasugli, da qui.',
+
+ 'CLEAN_AUTHORS_DONE' => 'Immagini senza un autore valido cancellate.',
+ 'CLEAN_CHANGED' => 'Modificato autore a "Ospite“.',
+ 'CLEAN_COMMENTS_DONE' => 'Commenti senza un autore valido cancellati.',
+ 'CLEAN_ENTRIES_DONE' => 'File privi di voce in database cancellati.',
+ 'CLEAN_GALLERY' => 'Pulisci galleria',
+ 'CLEAN_GALLERY_ABORT' => 'Ferma pulizia!',
+ 'CLEAN_NO_ACTION' => 'Nessuna azione completata. Qualcosa e\' andato storto!',
+ 'CLEAN_PERSONALS_DONE' => 'Album personali senza valido proprietario cancellati.',
+ 'CLEAN_PERSONALS_BAD_DONE' => 'Album personali degli utenti selezionati cancellati.',
+ 'CLEAN_PRUNE_DONE' => 'Immagini cancellate automaticamente con successo.',
+ 'CLEAN_PRUNE_NO_PATTERN' => 'Nessun modello di ricerca.',
+ 'CLEAN_SOURCES_DONE' => 'Immagini senza file cancellate.',
+
+ 'CONFIRM_CLEAN' => 'Questo passo non puo\' essere annullato!',
+ 'CONFIRM_CLEAN_AUTHORS' => 'Cancellare immagini senza autore valido?',
+ 'CONFIRM_CLEAN_COMMENTS' => 'Cancellare commenti senza autore valido?',
+ 'CONFIRM_CLEAN_ENTRIES' => 'Cancellare file senza voce in database?',
+ 'CONFIRM_CLEAN_PERSONALS' => 'Cancellare album personali senza un valido proprietario?» %s ',
+ 'CONFIRM_CLEAN_PERSONALS_BAD' => 'Cancellare album personali degli utenti selezionati?» %s ',
+ 'CONFIRM_CLEAN_SOURCES' => 'Cancellare immagini senza file?',
+ 'CONFIRM_PRUNE' => 'Cancellare tutte le immagini che hanno le seguenti condizioni: %s ',
+
+ 'PRUNE' => 'Cancellazione automatica',
+ 'PRUNE_ALBUMS' => 'Cancellazione automatica degli album',
+ 'PRUNE_CHECK_OPTION' => 'Spunta questa opzione quando cancelli automaticamente le immagini.',
+ 'PRUNE_COMMENTS' => 'Meno di x commenti',
+ 'PRUNE_PATTERN_ALBUM_ID' => 'L\'immagine e\' in uno dei seguenti album: » %s ',
+ 'PRUNE_PATTERN_COMMENTS' => 'L\'immagine ha meno di %d commenti.',
+ 'PRUNE_PATTERN_RATES' => 'L\'immagine ha meno di %d valutazioni.',
+ 'PRUNE_PATTERN_RATE_AVG' => 'L\'immagine ha una media di valutazioni inferiore di %s .',
+ 'PRUNE_PATTERN_TIME' => 'L\'immagine e\' stata caricata prima di “%s “.',
+ 'PRUNE_PATTERN_USER_ID' => 'L\'immagine e\' stata caricata da uno dei seguenti utenti: » %s ',
+ 'PRUNE_RATINGS' => 'Meno di x valutazioni',
+ 'PRUNE_RATING_AVG' => 'Media valutazioni inferiore di',
+ 'PRUNE_RATING_AVG_EXP' => 'Cancella automaticamente soltanto le immagini con una media di valutazioni inferiore di “x.yz “.',
+ 'PRUNE_TIME' => 'Caricate prima',
+ 'PRUNE_TIME_EXP' => 'Cancella automaticamente soltanto le immagini che sono state caricate prima “YYYY-MM-DD “.',
+ 'PRUNE_USERNAME' => 'Caricate da',
+ 'PRUNE_USERNAME_EXP' => 'Cancella automaticamente soltanto le immagini da certi utenti. Per cancellare automaticamente le immagini degli "ospiti" seleziona la spunta oltre il box del nome utente.',
+
+ //Log
+ 'LOG_CLEANUP_DELETE_FILES' => 'Cancellate %s immagini senza voci nel DB.',
+ 'LOG_CLEANUP_DELETE_ENTRIES' => 'Cancellate %s immagini senza file.',
+ 'LOG_CLEANUP_DELETE_NO_AUTHOR' => 'Cancellate %s immagini senza autore valido.',
+ 'LOG_CLEANUP_COMMENT_DELETE_NO_AUTHOR' => 'Cancellati %s commenti senza autore valido.',
+
+ 'MOVE_TO_IMPORT' => 'Sposta immagini alla cartella Import',
+ '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!',
+));
diff --git a/acpimport/language/it/info_acp_gallery_acpimport.php b/acpimport/language/it/info_acp_gallery_acpimport.php
new file mode 100644
index 00000000..9f96e167
--- /dev/null
+++ b/acpimport/language/it/info_acp_gallery_acpimport.php
@@ -0,0 +1,42 @@
+ 'Importa Immagini',
+ 'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Da qui puoi importare in massa immagini dal file system. Prima di importare le immagini assicurati di ridimensionarle manualmente.',
+
+ 'IMPORT_ALBUM' => 'Album in cui importare immagini:',
+ 'IMPORT_DEBUG_MES' => '%1$s immagini importate. Rimangono ancora %2$s immagini.',
+ 'IMPORT_DIR_EMPTY' => 'La cartella %s e\' vuota. Devi caricarci le immagini per importarle.',
+ 'IMPORT_FINISHED' => 'Tutte le %1$s immagini importate con successo.',
+ 'IMPORT_FINISHED_ERRORS' => '%1$s immagini sono state importate con successo, ma sono stati riscontrati i seguenti errori: ',
+ 'IMPORT_MISSING_ALBUM' => 'Seleziona un akbum in cui importare le immagini.',
+ 'IMPORT_SELECT' => 'Scegli le immagini che vuoi importare. Le immagini importate con successo vengono cancellate. Tutte le altri immagini restano disponibili.',
+ 'IMPORT_SCHEMA_CREATED' => 'Lo schema di importazione e\' stato creato con successo, attendi mentre le immagini vengono importate.',
+ 'IMPORT_USER' => 'Caricate da',
+ 'IMPORT_USER_EXP' => 'Puoi aggiungere le immagini a un altro utente da qui.',
+ 'IMPORT_USERS_PEGA' => 'Carica alla galleria personale dell\'utente.',
+
+ 'MISSING_IMPORT_SCHEMA' => 'Lo schema di importazione specificato (%s) non e\' stato trovato.',
+
+ 'NO_FILE_SELECTED' => 'Devi selezionare almeno un file.',
+));
diff --git a/core/language/bg/info_acp_gallery.php b/core/language/bg/info_acp_gallery.php
index 540925fa..03b37932 100644
--- a/core/language/bg/info_acp_gallery.php
+++ b/core/language/bg/info_acp_gallery.php
@@ -43,7 +43,6 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
- //'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => 'Българският превод на "phpBB Gallery" е направен от Lucifer ',
'IMAGES' => 'Изображение',
diff --git a/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
index ea3da467..ef54dca6 100644
--- a/core/language/de/info_acp_gallery.php
+++ b/core/language/de/info_acp_gallery.php
@@ -44,7 +44,6 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
- //'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => 'Übersetzt von franki Die Ahnen ',
'IMAGES' => 'Bilder',
diff --git a/core/language/fr/info_acp_gallery.php b/core/language/fr/info_acp_gallery.php
index 433b58fd..2535281c 100644
--- a/core/language/fr/info_acp_gallery.php
+++ b/core/language/fr/info_acp_gallery.php
@@ -59,7 +59,6 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
- //'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => '« phpBB Gallery » - Traduction française par pokyto aka le.poke (inspiré par darky et l’équipe phpbb-fr.com ) & par Galixte ',
'IMAGES' => 'Images',
diff --git a/core/language/it/email/newcomment_notify.txt b/core/language/it/email/newcomment_notify.txt
new file mode 100644
index 00000000..81b7dfcc
--- /dev/null
+++ b/core/language/it/email/newcomment_notify.txt
@@ -0,0 +1,11 @@
+Subject: Notifica nuovo commento - "{IMAGE_NAME}"
+
+Salve {USERNAME},
+
+Ricevi questa notifica perché stai controllando l'immagine, "{IMAGE_NAME}" su "{SITENAME}". Quest'immagina ha ricevuto un nuovo commento dalla tua ultima visita. Puoi usare il seguente link per leggere il commento.
+
+{U_IMAGE}
+
+Se non vuoi più controllare quest'immagine o album puoi cliccare il link "Annulla sottoscrizione immagine" trovato nel link soprastante.
+
+{EMAIL_SIG}
\ No newline at end of file
diff --git a/core/language/it/email/newimage_notify.txt b/core/language/it/email/newimage_notify.txt
new file mode 100644
index 00000000..c6bf0054
--- /dev/null
+++ b/core/language/it/email/newimage_notify.txt
@@ -0,0 +1,11 @@
+Subject: Notifica nuova immagine - "{ALBUM_NAME}"
+
+Salve {USERNAME},
+
+Ricevi questa notifica perché stati controllando l'album, "{ALBUM_NAME}" su "{SITENAME}". Quest'album ha ricevuto una nuova immagine dalla tua ultima visita, "{IMAGE_NAME}". Puoi usare il seguente link per vedere l'album.
+
+{U_ALBUM}
+
+Se non vuoi più controllare quest'album puoi cliccare sul link "Annulla sottoscrizione album" trovato nel link soprastante.
+
+{EMAIL_SIG}
\ No newline at end of file
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
new file mode 100644
index 00000000..c5b613b7
--- /dev/null
+++ b/core/language/it/gallery.php
@@ -0,0 +1,372 @@
+ 'Aggiungi altri campi di caricamento',
+ 'ALBUM' => 'Album',
+ 'ALBUM_IS_CATEGORY' => 'L’album che hai selezionato è un album-categoria. Non puoi caricare sulle categorie.',
+ 'ALBUM_LOCKED' => 'Bloccato',
+ 'ALBUM_NAME' => 'Nome album',
+ 'ALBUM_NOT_EXIST' => 'Quest’album non esiste',
+ 'ALBUM_PERMISSIONS' => 'Permessi Album',
+ 'ALBUM_REACHED_QUOTA' => 'Quest’album ha raggiunto il suo limite di immagini. Non puoi caricarci ulteriori immagini. Contatta l’amministratore per maggiori informazioni.',
+ 'ALBUM_UPLOAD_NEED_APPROVAL' => 'Le tue immagini sono state caricate con successo. Ma la tua immagine deve essere approvata da un amministratore o da un moderatore prima che sia pubblicamente visibile.',
+ 'ALBUM_UPLOAD_NEED_APPROVAL_ERROR' => 'Alcune delle tue immagini sono state caricate con successo.. Ma le tue immagini devono essere approvate da un amministratore o da un moderatore prima che siano pubblicamente visibili.%s
',
+ 'ALBUM_UPLOAD_SUCCESSFUL' => 'Le tue immagini sono state caricate con successo.',
+ 'ALBUM_UPLOAD_SUCCESSFUL_ERROR' => 'Alcune delle tue immagini sono state caricate con successo.%s ',
+ 'ALBUMS_MARKED' => 'Tutti gli album sono stati segnati come letti.',
+ 'ALL' => 'Tutto',
+ 'ALL_IMAGES' => 'Tutte le immagini',
+ 'ALLOW_COMMENTS' => 'Permetti commenti per questa immagine.',
+ 'ALLOW_COMMENTS_ARY' => array(
+ 0 => 'Permetti commenti per questa immagine.',
+ 2 => 'Permetti commenti per queste immagini.',
+ ),
+ 'ALLOWED_FILETYPES' => 'Tipi di file permessi',
+ 'APPROVE' => 'Approva',
+ 'DISAPPROVE' => 'Dissaprova',
+ 'APPROVE_IMAGE' => 'Approva immagine',
+
+ //@todo
+ 'ALBUM_COMMENT_CAN' => 'Tu puoi commentare le immagini in quest’album',
+ 'ALBUM_COMMENT_CANNOT' => 'Tu non puoi commentare le immagini in quest’album',
+ 'ALBUM_DELETE_CAN' => 'Tu puoi cancellare le tue immagini in quest’album',
+ 'ALBUM_DELETE_CANNOT' => 'Tu non puoi cancellare le tue immagini in quest’album',
+ 'ALBUM_EDIT_CAN' => 'Tu puoi modificare le tue immagini in quest’album',
+ 'ALBUM_EDIT_CANNOT' => 'Tu non puoi modificare le tue immagini in quest’album',
+ 'ALBUM_RATE_CAN' => 'Tu puoi valutare immagini in quest’album',
+ 'ALBUM_RATE_CANNOT' => 'Tu non puoi valutare immagini in quest’album',
+ 'ALBUM_UPLOAD_CAN' => 'Tu puoi caricare nuove immagini in quest’album',
+ 'ALBUM_UPLOAD_CANNOT' => 'Tu non puoi caricare nuove immagini in quest’album',
+ 'ALBUM_VIEW_CAN' => 'Tu puoi vedere immagini in quest’album',
+ 'ALBUM_VIEW_CANNOT' => 'Tu non puoi vedere immagini in quest’album',
+
+ 'BAD_UPLOAD_FILE_SIZE' => 'Il tuo file caricato è troppo grande',
+ 'BBCODES' => 'BBCode',
+ 'BROWSING_ALBUM' => 'Utenti che navigano in quest’album: %1$s',
+ 'BROWSING_ALBUM_GUEST' => 'Utenti che navigano in quest’album: %1$s e %2$d ospite',
+ 'BROWSING_ALBUM_GUESTS' => 'Utenti che navigano in quest’album: %1$s e %2$d ospiti',
+
+ 'CHANGE_AUTHOR' => 'Cambia aturoe',
+ 'CHANGE_IMAGE_STATUS' => 'Cambia status dell’immagine',
+ 'CHARACTERS' => 'caratteri',
+ 'CLICK_RETURN_ALBUM' => 'Clicca %squi%s per tornare all’album',
+ 'CLICK_RETURN_IMAGE' => 'Clicca %squi%s per tornare all’immagine',
+ 'CLICK_RETURN_INDEX' => 'Clicca %squi%s per tornare all’indice',
+ 'COMMENT' => 'Commento',
+ 'COMMENT_IMAGE' => 'Scrivendo un commento su un’immagine nell’album %s',
+ 'COMMENT_LENGTH' => 'Inserisci qui il tuo commento, non può contenere più di %d caratteri.',
+ 'COMMENT_ON' => 'Commenta su',
+ 'COMMENT_STORED' => 'Il tuo commento è stato salvato con successo.',
+ 'COMMENT_TOO_LONG' => 'Il tuo commento è troppo lungo.',
+ 'COMMENTS' => 'Commenti',
+ 'CONTEST_COMMENTS_STARTS' => 'I commenti sulle immagini in questo concorso sono permessi dal %s in avanti.',
+ 'CONTEST_ENDED' => 'Questo concorso è terminato il %s.',
+ 'CONTEST_ENDS' => 'Questo concorso termina il %s.',
+ 'CONTEST_RATING_STARTED' => 'La valutazione per questo concorso è iniziata il %s.',
+ 'CONTEST_RATING_STARTS' => 'La valutazione per questo concorso inizia il %s.',
+ 'CONTEST_RATING_ENDED' => 'La valutazione per questo concorso finisce il %s.',
+ 'CONTEST_RATING_HIDDEN' => 'nascosto',
+ 'CONTEST_RESULT' => 'Concorso',
+ 'CONTEST_RESULT_1' => 'Vincitore',
+ 'CONTEST_RESULT_2' => 'Secondo',
+ 'CONTEST_RESULT_3' => 'Terzo',
+ 'CONTEST_RESULT_HIDDEN' => 'La valutazione per questa immagine è nascosta, fino alla fine del concorso il %s.',
+ 'CONTEST_STARTED' => 'Il concorso è iniziato il %s.',
+ 'CONTEST_STARTS' => 'Il concorso inizia il %s.',
+ 'CONTEST_USERNAME' => 'Concorso ',
+ 'CONTEST_USERNAME_LONG' => 'Concorso » L’username è nascosto, fino alla fine del concorso il %s.',
+ 'CONTEST_IMAGE_DESC' => 'Concorso » La descrizione dell’immagine è nascosta, fino alla fine del concorso il %s.',
+ 'CONTEST_WINNERS_OF' => 'Vincitore del concorso del “%s“',
+ 'CONTINUE' => 'Continua',
+
+ 'DATABASE_NOT_UPTODATE' => 'Il tuo database non è della stessa versione dei tuoi file. Si prega di aggiornare il tuo database.',
+ 'DELETE_COMMENT' => 'Cancella commento',
+ 'DELETE_COMMENT2' => 'Cancellare il commento?',
+ 'DELETE_COMMENT2_CONFIRM' => 'Sei sicuro di voler cancellare il commento?',
+ 'DELETE_IMAGE' => 'Cancella',
+ 'DELETE_IMAGE2' => 'Cancellare immagine?',
+ 'DELETE_IMAGE2_CONFIRM' => 'Sei sicuro di voler cancellare l’immagine?',
+ 'DELETED_COMMENT' => 'Commento cancellato',
+ 'DELETED_COMMENT_NOT' => 'Commento non cancellato',
+ 'DELETED_IMAGE' => 'Immagine cancellata',
+ 'DELETED_IMAGE_NOT' => 'Immagine non cancellata',
+ 'DESC_TOO_LONG' => 'La tua descrizione è troppo lunga',
+ 'DESCRIPTION_LENGTH' => 'Inserisci qui la tua descrizione, non può contenere più di %d caratteri.',
+ 'DETAILS' => 'Dettagli',
+ 'DISALLOWED_EXTENSION' => 'Quest’estensione di immagine non è permessa',
+ 'DONT_RATE_IMAGE' => 'Non valutare immagine',
+
+ 'EDIT_COMMENT' => 'Modifica commento',
+ 'EDIT_IMAGE' => 'Modifica',
+ 'EDITED_TIME_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volta in totale',
+ 'EDITED_TIMES_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volte in totale',
+
+ 'FILE' => 'File',
+ 'FILE_SIZE' => 'Dimensione del file',
+ 'FILETYPE_MIMETYPE_MISMATCH' => 'Il tipo di file di “%1$s “ non combacia con il mime-type (%2$s).',
+ 'FILETYPES_GIF' => 'gif',
+ 'FILETYPES_JPG' => 'jpg',
+ 'FILETYPES_PNG' => 'png',
+ 'FILETYPES_ZIP' => 'zip',
+
+ 'FULL_EDITOR' => 'Editor completo',
+
+ 'GALLERY_IMAGE' => 'Immagine',
+ 'GALLERY_IMAGES' => 'Immagini',
+ 'GALLERY_VIEWS' => 'Visualizzazioni',
+
+ 'IGNORE_NOTUPTODATE_MESSAGE' => 'Ricordamelo il 7 giorni',
+ 'IMAGE_ALREADY_REPORTED' => 'Quest’immagine è stata già segnalata.',
+ 'IMAGE_BBCODE' => 'BBCode Immagine',
+ 'IMAGE_COMMENTS_DISABLED' => 'I commenti sono disabilitati per questa immagine.',
+ 'IMAGE_DAY' => '%.2f immagini al giorno',
+ 'IMAGE_DESC' => 'Descrizione Immagine',
+ 'IMAGE_HEIGHT' => 'Altezza immagine',
+ 'IMAGE_INSERTED' => 'Immagine inserita',
+ 'IMAGE_LOCKED' => 'Spiacente, quest’immagine è bloccata. Non si può più commentare quest’immagine.',
+ 'IMAGE_NAME' => 'Nome immagine',
+ 'IMAGE_NOT_EXIST' => 'Quest’immagine non esiste.',
+ 'IMAGE_PCT' => '%.2f%% di tutte le immagini',
+ 'IMAGE_STATUS' => 'Stato',
+ 'IMAGE_URL' => 'URL-Immagine',
+ 'IMAGE_VIEWS' => 'Visualizzazioni',
+ 'IMAGE_WIDTH' => 'Larghezza immagine',
+ 'IMAGES_REPORTED_SUCCESSFULLY' => 'L’immagine è stata segnalata con successo',
+ 'IMAGES_UPDATED_SUCCESSFULLY' => 'Le informazioni della tua immagine sono state aggiornate con successo',
+ 'INSERT_IMAGE_POST' => 'Inserisci immagine nel post',
+ 'INVALID_USERNAME' => 'Il tuo username è invalido',
+ 'INVALID_IMAGE' => 'Immagine non valida',
+ 'FILE_DISALLOWED_EXTENSION' => 'L’estensione del file non è permessa',
+ 'FILE_WRONG_FILESIZE' => 'Dimensione file errata',
+
+ 'LAST_COMMENT' => 'Ultimo Commento',
+ 'LAST_IMAGE' => 'Ultima Immagine',
+ 'LAST_IMAGE_BY' => 'Ultima Immagine di',
+ 'LOGIN_EXPLAIN_UPLOAD' => 'Devi essere registrato e collegato per caricare immagine in questa galleria.',
+
+ 'MARK_ALBUMS_READ' => 'Segna album come letti',
+ 'MAX_DIMENSIONS' => 'Dimensioni massime',
+ 'MAX_FILE_SIZE' => 'Dimensione massima file',
+ 'MAX_HEIGHT' => 'Massima altezza immagine',
+ 'MAX_WIDTH' => 'Massima largherzza immagine',
+ 'MISSING_COMMENT' => 'Nessun messaggio inserito',
+ 'MISSING_IMAGE_NAME' => 'Devi specificare un nome quando modifichi un’immagine.',
+ 'MISSING_MODE' => 'Nessun modo selezionato',
+ 'MISSING_REPORT_REASON' => 'Devi menzionare un motivo per segnalare un’immagine.',
+ 'MISSING_SLIDESHOW_PLUGIN' => 'Non è stato trovato un plugin per slideshow. Contatta l’amministratore della board.',
+ 'MISSING_SUBMODE' => 'Nessun sotto modo selezionato',
+ 'MISSING_USERNAME' => 'Nessun username inserito',
+ 'MOVE_TO_ALBUM' => 'Muovi all’album',
+ 'MOVE_TO_PERSONAL' => 'Muovi all’album personale',
+ 'MOVE_TO_PERSONAL_MOD' => 'Quando selezioni quest’opzione, l’immagine viene spostata nell’album personale dell’utente. Se l’utente non ce l’ha ancora, viene creato automaticamente.',
+ 'MOVE_TO_PERSONAL_EXPLAIN' => 'Quando selezioni quest’opzione, l’immagine viene spostata nel tuo album personale. Se non ce l’hai ancora, viene creato automaticamente.',
+
+ 'NEW_COMMENT' => 'Nuovo Commento',
+ 'NEW_IMAGES' => 'Nuove Immagini',
+ 'NEWEST_PGALLERY' => 'La nostra ultima galleria personale è %s',
+ 'NO_ALBUMS' => 'Non ci sono album in questa galleria.',
+ 'NO_COMMENTS' => 'Ancora nessun commento',
+ 'NO_IMAGES' => 'Nessuna immagine',
+ 'NO_IMAGES_FOUND' => 'Nessuna immagine trovata.',
+ 'NO_NEW_IMAGES' => 'Nessuna nuova immagine',
+ 'NO_IMAGES_LONG' => 'Non ci sono immagini in quest’album.',
+ 'NOT_ALLOWED_FILE_TYPE' => 'Questo tipo di file non è permesso',
+ 'NOT_RATED' => 'non valutata',
+
+ 'NO_WRITE_ACCESS' => 'Manca la cartella di upload oppure il phpBB non ha permesso di scriverci. Contatta l’amministratore!',
+
+ 'ORDER' => 'Ordine',
+ 'ORIG_FILENAME' => 'Prendi il nome del file come nome immagine (il campo di inserimento non ha funzione)',
+ 'OUT_OF_RANGE_VALUE' => 'Il valore è fuori raggio',
+ 'OWN_IMAGES' => 'Le tue immagini',
+
+ 'PERCENT' => '%',
+ 'PERSONAL_ALBUMS' => 'Album personali',
+ 'PIXELS' => 'pixel',
+ 'PLUGIN_CLASS_MISSING' => 'Errore nel Plugin della Galleria: la classe “%s“ non è stata trovata!',
+ 'POST_COMMENT' => 'Scrivi un commento',
+ 'POST_COMMENT_RATE_IMAGE' => 'Scrivi un commento e valuta l’immagine',
+ 'POSTER' => 'Postatore',
+
+ 'QUOTA_REACHED' => 'Il numero di immagini che ti è permesso caricare è stato raggiunto.',
+ 'QUOTE_COMMENT' => 'Cita commento',
+
+ 'RANDOM_IMAGES' => 'Immagini casuali',
+ 'RATE_IMAGE' => 'Valuta l’immagine',
+ 'RATES_COUNT' => 'Numero di valutazioni',
+ 'RATING' => 'Valutazione',
+ 'RATING_STRINGS' => array(
+ 0 => 'non valutata',
+ 1 => '%2$s (1 valutazione)',
+ 2 => '%2$s (%1$s valutazioni)',
+ ),
+ 'RATING_STRINGS_USER' => array(
+ 1 => '%2$s (1 valutazione, la tua valutazione: %3$s)',
+ 2 => '%2$s (%1$s valutazioni, la tua valutazione: %3$s)',
+ ),
+ 'RATING_SUCCESSFUL' => 'L’immagine è stata valutata con successo.',
+ 'READ_REPORT' => 'Leggi la segnalazione',
+ 'RECENT_COMMENTS' => 'Commenti recenti',
+ 'RECENT_IMAGES' => 'Immagini Recenti',
+ 'REPORT_IMAGE' => 'Segnala immagine',
+ 'RETURN_ALBUM' => '%sTorna all’ultimo album visitato%s',
+ 'ROTATE_IMAGE' => 'Ruota immagine',
+ 'ROTATE_LEFT' => '90° a sinistra',
+ 'ROTATE_NONE' => 'nessuna',
+ 'ROTATE_RIGHT' => '90° a destra',
+ 'ROTATE_UPSIDEDOWN' => '180° verticalmente',
+ 'RETURN_TO_GALLERY' => 'Ritorna alla Galleria',
+
+ 'SEARCH_ALBUM' => 'Cerca in quest’album…',
+ 'SEARCH_ALBUMS' => 'Cerca negli album',
+ 'SEARCH_ALBUMS_EXPLAIN' => 'Seleziona l’album in cui vuoi cercare. Viene cercato automaticamente anche nei sotto album se non disabiliti "cerca nei sotto album" sotto.',
+ 'SEARCH_COMMENTS' => 'Solo commenti',
+ 'SEARCH_CONTEST' => 'Vincitori del concorso',
+ 'SEARCH_IMAGE_COMMENTS' => 'Nomi immagini, descrizioni e commenti',
+ 'SEARCH_IMAGE_VALUES' => 'Nomi immagini e descrizioni',
+ 'SEARCH_IMAGENAME' => 'Solo nomi immagini',
+ 'SEARCH_RANDOM' => 'Immagini casuali',
+ 'NO_SEARCH_RESULTS_RANDOM' => 'Non ci sono immagini oppure non hai il permesso di vederle!',
+ 'SEARCH_RECENT' => 'Immagini recenti',
+ 'NO_SEARCH_RESULTS_RECENT' => 'Non ci sono immagini oppure non ne hai l’accesso!',
+ 'SEARCH_RECENT_COMMENTS' => 'Commenti recenti',
+ 'NO_SEARCH_RESULTS_RECENT_COMMENTS' => 'Non ci sono commenti o non ne hai l’accesso!',
+ 'SEARCH_SUBALBUMS' => 'Cerca nei sotto album',
+ 'SEARCH_TOPRATED' => 'Immagini meglio valutate',
+ 'SEARCH_USER_IMAGES' => 'Cerca nelle immagini dell’utente',
+ 'SEARCH_USER_IMAGES_OF' => 'Immagini di %s',
+ 'SELECT_ALBUM' => 'Seleziona un album',
+ 'SHOW_PERSONAL_ALBUM_OF' => 'Mostra l’album personale di %s',
+ 'SLIDE_SHOW' => 'Slideshow',
+ 'SLIDE_SHOW_HIGHSLIDE' => 'Per iniziare lo slideshow, clica su uno dei nomi immagine e clicca sull’icona "play":',
+ 'SLIDE_SHOW_LYTEBOX' => 'Per iniziare lo slideshow, clica su uno dei nomi immagine:',
+ 'SLIDE_SHOW_SHADOWBOX' => 'Per iniziare lo slideshow, clica su uno dei nomi immagine:',
+ 'SORT_ASCENDING' => 'Ascendente',
+ 'SORT_DEFAULT' => 'Predefinito',
+ 'SORT_DESCENDING' => 'Discendente',
+ 'STATUS' => 'Stato',
+ 'SUBALBUMS' => 'Sotto album',
+ 'SUBALBUM' => 'Sotto album',
+
+ 'THUMBNAIL_SIZE' => 'Dimensioni anteprima (pixel)',
+ 'TOTAL_COMMENTS_SPRINTF' => array(
+ 0 => 'Commenti totali 0 ',
+ 1 => 'Commenti totali %d ',
+ 2 => 'Commenti totali %d ',
+ ),
+ 'TOTAL_IMAGES' => 'Totale immagini',
+ 'TOTAL_IMAGES_SPRINTF' => array(
+ 0 => 'Nessuna immagine',
+ 1 => '%d immagine',
+ 2 => '%d immagini',
+ ),
+ 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
+ 0 => '0 gallerie personali',
+ 1 => '%d galleria personale',
+ 2 => '%d gallerie personali',
+ ),
+ 'TOTAL_PEGAS_SPRINTF' => array(
+ 0 => 'Totale gallerie personali 0 ',
+ 1 => 'Totale gallerie personali %d ',
+ 2 => 'Totale gallerie personali %d ',
+ ),
+
+ 'UNLOCK_IMAGE' => 'Sblocca immagine',
+ 'UNWATCH_ALBUM' => 'Disiscriviti dall’album',
+ 'UNWATCH_IMAGE' => 'Disiscriviti dall’immagine',
+ 'UNWATCH_PEGAS' => 'Non iscriverti alle nuove gallerie personali',
+ 'UNWATCHED_ALBUM' => 'Non sarai più informato sulle nuove immagini in quest’album.',
+ 'UNWATCHED_ALBUMS' => 'Non sarai più informato sulle nuove immagini in questi album.',
+ 'UNWATCHED_IMAGE' => 'Non sarai più informato sui nuovi commenti su questa immagine.',
+ 'UNWATCHED_IMAGES' => 'Non sarai più informato sui nuovi commenti su queste immagini.',
+ 'UNWATCHED_PEGAS' => 'Non sarai più automaticamente iscritto alle nuove gallerie personali.',
+ 'UPLOAD_ERROR' => 'Mentre si caricava “%1$s“ è avvenuto il seguente errore: » %2$s',
+ 'UPLOAD_IMAGE' => 'Carica Immagine',
+ 'UPLOAD_IMAGE_SIZE_TOO_BIG' => 'Le dimensioni della tua immagine sono troppo grandi',
+ 'UPLOAD_NO_FILE' => 'Devi inserire percorso e nome del file',
+ 'UPLOADED_BY_USER' => 'Caricata da',
+ 'UPLOADED_ON_DATE' => 'Caricata su',
+ 'USE_SAME_NAME' => 'Usa lo stesso nome immagine e descrizione per tutte le immagini.',
+ 'USE_NUM' => 'Aggiungi {NUM} per i numeri. Inizia il conteggio da:',
+ 'USER_REACHED_QUOTA' => array(
+ 0 => 'Non ti è permesso caricare alcuna immagine. Si prega di contattare l’amministratore per maggiori informazioni.',
+ 1 => 'Non ti è permesso caricare più di 1 immagine. Si prega di contattare l’amministratore per maggiori informazioni.',
+ 2 => 'Non ti è permesso caricare più di %s immagini. Si prega di contattare l’amministratore per maggiori informazioni.',
+ ),
+ 'USER_REACHED_QUOTA_SHORT' => array(
+ 0 => 'Non ti è permesso caricare alcuna immagine.',
+ 1 => 'Non ti è permesso caricare più di 1 immagine.',
+ 2 => 'Non ti è permesso caricare più di %s immagini.',
+ ),
+ 'USERNAME_BEGINS_WITH' => 'L’Username inizia con',
+ 'USERS_PERSONAL_ALBUMS' => 'Album Personali Utenti',
+
+ 'VISIT_GALLERY' => 'Visita la galleria utente',
+
+ 'VIEW_ALBUM' => 'Visualizza album',
+ 'VIEW_ALBUM_IMAGES' => array(
+ 1 => '1 immagine',
+ 2 => '%s immagini',
+ ),
+ 'VIEW_IMAGE' => 'Visualizza immagine',
+ 'VIEW_IMAGE_COMMENTS' => array(
+ 1 => '1 commento',
+ 2 => '%s commenti',
+ ),
+ 'VIEW_LATEST_IMAGE' => 'Visualizza l’ultima immagine',
+ 'VIEW_SEARCH_RECENT' => 'Visualizza le immagini recenti',
+ 'VIEW_SEARCH_RANDOM' => 'Visualizza immagini casuali',
+ 'VIEW_SEARCH_COMMENTED' => 'Visualizza commenti recenti',
+ 'VIEW_SEARCH_CONTESTS' => 'Visualizza i vincitori dei concorsi',
+ 'VIEW_SEARCH_TOPRATED' => 'Visualizza le immagini meglio valutate',
+ 'VIEW_SEARCH_SELF' => 'Visualizza le tue immagini',
+ 'VIEWING_ALBUM' => 'Visualizza l’album %s',
+ 'VIEWING_IMAGE' => 'Visualizzando immagine nell’album %s',
+
+ 'WATCH_ALBUM' => 'Iscriviti all’album',
+ 'WATCH_IMAGE' => 'Iscriviti all’immagine',
+ 'WATCH_PEGAS' => 'Iscriviti alle nuove gallerie personali',
+ 'WATCHING_ALBUM' => 'Sarai ora informato sulle nuove immagini in quest’album.',
+ 'WATCHING_IMAGE' => 'Sarai ora informato sui nuovi commenti su questa immagine.',
+ 'WATCHING_PEGAS' => 'Sarai ora automaticamente iscritto alle nuove gallerie personali.',
+
+ 'YOUR_COMMENT' => 'Il tuo commento',
+ 'YOUR_PERSONAL_ALBUM' => 'Il Tuo Album Personale',
+ 'YOUR_RATING' => 'La tua valutazione',
+
+ 'IMAGES_MOVED' => array(
+ 1 => 'Immagine spostata',
+ 2 => '%s immagini spostate',
+ ),
+
+ 'QUICK_MOD' => 'Seleziona azione di moderazione',
+ 'WRONG_FILESIZE' => 'L’immagine è più grande del limite!',
+ 'UNREAD_IMAGES' => 'Immagini non viste',
+ 'NO_UNREAD_IMAGES' => 'Nessuna immagine non vista',
+
+ // Versions 1.2.1 addiotions
+ 'GALLERY_DROP' => 'Lascia qui le tue immagini',
+));
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
new file mode 100644
index 00000000..21ad7afb
--- /dev/null
+++ b/core/language/it/gallery_acp.php
@@ -0,0 +1,420 @@
+ 'phpBB Gallery',
+ 'ACP_GALLERY_OVERVIEW_EXPLAIN' => 'Qui trovi alcune statistiche sulla tua galleria.',
+
+ // File dirs states
+ 'ACP_FILES_DIR_STATE' => './files/ state',
+ 'ACP_CORE_DIR_STATE' => './files/phpbbgallery/core/ state',
+ 'ACP_SOURCE_DIR_STATE' => './files/phpbbgallery/core/source/ state',
+ 'ACP_MEDIUM_DIR_STATE' => './files/phpbbgallery/core/meduim/ state',
+ 'ACP_MINI_DIR_STATE' => './files/phpbbgallery/core/mini/ state',
+
+ 'ADD_ALBUM_ON_TOP' => 'Aggiungi album in cima',
+ 'ADD_PERMISSIONS' => 'Aggiungi Permessi',
+ 'ALBUM_ADMIN' => 'Amministrazione album',
+ 'ALBUM_ADMIN_EXPLAIN' => 'In phpBB Gallery non ci sono categorie, è tutto basato sugli album. Ogni album può avere un numero illimitato di sotto album e puoi determinare in quali si possa postare o no (cioè se agiscono come una vecchia categoria). Qui puoi aggiungere, modificare, cancellare, bloccare individualmente gli album ed impostare certi controlli addizionali . Se le tue immagini si sono desincronizzate puoi anche risincronizzare un album. Devi compiare o impostare permessi appropriati per ogni album creato se vuoi che sia visualizzato. ',
+ 'ALBUM_AUTH_TITLE' => 'Permessi Album',
+ 'ALBUM_CREATED' => 'Album creato con successo.',
+ 'ALBUM_DELETE' => 'Cancella album',
+ 'ALBUM_DELETE_EXPLAIN' => 'Il modulo sottostante ti permette di eliminare un album e decidere dove vuoi inserire le immagini che contiene',
+ 'ALBUM_DELETED' => 'Questo album è stato correttamente cancellato.',
+ 'ALBUM_DESC' => 'Descrizione',
+ 'ALBUM_DESC_EXPLAIN' => 'Ogni marcatore HTML sarà visualizzato.',
+ 'ALBUM_DESC_TOO_LONG' => 'La descrizione per l’album è troppo lunga, non deve essere superiore a 4000 caratteri.',
+ 'ALBUM_EDIT_EXPLAIN' => 'Con questo modulo puoi personalizzare questo album. Nota che la moderazione è impostata tramite le autorizzazioni di ogni album per ogni utente o gruppo..',
+ 'ALBUM_ID' => 'ID-Album',
+ 'ALBUM_IMAGE' => 'Immagine album',
+ 'ALBUM_IMAGE_EXPLAIN' => 'Posizione, relativa alla cartella di root phpBB, di un’immagine addizionale da associare con questo album.',
+ 'ALBUM_NAME_EMPTY' => 'Devi aggiungere un nome per questo album.',
+ 'ALBUM_NO_TYPE_CHANGE_TO_CONTEST' => 'Un album non-concorso non può essere trasformato in un album concorso.',
+ 'ALBUM_PARENT' => 'Album padre',
+ 'ALBUM_PARENT_INVALID' => 'L’album padre selezionato non è valido. Potrebbe essere essere un figlio dell’album, oppure non esiste.',
+ 'ALBUM_PASSWORD' => 'Album password',
+ 'ALBUM_PASSWORD_EXPLAIN' => 'Definisci una password per questo album, utilizza il sistema preferenze di autorizzazione.',
+ 'ALBUM_PASSWORD_CONFIRM' => 'Conferma password album',
+ 'ALBUM_PASSWORD_CONFIRM_EXPLAIN' => 'Deve essere aggiunto solo se è stata impostata una password.',
+ 'ALBUM_RESYNCED' => 'Album “%s” correttamente sincronizzato',
+ 'ALBUM_SETTINGS' => 'Configurazioni album',
+ 'ALBUM_STATUS' => 'Stato album',
+ 'ALBUM_TYPE' => 'Tipo album',
+ 'ALBUM_TYPE_CAT' => 'Categoria',
+ 'ALBUM_TYPE_CONTEST' => 'Concorso',
+ 'ALBUM_TYPE_UPLOAD' => 'Album',
+ 'ALBUM_UPDATED' => 'L’album è stato aggiornato con successo.',
+ 'ALBUM_WATERMARK' => 'Visualizza watermark',
+ 'ALBUM_WATERMARK_EXPLAIN' => 'Se impostata su No , il watermark non sarà visualizzato indipendentemente dai permessi impostati!',
+ 'ALBUM_WITH_CONTEST_NO_TYPE_CHANGE' => 'Un album-concorso non può essere trasformato in un album-non-concorso.',
+ 'ALBUMS' => 'Album',
+
+ 'CACHE_DIR_SIZE' => 'Dimensione cache/-directory',
+ 'CHANGE_AUTHOR_TO_GUEST' => 'Modifica da utente registrato a ospite',
+ 'CHECK' => 'Controllo',
+ 'CHECK_AUTHOR_EXPLAIN' => 'Nessuna immagine senza autore trovata.',
+ 'CHECK_COMMENT_EXPLAIN' => 'Nessun commento senza autore trovato.',
+ 'CHECK_ENTRY_EXPLAIN' => 'Devi eseguire il controllo, per la ricerca di file, senza la base dati.',
+ 'CHECK_PERSONALS_EXPLAIN' => 'Nessun album personale senza valido proprietario trovato.',
+ 'CHECK_PERSONALS_BAD_EXPLAIN' => 'Nessun album personale trovato.',
+ 'CHECK_SOURCE_EXPLAIN' => 'Nessuna voce trovata. Esegui il controllo, per essere sicuro.',
+ 'COLS_PER_PAGE' => 'Numero di colonne sulla pagina anteprima',
+ 'COMMENT' => 'Commento',
+ 'COMMENT_ID' => 'ID-Commento',
+ 'COMMENT_MAX_LENGTH' => 'Lunghezza massima per commenti',
+ 'COMMENT_SYSTEM' => 'Attiva sistema commenti',
+ 'COMMENT_USER_CONTROL' => 'Gli utenti possono controllare i commenti',
+ 'COMMENT_USER_CONTROL_EXP' => 'Permetti agli utenti di scegliere, se gli altri utenti possono aggiungere commenti alle loro immagini.',
+ 'CONTEST_DATE_EXPLAIN' => 'Aggiungi data nel formato YYYY-MM-DD HH:MM.',
+ 'CONTEST_END' => 'Fine concorso',
+ 'CONTEST_END_BEFORE_RATING' => 'La fine della rassegna non può essere prima dell’inizio-concorso-voti.',
+ 'CONTEST_END_BEFORE_START' => 'La fine della rassegna non può essere prima dell’inizio-concorso.',
+ 'CONTEST_END_EXPLAIN' => 'Dopo la fine della rassegna gli utenti non possono votare le immagini.',
+ 'CONTEST_END_INVALID' => 'Fine rassegna non valida (%s). Devi inserire una data nel formato YYYY-MM-DD HH:MM.',
+ 'CONTEST_RATING' => 'Inizio votazione',
+ 'CONTEST_RATING_BEFORE_START' => 'L’inizio della rassegna-votazione non può essere precedente.',
+ 'CONTEST_RATING_EXPLAIN' => 'Dopo l’“inizio votazione“ gli utenti non possono caricare immagini.',
+ 'CONTEST_RATING_INVALID' => 'Inizio votazione-rassegna non valido (%s). Devi inserire una data nel formato YYYY-MM-DD HH:MM.',
+ 'CONTEST_SETTINGS' => 'Configurazione rassegna',
+ 'CONTEST_START' => 'Inizio rassegna',
+ 'CONTEST_START_EXPLAIN' => 'All’inizio della rassegna gli utenti non possono caricare immagini.',
+ 'CONTEST_START_INVALID' => 'Inizio rassegna non valido (%s). Devi inserire una data nel formato YYYY-MM-DD HH:MM.',
+ 'COPY_PERMISSIONS' => 'Copia permessi da',
+ 'COPY_PERMISSIONS_ADD_EXPLAIN' => 'Se selezioni la copia dei permessi, l’album avrà gli stessi permessi selezionati qui. Se nessun album è selezionato è necessario configurare i permessi successivamente.',
+ 'COPY_PERMISSIONS_ALBUM_FROM_EXPLAIN' => 'La fonte da dove vuoi copiare i permessi.',
+ 'COPY_PERMISSIONS_ALBUM_TO_EXPLAIN' => 'L’album di destinazione dove vuoi copiare i permessi.',
+ 'COPY_PERMISSIONS_CONFIRM' => 'Tieni presente che questa operazione sovrascrive tutte le autorizzazioni esistenti sugli album selezionati.',
+ 'COPY_PERMISSIONS_EDIT_EXPLAIN' => 'Se selezioni la copia dei permessi, l’album avrà gli stessi permessi selezionati qui. Questo sovrascriverà ogni permesso che precedentemente configurato con questo album. Se non è selezionato nessun album verrano conservate le autorizzazioni correnti.',
+ 'COPY_PERMISSIONS_FROM' => 'Copia permessi da',
+ 'COPY_PERMISSIONS_SUCCESSFUL' => 'Permessi copiati con successo.',
+ 'COPY_PERMISSIONS_TO' => 'Applica Permessi a',
+ 'CREATE' => 'Crea',
+ 'CREATE_ALBUM' => 'Crea nuovo album',
+ 'CREATE_USERS_PEGA' => 'Crea una galleria personale per l’utente',
+
+ 'DECIDE_MOVE_DELETE_CONTENT' => 'Cancella contenuto o sposta all’album',
+ 'DECIDE_MOVE_DELETE_SUBALBUMS' => 'Cancella sotto-albums o sposta all’album',
+ 'DEFAULT_SORT_EXPLAIN' => 'Se selezionato Default , sarà impostato l’ordinamento predefinito.',
+ 'DEFAULT_SORT_METHOD' => 'Metodo ordinamento predefinito',
+ 'DEFAULT_SORT_ORDER' => 'Ordinamento predefinito',
+ 'DELETE_ALBUM_SUBS' => 'Devi prima eliminare i sotto-albums',
+ 'DELETE_ALL_IMAGES' => 'Cancella immagini',
+ 'DELETE_IMAGES' => 'Cancella immagini',
+ 'DELETE_PERMISSIONS' => 'Cancella permessi',
+ 'DELETE_SUBALBUMS' => 'Cancella sotto-albums e le loro immagini',
+ 'DISP_BIRTHDAYS' => 'Mostra compleanni',
+ 'DISP_FAKE_THUMB' => 'Mostra anteprime nella lista album',
+ 'DISP_LOGIN' => 'Mostra campo login',
+ 'DISP_LOGIN_EXP' => 'Solo ospiti',
+ 'DISP_NEXTPREV_THUMB' => 'Visualizza anteprima sulla successiva/precedente immagine',
+ 'DISP_NEXTPREV_THUMB_EXPLAIN' => 'Se impostato su No, ci sarà solo il nome dell’immagine come un link.',
+ 'DISP_PERSONAL_ALBUM_PROFILE' => 'Visualizza link ad album personali nel profilo utente',
+ 'DISP_STATISTIC' => 'Visualizza statistiche galleria',
+ 'DISP_GALLERY_ICON' => 'Mostra link alla galleria',
+ 'DISP_GALLERY_ICON_EXP' => 'Mostra link alla galleria nel menu utente.',
+ 'DISP_TOTAL_IMAGES' => 'Visualizza “Totale immagini“ nell’indice.' . $phpEx,
+ 'DISP_USER_IMAGES_PROFILE' => 'Visualizza statistiche con caricamento immagini nel profilo utente',
+ 'DISP_VIEWTOPIC_ICON' => 'Mostra pulsante all’album personale nel vedi argomento (viewtopic).' . $phpEx,
+ 'DISP_VIEWTOPIC_IMAGES' => 'Mostra conteggio immagini nel vedi argomento (viewtopic).' . $phpEx,
+ 'DISP_VIEWTOPIC_LINK' => 'Link conteggio immagine nelle immagini utente',
+ 'DISP_WHOISONLINE' => 'Mostra chi c’è “on line“',
+ 'DISPLAY_IN_RRC' => 'Visualizza immagini di questo album in immagini "Recenti-Casuali"',
+ 'DONT_COPY_PERMISSIONS' => 'Non copiare permessi',
+
+ 'EDIT_ALBUM' => 'Modifica album',
+ 'FAKE_THUMB_SIZE' => 'Dimensione anteprima',
+ 'FAKE_THUMB_SIZE_EXP' => 'Se vuoi ridimensionare all’immagine originale, ricorda 16 pixels per la black-info-line',
+
+ 'GALLERY_ALBUMS_TITLE' => 'Controllo albums galleria',
+ 'GALLERY_CONFIG' => 'Configurazione galleria',
+ 'GALLERY_CONFIG_EXPLAIN' => 'Puoi modificare la configurazione generale di phpBB Gallery qui.',
+ 'GALLERY_CONFIG_UPDATED' => 'Configurazione galleria aggiornata con successo.',
+ 'GALLERY_INDEX' => 'Indice galleria',
+ 'GALLERY_PURGE_CACHE_EXPLAIN' => 'Se usi lo strumento cache anteprime, devi cancellare prima la tua cache dopo aver modificato la configurazione anteprime in “Configurazione galleria“ in modo che esse vengano rigenerate.',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF' => 'Risincronizza gli album personali ai campi di profilo',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF_EXPAIN' => 'Quest\'azione risincronizzera\' tutti gli album personali di livello piu\' alto come campi di profilo personalizzati. ATTENZIONE! Se hai troppi album personali di livello piu\' alto potrebbe volerci un po\' di tempo!',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF_CONFIRM' => 'Sei sicuro di voler risincronizzare tutti gli album personali di livello piu\' alto come campi personalizzati di profilo?',
+ 'GALLERY_STATS' => 'Statictiche galleria',
+ 'GALLERY_VERSION' => 'Versione galleria',
+ 'GD_VERSION' => 'Ottimizza per versione GD',
+ 'GENERAL_ALBUM_SETTINGS' => 'Configurazione generale album',
+ 'GIF_ALLOWED' => 'Permetti il caricamento di file GIF',
+ 'GUPLOAD_DIR_SIZE' => 'Dimensione directory/-caricamento',
+
+ 'HACKING_ATTEMPT' => 'Tentativo di hacking!',
+ 'HANDLE_IMAGES' => 'Che cosa fare con le immagini',
+ 'HANDLE_SUBS' => 'Che cosa fare con i sotto-albums',
+ 'HOTLINK_ALLOWED' => 'Link consentiti',
+ 'HOTLINK_ALLOWED_EXP' => 'Link immagini provenienti da questo dominio sono sempre consentiti. I domini devono essere separati da una virgola (no spazi). Es: “flying-bits.org,phpbb.com“',
+ 'HOTLINK_PREVENT' => 'Abilita links alle immagini di tutti i siti',
+
+ 'IMAGE_DESC_MAX_LENGTH' => 'Lunghezza massima descrizione/commento (bytes)',
+ 'IMAGE_ID' => 'ID-immagine',
+ 'IMAGE_SETTINGS' => 'Configurazione immagine',
+ 'IMAGES_PER_DAY' => 'immagini per giorno',
+ 'INDEX_SETTINGS' => 'Configurazione per galleria/indice.' . $phpEx,
+ 'INFO_LINE' => 'Visualizza dimensione-file su anteprima',
+ 'INHERIT_PERMISSIONS_ALBUM' => 'Ereditano le autorizzazioni di un altro album',
+ 'INHERIT_PERMISSIONS_VICTIM' => 'Ereditano le autorizzazioni di un altra configurazione',
+
+ 'JPG_ALLOWED' => 'Consenti il caricamento di file JPG',
+ 'JPG_QUALITY' => 'Qualità JPG',
+ 'JPG_QUALITY_EXP' => 'Quando si effettua la rotazione o il ridimensionamento delle immagini, la dimensione del file potrebbe aumentare. Con questa opzione è possibile ridurre la qualità, per risparmiare spazio su disco.',
+
+ 'LIST_INDEX' => 'Lista sotto-album nella legenda dell’album padre',
+ 'LIST_INDEX_EXPLAIN' => 'Visualizza questo album sull’indice e altrove come un collegamento all’interno dell’album padre se l’opzione “lista sotto-albums nella legenda” è attivata.',
+ 'LIST_SUBALBUMS' => 'Lista sotto-album nella legenda',
+ 'LIST_SUBALBUMS_EXPLAIN' => 'Visualizza questo album sull’indice e altrove come un collegamento all’interno dell’album padre se l’opzione “lista sotto-albums nella legenda” è attivata.',
+ 'LOCKED' => 'Bloccato',
+ 'LOOK_UP_ALBUM' => 'Seleziona un album',
+ 'LOOK_UP_ALBUMS_EXPLAIN' => 'Sei in grado di selezionare più di un album.',
+
+ 'MANAGE_CRASHED_ENTRIES' => 'Gestione voci bloccate',
+ 'MANAGE_CRASHED_IMAGES' => 'Gestione immagini bloccate',
+ 'MANAGE_PERSONALS' => 'Gestione albums personali',
+ 'MAX_IMAGES_PER_ALBUM' => 'Numero massimo di immagini per ciascun album',
+ 'MAX_IMAGES_PER_ALBUM_EXP' => 'Illimitata è -1',
+ 'MEDIUM_CACHE' => 'Cache immagini ridimensionate per immagine-pagina',
+ 'MEDIUM_DIR_SIZE' => 'Dimensione media/-directory',
+ 'MISSING_ALBUM_NAME' => 'Devi aggiungere un nome per questo album.',
+ 'MISSING_AUTHOR' => 'Immagini senza autore valido',
+ 'MISSING_AUTHOR_C' => 'Commenti senza autore valido',
+ 'MISSING_ENTRY' => 'Files senza voce nel database',
+ 'MISSING_OWNER' => 'Album personali senza autore valido',
+ 'MISSING_OWNER_EXP' => 'Sotto-albums, immagini e commenti possono essere eliminati.',
+ 'MISSING_SOURCE' => 'Le immagini senza file',
+ 'MOVE_IMAGES_TO' => 'Sposta immagini su',
+ 'MOVE_SUBALBUMS_TO' => 'Sposta sotto-albums su',
+
+ 'NEW_ALBUM_CREATED' => 'Nuovo album creato con successo',
+ 'NO_ALBUM_SELECTED' => 'È necessario selezionare almeno un album.',
+ 'NO_DESTINATION_ALBUM' => 'Non è stato specificato un album di destinazione per lo spostamento del contenuto.',
+ 'NO_PERMISSIONS_SELECTED' => 'È necessario selezionare almeno un album o una speciale autorizzazione.',
+ 'NO_VICTIM_SELECTED' => 'È necessario selezionare almeno un utente o gruppo.',
+ 'NO_INHERIT' => 'Non copiare permessi',
+ 'NO_PARENT_ALBUM' => 'Nessun padre',
+ 'NO_SUBALBUMS' => 'Nessun album allegato',
+ 'NUMBER_ALBUMS' => 'Numero di albums',
+ 'NUMBER_IMAGES' => 'Numero di immagini',
+ 'NUMBER_PERSONALS' => 'Numero di albums personali',
+
+ 'OWN_PERSONAL_ALBUMS' => 'Propri album personali',
+ 'OWN_PERSONAL_ALBUMS_EXPLAIN' => 'Queste autorizzazioni vengono utilizzate, quando un utente visita uno dei suoi album personali.Se i toui utenti non posso creare un album personale, hai bisogno di impostare questi permessi. ',
+ 'PERSONAL_ALBUMS_EXPLAIN' => 'Queste autorizzazioni vengono utilizzate, quando un utente A visita un album personale di un utente B. Se i moderatori non possono moderare le immagini personali, hai bisogno di impostare questi permessi. ',
+
+ 'PERMISSION' => 'Permessi',
+ 'PERMISSION_NEVER' => 'Mai',
+ 'PERMISSION_NO' => 'No',
+ 'PERMISSION_SETTING' => 'Configurazione',
+ 'PERMISSION_YES' => 'Si',
+ 'PERMISSION_A_COUNT' => 'Numero di sottoalbum personali consentiti',
+ 'PERMISSION_A_LIST' => 'Può vedere album',
+ 'PERMISSION_A_RESTRICT' => 'Può limitare l’accesso',
+ 'PERMISSION_A_UNLIMITED' => 'Numero illimitato di sotto-albums personali',
+ 'PERMISSION_C' => 'Commenti',
+ 'PERMISSION_C_DELETE' => 'Può cancellare i suoi commenti',
+ 'PERMISSION_C_EDIT' => 'Può modificare i suoi commenti',
+ 'PERMISSION_C_POST' => 'Può commentare le immagini',
+ 'PERMISSION_C_READ' => 'Può leggere i commenti',
+ 'PERMISSION_I' => 'immagini',
+ 'PERMISSION_I_APPROVE' => 'Può caricare immagini senza approvazione',
+ 'PERMISSION_I_COUNT' => 'Numero di immagini caricate',
+ 'PERMISSION_I_DELETE' => 'Può cancellare le sue immagini',
+ 'PERMISSION_I_EDIT' => 'Può modificare le sue immagini',
+ 'PERMISSION_I_LOCK' => 'Può bloccare immagini',
+ 'PERMISSION_I_RATE' => 'Può votare immagini',
+ 'PERMISSION_I_RATE_EXPLAIN' => 'Gli ospiti e le immagini caricate non possono mai votare le immagini.',
+ 'PERMISSION_I_REPORT' => 'Può segnalare immagini',
+ 'PERMISSION_I_UNLIMITED' => 'Può caricare immagini illimitate',
+ 'PERMISSION_I_UPLOAD' => 'Può caricare immagini',
+ 'PERMISSION_I_UPLOAD_EXPLAIN' => 'Questa autorizzazione è anche usata per determinare se l’utente può spostare le immagini per l’album, quando dispone di autorizzazioni di moderatore in altri forum.',
+ 'PERMISSION_I_VIEW' => 'Può vedere immagini',
+ 'PERMISSION_I_WATERMARK' => 'Può vedere immagini con watermark',
+ 'PERMISSION_M' => 'Moderazione',
+ 'PERMISSION_MISC' => 'Misti', //Miscellaneous
+ 'PERMISSION_M_COMMENTS' => 'Può moderare commenti',
+ 'PERMISSION_M_DELETE' => 'Può cancellare immagini',
+ 'PERMISSION_M_EDIT' => 'Può modificare immagini',
+ 'PERMISSION_M_MOVE' => 'Può spostare immagini',
+ 'PERMISSION_M_REPORT' => 'Può gestire le segnalazioni',
+ 'PERMISSION_M_STATUS' => 'Può approvare e bloccare le immagini',
+
+ 'PERMISSION_EMPTY' => 'Non hai configurato tutti i permessi.',
+ 'PERMISSIONS' => 'Permessi',
+ 'PERMISSIONS_COPY' => 'Copia permessi album',
+ 'PERMISSIONS_COPY_EXPLAIN' => 'Qui è possibile copiare i permessi da un album ad un altro.',
+ 'PERMISSIONS_EXPLAIN' => 'Qui è possibile modificare gli album a cui utenti e gruppi possono accedere.',
+ 'PERMISSIONS_STORED' => 'Permessi salvati con successo.',
+ 'PERSONAL_ALBUM_INDEX' => 'Vedi albums personali nell’indice',
+ 'PERSONAL_ALBUM_INDEX_EXP' => 'Se scegli “No“, ci sarà il collegamento diretto.',
+ 'PEGA_CREATED' => 'Creata galleria personale per %s.',
+ 'PEGA_ALREADY_EXISTS' => '%s ha già una galleria personale.',
+ 'PGALLERIES_PER_PAGE' => 'Numero di gallerie personali per pagina',
+ 'ITEMS_PER_PAGE' => 'Oggetti per pagina',
+ 'ITEMS_PER_PAGE_EXP' => 'Quante immagini/album per pagina',
+ 'RANDOM_ON_INDEX' => 'Mostra immagini casuali sull’index',
+ 'RANDOM_ON_INDEX_EXP' => 'Dovrebbero esserci immagini casuali sull’index della galleria.',
+ 'RANDOM_ON_INDEX_COUNT' => 'Conteggio delle immagini casuali',
+ 'RECENT_ON_INDEX' => 'Mostra immagini recenti',
+ 'RECENT_ON_INDEX_EXP' => 'Dovrebbero esserci immagini recenti nell’index',
+ 'RECENT_ON_INDEX_COUNT' => 'Conteggio immagini recenti',
+ 'PHPBB_INTEGRATION' => 'integrazione phpBB',
+ 'PNG_ALLOWED' => 'Consenti invio di files PNG',
+ 'PURGED_CACHE' => 'Svuotata la cache',
+
+ 'RATE_SCALE' => 'Scala voti',
+ 'RATE_SYSTEM' => 'Attiva sistema voti',
+ 'REDIRECT_ACL' => 'Ora puoi attivare e %sconfigurare permessi%s per questo album.',
+ 'REMOVE_IMAGES_FOR_CAT' => 'E’ necessario eliminare le immagini di questo album, prima di passare il tipo di album alla categoria.',
+ 'RESET_RATING' => 'Azzera voti album',
+ 'RESET_RATING_COMPLETED' => 'Voti cancellati con successo.',
+ 'RESET_RATING_CONFIRM' => 'Vuoi davvero eliminare tutti i voti sulle immagini dell’album “%s“?',
+ 'RESET_RATING_EXPLAIN' => 'Elimina tutti i voti sulle immagini nell’album specifico. Immettere id-album nel campo sul lato destro.',
+ 'RESIZE_IMAGES' => 'Ridimensiona immagini più grandi',
+ 'RESYNC_IMAGECOUNTS' => 'Sincronizza conteggio immagini',
+ 'RESYNC_IMAGECOUNTS_CONFIRM' => 'Sei sicuro di voler sincronizzare il conteggio delle immagini?',
+ 'RESYNC_IMAGECOUNTS_EXPLAIN' => 'Solo le immagini esistenti saranno prese in considerazione.',
+ 'RESYNC_LAST_IMAGES' => 'Aggiorna “ultima immagine“',
+ 'RESYNC_PERSONALS' => 'Sincronizza id albums personali',
+ 'RESYNC_PERSONALS_CONFIRM' => 'Sei sicuro di voler sincronizzare il conteggio delle immagini?',
+ 'RESYNCED_IMAGECOUNTS' => 'Sincronizza conteggio immagini',
+ 'RESYNCED_LAST_IMAGES' => 'Aggiorna “ultima immagine“',
+ 'RESYNCED_PERSONALS' => 'Sincronizza id albums personali',
+ 'ROTATE_IMAGES' => 'Permette di ruotare le immagini',
+ 'ROTATE_IMAGES_EXP' => 'Questa funzione non può essere utilizzata al momento, come la funzione di “ruota immagine“ anche se non è inclusa nella vostra versione GD.',
+ 'ROWS_PER_PAGE' => 'Numero di righe nella pagina di anteprima',
+
+ 'RRC_DISPLAY_ALBUMNAME' => 'Nome album',
+ 'RRC_DISPLAY_COMMENTS' => 'Commenti',
+ 'RRC_DISPLAY_IMAGENAME' => 'Nome immagine',
+ 'RRC_DISPLAY_IMAGETIME' => 'Tempo immagine',
+ 'RRC_DISPLAY_IMAGEVIEWS' => 'Visualizzazioni immagini',
+ 'RRC_DISPLAY_IP' => 'Ip utente',
+ 'RRC_DISPLAY_NONE' => 'Nessuno',
+ 'RRC_DISPLAY_OPTIONS' => 'I valori che devono essere visualizzati sotto le anteprime',
+ 'RRC_DISPLAY_USERNAME' => 'Nome utente',
+ 'RRC_DISPLAY_RATINGS' => 'Voti',
+ 'RRC_GINDEX' => 'Recenti- & immagini Casuali & Commenti - Funzionalità',
+ 'RRC_GINDEX_COLUMNS' => 'Colonne',
+ 'RRC_GINDEX_COMMENTS' => 'Seleziona e sposta commenti',
+ 'RRC_GINDEX_CONTESTS' => 'Numero di concorsi',
+ 'RRC_GINDEX_CROWS' => 'Numero di commenti',
+ 'RRC_GINDEX_MODE' => 'Modo',
+ 'RRC_GINDEX_MODE_EXP' => '“immagini casuali“ può richiedere maggior carico su database di grandi dimensioni!',
+ 'RRC_GINDEX_PGALLERIES' => 'Visulizzazione immagini di albums personali',
+ 'RRC_GINDEX_ROWS' => 'Righe',
+ 'RRC_MODE_COMMENTS' => 'Commenti',
+ 'RRC_MODE_NONE' => 'Nessuno',
+ 'RRC_MODE_RANDOM' => 'immagini casuali',
+ 'RRC_MODE_RECENT' => 'immagini recenti',
+ 'RRC_PROFILE_COLUMNS' => 'Colonne',
+ 'RRC_PROFILE_MODE' => 'Modo “Recenti- & immagini Casuali“-Funzionalità nel profilo',
+ 'RRC_PROFILE_MODE_EXP' => '“immagini casuali“ può richiedere maggior carico su database di grandi dimensioni!',
+ 'RRC_PROFILE_ROWS' => 'Righe',
+ 'RRC_PROFILE_ITEMS' => 'Oggetti nel profilo utente',
+
+ 'RSZ_HEIGHT' => 'Altezza massima sulla visualizzazione immagini',
+ 'RSZ_WIDTH' => 'Larghezza massima sulla visualizzazione immagini',
+
+ 'SEARCH_SETTINGS' => 'Configurazioni di ricerca',
+ 'SELECT_ALBUM' => 'Seleziona album',
+ 'SELECT_ALBUMS' => 'Seleziona più album',
+ 'SELECT_GROUPS' => 'Seleziona gruppi',
+ 'SELECT_PERM_SYS' => 'Seleziona sistema-permessi',
+ 'SELECT_PERMISSIONS' => 'Seleziona permessi',
+ 'SELECTED_ALBUM_NOT_EXIST' => 'Album non esistenti.',
+ 'SELECTED_ALBUMS' => 'Seleziona albums',
+ 'SELECTED_GROUPS' => 'Seleziona gruppi',
+ 'SELECTED_PERM_SYS' => 'Seleziona sistema-permessi',
+ 'SET_PERMISSIONS' => ' Configura permessi now.',
+ 'SORRY_NO_STATISTIC' => 'Spiacente, il valore delle statistiche non è disponibile.',
+ 'SYNC_IN_PROGRESS' => 'Sincronizza album',
+ 'SYNC_IN_PROGRESS_EXPLAIN' => 'Attuale sincronizzazione intervallo immagini %1$d/%2$d.',
+
+ 'THUMBNAIL_CACHE' => 'Anteprima cache',
+ 'THUMBNAIL_HEIGHT' => 'Altezza anteprima',
+ 'THUMBNAIL_QUALITY' => 'Qualita anteprima (1-100)',
+ 'THUMBNAIL_QUALITY_EXP' => 'Il valore deve essere compreso tra 1 e 100.',
+ 'THUMBNAIL_SETTINGS' => 'Configurazione anteprima',
+ 'THUMBNAIL_WIDTH' => 'Larghezza anteprima',
+
+ 'UC_IMAGE_NAME' => 'Nome immagine',
+ 'UC_IMAGE_ICON' => 'Ultima icona immagine',
+ 'UC_IMAGEPAGE' => 'Immagine su pagina immagini (con commenti e voti)',
+ 'UC_IMAGEPAGE_EXP' => 'E’ la pagina con i dettagli delle immagini e i commenti',
+ 'UC_LINK_CONFIG' => 'Link configurazione',
+ 'UC_LINK_HIGHSLIDE' => 'Apri Highslide-Plugin',
+ 'UC_LINK_IMAGE' => 'Apri immagini',
+ 'UC_LINK_IMAGE_PAGE' => 'Apri pagina immagine (con commenti e voti)',
+ 'UC_LINK_LYTEBOX' => 'Apri Lytebox-Plugin',
+ 'UC_LINK_NEXT' => 'Prossima Immagine',
+ 'UC_LINK_NEWTAB' => 'Aperto in una nuova scheda',
+ 'UC_LINK_NONE' => 'Nessun Link',
+ 'UC_LINK_SHADOWBOX' => 'Apri Shadowbox-Plugin',
+ 'UC_THUMBNAIL' => 'Anteprima',
+ 'UC_THUMBNAIL_EXP' => 'Usato anche per il BBCode.',
+ 'UNLOCKED' => 'Sbloccato',
+ 'UPDATE_BBCODE' => 'BBCode aggiornato',
+ 'UPLOAD_IMAGES' => 'Carica immagini multiple',
+
+ 'VIEW_IMAGE_URL' => 'Visualizza URL immagini sulla pagina immagini',
+
+ 'WATERMARK' => 'Watermark',
+ 'WATERMARK_HEIGHT' => 'Altezza minima per watermark',
+ 'WATERMARK_HEIGHT_EXP' => 'Per evitare che immagini piccole siano contenute in Watermark, è possibile immettere una minimo-larghezza/altezza.',
+ 'WATERMARK_IMAGES' => 'immagini Watermark',
+ 'WATERMARK_OPTIONS' => 'Opzioni Watermark',
+ 'WATERMARK_POSITION' => 'Posizione Watermark',
+ 'WATERMARK_POSITION_BOTTOM' => 'In basso',
+ 'WATERMARK_POSITION_CENTER' => 'centro',
+ 'WATERMARK_POSITION_LEFT' => 'sinistra',
+ 'WATERMARK_POSITION_MIDDLE' => 'Al centro',
+ 'WATERMARK_POSITION_RIGHT' => 'destra',
+ 'WATERMARK_POSITION_TOP' => 'In alto',
+ 'WATERMARK_SOURCE' => 'Percorso file Watermark (relativo alla root del tuo phpbb)',
+ 'WATERMARK_SOURCE_EXP' => 'Relativo al percorso root del tuo phpBB',
+ 'WATERMARK_WIDTH' => 'Larghezza minima per watermark',
+ 'WATERMARK_WIDTH_EXP' => 'Per evitare che immagini piccole siano contenute in Watermark, è possibile immettere una minimo-larghezza/altezza.',
+
+ 'ZIP_ALLOWED' => 'E’ ammesso l’invio di archivi ZIP',
+ 'NO_WRITE_ACCESS' => 'Nessun accesso di scrittura',
+ 'WRITE_ACCESS' => 'OK',
+ 'DIR_CREATED' => 'Cartella creata',
+));
+
+/**
+* A copy of Handyman` s MOD version check, to view it on the gallery overview
+*/
+$lang = array_merge($lang, array(
+ 'ANNOUNCEMENT_TOPIC' => 'Annuncio di rilascio',
+ 'CURRENT_VERSION' => 'Versione corrente',
+ 'DOWNLOAD_LATEST' => 'Download ultima versione',
+ 'LATEST_VERSION' => 'Ultima Versione',
+ 'NO_INFO' => 'Il server non può essere contattato',
+ 'NOT_UP_TO_DATE' => 'La MOD %s non è aggiornata',
+ 'RELEASE_ANNOUNCEMENT' => 'Argomento annuncio',
+ 'UP_TO_DATE' => 'La MOD %s è aggiornata',
+ 'VERSION_CHECK' => 'Controllo versione MOD',
+));
diff --git a/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php
new file mode 100644
index 00000000..2a140b8e
--- /dev/null
+++ b/core/language/it/gallery_mcp.php
@@ -0,0 +1,154 @@
+ 'Seleziona l\'azione desiderata',
+
+ 'GALLERY_MCP_MAIN' => 'Principale',
+ 'GALLERY_MCP_OVERVIEW' => 'Panoramica',
+ 'GALLERY_MCP_QUEUE' => 'Coda',
+ 'GALLERY_MCP_QUEUE_DETAIL' => 'Dettagli immagine',
+ 'GALLERY_MCP_REPORTED' => 'Immagini segnalate',
+ 'GALLERY_MCP_REPO_DONE' => 'Segnalazioni chiuse',
+ 'GALLERY_MCP_REPO_OPEN' => 'Apri segnalazioni',
+ 'GALLERY_MCP_REPO_DETAIL' => 'Dettaglio segnalazioni',
+ 'GALLERY_MCP_UNAPPROVED' => 'Immagini in attesa di approvazione',
+ 'GALLERY_MCP_APPROVED' => 'Immagini approvate',
+ 'GALLERY_MCP_LOCKED' => 'Immagini bloccate',
+ 'GALLERY_MCP_VIEWALBUM' => 'Visualizza album',
+ 'GALLERY_MCP_ALBUM_OVERVIEW' => 'Modera album',
+
+ 'IMAGE_REPORTED' => 'Questa immagine è stata segnalata.',
+ 'IMAGE_UNAPPROVED' => 'Questa immagine è in attesa di approvazione.',
+
+ 'MODERATE_ALBUM' => 'Modera album',
+
+ 'LATEST_IMAGES_REPORTED' => 'Ultime 5 segnalazioni',
+ 'LATEST_IMAGES_UNAPPROVED' => 'Ultime 5 immagini in attesa di approvazione',
+
+ 'QUEUE_A_APPROVE' => 'Approva immagine',
+ 'QUEUE_A_APPROVE2' => 'Approva immagine?',
+ 'QUEUE_A_APPROVE2_CONFIRM' => 'Sei sicuro di voler approvare questa immagine?',
+ 'QUEUE_A_DELETE' => 'Cancella immagine',
+ 'QUEUE_A_DELETE2' => 'Cancella immagine?',
+ 'QUEUE_A_DELETE2_CONFIRM' => 'Sei sicuro di voler cancellare questa immagine?',
+ 'QUEUE_A_LOCK' => 'Blocca immagine',
+ 'QUEUE_A_LOCK2' => 'Blocca immagine?',
+ 'QUEUE_A_LOCK2_CONFIRM' => 'Sei sicuro di voler bloccare questa immagine?',
+ 'QUEUE_A_MOVE' => 'Sposta immagine',
+ 'QUEUE_A_UNAPPROVE' => 'Disapprova immagine',
+ 'QUEUE_A_UNAPPROVE2' => 'Disapprova immagine?',
+ 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Sei sicuro di voler disapprovare questa immagine?',
+
+ 'QUEUE_STATUS_0' => 'Questa immagine è in attesa di approvazione.',
+ 'QUEUE_STATUS_1' => 'Questa immagine è stata approvata.',
+ 'QUEUE_STATUS_2' => 'Questa immagine è bloccata.',
+
+ 'QUEUES_A_APPROVE' => 'Approva immagini',
+ 'QUEUES_A_APPROVE2' => 'Approva immagini?',
+ 'QUEUES_A_APPROVE2_CONFIRM' => 'Sei sicuro di voler approvare queste immagini?',
+ 'QUEUES_A_DELETE' => 'Cancella immagini',
+ 'QUEUES_A_DELETE2' => 'Cancella immagini?',
+ 'QUEUES_A_DELETE2_CONFIRM' => 'Sei sicuro di voler cancellare queste immagini?',
+ 'QUEUES_A_LOCK' => 'Blocca immagini',
+ 'QUEUES_A_LOCK2' => 'Blocca immagini?',
+ 'QUEUES_A_LOCK2_CONFIRM' => 'Sei sicuro di voler bloccare queste immagini?',
+ 'QUEUES_A_MOVE' => 'Sposta immagini',
+ 'QUEUES_A_UNAPPROVE' => 'Disapprova immagini',
+ 'QUEUES_A_UNAPPROVE2' => 'Disapprova immagini?',
+ 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Sei sicuro di voler disapprovare queste immagini?',
+ 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Sei sicuro di voler disapprovare queste immagini?',
+
+ 'REPORT_A_CLOSE' => 'Chiudi segnalazione',
+ 'REPORT_A_CLOSE2' => 'Chiudi segnalazione?',
+ 'REPORT_A_CLOSE2_CONFIRM' => 'Sei sicuro di voler chiudere questa segnalazione?',
+ 'REPORT_A_DELETE' => 'Cancella segnalzione',
+ 'REPORT_A_DELETE2' => 'Cancella segnalzione?',
+ 'REPORT_A_DELETE2_CONFIRM' => 'Sei sicuro di voler cancellare questa segnalazione?',
+ 'REPORT_A_OPEN' => 'Apri segnalazione',
+ 'REPORT_A_OPEN2' => 'Apri segnalazione?',
+ 'REPORT_A_OPEN2_CONFIRM' => 'Sei sicuro di voler aprire questa segnalazione?',
+
+ 'REPORT_NOT_FOUND' => 'Impossibile trovare la segnalazione.',
+ 'REPORT_STATUS_1' => 'Questa segnalazione necessita di controllo.',
+ 'REPORT_STATUS_2' => 'Questa segnalazione è chiusa.',
+
+ 'REPORTS_A_CLOSE' => 'Chiudi segnalazioni',
+ 'REPORTS_A_CLOSE2' => 'Chiudi segnalazioni?',
+ 'REPORTS_A_CLOSE2_CONFIRM' => 'Sei sicuro di voler chiudere queste segnalazioni?',
+ 'REPORTS_A_DELETE' => 'Cancella segnalazioni',
+ 'REPORTS_A_DELETE2' => 'Cancella segnalazioni?',
+ 'REPORTS_A_DELETE2_CONFIRM' => 'Sei sicuro di voler cancellare queste segnalazioni?',
+ 'REPORTS_A_OPEN' => 'Apri segnalazioni',
+ 'REPORTS_A_OPEN2' => 'Apri segnalazioni?',
+ 'REPORTS_A_OPEN2_CONFIRM' => 'Sei sicuro di voler aprire queste segnalazioni?',
+
+ 'REPORT_MOD' => 'Modificato da',
+ 'REPORTED_IMAGES' => 'Immagini segnalate',
+ 'REPORTER' => 'Segnalazione utente',
+ 'REPORTER_AND_ALBUM' => 'Segnalazione & Album',
+
+ 'WAITING_APPROVED_IMAGE' => array(
+ 0 => 'Non ci sono immagini approvate.',
+ 1 => 'In totale c’è 1 immagine approvata.',
+ 2 => 'In totale ci sono %s imamagini approvate.',
+ ),
+ 'WAITING_DISPPROVED_IMAGE' => array(
+ 0 => 'Nessuna immagine disapprovata.',
+ 1 => 'In totale c’è 1 immagine disapprovata.',
+ 2 => 'In totale ci sono %s immagini disapprovate.',
+ ),
+ 'WAITING_LOCKED_IMAGE' => array(
+ 0 => 'Nessuna immagine bloccata.',
+ 1 => 'In totale c’è 1 immagine chiusa.',
+ 2 => 'In totale ci sono %s immagini chiuse.',
+ ),
+ 'WAITING_REPORTED_DONE' => array(
+ 0 => 'Nessuna segnalazione ricevuta.',
+ 1 => 'In totale c’è 1 segnalazione controllate.',
+ 2 => 'In totale ci sono %s segnalazioni controllate.',
+ ),
+ 'WAITING_REPORTED_IMAGE' => array(
+ 0 => 'Nessuna segnalazione ricevuta.',
+ 1 => 'In totale c’è 1 segnalazione da controllare.',
+ 2 => 'In totale ci sono %s segnalazioni da controllare.',
+ ),
+ 'WAITING_UNAPPROVED_IMAGE' => array(
+ 0 => 'Non risultano immagini in attesa di approvazione.',
+ 1 => 'In totale c’è 1 imaggine in attesa di approvazione.',
+ 2 => 'In totale ci sono %s immagini in attesa di approvazione.',
+ ),
+ 'DELETED_IMAGES' => array(
+ 0 => 'Nessuna immagine cancellata.',
+ 1 => 'In totale c’è stata 1 immagine cancellata.',
+ 2 => 'In totale ci sono state %s immagini cancellate.',
+ ),
+ 'MOVED_IMAGES' => array(
+ 0 => 'Nessuna immagini è stata spostata.',
+ 1 => 'In totale c’è stata 1 imamagine spostata.',
+ 2 => 'In totale ci sono state %s immagini spostate.',
+ ),
+ 'NO_WAITING_UNAPPROVED_IMAGE' => 'Non ci sono immagini in attesa di approvazione.',
+));
diff --git a/core/language/it/gallery_notifications.php b/core/language/it/gallery_notifications.php
new file mode 100644
index 00000000..536844c3
--- /dev/null
+++ b/core/language/it/gallery_notifications.php
@@ -0,0 +1,44 @@
+ '%2$s immagini caricate in attesa di approvazione nell’album %1$s ',
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_FOR_APPROVE' => 'Immagini in attesa di approvazione',
+
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_APPROVED' => 'Immagini approvate',
+ 'NOTIFICATION_PHPBBGALLERY_IMAGE_APPROVED' => 'Le immagini nell’album %1$s sono state approvate',
+
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_NOT_APPROVED' => 'Immagini non approvate',
+ 'NOTIFICATION_PHPBBGALLERY_IMAGE_NOT_APPROVED' => 'Le immagini nell\'album %1$s non sono state approvate',
+
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_IMAGE' => 'Nuove immagini',
+ 'NOTIFICATION_PHPBBGALLERY_NEW_IMAGE' => 'Nuove immagini sono state caricate nell’album %1$s ',
+
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_COMMENT' => 'Nuovi commenti',
+ 'NOTIFICATION_PHPBBGALLERY_NEW_COMMENT' => '%1$s ha commentato su un’immagine che stai controllando',
+
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_REPORT' => 'Nuova segnalazione immagine',
+ 'NOTIFICATION_PHPBBGALLERY_NEW_REPORT' => '%1$s ha segnalato un’immagine',
+));
diff --git a/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
new file mode 100644
index 00000000..cf6f5457
--- /dev/null
+++ b/core/language/it/gallery_ucp.php
@@ -0,0 +1,85 @@
+ 'Tutti',
+ 'ACCESS_CONTROL_REGISTERED' => 'Utenti registrati',
+ 'ACCESS_CONTROL_NOT_FOES' => 'Utenti registrati, eccetto i tuoi nemici',
+ 'ACCESS_CONTROL_FRIENDS' => 'Solo i tuoi amici',
+ 'ACCESS_CONTROL_SPECIAL_FRIENDS' => 'Solo i tuoi amici speciali',
+ 'ALBUMS' => 'Albums',
+ 'ALBUM_ACCESS' => 'Consenti accesso per',
+ 'ALBUM_ACCESS_EXPLAIN' => 'Puoi usare la tua %1$slista Amici e Nemici%2$s per controllare l’accesso all’album. In ogni caso i moderatori possono sempre accedere all’album.',
+ 'ALBUM_DESC' => 'Descrizione album',
+ 'ALBUM_NAME' => 'Nome album',
+ 'ALBUM_PARENT' => 'Album padre',
+ 'ATTACHED_SUBALBUMS' => 'Sotto-album allegati',
+
+ 'CREATE_PERSONAL_ALBUM' => 'Crea album personale',
+ 'CREATE_SUBALBUM' => 'Crea sotto-album',
+ 'CREATE_SUBALBUM_EXP' => 'È possibile allegare un nuovo sotto-album alla tua galleria personale.',
+ 'CREATED_SUBALBUM' => 'Sotto-album creato con successo',
+ 'DELETE_ALBUM' => 'Cancella album',
+ 'DELETE_ALBUM_CONFIRM' => 'Vuoi cancellare questo album con i sotto-albums e immagini collegate?',
+ 'DELETED_ALBUMS' => 'Albums cancellati con successo',
+
+ 'EDIT' => 'Modifica',
+ 'EDIT_ALBUM' => 'Modifica album',
+ 'EDIT_SUBALBUM' => 'Modifica sotto-album',
+ 'EDIT_SUBALBUM_EXP' => 'Puoi modificare i tuoi albums.',
+ 'EDITED_SUBALBUM' => 'Album modificato con successo',
+
+ 'GOTO' => 'Torna a',
+
+ 'MANAGE_SUBALBUMS' => 'Gestione sotto-albums personali',
+ 'MISSING_ALBUM_NAME' => 'Scrivi un nome per l’album',
+
+ 'NEED_INITIALISE' => 'Non hai un tuo album personale.',
+ 'NO_ALBUM_STEALING' => 'Non sei autorizzato a gestire gli albums di altri utenti.',
+ 'NO_MORE_SUBALBUMS_ALLOWED' => 'Hai raggiunto il massimo di sotto-albums per il tuo album personale',
+ 'NO_PARENT_ALBUM' => '«-- nessun album padre',
+ 'NO_PERSALBUM_ALLOWED' => 'Non hai i permessi per creare il tuo album personale',
+ 'NO_PERSONAL_ALBUM' => 'Non hai un album personale. Puoi creare il tuo album personale con alcuni aotto-albums. Negli albums personali solo i proprietare possono inviare immagini.',
+ 'NO_SUBALBUMS' => 'Non ci sono albums allegati',
+ 'NO_SUBSCRIPTIONS' => 'Non hai sottoscritto nessuna immagine.',
+
+ 'PARSE_BBCODE' => 'Analizza BBCode',
+ 'PARSE_SMILIES' => 'Analizza faccine',
+ 'PARSE_URLS' => 'Analizza links',
+ 'PERSONAL_ALBUM' => 'Album personale',
+
+ 'UNSUBSCRIBE' => 'Elimina sottoscrizione',
+ 'USER_ALLOW_COMMENTS' => 'Permetti agli utenti di commentare le tue immagini',
+
+ 'YOUR_SUBSCRIPTIONS' => 'Puoi vedere gli albums e le immagini che hai sottoscritto.',
+
+ 'WATCH_CHANGED' => 'Configurazione salvata',
+ 'WATCH_COM' => 'Sottoscrivi immagini commentate',
+ 'WATCH_NOTE' => 'Questa opzione ha effetto solo sulle nuove immagini. Tutte le altre immagini necessitano di essere aggiunte come “sottoscritte“.',
+ 'WATCH_OWN' => 'Sottoscrivi immagini',
+
+ 'RRC_ZEBRA' => 'Nascondi dai nemici in RRC',
+ 'RRC_ZEBRA_EXPLAIN' => 'Nascondi le immagini negli album dai nemici nelle parti dei Commenti, Recenti e Casuali dell\'Indice.ATTENZIONE! Questo non cancellera\' le immagini caricate negli album comuni e pubblici.'
+));
diff --git a/core/language/it/info_acp_gallery.php b/core/language/it/info_acp_gallery.php
new file mode 100644
index 00000000..ad2fedd9
--- /dev/null
+++ b/core/language/it/info_acp_gallery.php
@@ -0,0 +1,57 @@
+ 'Gestione Album',
+ 'ACP_GALLERY_ALBUM_PERMISSIONS' => 'Permessi',
+ 'ACP_GALLERY_ALBUM_PERMISSIONS_COPY'=> 'Copia permessi',
+ 'ACP_GALLERY_CONFIGURE_GALLERY' => 'Configura galleria',
+ 'ACP_GALLERY_LOGS' => 'Log Galleria',
+ 'ACP_GALLERY_LOGS_EXPLAIN' => 'Lista di tutte le azioni di moderazione della galleria, come approvazioni, disapprovazioni, chiusure, riaperture, chiusura delle segnalazioni e cancellazione immagini.',
+ 'ACP_GALLERY_MANAGE_ALBUMS' => 'Gestisci gli album',
+ 'ACP_GALLERY_OVERVIEW' => 'Panoramica',
+
+ 'GALLERY' => 'Galleria',
+ 'GALLERY_EXPLAIN' => 'Galleria Immagini',
+ 'GALLERY_HELPLINE_ALBUM' => 'Immagine di Galleria: [image]id_immagine[/image], con questo BBCode puoi aggiungere un’immagine dalla galleria nel tuo post.',
+ 'GALLERY_POPUP' => 'Galleria',
+ 'GALLERY_POPUP_HELPLINE' => 'Apri un popup in cui selezionare le tue immagini recenti e caricarne di nuove.',
+
+ // Please do not change the copyright.
+ 'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
+ // A little line where you can give yourself some credits on the translation.
+ 'GALLERY_TRANSLATION_INFO' => 'Traduzione in italiano della Galleria phpBB di Fabio "Lord Phobos" Bolzoni',
+
+ 'IMAGES' => 'Immagini',
+ 'IMG_BUTTON_UPLOAD_IMAGE' => 'Carica immagine',
+
+ 'PERSONAL_ALBUM' => 'Album personale',
+ 'PHPBB_GALLERY' => 'Galleria phpBB',
+
+ 'TOTAL_IMAGES_SPRINTF' => array(
+ 0 => 'Totale immagini 0 ',
+ 1 => 'Totale immagini %d ',
+ ),
+));
diff --git a/core/language/it/info_acp_gallery_logs.php b/core/language/it/info_acp_gallery_logs.php
new file mode 100644
index 00000000..d77513ba
--- /dev/null
+++ b/core/language/it/info_acp_gallery_logs.php
@@ -0,0 +1,69 @@
+ 'Log Moderatore',
+ 'ACP_LOG_GALLERY_MOD_EXP' => 'Log Moderatore',
+ 'ACP_LOG_GALLERY_ADM' => 'Log Amministratore',
+ 'ACP_LOG_GALLERY_ADM_EXP' => 'Log Amministratore',
+ 'ACP_LOG_GALLERY_SYSTEM' => 'Log di Sistema',
+ 'ACP_LOG_GALLERY_SYSTEM_EXP' => 'Log di Sistema',
+ 'LOG_GALLERY_SHOW_LOGS' => 'Mostra soltanto',
+
+ 'SORT_USER_ID' => 'ID Utente',
+
+ 'LOG_ALBUM_ADD' => 'Nuovo album creato » %s',
+ 'LOG_ALBUM_DEL_ALBUM' => 'Album cancellato » %s',
+ 'LOG_ALBUM_DEL_ALBUMS' => 'Cancellato album e relativi sotto-album » %s',
+ 'LOG_ALBUM_DEL_MOVE_ALBUMS' => 'Cancellato album e spostati sottoalbum a %1$s » %2$s',
+ 'LOG_ALBUM_DEL_MOVE_IMAGES' => 'Cancellato album e spostate immagini per %1$s » %2$s',
+ 'LOG_ALBUM_DEL_MOVE_IMAGES_ALBUMS' => 'Cancellato album e relativi sotto-album, spostate immagini a %1$s » %2$s',
+ 'LOG_ALBUM_DEL_MOVE_IMAGES_MOVE_ALBUMS' => 'Cancellato album, spostate immagini a %1$s con relativi sottoalbum a %2$s » %3$s',
+ 'LOG_ALBUM_DEL_IMAGES' => 'Cancellato album con relative immagini » %s',
+ 'LOG_ALBUM_DEL_IMAGES_ALBUMS' => 'Cancellato album, immagini e sottoalbum » %s',
+ 'LOG_ALBUM_DEL_IMAGES_MOVE_ALBUMS' => 'Cancellato album e immagini, spostati sottoalbum a %1$s » %2$s',
+ 'LOG_ALBUM_EDIT' => 'Modificato dettagli album » %s',
+ 'LOG_ALBUM_MOVE_DOWN' => 'Spostato album %1$s sotto %2$s',
+ 'LOG_ALBUM_MOVE_UP' => 'Spostato album %1$s sopra %2$s',
+ 'LOG_ALBUM_SYNC' => 'Sincronizzato album » %s',
+
+ 'LOG_CLEAR_GALLERY' => 'Log galleria pulito',
+
+ 'LOG_GALLERY_APPROVED' => 'Immagine approvata » %s',
+ 'LOG_GALLERY_COMMENT_DELETED' => 'Commento cancellato » %s',
+ 'LOG_GALLERY_COMMENT_EDITED' => 'Commento cancellato » %s',
+ 'LOG_GALLERY_DELETED' => 'Immagine cancellata » %s',
+ 'LOG_GALLERY_EDITED' => 'Immagine modificata » %s',
+ 'LOG_GALLERY_LOCKED' => 'Immagine bloccata » %s',
+ 'LOG_GALLERY_MOVED' => 'Immagine spostata » from %1$s to %2$s',
+ 'LOG_GALLERY_REPORT_CLOSED' => 'Segnalazione chiusa » %s',
+ 'LOG_GALLERY_REPORT_DELETED' => 'Segnalazione cancellata » %s',
+ 'LOG_GALLERY_REPORT_OPENED' => 'Segnalazione riaperta » %s',
+ 'LOG_GALLERY_UNAPPROVED' => 'Immagine non approvata » %s',
+ 'LOG_GALLERY_DISAPPROVED' => 'Immagine disapprovata » %s',
+
+ 'LOGVIEW_VIEWALBUM' => 'Vedi album',
+ 'LOGVIEW_VIEWIMAGE' => 'Vedi immagine',
+));
diff --git a/core/language/it/info_ucp_gallery.php b/core/language/it/info_ucp_gallery.php
new file mode 100644
index 00000000..84e9b1b0
--- /dev/null
+++ b/core/language/it/info_ucp_gallery.php
@@ -0,0 +1,31 @@
+ 'Galleria',
+ 'UCP_GALLERY_PERSONAL_ALBUMS' => 'Gestisci album personali',
+ 'UCP_GALLERY_SETTINGS' => 'Impostazioni personali',
+ 'UCP_GALLERY_WATCH' => 'Gestisci sottoscrizioni',
+));
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
new file mode 100644
index 00000000..22a43621
--- /dev/null
+++ b/core/language/it/install_gallery.php
@@ -0,0 +1,134 @@
+ 'Il BBCode deve essere ricostruito.',
+
+ 'CAT_CONVERT' => 'converti phpBB2',
+ 'CAT_CONVERT_TS' => 'converti TS Gallery',
+ 'CAT_UNINSTALL' => 'disinstalla phpBB Gallery',
+
+ 'CHECK_TABLES' => 'Controlla tabelle',
+ 'CHECK_TABLES_EXPLAIN' => 'Le seguenti tabelle necessitano di conversione.',
+
+ 'CONVERT_SMARTOR_INTRO' => 'Converti da “Album-MOD“ di smartor a “phpBB Gallery“',
+ 'CONVERT_SMARTOR_INTRO_BODY' => 'Con questo convertitore, puoi convertire i tuoi albums, immagini, voti e commenti da Album-MOD di Smartor (testato v2.0.56) e Full Album Pack (testato v1.4.1) a phpBB Gallery.Nota: I permessi non saranno copiati .',
+ 'CONVERT_TS_INTRO' => 'Converti da “TS Gallery“ a “phpBB Gallery“',
+ 'CONVERT_TS_INTRO_BODY' => 'Con questo convertitore, puoi convertire i tuoi albums, immagini, voti e commenti da TS Gallery (testato v0.2.1) a phpBB Gallery.Nota: I permessi non saranno copiati .',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'La conversione della tua gallery a phpBB Gallery v%s è stata completata con successo. Assicurati di aver trasferito tutti i file prima di attivare il tuo forum e di cancellare la cartella install.I permessi non saranno copiati. Devi anche pulire il tuo database da vecchie voci, relative a immagini non più esistenti. Questo può essere fatto in ".MODs > phpBB Gallery > Pulisci gallery".',
+
+ 'CONVERTED_ALBUMS' => 'Gli albums sono stati copiati con successo.',
+ 'CONVERTED_COMMENTS' => 'I commenti sono stati copiati con successo.',
+ 'CONVERTED_IMAGES' => 'Le immagini sono stati copiati con successo.',
+ 'CONVERTED_MISC' => 'Convertite altre funzioni.',
+ 'CONVERTED_PERSONALS' => 'Gli album personali sono stati copiati con successo.',
+ 'CONVERTED_RATES' => 'I voti sono stati copiati con successo.',
+ 'CONVERTED_RESYNC_ALBUMS' => 'Sincronizzazione statistiche album.',
+ 'CONVERTED_RESYNC_COMMENTS' => 'Sincronizzazione commenti.',
+ 'CONVERTED_RESYNC_COUNTS' => 'Sincronizzazione contatore immagini.',
+ 'CONVERTED_RESYNC_RATES' => 'Sincronizzazione voti.',
+
+ 'FILE_DELETE_FAIL' => 'Il file non può essere eliminato, occorre eliminarlo manualmente',
+ 'FILE_STILL_EXISTS' => 'Il file cercato non esiste',
+ 'FILES_REQUIRED_EXPLAIN' => 'Richiesto - Per poter funzionare correttamente phpBB Gallery deve essere in grado di accedere o scrivere ad alcuni file o directory. Se vedi “ Non scrivibile ” è necessario modificare le autorizzazioni su file o directory per consentire a phpBB di scrivere in esso.',
+ 'FILES_DELETE_OUTDATED' => 'Elimina i file obsoleti',
+ 'FILES_DELETE_OUTDATED_EXPLAIN' => 'Se sceglii di eliminare i file, essi saranno completamente eliminati e non potranno essere ripristinati! Nota: Se hai stili e linguaggi installati, è necessario cancellarli manualmente.',
+ 'FILES_OUTDATED' => 'Files obsoleti',
+ 'FILES_OUTDATED_EXPLAIN' => 'Obsoleti - Per eliminare il rischio di attacchi hackers, elimina definitivamente i seguenti files.',
+ 'FOUND_INSTALL' => 'Doppia installazione',
+ 'FOUND_INSTALL_EXPLAIN' => 'Doppia installazione - E’ stata trovata già una galeria installata! Se continui, tutti i dati esistenti saranno sovrascritti. Tutti gli albums, immagini e commenti saranno cancellati! Per questo un %1$saggiornamento%2$s è raccomandato. ',
+ 'FOUND_VERSION' => 'E’ stata trovata la seguente versione',
+ 'FOUNDER_CHECK' => 'Sei un "Founder" di questa board',
+ 'FOUNDER_NEEDED' => 'Devi essere un “Founder“ di questa board!',
+
+ 'INSTALL_CONGRATS_EXPLAIN' => 'Hai correttamente installato phpBB Gallery v%s.Ora cancella, sposta o rinomina la cartella install prima di usare il tuo forum. Se questa directory è ancora presente, sarà consentito solo l’accesso in amministrazione (ACP).
',
+ 'INSTALL_INTRO_BODY' => 'Con questa opzione, è possibile installare phpBB Gallery sul tuo forum.',
+
+ 'GOTO_GALLERY' => 'Vai su phpBB Gallery',
+ 'GOTO_INDEX' => 'Vai all’indice del forum',
+
+ 'MISSING_CONSTANTS' => 'Prima di eseguire lo script di installazione, devi caricare i tuoi files modificati, in particolare il file includes/constants.php.',
+ 'MODULES_CREATE_PARENT' => 'Crea modulo standard padre',
+ 'MODULES_PARENT_SELECT' => 'Scegli il modulo padre',
+ 'MODULES_SELECT_4ACP' => 'Scegli il modulo padre per “pannello di controllo amministrativo“',
+ 'MODULES_SELECT_4LOG' => 'Scegli il modulo padre per “log gallery“',
+ 'MODULES_SELECT_4MCP' => 'Scegli il modulo padre per “pannelo di controllo moderatore“',
+ 'MODULES_SELECT_4UCP' => 'Scegli il modulo padre per “pannello di controllo utente“',
+ 'MODULES_SELECT_NONE' => 'nessun modulo padre',
+
+ 'NO_INSTALL_FOUND' => 'Nessuna installazione trovata!',
+
+ 'OPTIONAL_EXIFDATA' => 'La funzione “exif_read_data“ esiste',
+ 'OPTIONAL_EXIFDATA_EXP' => 'Il modulo exif-module non è installato o non esiste.',
+ 'OPTIONAL_EXIFDATA_EXPLAIN' => 'Se la funzione esiste, i dati exif delle immagini sono visualizzate nella pagina immagini.',
+ 'OPTIONAL_IMAGEROTATE' => 'La funzione “imagerotate“ esiste',
+ 'OPTIONAL_IMAGEROTATE_EXP' => 'Devi aggiornare la tua libreria GD, quella attuale è "%s".',
+ 'OPTIONAL_IMAGEROTATE_EXPLAIN' => 'Se la funzione esiste, puoi ruotare le immagini quando le carichi o le modifichi.',
+
+ 'PAYPAL_DEV_SUPPORT' => '
+
Note autore
+
La creazione, il mantenimento e gli aggiornamenti per questa MOD richiedono molto tempo e fatica, se ti piace questa MOD e vuoi aiutarmi con una donazione puoi usare la mia ID Paypal nickvergessen@gmx.de , o contattarmi al mio indirizzo email. La donazione suggerita è di 25,00€ (ma qualunque importo potrà aiutarmi).
+
+
',
+
+ 'PHP_SETTINGS' => 'Configurazioni PHP',
+ 'PHP_SETTINGS_EXP' => 'Queste sono le configurazioni richieste per installare la galleria.',
+ 'PHP_SETTINGS_OPTIONAL' => 'Configurazioni PHP opzionali',
+ 'PHP_SETTINGS_OPTIONAL_EXP' => 'Queste configuraioni PHP non sono richieste per il normale uso, ma sono necessarie per utilizzare nuovi strumenti.',
+
+ 'REQ_GD_LIBRARY' => 'GD Library è installato',
+ 'REQ_PHP_VERSION' => 'Versione php >= %s',
+ 'REQ_PHPBB_VERSION' => 'Versione phpBB >= %s',
+ 'REQUIREMENTS_EXPLAIN' => 'Prima di procedere con l’installazione completa, phpBB effettuerà alcuni test sulla tua configurazione del server e file per garantire che possano essere installati ed eseguiti correttamente su phpBB. Assicurati di leggere attentamente attraverso i risultati e non procedere fino a quando vengono passati tutti i test necessari.',
+
+ 'STAGE_ADVANCED_EXPLAIN' => 'Hai scelto i moduli principali per la gallery. Per un’installazione normale non è consigliabile effettuare modifiche.',
+ 'STAGE_COPY_TABLE' => 'Copia tabelle database',
+ 'STAGE_COPY_TABLE_EXPLAIN' => 'Le tabelle del database per l’album e dati utente hanno gli stessi nomi in TS Gallery e phpBB Gallery. Puoi così copiarli e convertire i dati.',
+ 'STAGE_CREATE_TABLE_EXPLAIN' => 'Le tabelle del database utilizzate da phpBB gallery sono state create e popolate con alcuni dati iniziali. Passare alla schermata successiva per completare l’installazione di phpBB gallery.',
+ 'STAGE_DELETE_TABLES' => 'Pulizia database',
+ 'STAGE_DELETE_TABLES_EXPLAIN' => 'Il database della Mod Gallery è stato cancellato. Procedi con gli step successivi per terminare la disinstallazione della phpBB Gallery.',
+ 'SUPPORT_BODY' => 'Pieno supporto è previsto per la corrente versione stabile di phpBB, gratuitamente. Questo include::
installazione configurazione questioni tecniche problemi relativi a bugs nel software aggiornamenti da versioni Release Candidate (RC) a versione stabile conversione da Smartors Album-MOD per phpBB 2.0.x a phpBB Gallery per phpBB3 conversione da TS Gallery a phpBB Gallery L’uso delle versioni Beta è raccomandato in modo limitato. Gli aggiornamenti sono consigliati.
Il supporto è dato sui seguenti forum:
',
+
+ 'TABLE_ALBUM' => 'la tabella include le immagini',
+ 'TABLE_ALBUM_CAT' => 'la tabella include gli albums',
+ 'TABLE_ALBUM_COMMENT' => 'la tabella include i commenti',
+ 'TABLE_ALBUM_CONFIG' => 'la tabella include la configurazione',
+ 'TABLE_ALBUM_RATE' => 'la tabella include i voti',
+ 'TABLE_EXISTS' => 'esiste',
+ 'TABLE_MISSING' => 'non esiste',
+ 'TABLE_PREFIX_EXPLAIN' => 'Prefisso di phpBB',
+
+ 'UNINSTALL_INTRO' => 'Benvenuto nel processo di disinstallazione',
+ 'UNINSTALL_INTRO_BODY' => 'Con questa opzione è possibile disinstallare la phpBB Gallery dalla tua board.ATTENZIONE: tutti gli albums, immagini e commenti saranno cancellati! ',
+ 'UNINSTALL_REQUIREMENTS' => 'Requisiti',
+ 'UNINSTALL_REQUIREMENTS_EXPLAIN' => 'Prima di procedere con la disinstallazione phpBB effettuerà alcuni test per verificare che tu abbia i permessi per disinstallare phpBB Gallery.',
+ 'UNINSTALL_START' => 'Disinstallazione',
+ 'UNINSTALL_FINISHED' => 'Disinstallazione quasi terminata',
+ 'UNINSTALL_FINISHED_EXPLAIN' => 'Hai disinstallato phpBB Gallery con successo.Ora hai solo bisogno di annullare la procedura dell’install.xml e cancellare i files della galleria. Successivamente il tuo ACP sarà completamente libero dalla galleria. ',
+
+ 'UPDATE_INSTALLATION_EXPLAIN' => 'Puoi aggiornare la tua versione di phpBB Gallery.',
+
+ 'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
+));
diff --git a/core/language/it/permissions_gallery.php b/core/language/it/permissions_gallery.php
new file mode 100644
index 00000000..699b649a
--- /dev/null
+++ b/core/language/it/permissions_gallery.php
@@ -0,0 +1,30 @@
+ 'Puo\' gestire gli aggiustamenti della galleria phpBB',
+ 'ACL_A_GALLERY_ALBUMS' => 'Puo\' aggiungere/modificare albums e permessi',
+));
diff --git a/core/language/nl/info_acp_gallery.php b/core/language/nl/info_acp_gallery.php
index d4018b08..e99bc687 100644
--- a/core/language/nl/info_acp_gallery.php
+++ b/core/language/nl/info_acp_gallery.php
@@ -44,7 +44,6 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
- //'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => 'Nederlandse vertaling door Dutch Translators ',
'IMAGES' => 'Afbeeldingen',
diff --git a/core/language/ru/info_acp_gallery.php b/core/language/ru/info_acp_gallery.php
index c08e4dd7..fe926ce7 100644
--- a/core/language/ru/info_acp_gallery.php
+++ b/core/language/ru/info_acp_gallery.php
@@ -38,7 +38,6 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
- //'GALLERY_TRANSLATION_INFO' => 'English "phpBB Gallery"-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => 'Русский перевод phpBB Gallery — www.phpbbguru.net ',
'IMAGES' => 'Фото',
'IMG_BUTTON_UPLOAD_IMAGE' => 'Загрузка фото',
diff --git a/exif/language/it/exif.php b/exif/language/it/exif.php
new file mode 100644
index 00000000..7b1c0494
--- /dev/null
+++ b/exif/language/it/exif.php
@@ -0,0 +1,95 @@
+ 'Dati Exif',
+ 'EXIF_APERTURE' => 'F-number',
+ 'EXIF_CAM_MODEL' => 'Modello Camera',
+ 'EXIF_DATE' => 'Immagine scattata il',
+ 'EXIF_EXPOSURE' => 'Velocita\' otturatore',
+ 'EXIF_EXPOSURE_EXP' => '%s Sec',// 'EXIF_EXPOSURE' unit
+ 'EXIF_EXPOSURE_BIAS' => 'Inclinazione di esposizione',
+ 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV',// 'EXIF_EXPOSURE_BIAS' unit
+ 'EXIF_EXPOSURE_PROG' => 'Programma di esposizione',
+ 'EXIF_EXPOSURE_PROG_0' => 'Non definito',
+ 'EXIF_EXPOSURE_PROG_1' => 'Manuale',
+ 'EXIF_EXPOSURE_PROG_2' => 'Programma normale',
+ 'EXIF_EXPOSURE_PROG_3' => 'Priorita\' d\'apertura',
+ 'EXIF_EXPOSURE_PROG_4' => 'Priorita\' otturatore',
+ 'EXIF_EXPOSURE_PROG_5' => 'Programma creativo (inclinato verso la profondita\' di campo)',
+ 'EXIF_EXPOSURE_PROG_6' => 'Programma d\'azione (inclinato verso la velocita\' dell\'otturatore)',
+ 'EXIF_EXPOSURE_PROG_7' => 'Modalita\' ritratto (per foto ravvicinate con lo sfondo fuori fuoco)',
+ 'EXIF_EXPOSURE_PROG_8' => 'Modalita\' panorama (per foto del panorama con lo sfondo a fuoco)',
+ 'EXIF_FLASH' => 'Flash',
+ 'EXIF_FLASH_CASE_0' => 'Il Flash non e\' scattato',
+ 'EXIF_FLASH_CASE_1' => 'Flash scattato',
+ 'EXIF_FLASH_CASE_5' => 'luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_7' => 'luce di ritorno rilevata',
+ 'EXIF_FLASH_CASE_8' => 'Acceso, il flash non e\' scattato',
+ 'EXIF_FLASH_CASE_9' => 'Il flash e\' scattato, modalita\' flash obbligatoria',
+ 'EXIF_FLASH_CASE_13' => 'Il flash e\' scattato, modalita\' flash obbligatoria, luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_15' => 'Il flash e\' scattato, modalita\' flash obbligatoria, luce di ritorno rilevata',
+ 'EXIF_FLASH_CASE_16' => 'Il flash non e\' scattato, modalita\' flash obbligatoria',
+ 'EXIF_FLASH_CASE_20' => 'Spento, il flash non e\' scattato, luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_24' => 'Il flash non e\' scattato, modalita\' automatica',
+ 'EXIF_FLASH_CASE_25' => 'Il flash e\' scattato, modalita\' automatica',
+ 'EXIF_FLASH_CASE_29' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_31' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno rilevata',
+ 'EXIF_FLASH_CASE_32' => 'Funzione flash assente',
+ 'EXIF_FLASH_CASE_48' => 'Spento, funzione flash assente',
+ 'EXIF_FLASH_CASE_65' => 'Il flash e\' scattato, modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_69' => 'Il flash e\' scattato,modalita\' riduzione occhi rossi, luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_71' => 'Il flash e\' scattato, modalita\' riduzione occhi rossi, luce di ritorno rilevata',
+ 'EXIF_FLASH_CASE_73' => 'Il flash e\' scattato, modalita\' flash obbligatoria, modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_77' => 'Il flash e\' scattato, modalita\' flash obbligatoria, modalita\' riduzione occhi rossi, luce di ritorno non rilevata',
+ 'EXIF_FLASH_CASE_79' => 'Il flash e\' scattato, modalita\' flash obbligatoria, modalita\' riduzione occhi rossi, luce di ritorno rilevata',
+ 'EXIF_FLASH_CASE_80' => 'Spento, Modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_88' => 'Auto, Non e\' scattato, Modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_89' => 'Il flash e\' scattato, modalita\' automatica, modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_93' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno non rilevata, modalita\' riduzione occhi rossi',
+ 'EXIF_FLASH_CASE_95' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno rilevata, modalita\' riduzione occhi rossi',
+ 'EXIF_FOCAL' => 'Lunghezza di Focus',
+ 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit
+ 'EXIF_ISO' => 'Valore di velocita\' ISO',
+ 'EXIF_METERING_MODE' => 'Modalita\' di metratura',
+ 'EXIF_METERING_MODE_0' => 'Sconosciuta',
+ 'EXIF_METERING_MODE_1' => 'Media',
+ 'EXIF_METERING_MODE_2' => 'Media spostata al centro',
+ 'EXIF_METERING_MODE_3' => 'Spot',
+ 'EXIF_METERING_MODE_4' => 'Multi-Spot',
+ 'EXIF_METERING_MODE_5' => 'Modello',
+ 'EXIF_METERING_MODE_6' => 'Parziale',
+ 'EXIF_METERING_MODE_255' => 'Altra',
+ 'EXIF_NOT_AVAILABLE' => 'non disponibile',
+ 'EXIF_WHITEB' => 'Bilanciamento del bianco',
+ 'EXIF_WHITEB_AUTO' => 'Automatico',
+ 'EXIF_WHITEB_MANU' => 'Manuale',
+
+ 'DISP_EXIF_DATA' => 'Mostra dati Exif',
+ 'DISP_EXIF_DATA_EXP' => 'Questa caratteristica non puo\' essere utilizzatal momento, dato che la funzione “exif_read_data“ non e\' inclusa nella tua installazione di PHP.',
+ 'SHOW_EXIF' => 'mostra/nascondi',
+ 'VIEWEXIFS_DEFAULT' => 'Visualizza Dati-Exif in modo predefinito',
+));
diff --git a/exif/language/it/index.htm b/exif/language/it/index.htm
new file mode 100644
index 00000000..e69de29b
From fa66316c6c1e90d5773554d810df66d3b95c9869 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 27 Jul 2025 17:09:22 +0100
Subject: [PATCH 005/138] Add missing album_desc
---
core/language/es/gallery.php | 1 +
core/language/it/gallery.php | 1 +
2 files changed, 2 insertions(+)
diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php
index 85c4fe64..80f84a14 100644
--- a/core/language/es/gallery.php
+++ b/core/language/es/gallery.php
@@ -26,6 +26,7 @@
$lang = array_merge($lang, array(
'ADD_UPLOAD_FIELD' => 'Añadir más campos de subida',
'ALBUM' => 'Álbum',
+ 'ALBUM_DESC' => 'Descripción del álbum',
'ALBUM_IS_CATEGORY' => 'El álbum en el que hiciste trampa, es un álbum de categoría. No puedes subir a categorías.',
'ALBUM_LOCKED' => 'Bloqueado',
'ALBUM_NAME' => 'Nombre del álbum',
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index c5b613b7..72877f29 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -26,6 +26,7 @@
$lang = array_merge($lang, array(
'ADD_UPLOAD_FIELD' => 'Aggiungi altri campi di caricamento',
'ALBUM' => 'Album',
+ 'ALBUM_DESC' => 'Descrizione dell’album',
'ALBUM_IS_CATEGORY' => 'L’album che hai selezionato è un album-categoria. Non puoi caricare sulle categorie.',
'ALBUM_LOCKED' => 'Bloccato',
'ALBUM_NAME' => 'Nome album',
From 8a67c2a152cdbda7df585223080dd329fd04c044 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 27 Jul 2025 17:19:18 +0100
Subject: [PATCH 006/138] Update README.md
---
README.md | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 72a11ea6..155ec364 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,11 @@
[](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml) [](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master) [](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master)
-© 2012 - [nickvergessen](http://www.flying-bits.org)
+© 2012 - [nickvergessen](https://www.flying-bits.org)
-© 2014 - 2022 - [Lucifer](http://www.anavaro.com)
+© 2014 - 2025 - [Lucifer](https://www.anavaro.com)
+
+© 2019 - 2025 [Leinad4Mind](https://leinad4mind.top/forum)
Welcome to phpBB Gallery version 3.3.x
@@ -31,7 +33,7 @@ MSSQL is not ok. I don't have a MSSQL instance to test different functions. If y
### Exif
-Allows saving and visualization of EXIF (Exchangeable image file format) image information. Basicly a bunch of stuff about the image - F-stop, ISO, appature, speed, usage of flash ... it could hold GPS coordinates ...
+Allows saving and visualization of EXIF (Exchangeable image file format) image information. Basically a bunch of stuff about the image - F-stop, ISO, aperture, speed, usage of flash ... it could hold GPS coordinates ...
### ACP Import
@@ -39,9 +41,9 @@ Allows bulk import of images.
### ACP cleanup
-Bunch of functions related to DB and file system maintenence. Allows you to purge albums, move pictures, clean orphaned images, albums and comments ...
+Bunch of functions related to DB and file system maintenance. Allows you to purge albums, move pictures, clean orphaned images, albums and comments ...
-## Adding a new feture?
+## Adding a new feature?
If you can make me think of it as core function I will add it. Such function is going to be the contests, the plupload support and jQuery based visualization libraries.
@@ -53,7 +55,7 @@ If you want to contribute to this project do it as you will any other project -
## Development roadmap?
-As I said the 1.2 version will be primarly targeted as backword compatible with phpBB Gallery 1.1.6 MOD (DB will be the same but you will have to manualy move your images to the new location).
+As I said the 1.2 version will be primarily targeted as backwards compatible with phpBB Gallery 1.1.6 MOD (DB will be the same but you will have to manually move your images to the new location).
3.2.x is providing phpBB 3.2 compatibility and some code optimization. When initial release is done I will start adding features.
@@ -61,7 +63,7 @@ Version 3.3.x will be compatible to phpBB 3.3 and will have new features.
## Installation
-This ext installs as evry other phpBB extension:
+This ext installs as every other phpBB extension:
- Clone the repo to ext folder OR download the zip file and copy phpbbgallery to your ext folder
- Go to ACP -> Customise -> Manage extensions
@@ -75,7 +77,7 @@ This is task that could not be automated. You will have to do some work. Just fo
Regards,
Stanislav Atanasov
-P.S.: You can get more support here - [Forum](http://lab.anavaro.com/forum/viewforum.php?f=4)
+P.S.: You can get more support here - [Forum](https://www.phpbb.com/customise/db/extension/phpbb_gallery/support)
P.P.S: If you like this extension - you could alway donate:
From 724bbcbfb4337eaca07385862a3193bc3ad1a4d2 Mon Sep 17 00:00:00 2001
From: Leinad Mind
Date: Sun, 27 Jul 2025 22:41:52 +0100
Subject: [PATCH 007/138] Merge pull request #10 from
Galex3/fix-who-is-online-empty
Fix who is online empty - Thks Galex3
---
core/config/services.yml | 2 ++
core/controller/image.php | 41 ++++++++++++++++++------------------
core/notification/helper.php | 8 +++++--
core/user.php | 2 +-
4 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/core/config/services.yml b/core/config/services.yml
index 2b4534d4..e70e4370 100644
--- a/core/config/services.yml
+++ b/core/config/services.yml
@@ -249,6 +249,8 @@ services:
- '%core.root_path%'
- '%core.php_ext%'
- '%tables.phpbbgallery.watch%'
+ calls:
+ - [set_image, ['@phpbbgallery.core.image']]
phpbbgallery.core.log:
class: phpbbgallery\core\log
arguments:
diff --git a/core/controller/image.php b/core/controller/image.php
index bbcebc1f..af130a90 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -449,8 +449,6 @@ public function base($image_id, $page = 0)
$this->users_id_array[$this->data['image_user_id']] = $this->data['image_user_id'];
- $this->load_users_data();
-
$user_id = $this->data['image_user_id'];
$this->users_data_array[$user_id]['username'] = ($this->data['image_username']) ? $this->data['image_username'] : $this->language->lang('GUEST');
$user_data = $this->users_data_array[$user_id] ?? [];
@@ -599,6 +597,26 @@ public function base($image_id, $page = 0)
{
$this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page'));
}
+
+ // Load online-information
+ if ($this->config['load_onlinetrack'] && count($this->users_id_array))
+ {
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
+ GROUP BY session_user_id';
+ $result = $this->db->sql_query($sql);
+
+ $update_time = $this->config['load_online_time'] * 60;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ $this->load_users_data();
+
return $this->helper->render('gallery/viewimage_body.html', $page_title);
}
@@ -638,25 +656,6 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
}
$this->db->sql_freeresult($result);
- $this->load_users_data();
-
- if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
- {
- // Load online-information
- $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
- FROM ' . SESSIONS_TABLE . '
- WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
- GROUP BY session_user_id';
- $result = $this->db->sql_query($sql);
-
- $update_time = $this->config['load_online_time'] * 60;
- while ($row = $this->db->sql_fetchrow($result))
- {
- $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
- }
- $this->db->sql_freeresult($result);
- }
-
foreach ($comments as $row)
{
$edit_info = '';
diff --git a/core/notification/helper.php b/core/notification/helper.php
index 8c280dab..d0921837 100644
--- a/core/notification/helper.php
+++ b/core/notification/helper.php
@@ -28,7 +28,7 @@ class helper
protected $image;
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user,
\phpbbgallery\core\auth\auth $gallery_auth, \phpbbgallery\core\album\loader $album_load, \phpbb\controller\helper $helper, \phpbbgallery\core\url $url,
- Container $phpbb_container, $root_path, $php_ext, $watch_table, \phpbbgallery\core\image\image $image)
+ Container $phpbb_container, $root_path, $php_ext, $watch_table)
{
$this->config = $config;
$this->db = $db;
@@ -43,7 +43,6 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive
$this->root_path = $root_path;
$this->php_ext = $php_ext;
$this->watch_table = $watch_table;
- $this->image = $image;
}
/**
@@ -299,4 +298,9 @@ public function new_image($data)
$data['targets'] = $targets;
$this->notify('new_image', $data);
}
+
+ public function set_image(\phpbbgallery\core\image\image $image)
+ {
+ $this->image = $image;
+ }
}
diff --git a/core/user.php b/core/user.php
index 961a45a8..7f25087b 100644
--- a/core/user.php
+++ b/core/user.php
@@ -612,7 +612,7 @@ public function add_user_to_cache(&$user_cache, $row)
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'contact_user' => $this->user->lang('CONTACT_USER', get_username_string('username', $user_id, $row['username'], $row['user_colour'], $row['username'])),
- 'online' => false,
+ 'online' => $user_cache[$user_id]['online'],
'jabber' => ($this->config['jab_enable'] && $row['user_jabber'] && $this->auth->acl_get('u_sendim')) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=contact&action=jabber&u=$user_id") : '',
'search' => ($this->config['load_search'] && $this->auth->acl_get('u_search')) ? append_sid("{$this->root_path}search.$this->php_ext", "author_id=$user_id&sr=posts") : '',
'author_full' => get_username_string('full', $user_id, $row['username'], $row['user_colour']),
From 4b88138b028276e1b68d17d3f56c13b6fe039817 Mon Sep 17 00:00:00 2001
From: Gustavo Silva
Date: Sun, 27 Jul 2025 23:53:38 +0100
Subject: [PATCH 008/138] Revert some changes and fix who is online not
displaying
---
core/controller/image.php | 40 ++++++++++++++++++++-------------------
core/controller/index.php | 6 +++---
core/user.php | 2 +-
3 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index af130a90..e1ee1fbb 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -449,6 +449,8 @@ public function base($image_id, $page = 0)
$this->users_id_array[$this->data['image_user_id']] = $this->data['image_user_id'];
+ $this->load_users_data();
+
$user_id = $this->data['image_user_id'];
$this->users_data_array[$user_id]['username'] = ($this->data['image_username']) ? $this->data['image_username'] : $this->language->lang('GUEST');
$user_data = $this->users_data_array[$user_id] ?? [];
@@ -598,25 +600,6 @@ public function base($image_id, $page = 0)
$this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page'));
}
- // Load online-information
- if ($this->config['load_onlinetrack'] && count($this->users_id_array))
- {
- $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
- FROM ' . SESSIONS_TABLE . '
- WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
- GROUP BY session_user_id';
- $result = $this->db->sql_query($sql);
-
- $update_time = $this->config['load_online_time'] * 60;
- while ($row = $this->db->sql_fetchrow($result))
- {
- $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
- }
- $this->db->sql_freeresult($result);
- }
-
- $this->load_users_data();
-
return $this->helper->render('gallery/viewimage_body.html', $page_title);
}
@@ -656,6 +639,25 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
}
$this->db->sql_freeresult($result);
+ $this->load_users_data();
+
+ // Load online-information
+ if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
+ {
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
+ GROUP BY session_user_id';
+ $result = $this->db->sql_query($sql);
+
+ $update_time = $this->config['load_online_time'] * 60;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
foreach ($comments as $row)
{
$edit_info = '';
diff --git a/core/controller/index.php b/core/controller/index.php
index b7cc7871..2c520948 100644
--- a/core/controller/index.php
+++ b/core/controller/index.php
@@ -219,7 +219,7 @@ public function base()
}
}
$this->display_legend();
- $this->display_brithdays();
+ $this->display_birthdays();
$this->assign_dropdown_links('phpbbgallery_core_index');
$this->template->assign_block_vars('navlinks', array(
@@ -227,7 +227,7 @@ public function base()
'U_VIEW_FORUM' => $this->helper->route('phpbbgallery_core_index'),
));
- return $this->helper->render('gallery/index_body.html', $this->language->lang('GALLERY'));
+ return $this->helper->render('gallery/index_body.html', $this->language->lang('GALLERY'), 200, $this->gallery_config->get('disp_whoisonline'));
}
/**
@@ -386,7 +386,7 @@ protected function display_legend()
));
}
- protected function display_brithdays()
+ protected function display_birthdays()
{
// Generate birthday list if required ...
if ($this->config['load_birthdays'] && $this->config['allow_birthdays'] && $this->config['phpbb_gallery_disp_birthdays'] && $this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
diff --git a/core/user.php b/core/user.php
index 7f25087b..961a45a8 100644
--- a/core/user.php
+++ b/core/user.php
@@ -612,7 +612,7 @@ public function add_user_to_cache(&$user_cache, $row)
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'contact_user' => $this->user->lang('CONTACT_USER', get_username_string('username', $user_id, $row['username'], $row['user_colour'], $row['username'])),
- 'online' => $user_cache[$user_id]['online'],
+ 'online' => false,
'jabber' => ($this->config['jab_enable'] && $row['user_jabber'] && $this->auth->acl_get('u_sendim')) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=contact&action=jabber&u=$user_id") : '',
'search' => ($this->config['load_search'] && $this->auth->acl_get('u_search')) ? append_sid("{$this->root_path}search.$this->php_ext", "author_id=$user_id&sr=posts") : '',
'author_full' => get_username_string('full', $user_id, $row['username'], $row['user_colour']),
From d4834725e995204057d6198b0eec6ead911fd614 Mon Sep 17 00:00:00 2001
From: Gustavo Silva
Date: Sun, 27 Jul 2025 23:56:01 +0100
Subject: [PATCH 009/138] Revert some changes
---
core/controller/image.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index e1ee1fbb..bbcebc1f 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -599,7 +599,6 @@ public function base($image_id, $page = 0)
{
$this->display_comments($image_id, $this->data, $album_id, $album_data, ($page - 1) * $this->gallery_config->get('items_per_page'), $this->gallery_config->get('items_per_page'));
}
-
return $this->helper->render('gallery/viewimage_body.html', $page_title);
}
@@ -641,9 +640,9 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
$this->load_users_data();
- // Load online-information
if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
{
+ // Load online-information
$sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
FROM ' . SESSIONS_TABLE . '
WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
From bc52781fbc06c73110c8d4eee2c5353ecab5223c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 12:19:10 +0100
Subject: [PATCH 010/138] Add features and clean readme
---
README.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 75 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index 155ec364..478862c5 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml) [](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master) [](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master)
-© 2012 - [nickvergessen](https://www.flying-bits.org)
+© 2008 - 2012 - [nickvergessen](https://web.archive.org/web/20131104154014/http://www.flying-bits.org/index.php)
© 2014 - 2025 - [Lucifer](https://www.anavaro.com)
@@ -14,14 +14,14 @@ This is direct port of [nickvergessen](https://github.com/nickvergessen)'s phpBB
This project will include only base core code and functioning add-ons which will expand this code.
-##Donate
-If you like my code - buy me a beer/coffee/license for PhpStorm :D
+## Donate
+If you like this extension or just like my code - buy me a beer/coffee/license for PhpStorm :D
+
+[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3JQ8HDK6Y7A2N)
- BTC: 12afvCTp1dRrQdHaavzthZ1dNWMoi8eyc8
- ETH: 0x363abc8edf41ac89906b20e90cf7fdc71fe78cd5
-[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XQ6USSXCSUM5W)
-
## Known Issues
MSSQL is not ok. I don't have a MSSQL instance to test different functions. If you want to use with MSSQL - we can debug and do stuff.
@@ -33,7 +33,7 @@ MSSQL is not ok. I don't have a MSSQL instance to test different functions. If y
### Exif
-Allows saving and visualization of EXIF (Exchangeable image file format) image information. Basically a bunch of stuff about the image - F-stop, ISO, aperture, speed, usage of flash ... it could hold GPS coordinates ...
+Allows saving and visualization of EXIF (Exchangeable image file format) image information. Basically a bunch of stuff about the image - F-stop, ISO, aperture, speed, usage of flash... it could hold GPS coordinates...
### ACP Import
@@ -41,7 +41,75 @@ Allows bulk import of images.
### ACP cleanup
-Bunch of functions related to DB and file system maintenance. Allows you to purge albums, move pictures, clean orphaned images, albums and comments ...
+Bunch of functions related to DB and file system maintenance. Allows you to purge albums, move pictures, clean orphaned images, albums and comments...
+
+
+## Current features (grabbed from 1.1.6 - To be reviewed)
+
+### Configurations/Misc:
+ - Filetypes: gif, jpg, jpeg, png & webp (new)
+ - Imagesize: filesize, image-height, image-width
+ - Resize images on upload
+ - Global control about comment & rating system (dis-/enable)
+ - Thumbnails: GD-version, quality and size
+ - Images available in 3 sizes (thumbnail, medium, full)
+ - Several options to thumbnail-displaying album.php: number of rows & columns, options to display (username, rating, comments, upload-time...)
+ - RRC (recent-random-comment): display the recent images, random images and/or recent comments on the gallery/index.php with full ACP-Control
+ - Sub-folder name adjustable (default: gallery/)
+ - Search function (also available in the album) (page for Recent/Random/Top-Rated/Last comments/Own images)
+ - Available in more languages: Bulgarian, Dutch, French, German and Russian
+ - Available Addons: ACP Cleanup, ACP Import and EXIF
+
+### Integration in phpBB:
+ - Link to personal gallery on viewtopic (ACP-Option)
+ - Number of user-images on viewtopic (ACP-Option)
+ - Number of images on index (ACP-Option)
+ - Recent/Random images in user-profile (with full ACP-Control)
+ - BBcode to use gallery images in postings
+ - Available for prosilver styles
+
+### Album / Permission-management:
+ - Unlimited sub... subalbums depth
+ - Copy permissions on create/edit album
+ - Album-types: Category, album, contest (see later for more information)
+ - "Album locked"-Option
+ - Inherit function on setting permissions
+ - Group- & User-based permissions
+ - Image-permissions: view, view without watermark, upload, upload with approval, edit, delete, report, rate
+ - Comment-permissions: view, post, edit, delete
+ - Moderate-permissions: moderate comments, image: delete, edit, move, handle reports, approve/lock
+ - Misc-permissions: View album, Number of allowed images (also unlimited), albums (for personal galleries)
+ - Personal galleries (upload by owner only), with subalbums and management through UCP
+
+### Images / Comments:
+ - Hotlink prevention: also with whitelist
+ - Display exif-data
+ - Watermark: with min-width and min-height, to avoid little images from being fully covered
+ - Report function
+ - Upload more images at once (Number settable in the ACP)
+ - Full user-profile on comments
+ - BBCodes, Custom-BBCodes and Smilies on comments & image-description
+ - Notification (via notification only) on new images/comments/reports/approvals
+ - Option to favorite images
+ - Next/Previous link (with imagename and thumbnail)
+ - Unread-markup of albums with new images
+
+### ACP:
+ - Statistical overview
+ - Resync-Options for several dynamic values
+ - Reset rating for album
+ - Mass-Import (With Addon)
+ - CleanUp (With Addon): Ability to delete images/comments of deleted users (or set to anonymous/guest), and personal albums
+
+### Contests:
+ - First timeperiod: Upload only, ratings and comments are not allowed, upload-username is hidden
+ - Second timeperiod: No more upload, ratings are allowed, comments are not allowed, upload-username is hidden
+ - End of contest: No more upload and ratings, comments are allowed, upload-username is displayed
+
+### TODO
+
+Make plugins work again [Highslide JS](https://highslide.com/download.php), [Shadowbox](https://www.shadowbox-js.com/download.html) and [Lytebox](https://web.archive.org/web/20130430051404/http://lytebox.com) support (These scripts must be downloaded separately because of the license) or maybe remove and add new ones.
+Points Ext. Compatibility (Addon)
## Adding a new feature?
@@ -78,9 +146,3 @@ Regards,
Stanislav Atanasov
P.S.: You can get more support here - [Forum](https://www.phpbb.com/customise/db/extension/phpbb_gallery/support)
-
-P.P.S: If you like this extension - you could alway donate:
-
-[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3JQ8HDK6Y7A2N)
-
- 12afvCTp1dRrQdHaavzthZ1dNWMoi8eyc8
From 083a41d8e72b9a85500f2bd1e5cef9e5627b4ebc Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:05:44 +0100
Subject: [PATCH 011/138] Fix eslint
---
acpimport/acp/main_module.php | 3 ++-
core/controller/file.php | 3 ++-
core/controller/index.php | 3 ++-
core/cron/cron_cleaner.php | 2 +-
core/language/es/gallery_mcp.php | 2 +-
core/language/es/install_gallery.php | 2 +-
core/language/it/gallery.php | 4 +--
core/language/it/gallery_acp.php | 30 +++++++++++-----------
core/language/it/gallery_notifications.php | 2 +-
core/language/it/gallery_ucp.php | 4 +--
core/language/it/info_acp_gallery.php | 2 +-
core/notification/helper.php | 2 +-
12 files changed, 31 insertions(+), 28 deletions(-)
diff --git a/acpimport/acp/main_module.php b/acpimport/acp/main_module.php
index 08a56b47..4076fec3 100644
--- a/acpimport/acp/main_module.php
+++ b/acpimport/acp/main_module.php
@@ -215,7 +215,8 @@ function import()
// Put the images into the database
$db->sql_query('INSERT INTO ' . $table_prefix . 'gallery_images ' . $db->sql_build_array('INSERT', $sql_ary));
// If the source image is imported, we delete it.
- if (file_exists($image_src_full)) {
+ if (file_exists($image_src_full))
+ {
@unlink($image_src_full);
}
}
diff --git a/core/controller/file.php b/core/controller/file.php
index 5bb1c52c..8783f038 100644
--- a/core/controller/file.php
+++ b/core/controller/file.php
@@ -385,7 +385,8 @@ public function display()
}
}
- if(!$this->tool->image_type) {
+ if (!$this->tool->image_type)
+ {
$this->tool->image_type = $this->tool->extension_by_filename($this->tool->image_source);
if (!$this->tool->image_type)
{
diff --git a/core/controller/index.php b/core/controller/index.php
index 00ad1df9..cf3c3466 100644
--- a/core/controller/index.php
+++ b/core/controller/index.php
@@ -154,7 +154,8 @@ public function base()
$alphabet = range('a', 'z');
$alpha_links = [];
- foreach ($alphabet as $char) {
+ foreach ($alphabet as $char)
+ {
$alpha_links[] = '' . strtoupper($char) . ' ';
}
$alpha_links[] = '# ';
diff --git a/core/cron/cron_cleaner.php b/core/cron/cron_cleaner.php
index 9009508b..a29a8656 100644
--- a/core/cron/cron_cleaner.php
+++ b/core/cron/cron_cleaner.php
@@ -58,4 +58,4 @@ public function is_runnable()
{
return true;
}
-}
\ No newline at end of file
+}
diff --git a/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php
index 04cbaee3..7f15a0ce 100644
--- a/core/language/es/gallery_mcp.php
+++ b/core/language/es/gallery_mcp.php
@@ -61,7 +61,7 @@
'QUEUE_A_UNAPPROVE' => 'No aprobar imagen',
'QUEUE_A_UNAPPROVE2' => '¿Aprobar la imagen?',
'QUEUE_A_UNAPPROVE2_CONFIRM' => '¿Está seguro de que desea suprimir esta imagen?',
-
+
'QUEUE_STATUS_0' => 'La imagen está a la espera de aprobación.',
'QUEUE_STATUS_1' => 'La imagen está aprobada.',
'QUEUE_STATUS_2' => 'La imagen está bloqueada.',
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index 706b1333..56ee328c 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -79,7 +79,7 @@
'MODULES_SELECT_NONE' => 'sin módulo padre',
'NO_INSTALL_FOUND' => 'No se encontró ninguna instalación!',
-
+
'OPTIONAL_EXIFDATA' => 'Función "exif_read_data" existe',
'OPTIONAL_EXIFDATA_EXP' => 'El módulo exif no está cargado o instalado.',
'OPTIONAL_EXIFDATA_EXPLAIN' => 'Si la función existe, los datos exif de las imágenes se muestran en la página de imagen.',
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index 72877f29..e8cf72e2 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -365,8 +365,8 @@
'QUICK_MOD' => 'Seleziona azione di moderazione',
'WRONG_FILESIZE' => 'L’immagine è più grande del limite!',
- 'UNREAD_IMAGES' => 'Immagini non viste',
- 'NO_UNREAD_IMAGES' => 'Nessuna immagine non vista',
+ 'UNREAD_IMAGES' => 'Immagini non viste',
+ 'NO_UNREAD_IMAGES' => 'Nessuna immagine non vista',
// Versions 1.2.1 addiotions
'GALLERY_DROP' => 'Lascia qui le tue immagini',
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
index 21ad7afb..816297f9 100644
--- a/core/language/it/gallery_acp.php
+++ b/core/language/it/gallery_acp.php
@@ -26,13 +26,13 @@
$lang = array_merge($lang, array(
'ACP_GALLERY_OVERVIEW' => 'phpBB Gallery',
'ACP_GALLERY_OVERVIEW_EXPLAIN' => 'Qui trovi alcune statistiche sulla tua galleria.',
-
- // File dirs states
- 'ACP_FILES_DIR_STATE' => './files/ state',
- 'ACP_CORE_DIR_STATE' => './files/phpbbgallery/core/ state',
- 'ACP_SOURCE_DIR_STATE' => './files/phpbbgallery/core/source/ state',
- 'ACP_MEDIUM_DIR_STATE' => './files/phpbbgallery/core/meduim/ state',
- 'ACP_MINI_DIR_STATE' => './files/phpbbgallery/core/mini/ state',
+
+ // File dirs states
+ 'ACP_FILES_DIR_STATE' => './files/ state',
+ 'ACP_CORE_DIR_STATE' => './files/phpbbgallery/core/ state',
+ 'ACP_SOURCE_DIR_STATE' => './files/phpbbgallery/core/source/ state',
+ 'ACP_MEDIUM_DIR_STATE' => './files/phpbbgallery/core/medium/ state',
+ 'ACP_MINI_DIR_STATE' => './files/phpbbgallery/core/mini/ state',
'ADD_ALBUM_ON_TOP' => 'Aggiungi album in cima',
'ADD_PERMISSIONS' => 'Aggiungi Permessi',
@@ -142,7 +142,7 @@
'DISP_WHOISONLINE' => 'Mostra chi c’è “on line“',
'DISPLAY_IN_RRC' => 'Visualizza immagini di questo album in immagini "Recenti-Casuali"',
'DONT_COPY_PERMISSIONS' => 'Non copiare permessi',
-
+
'EDIT_ALBUM' => 'Modifica album',
'FAKE_THUMB_SIZE' => 'Dimensione anteprima',
'FAKE_THUMB_SIZE_EXP' => 'Se vuoi ridimensionare all’immagine originale, ricorda 16 pixels per la black-info-line',
@@ -187,7 +187,7 @@
'LIST_INDEX_EXPLAIN' => 'Visualizza questo album sull’indice e altrove come un collegamento all’interno dell’album padre se l’opzione “lista sotto-albums nella legenda” è attivata.',
'LIST_SUBALBUMS' => 'Lista sotto-album nella legenda',
'LIST_SUBALBUMS_EXPLAIN' => 'Visualizza questo album sull’indice e altrove come un collegamento all’interno dell’album padre se l’opzione “lista sotto-albums nella legenda” è attivata.',
- 'LOCKED' => 'Bloccato',
+ 'LOCKED' => 'Bloccato',
'LOOK_UP_ALBUM' => 'Seleziona un album',
'LOOK_UP_ALBUMS_EXPLAIN' => 'Sei in grado di selezionare più di un album.',
@@ -210,7 +210,7 @@
'NEW_ALBUM_CREATED' => 'Nuovo album creato con successo',
'NO_ALBUM_SELECTED' => 'È necessario selezionare almeno un album.',
- 'NO_DESTINATION_ALBUM' => 'Non è stato specificato un album di destinazione per lo spostamento del contenuto.',
+ 'NO_DESTINATION_ALBUM' => 'Non è stato specificato un album di destinazione per lo spostamento del contenuto.',
'NO_PERMISSIONS_SELECTED' => 'È necessario selezionare almeno un album o una speciale autorizzazione.',
'NO_VICTIM_SELECTED' => 'È necessario selezionare almeno un utente o gruppo.',
'NO_INHERIT' => 'Non copiare permessi',
@@ -225,7 +225,7 @@
'PERSONAL_ALBUMS_EXPLAIN' => 'Queste autorizzazioni vengono utilizzate, quando un utente A visita un album personale di un utente B. Se i moderatori non possono moderare le immagini personali, hai bisogno di impostare questi permessi. ',
'PERMISSION' => 'Permessi',
- 'PERMISSION_NEVER' => 'Mai',
+ 'PERMISSION_NEVER' => 'Mai',
'PERMISSION_NO' => 'No',
'PERMISSION_SETTING' => 'Configurazione',
'PERMISSION_YES' => 'Si',
@@ -245,7 +245,7 @@
'PERMISSION_I_EDIT' => 'Può modificare le sue immagini',
'PERMISSION_I_LOCK' => 'Può bloccare immagini',
'PERMISSION_I_RATE' => 'Può votare immagini',
- 'PERMISSION_I_RATE_EXPLAIN' => 'Gli ospiti e le immagini caricate non possono mai votare le immagini.',
+ 'PERMISSION_I_RATE_EXPLAIN' => 'Gli ospiti e le immagini caricate non possono mai votare le immagini.',
'PERMISSION_I_REPORT' => 'Può segnalare immagini',
'PERMISSION_I_UNLIMITED' => 'Può caricare immagini illimitate',
'PERMISSION_I_UPLOAD' => 'Può caricare immagini',
@@ -264,7 +264,7 @@
'PERMISSION_EMPTY' => 'Non hai configurato tutti i permessi.',
'PERMISSIONS' => 'Permessi',
'PERMISSIONS_COPY' => 'Copia permessi album',
- 'PERMISSIONS_COPY_EXPLAIN' => 'Qui è possibile copiare i permessi da un album ad un altro.',
+ 'PERMISSIONS_COPY_EXPLAIN' => 'Qui è possibile copiare i permessi da un album ad un altro.',
'PERMISSIONS_EXPLAIN' => 'Qui è possibile modificare gli album a cui utenti e gruppi possono accedere.',
'PERMISSIONS_STORED' => 'Permessi salvati con successo.',
'PERSONAL_ALBUM_INDEX' => 'Vedi albums personali nell’indice',
@@ -372,7 +372,7 @@
'UC_LINK_NEXT' => 'Prossima Immagine',
'UC_LINK_NEWTAB' => 'Aperto in una nuova scheda',
'UC_LINK_NONE' => 'Nessun Link',
- 'UC_LINK_SHADOWBOX' => 'Apri Shadowbox-Plugin',
+ 'UC_LINK_SHADOWBOX' => 'Apri Shadowbox-Plugin',
'UC_THUMBNAIL' => 'Anteprima',
'UC_THUMBNAIL_EXP' => 'Usato anche per il BBCode.',
'UNLOCKED' => 'Sbloccato',
@@ -397,7 +397,7 @@
'WATERMARK_SOURCE_EXP' => 'Relativo al percorso root del tuo phpBB',
'WATERMARK_WIDTH' => 'Larghezza minima per watermark',
'WATERMARK_WIDTH_EXP' => 'Per evitare che immagini piccole siano contenute in Watermark, è possibile immettere una minimo-larghezza/altezza.',
-
+
'ZIP_ALLOWED' => 'E’ ammesso l’invio di archivi ZIP',
'NO_WRITE_ACCESS' => 'Nessun accesso di scrittura',
'WRITE_ACCESS' => 'OK',
diff --git a/core/language/it/gallery_notifications.php b/core/language/it/gallery_notifications.php
index 536844c3..534f25f1 100644
--- a/core/language/it/gallery_notifications.php
+++ b/core/language/it/gallery_notifications.php
@@ -39,6 +39,6 @@
'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_COMMENT' => 'Nuovi commenti',
'NOTIFICATION_PHPBBGALLERY_NEW_COMMENT' => '%1$s ha commentato su un’immagine che stai controllando',
- 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_REPORT' => 'Nuova segnalazione immagine',
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_REPORT' => 'Nuova segnalazione immagine',
'NOTIFICATION_PHPBBGALLERY_NEW_REPORT' => '%1$s ha segnalato un’immagine',
));
diff --git a/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
index cf6f5457..61ffa985 100644
--- a/core/language/it/gallery_ucp.php
+++ b/core/language/it/gallery_ucp.php
@@ -52,12 +52,12 @@
'EDITED_SUBALBUM' => 'Album modificato con successo',
'GOTO' => 'Torna a',
-
+
'MANAGE_SUBALBUMS' => 'Gestione sotto-albums personali',
'MISSING_ALBUM_NAME' => 'Scrivi un nome per l’album',
'NEED_INITIALISE' => 'Non hai un tuo album personale.',
- 'NO_ALBUM_STEALING' => 'Non sei autorizzato a gestire gli albums di altri utenti.',
+ 'NO_ALBUM_STEALING' => 'Non sei autorizzato a gestire gli albums di altri utenti.',
'NO_MORE_SUBALBUMS_ALLOWED' => 'Hai raggiunto il massimo di sotto-albums per il tuo album personale',
'NO_PARENT_ALBUM' => '«-- nessun album padre',
'NO_PERSALBUM_ALLOWED' => 'Non hai i permessi per creare il tuo album personale',
diff --git a/core/language/it/info_acp_gallery.php b/core/language/it/info_acp_gallery.php
index ad2fedd9..2b35b752 100644
--- a/core/language/it/info_acp_gallery.php
+++ b/core/language/it/info_acp_gallery.php
@@ -40,7 +40,7 @@
'GALLERY_POPUP_HELPLINE' => 'Apri un popup in cui selezionare le tue immagini recenti e caricarne di nuove.',
// Please do not change the copyright.
- 'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
+ 'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
'GALLERY_TRANSLATION_INFO' => 'Traduzione in italiano della Galleria phpBB di Fabio "Lord Phobos" Bolzoni',
diff --git a/core/notification/helper.php b/core/notification/helper.php
index d0921837..077ec79f 100644
--- a/core/notification/helper.php
+++ b/core/notification/helper.php
@@ -298,7 +298,7 @@ public function new_image($data)
$data['targets'] = $targets;
$this->notify('new_image', $data);
}
-
+
public function set_image(\phpbbgallery\core\image\image $image)
{
$this->image = $image;
From 8a019d172abdce090a653193b62cc7ff2c239a5c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:19:38 +0100
Subject: [PATCH 012/138] Sanitise first_char
---
core/album/display.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/album/display.php b/core/album/display.php
index 6bb4be2e..99067ab4 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -356,7 +356,11 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
$root_data = array('album_id' => 0);
$sql_where = 'a.album_user_id > ' . \phpbbgallery\core\block::PUBLIC_ALBUM;
$num_pegas = $this->config['phpbb_gallery_num_pegas'];
- $first_char = $this->request->variable('first_char', '');
+ $first_char = strtolower($this->request->variable('first_char', ''));
+ if (!preg_match('/^[a-z]$/', $first_char) && $first_char !== 'other') {
+ $first_char = '';
+ }
+
if ($first_char == 'other')
{
// Loop the ASCII: a-z
From 636716ef28c61144738484445c763f5705e81297 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:20:26 +0100
Subject: [PATCH 013/138] Fix deprecated SPDX license identifier
---
acpcleanup/composer.json | 2 +-
acpimport/composer.json | 2 +-
core/composer.json | 2 +-
exif/composer.json | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/acpcleanup/composer.json b/acpcleanup/composer.json
index bb9973ea..1681fd05 100644
--- a/acpcleanup/composer.json
+++ b/acpcleanup/composer.json
@@ -5,7 +5,7 @@
"homepage": "https://github.com/satanasov/phpbbgallery",
"version": "1.2.2",
"time": "2025-07-27",
- "license": "GPL-2.0",
+ "license": "GPL-2.0-only",
"authors": [
{
"name": "Joas Schilling",
diff --git a/acpimport/composer.json b/acpimport/composer.json
index e6364519..e4a452a2 100644
--- a/acpimport/composer.json
+++ b/acpimport/composer.json
@@ -5,7 +5,7 @@
"homepage": "https://github.com/satanasov/phpbbgallery",
"version": "1.2.2",
"time": "2025-07-27",
- "license": "GPL-2.0",
+ "license": "GPL-2.0-only",
"authors": [
{
"name": "Joas Schilling",
diff --git a/core/composer.json b/core/composer.json
index 1b1dfd15..df4c1d91 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -5,7 +5,7 @@
"homepage": "https://github.com/satanasov/phpbbgallery",
"version": "3.4.0",
"time": "2025-07-27",
- "license": "GPL-2.0",
+ "license": "GPL-2.0-only",
"authors": [
{
"name": "Joas Schilling",
diff --git a/exif/composer.json b/exif/composer.json
index 72d17539..5a0884c4 100644
--- a/exif/composer.json
+++ b/exif/composer.json
@@ -5,7 +5,7 @@
"homepage": "https://github.com/satanasov/phpbbgallery",
"version": "1.2.2",
"time": "2025-07-27",
- "license": "GPL-2.0",
+ "license": "GPL-2.0-only",
"authors": [
{
"name": "Joas Schilling",
From 5066ea4ca633a973b7c446098a7296830b01a147 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:29:43 +0100
Subject: [PATCH 014/138] Add missing revert schema
---
core/migrations/release_3_2_1_1.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/core/migrations/release_3_2_1_1.php b/core/migrations/release_3_2_1_1.php
index e65a38aa..5d4850e8 100644
--- a/core/migrations/release_3_2_1_1.php
+++ b/core/migrations/release_3_2_1_1.php
@@ -29,4 +29,15 @@ public function update_schema()
);
}
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'gallery_users' => array(
+ 'rrc_zebra',
+ ),
+ ),
+ );
+ }
+
}
From 381f2b8a9a038db714bdeaa82ee467f63e7f92eb Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:30:03 +0100
Subject: [PATCH 015/138] remove unnecessary htmlspecialchars
---
core/file/file.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/file/file.php b/core/file/file.php
index aa71450b..33763775 100644
--- a/core/file/file.php
+++ b/core/file/file.php
@@ -251,8 +251,7 @@ public function write_image($destination, $quality = -1, $destroy_image = false)
*/
public function header_filename($file)
{
- $raw = $this->request->server('HTTP_USER_AGENT');
- $user_agent = htmlspecialchars($raw);
+ $user_agent = $this->request->server('HTTP_USER_AGENT');
// There be dragons here.
// Not many follows the RFC...
From 3365ab3c58c14ba1a11a8d2d2ca004bdc9f33b79 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:30:23 +0100
Subject: [PATCH 016/138] Remove stripslashes, doing more harm then good
---
core/log.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/log.php b/core/log.php
index 9c43be3c..64d06158 100644
--- a/core/log.php
+++ b/core/log.php
@@ -241,7 +241,7 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
'ip' => $row['log_ip'],
'album' => $row['album'],
'image' => $row['image'],
- 'description' => json_decode(stripslashes($row['description']))
+ 'description' => json_decode($row['description'], true)
);
$users_array[$row['log_user']] = array('');
}
From 1327f42ce7e5eda3218c0d2b92c0bc8d6ab57285 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 15:45:04 +0100
Subject: [PATCH 017/138] Refactor recent_count method, preventing possible sql
injection warning
---
core/search.php | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/core/search.php b/core/search.php
index 2c5ba370..81dd0d7f 100644
--- a/core/search.php
+++ b/core/search.php
@@ -247,13 +247,11 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
* return (int) $images_count
*/
public function recent_count()
- {
+{
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $sql = 'SELECT COUNT(image_id) as count
- FROM ' . $this->images_table . '
- WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN;
- $exclude_albums = array();
+ $exclude_albums = [];
+
if (!$this->gallery_config->get('rrc_gindex_pegas'))
{
$sql_no_user = 'SELECT album_id FROM ' . $this->albums_table . ' WHERE album_user_id > 0';
@@ -264,14 +262,34 @@ public function recent_count()
}
$this->db->sql_freeresult($result);
}
+
$exclude_albums = array_merge($exclude_albums, $this->gallery_auth->get_exclude_zebra());
- $sql .= ' AND ((' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums), false, true) . ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
- OR ' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('m_status'), $exclude_albums), false, true) . ')';
- $result = $this->db->sql_query($sql);
+
+ // Get allowed album ids for view and mod permissions excluding excluded albums
+ $view_album_ids = array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums);
+ $mod_album_ids = array_diff($this->gallery_auth->acl_album_ids('m_status'), $exclude_albums);
+
+ // Start SQL with placeholder for image_status <> STATUS_ORPHAN
+ $sql = 'SELECT COUNT(image_id) AS count
+ FROM ' . $this->images_table . '
+ WHERE image_status <> ?';
+
+ $params = [\phpbbgallery\core\block::STATUS_ORPHAN];
+
+ // Add the complex WHERE condition with placeholders for STATUS_UNAPPROVED
+ $sql .= ' AND ((' . $this->db->sql_in_set('image_album_id', $view_album_ids, false, true) . ' AND image_status <> ?) OR ' . $this->db->sql_in_set('image_album_id', $mod_album_ids, false, true) . ')';
+
+ $params[] = \phpbbgallery\core\block::STATUS_UNAPPROVED;
+
+ // Execute query with parameters bound safely
+ $result = $this->db->sql_query($sql, $params);
$row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
return (int) $row['count'];
}
+
/**
* recent comments
* @param (int) $limit How many imagese to query
From 6c63ad6e2faec3802111747740f740e9bb776abe Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:04:30 +0100
Subject: [PATCH 018/138] Fix more eslint
---
core/album/display.php | 3 ++-
core/controller/image.php | 2 +-
core/language/bg/gallery.php | 1 +
core/language/bg/gallery_acp.php | 4 ----
core/language/bg/gallery_ucp.php | 1 +
core/language/de/gallery_acp.php | 22 ----------------------
core/language/en/gallery_acp.php | 22 ----------------------
core/language/es/gallery.php | 15 +++++++++------
core/language/es/gallery_acp.php | 15 ++++++++++++++-
core/language/es/gallery_mcp.php | 7 ++++---
core/language/es/gallery_notifications.php | 3 +++
core/language/es/gallery_ucp.php | 4 ++++
core/language/es/info_acp_gallery.php | 3 +++
core/language/fr/gallery.php | 3 ++-
core/language/fr/gallery_ucp.php | 1 +
core/language/it/gallery.php | 11 ++++++-----
core/language/it/gallery_ucp.php | 1 +
core/language/nl/gallery.php | 1 +
core/language/nl/gallery_ucp.php | 1 +
core/language/ru/gallery.php | 5 +++++
core/language/ru/gallery_ucp.php | 2 ++
core/search.php | 2 +-
22 files changed, 62 insertions(+), 67 deletions(-)
diff --git a/core/album/display.php b/core/album/display.php
index 99067ab4..73e00a07 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -357,7 +357,8 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
$sql_where = 'a.album_user_id > ' . \phpbbgallery\core\block::PUBLIC_ALBUM;
$num_pegas = $this->config['phpbb_gallery_num_pegas'];
$first_char = strtolower($this->request->variable('first_char', ''));
- if (!preg_match('/^[a-z]$/', $first_char) && $first_char !== 'other') {
+ if (!preg_match('/^[a-z]$/', $first_char) && $first_char !== 'other')
+ {
$first_char = '';
}
diff --git a/core/controller/image.php b/core/controller/image.php
index 954d0f48..3e78be52 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -662,7 +662,7 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
{
$edit_info = '';
- // Let's deply new profile
+ // Let's deploy new profile
$poster_id = $row['comment_user_id'];
if ($row['comment_edit_count'] > 0)
diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php
index bfc50100..0e863d7a 100644
--- a/core/language/bg/gallery.php
+++ b/core/language/bg/gallery.php
@@ -191,6 +191,7 @@
'NO_ALBUMS' => 'В тази галерия няма албуми.',
'NO_COMMENTS' => 'Все още няма коментари',
'NO_IMAGES' => 'Няма изображения',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'Не са намерени изображения.',
'NO_NEW_IMAGES' => 'Няма нови изображения',
'NO_IMAGES_LONG' => 'В този албум няма изображения.',
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index 6c308f59..455c4ac8 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -232,13 +232,9 @@
'PERMISSION_YES' => 'Да',
'PERMISSION_A_COUNT' => 'Брой допустими лични подалбуми',
- 'PERMISSION_A_COUNT_EXPLAIN' => ' ',
'PERMISSION_A_LIST' => 'Може да вижда албум',
- 'PERMISSION_A_LIST_EXPLAIN' => ' ',
'PERMISSION_A_RESTRICT' => 'Може да ограничва достъпа',
- 'PERMISSION_A_RESTRICT_EXPLAIN' => ' ',
'PERMISSION_A_UNLIMITED' => 'Не огрничен брой лични подалбуми',
- 'PERMISSION_A_UNLIMITED_EXPLAIN'=> ' ',
'PERMISSION_C' => 'Коментари',
'PERMISSION_C_DELETE' => 'Може да трие собствените си коментари',
'PERMISSION_C_DELETE_EXPLAIN' => ' ',
diff --git a/core/language/bg/gallery_ucp.php b/core/language/bg/gallery_ucp.php
index fb770a06..fa829a0d 100644
--- a/core/language/bg/gallery_ucp.php
+++ b/core/language/bg/gallery_ucp.php
@@ -65,6 +65,7 @@
'NO_PERSONAL_ALBUM' => 'Все още нямате личен албум. Тук можете да създадете личен албум с подалбуми. В личните албуми само собственика може да качва изображения.',
'NO_SUBALBUMS' => 'Няма свързани албуми',
'NO_SUBSCRIPTIONS' => 'Не сте се абонирали за никакви изображения.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
'PARSE_BBCODE' => 'Parse BBCode',
'PARSE_SMILIES' => 'Parse smilies',
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index bb768781..958cecaa 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -233,58 +233,36 @@
'PERMISSION_YES' => 'Ja',
'PERMISSION_A_COUNT' => 'Anzahl der möglichen persönlichen Subalben',
- 'PERMISSION_A_COUNT_EXPLAIN' => ' ',
'PERMISSION_A_LIST' => 'Kann das Album sehen',
- 'PERMISSION_A_LIST_EXPLAIN' => ' ',
'PERMISSION_A_RESTRICT' => 'Kann den Zugriff einschränken',
- 'PERMISSION_A_RESTRICT_EXPLAIN' => ' ',
'PERMISSION_A_UNLIMITED' => 'Unbegrenzte Anzahl der persönlichen Subalben',
- 'PERMISSION_A_UNLIMITED_EXPLAIN'=> ' ',
'PERMISSION_C' => 'Kommentare',
'PERMISSION_C_DELETE' => 'Kann eigene Kommentare löschen',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Kann eigene Kommentare bearbeiten',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Kann Bilder kommentieren',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Kann Kommentare lesen',
- 'PERMISSION_C_READ_EXPLAIN' => ' ',
'PERMISSION_I' => 'Bilder',
'PERMISSION_I_APPROVE' => 'Kann Bilder ohne Freigabe erstellen',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Anzahl der hochladbaren Bilder',
- 'PERMISSION_I_COUNT_EXPLAIN' => ' ',
'PERMISSION_I_DELETE' => 'Kann eigene Bilder löschen',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Kann eigene Bilder bearbeiten',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Kann Bilder sperren',
'PERMISSION_I_RATE' => 'Kann Bilder bewerten',
'PERMISSION_I_RATE_EXPLAIN' => 'Gäste und der Bild-Autor können Bilder NIE bewerten.',
'PERMISSION_I_REPORT' => 'Kann Bilder melden',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Kann unbegrenzt Bilder hochladen',
- 'PERMISSION_I_UNLIMITED_EXPLAIN'=> ' ',
'PERMISSION_I_UPLOAD' => 'Kann Bilder hochladen',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Diese Berechtigung ist auch dafür verantwortlich, um festzustellen ob ein Benutzer Bilder in das Album verschieben darf, wenn er Moderator-Berechtigungen in einem anderem Album hat.',
'PERMISSION_I_VIEW' => 'Kann Bilder sehen',
- 'PERMISSION_I_VIEW_EXPLAIN' => ' ',
'PERMISSION_I_WATERMARK' => 'Kann Bilder ohne Wasserzeichen sehen',
- 'PERMISSION_I_WATERMARK_EXPLAIN'=> ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Sonstiges', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Kann Kommentare moderieren',
- 'PERMISSION_M_COMMENTS_EXPLAIN' => ' ',
'PERMISSION_M_DELETE' => 'Kann Bilder löschen',
- 'PERMISSION_M_DELETE_EXPLAIN' => ' ',
'PERMISSION_M_EDIT' => 'Kann Bilder bearbeiten',
- 'PERMISSION_M_EDIT_EXPLAIN' => ' ',
'PERMISSION_M_MOVE' => 'Kann Bilder verschieben',
- 'PERMISSION_M_MOVE_EXPLAIN' => ' ',
'PERMISSION_M_REPORT' => 'Kann Meldungen bearbeiten',
- 'PERMISSION_M_REPORT_EXPLAIN' => ' ',
'PERMISSION_M_STATUS' => 'Kann Bilder freischalten und sperren',
- 'PERMISSION_M_STATUS_EXPLAIN' => ' ',
'PERMISSION_EMPTY' => 'Du hast nicht alle Berechtigungen gesetzt.',
'PERMISSIONS' => 'Berechtigungen',
diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
index 1f5f10ba..190c2b5f 100644
--- a/core/language/en/gallery_acp.php
+++ b/core/language/en/gallery_acp.php
@@ -232,58 +232,36 @@
'PERMISSION_YES' => 'Yes',
'PERMISSION_A_COUNT' => 'Number of possible personal subalbums',
- 'PERMISSION_A_COUNT_EXPLAIN' => ' ',
'PERMISSION_A_LIST' => 'Can see album',
- 'PERMISSION_A_LIST_EXPLAIN' => ' ',
'PERMISSION_A_RESTRICT' => 'Can restrict access',
- 'PERMISSION_A_RESTRICT_EXPLAIN' => ' ',
'PERMISSION_A_UNLIMITED' => 'Unlimited number of personal subalbums',
- 'PERMISSION_A_UNLIMITED_EXPLAIN'=> ' ',
'PERMISSION_C' => 'Comments',
'PERMISSION_C_DELETE' => 'Can delete own comments',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Can edit own comments',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Can comment on image',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Can read comments',
- 'PERMISSION_C_READ_EXPLAIN' => ' ',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Can upload without approval',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Number of uploadable images',
- 'PERMISSION_I_COUNT_EXPLAIN' => ' ',
'PERMISSION_I_DELETE' => 'Can delete own images',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Can edit own images',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Can lock images',
'PERMISSION_I_RATE' => 'Can rate images',
'PERMISSION_I_RATE_EXPLAIN' => 'Guests and the image-uploader can NEVER rate images.',
'PERMISSION_I_REPORT' => 'Can report images',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Can upload unlimited images',
- 'PERMISSION_I_UNLIMITED_EXPLAIN'=> ' ',
'PERMISSION_I_UPLOAD' => 'Can upload images',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'This permission is also used, to determinate whether the user can move images to the album, when having moderator permissions in other forums.',
'PERMISSION_I_VIEW' => 'Can view images',
- 'PERMISSION_I_VIEW_EXPLAIN' => ' ',
'PERMISSION_I_WATERMARK' => 'Can view images without watermark',
- 'PERMISSION_I_WATERMARK_EXPLAIN'=> ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Misc', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Can moderate comments',
- 'PERMISSION_M_COMMENTS_EXPLAIN' => ' ',
'PERMISSION_M_DELETE' => 'Can delete images',
- 'PERMISSION_M_DELETE_EXPLAIN' => ' ',
'PERMISSION_M_EDIT' => 'Can edit images',
- 'PERMISSION_M_EDIT_EXPLAIN' => ' ',
'PERMISSION_M_MOVE' => 'Can move images',
- 'PERMISSION_M_MOVE_EXPLAIN' => ' ',
'PERMISSION_M_REPORT' => 'Can manage reports',
- 'PERMISSION_M_REPORT_EXPLAIN' => ' ',
'PERMISSION_M_STATUS' => 'Can approve and lock images',
- 'PERMISSION_M_STATUS_EXPLAIN' => ' ',
'PERMISSION_EMPTY' => 'You didn’t set all permissions.',
'PERMISSIONS' => 'Permissions',
diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php
index 80f84a14..7f7936f7 100644
--- a/core/language/es/gallery.php
+++ b/core/language/es/gallery.php
@@ -72,7 +72,6 @@
'CHANGE_AUTHOR' => 'Cambiar autor',
'CHANGE_IMAGE_STATUS' => 'Cambiar estado de la imagen',
- 'CHARACTERS' => 'caracteres',
'CLICK_RETURN_ALBUM' => 'Haga clic %saquí%s para volver al álbum',
'CLICK_RETURN_IMAGE' => 'Haga clic %saquí%s para volver a la imagen',
'CLICK_RETURN_INDEX' => 'Haga clic %saquí%s para volver al índice',
@@ -122,8 +121,8 @@
'EDIT_COMMENT' => 'Editar comentario',
'EDIT_IMAGE' => 'Editar',
- 'EDITED_TIME_TOTAL' => 'Última edición de %s en %s; editado %d vez en total ',
- 'EDITED_TIMES_TOTAL' => 'Última edición de %s en %s; editado %d veces en total ',
+ 'IMAGE_EDITED_TIME_TOTAL' => 'Última edición de %s en %s; editado %d vez en total ',
+ 'IMAGE_EDITED_TIMES_TOTAL' => 'Última edición de %s en %s; editado %d veces en total ',
'FILE' => 'Archivo',
'FILE_SIZE' => 'Tamaño del archivo',
@@ -131,9 +130,10 @@
'FILETYPES_GIF' => 'gif',
'FILETYPES_JPG' => 'jpg',
'FILETYPES_PNG' => 'png',
+ 'FILETYPES_WEBP' => 'webp',
'FILETYPES_ZIP' => 'zip',
- 'FULL_EDITOR' => 'Editor completo',
+ 'FULL_EDITOR_GALLERY' => 'Editor completo',
'GALLERY_IMAGE' => 'Imagen',
'GALLERY_IMAGES' => 'Imágenes',
@@ -191,6 +191,7 @@
'NO_ALBUMS' => 'No hay álbumes en esta galería.',
'NO_COMMENTS' => 'No hay comentarios todavía',
'NO_IMAGES' => 'Sin imágenes',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'No se encontraron imágenes.',
'NO_NEW_IMAGES' => 'No hay nuevas imágenes',
'NO_IMAGES_LONG' => 'No hay imágenes en este álbum.',
@@ -206,7 +207,7 @@
'PERCENT' => '%',
'PERSONAL_ALBUMS' => 'Álbumes personales',
- 'PIXELS' => 'pixeles',
+
'PLUGIN_CLASS_MISSING' => 'Error de plugin de la galería: No se pudo encontrar la clase "% s".',
'POST_COMMENT' => 'Publicar un comentario',
'POST_COMMENT_RATE_IMAGE' => 'Publicar un comentario y calificar la imagen',
@@ -360,11 +361,13 @@
'IMAGES_MOVED' => array(
1 => 'Imagen movida',
- 2 => '%s imágenes movidas',
+ 2 => '%s imágenes movidas',
),
'QUICK_MOD' => 'Seleccionar la acción del moderador',
'WRONG_FILESIZE' => 'La imagen es más grande que el límite!',
+ 'UNREAD_IMAGES' => 'Unviewed images',
+ 'NO_UNREAD_IMAGES' => 'No unviewed images',
// Versions 1.2.1 addiotions
'GALLERY_DROP' => 'Deja tus imágenes aquí',
diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
index b1db141d..f3507214 100644
--- a/core/language/es/gallery_acp.php
+++ b/core/language/es/gallery_acp.php
@@ -27,6 +27,13 @@
'ACP_GALLERY_OVERVIEW' => 'Galería phpBB',
'ACP_GALLERY_OVERVIEW_EXPLAIN' => 'Aquí hay algunas estadísticas sobre tu galería.',
+ // File dirs states
+ 'ACP_FILES_DIR_STATE' => './files/ state',
+ 'ACP_CORE_DIR_STATE' => './files/phpbbgallery/core/ state',
+ 'ACP_SOURCE_DIR_STATE' => './files/phpbbgallery/core/source/ state',
+ 'ACP_MEDIUM_DIR_STATE' => './files/phpbbgallery/core/medium/ state',
+ 'ACP_MINI_DIR_STATE' => './files/phpbbgallery/core/mini/ state',
+
'ADD_ALBUM_ON_TOP' => 'Añadir álbum en la parte superior',
'ADD_PERMISSIONS' => 'Añadir permisos',
'ALBUM_ADMIN' => 'Administración de álbumes',
@@ -124,7 +131,9 @@
'DISP_NEXTPREV_THUMB' => 'Mostrar miniatura de la imagen siguiente / anterior',
'DISP_NEXTPREV_THUMB_EXPLAIN' => 'Si se establece en No, solo habrá el nombre de la imagen como enlace.',
'DISP_PERSONAL_ALBUM_PROFILE' => 'Mostrar enlace a álbum personal en perfil de usuario',
- 'DISP_STATISTIC' => 'Mostrar galería-estadística',
+ 'DISP_STATISTIC' => 'Mostrar galería-estadística',
+ 'DISP_GALLERY_ICON' => 'Show gallery link',
+ 'DISP_GALLERY_ICON_EXP' => 'Show link to the gallery in user menu.',
'DISP_TOTAL_IMAGES' => 'Mostrar "Total de imágenes" en el índice.' . $phpEx,
'DISP_USER_IMAGES_PROFILE' => 'Mostrar estadística con imágenes subidas en perfil de usuario',
'DISP_VIEWTOPIC_ICON' => 'Mostrar el botón del álbum personal en viewtopic.' . $phpEx,
@@ -145,6 +154,9 @@
'GALLERY_CONFIG_UPDATED' => 'La configuración de la galería se ha actualizado correctamente.',
'GALLERY_INDEX' => 'Galería-Índice',
'GALLERY_PURGE_CACHE_EXPLAIN' => 'Si utiliza la función de caché de miniaturas, debe borrar la caché de miniaturas después de cambiar la configuración de las miniaturas en "Configuración de galería" para que se regeneren.',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF' => 'Resync personal albums to profile fields',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF_EXPAIN' => 'This action will resync all top level personal albums as contact based custom profile field. WARNING! If you have too many top level personal albums this could take some time!',
+ 'GALLERY_RESYNC_ALBUMS_TO_CPF_CONFIRM' => 'Are you sure that you want to resync all top level personal albums as contact CPFs?',
'GALLERY_STATS' => 'Estadísticas de la galería',
'GALLERY_VERSION' => 'Versión de la galería',
'GD_VERSION' => 'Optimizar para la versión GD',
@@ -272,6 +284,7 @@
'RECENT_ON_INDEX_COUNT' => 'Conteo de imágenes recientes',
'PHPBB_INTEGRATION' => 'Integración de phpBB',
'PNG_ALLOWED' => 'Permitido subir archivos PNG',
+ 'WEBP_ALLOWED' => 'Allowed to upload WEBP files',
'PURGED_CACHE' => 'Purgó la caché',
'RATE_SCALE' => 'Escala de calificación',
diff --git a/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php
index 7f15a0ce..f9d97260 100644
--- a/core/language/es/gallery_mcp.php
+++ b/core/language/es/gallery_mcp.php
@@ -67,18 +67,18 @@
'QUEUE_STATUS_2' => 'La imagen está bloqueada.',
'QUEUES_A_APPROVE' => 'Aprobar imágenes',
- 'QUEOUT_A_APPROVE2' => '¿Aprobar imágenes?',
+ 'QUEUES_A_APPROVE2' => '¿Aprobar imágenes?',
'QUEUES_A_APPROVE2_CONFIRM' => '¿Estás seguro de que quieres aprobar estas imágenes?',
'QUEUES_A_DELETE' => 'Eliminar imágenes',
'QUEUES_A_DELETE2' => '¿Eliminar imágenes?',
- 'QUEOUT_A_DELETE2_CONFIRM' => '¿Está seguro de que desea eliminar estas imágenes?',
+ 'QUEUES_A_DELETE2_CONFIRM' => '¿Está seguro de que desea eliminar estas imágenes?',
'QUEUES_A_LOCK' => 'Bloquear imágenes',
'QUEUES_A_LOCK2' => '¿Bloquear imágenes?',
'QUEUES_A_LOCK2_CONFIRM' => '¿Seguro que quieres bloquear estas imágenes?',
'QUEUES_A_MOVE' => 'Mover imágenes',
'QUEUES_A_UNAPPROVE' => 'No aprobar imágenes',
'QUEUES_A_UNAPPROVE2' => '¿Aprobar imágenes?',
- 'QUEOUT_A_UNAPPROVE2_CONFIRM' => '¿Estás seguro de que quieres desautorizar estas imágenes?',
+ 'QUEUES_A_UNAPPROVE2_CONFIRM' => '¿Estás seguro de que quieres desautorizar estas imágenes?',
'QUEUES_A_DISAPPROVE2_CONFIRM' => '¿Está seguro de que desea desautorizar estas imágenes?',
'REPORT_A_CLOSE' => 'Cerrar informe',
@@ -106,6 +106,7 @@
'REPORTS_A_OPEN2_CONFIRM' => '¿Está seguro de que desea abrir estos informes?',
'REPORT_MOD' => 'Editado por',
+ 'REPORT_CLOSED_BY' => 'Report closed by',
'REPORTED_IMAGES' => 'Imágenes reportadas',
'REPORTER' => 'Usuario de informes',
'REPORTER_AND_ALBUM' => 'Reportero y Álbum',
diff --git a/core/language/es/gallery_notifications.php b/core/language/es/gallery_notifications.php
index 4eb52c94..fa4b5632 100644
--- a/core/language/es/gallery_notifications.php
+++ b/core/language/es/gallery_notifications.php
@@ -30,6 +30,9 @@
'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_APPROVED' => 'Imágenes aprobadas',
'NOTIFICATION_PHPBBGALLERY_IMAGE_APPROVED' => 'Las imágenes del álbum %1$s fueron aprobadas',
+ 'NOTIFICATION_TYPE_PHPBBGALLERY_IMAGE_NOT_APPROVED' => 'Not approved images',
+ 'NOTIFICATION_PHPBBGALLERY_IMAGE_NOT_APPROVED' => 'Images in album %1$s were not approved',
+
'NOTIFICATION_TYPE_PHPBBGALLERY_NEW_IMAGE' => 'Nuevas imágenes',
'NOTIFICATION_PHPBBGALLERY_NEW_IMAGE' => 'Se subieron nuevas imágenes al álbum %1$s ',
diff --git a/core/language/es/gallery_ucp.php b/core/language/es/gallery_ucp.php
index 4936453f..fc036bc5 100644
--- a/core/language/es/gallery_ucp.php
+++ b/core/language/es/gallery_ucp.php
@@ -65,6 +65,7 @@
'NO_PERSONAL_ALBUM' => 'Todavía no tienes un álbum personal. Aquí puedes crear tu álbum personal, con algunos subalbums. En álbumes personales sólo el propietario puede subir imágenes. ',
'NO_SUBALBUMS' => 'No hay álbumes adjuntos',
'NO_SUBSCRIPTIONS' => 'No se ha suscrito a ninguna imagen.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
'PARSE_BBCODE' => 'Analizar BBCode',
'PARSE_SMILIES' => 'Analizar smilies',
@@ -80,4 +81,7 @@
'WATCH_COM' => 'Suscribir imágenes comentadas por defecto',
'WATCH_NOTE' => 'Esta opción sólo afecta a las nuevas imágenes. Todas las demás imágenes deben añadirse mediante la opción "suscribir imagen". ',
'WATCH_OWN' => 'Suscribir imágenes propias por defecto',
+
+ 'RRC_ZEBRA' => 'Hide from foes in RRC',
+ 'RRC_ZEBRA_EXPLAIN' => 'Hide images in albums from foes in Recent, Random and Comments part of the index.WARNING! This won\'t hide images uploaded in common/public albums.'
));
diff --git a/core/language/es/info_acp_gallery.php b/core/language/es/info_acp_gallery.php
index 95f583f0..b4e85f90 100644
--- a/core/language/es/info_acp_gallery.php
+++ b/core/language/es/info_acp_gallery.php
@@ -39,6 +39,9 @@
'GALLERY_POPUP' => 'Galería',
'GALLERY_POPUP_HELPLINE' => 'Abre una ventana emergente donde puedes seleccionar tus imágenes recientes y subir nuevas imágenes.',
+ // Please do not change the copyright.
+ 'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
+
// Una pequeña línea donde puedes darte algunos créditos sobre la traducción.
//'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => '',
diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php
index 5051277c..ae7d3323 100644
--- a/core/language/fr/gallery.php
+++ b/core/language/fr/gallery.php
@@ -145,7 +145,7 @@
'FILETYPES_GIF' => 'gif',
'FILETYPES_JPG' => 'jpg',
'FILETYPES_PNG' => 'png',
- 'FILETYPES_WEBP' => 'webp',
+ 'FILETYPES_WEBP' => 'webp',
'FILETYPES_ZIP' => 'zip',
'FULL_EDITOR_GALLERY' => 'Éditeur complet',
@@ -206,6 +206,7 @@
'NO_ALBUMS' => 'Il n’y a aucun album dans cette galerie.',
'NO_COMMENTS' => 'Aucun commentaire',
'NO_IMAGES' => 'Aucune image',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'Aucune image trouvée.',
'NO_NEW_IMAGES' => 'Aucune nouvelle image',
'NO_IMAGES_LONG' => 'Il n’y a aucune image dans cet album.',
diff --git a/core/language/fr/gallery_ucp.php b/core/language/fr/gallery_ucp.php
index a4c8e3c7..19810469 100644
--- a/core/language/fr/gallery_ucp.php
+++ b/core/language/fr/gallery_ucp.php
@@ -80,6 +80,7 @@
'NO_PERSONAL_ALBUM' => 'Aucun album personnel n’a été créé. Il est possible de créer son album personnel, avec plusieurs ses sous-albums. Dans les albums personnels, seul le propriétaire peut charger des images.',
'NO_SUBALBUMS' => 'Aucun album ajouté',
'NO_SUBSCRIPTIONS' => 'Aucun abonnement aux images n’a été configuré.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
'PARSE_BBCODE' => 'Autoriser les BBCodes',
'PARSE_SMILIES' => 'Autoriser les Smileys',
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index e8cf72e2..80642df4 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -72,7 +72,6 @@
'CHANGE_AUTHOR' => 'Cambia aturoe',
'CHANGE_IMAGE_STATUS' => 'Cambia status dell’immagine',
- 'CHARACTERS' => 'caratteri',
'CLICK_RETURN_ALBUM' => 'Clicca %squi%s per tornare all’album',
'CLICK_RETURN_IMAGE' => 'Clicca %squi%s per tornare all’immagine',
'CLICK_RETURN_INDEX' => 'Clicca %squi%s per tornare all’indice',
@@ -122,8 +121,8 @@
'EDIT_COMMENT' => 'Modifica commento',
'EDIT_IMAGE' => 'Modifica',
- 'EDITED_TIME_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volta in totale',
- 'EDITED_TIMES_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volte in totale',
+ 'IMAGE_EDITED_TIME_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volta in totale',
+ 'IMAGE_EDITED_TIMES_TOTAL' => 'Modificato l’ultima volta da %s il %s; modificato %d volte in totale',
'FILE' => 'File',
'FILE_SIZE' => 'Dimensione del file',
@@ -131,9 +130,10 @@
'FILETYPES_GIF' => 'gif',
'FILETYPES_JPG' => 'jpg',
'FILETYPES_PNG' => 'png',
+ 'FILETYPES_WEBP' => 'webp',
'FILETYPES_ZIP' => 'zip',
- 'FULL_EDITOR' => 'Editor completo',
+ 'FULL_EDITOR_GALLERY' => 'Editor completo',
'GALLERY_IMAGE' => 'Immagine',
'GALLERY_IMAGES' => 'Immagini',
@@ -191,6 +191,7 @@
'NO_ALBUMS' => 'Non ci sono album in questa galleria.',
'NO_COMMENTS' => 'Ancora nessun commento',
'NO_IMAGES' => 'Nessuna immagine',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'Nessuna immagine trovata.',
'NO_NEW_IMAGES' => 'Nessuna nuova immagine',
'NO_IMAGES_LONG' => 'Non ci sono immagini in quest’album.',
@@ -206,7 +207,7 @@
'PERCENT' => '%',
'PERSONAL_ALBUMS' => 'Album personali',
- 'PIXELS' => 'pixel',
+
'PLUGIN_CLASS_MISSING' => 'Errore nel Plugin della Galleria: la classe “%s“ non è stata trovata!',
'POST_COMMENT' => 'Scrivi un commento',
'POST_COMMENT_RATE_IMAGE' => 'Scrivi un commento e valuta l’immagine',
diff --git a/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
index 61ffa985..6325645c 100644
--- a/core/language/it/gallery_ucp.php
+++ b/core/language/it/gallery_ucp.php
@@ -64,6 +64,7 @@
'NO_PERSONAL_ALBUM' => 'Non hai un album personale. Puoi creare il tuo album personale con alcuni aotto-albums. Negli albums personali solo i proprietare possono inviare immagini.',
'NO_SUBALBUMS' => 'Non ci sono albums allegati',
'NO_SUBSCRIPTIONS' => 'Non hai sottoscritto nessuna immagine.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
'PARSE_BBCODE' => 'Analizza BBCode',
'PARSE_SMILIES' => 'Analizza faccine',
diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php
index 95299fd4..102f16ff 100644
--- a/core/language/nl/gallery.php
+++ b/core/language/nl/gallery.php
@@ -192,6 +192,7 @@
'NO_ALBUMS' => 'Er zijn geen albums in deze galerij.',
'NO_COMMENTS' => 'Nog geen reacties',
'NO_IMAGES' => 'Geen afbeeldingen',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'Geen afbeldingen gevonden.',
'NO_NEW_IMAGES' => 'Geen nieuwe afbeeldingen',
'NO_IMAGES_LONG' => 'Er zijn geen afbeeldingen in dit album.',
diff --git a/core/language/nl/gallery_ucp.php b/core/language/nl/gallery_ucp.php
index 83ce0a81..50d75f19 100644
--- a/core/language/nl/gallery_ucp.php
+++ b/core/language/nl/gallery_ucp.php
@@ -66,6 +66,7 @@
'NO_PERSONAL_ALBUM' => 'Je hebt nog geen persoonlijk album. Hier kan je persoonlijke albums creëren, met een aantal subalbums. In persoonlijke albums kan alleen de eigenaar afbeeldingen uploaden.',
'NO_SUBALBUMS' => 'Geen albums toegevoegd',
'NO_SUBSCRIPTIONS' => 'Je bent niet geabonneerd op een afbeelding.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
'PARSE_BBCODE' => 'BBCode gebruiken',
'PARSE_SMILIES' => 'Smilies gebruiken',
diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php
index 2c2f3ccd..3522bc9f 100644
--- a/core/language/ru/gallery.php
+++ b/core/language/ru/gallery.php
@@ -111,10 +111,12 @@
'DETAILS' => 'Информация',
'DISALLOWED_EXTENSION' => 'Изображение с таким расширением не разрешено',
'DONT_RATE_IMAGE' => 'Нет оценки',
+
'EDIT_COMMENT' => 'Редактировать комментарий',
'EDIT_IMAGE' => 'Редактировать',
'IMAGE_EDITED_TIME_TOTAL' => 'Последний раз редактировалось пользователем %s %s; всего редактировалось раз: %d',
'IMAGE_EDITED_TIMES_TOTAL' => 'Последний раз редактировалось пользователем %s %s; всего редактировалось раз: %d',
+
'FILE' => 'Файл',
'FILE_SIZE' => 'Размер файла',
'FILETYPE_MIMETYPE_MISMATCH' => 'Тип файла «%1$s » не соответствует mime-типу (%2$s).',
@@ -123,7 +125,9 @@
'FILETYPES_PNG' => 'png',
'FILETYPES_WEBP' => 'webp',
'FILETYPES_ZIP' => 'zip',
+
'FULL_EDITOR_GALLERY' => 'Редактировать',
+
'GALLERY_IMAGE' => 'Фото',
'GALLERY_IMAGES' => 'Фотографии',
'GALLERY_VIEWS' => 'Просмотры',
@@ -176,6 +180,7 @@
'NO_ALBUMS' => 'Нет альбомов',
'NO_COMMENTS' => 'пока нет',
'NO_IMAGES' => 'Нет фотографий',
+ 'NO_COMMENTS_NO_IMAGES' => 'No comments or own pictures yet',
'NO_IMAGES_FOUND' => 'Фото не найдены.',
'NO_NEW_IMAGES' => 'Нет новых фотографий',
'NO_IMAGES_LONG' => 'Этот альбом пуст.',
diff --git a/core/language/ru/gallery_ucp.php b/core/language/ru/gallery_ucp.php
index 7df2a742..09be3c8f 100644
--- a/core/language/ru/gallery_ucp.php
+++ b/core/language/ru/gallery_ucp.php
@@ -56,6 +56,8 @@
'NO_PERSONAL_ALBUM' => 'У вас пока нет личного фотоальбома. Здесь можно создать его, а также вложенные альбомы.',
'NO_SUBALBUMS' => 'Нет вложенных альбомов',
'NO_SUBSCRIPTIONS' => 'Вы не подписаны ни на одно фото.',
+ 'NO_SUBSCRIPTIONS_ALBUM' => 'You are not subscribed to an album.',
+
'PARSE_BBCODE' => 'Разрешить BBCode',
'PARSE_SMILIES' => 'Разрешить смайлики',
'PARSE_URLS' => 'Разрешить ссылки',
diff --git a/core/search.php b/core/search.php
index 81dd0d7f..c4505af3 100644
--- a/core/search.php
+++ b/core/search.php
@@ -247,7 +247,7 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
* return (int) $images_count
*/
public function recent_count()
-{
+ {
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
$exclude_albums = [];
From 49ff6105030ca0da015244587d900a4a4563a88d Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:24:00 +0100
Subject: [PATCH 019/138] Fix eslint on translations
---
core/language/bg/gallery_acp.php | 6 +++---
core/language/de/gallery_acp.php | 3 +++
core/language/en/gallery_acp.php | 3 +++
core/language/en/gallery_mcp.php | 2 +-
core/language/es/gallery_acp.php | 3 +++
core/language/fr/gallery_acp.php | 3 +++
core/language/it/gallery_acp.php | 4 ++++
core/language/it/gallery_mcp.php | 1 +
core/language/nl/gallery_acp.php | 3 +++
core/language/ru/gallery_acp.php | 3 +++
10 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index 455c4ac8..2fead99a 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -237,11 +237,11 @@
'PERMISSION_A_UNLIMITED' => 'Не огрничен брой лични подалбуми',
'PERMISSION_C' => 'Коментари',
'PERMISSION_C_DELETE' => 'Може да трие собствените си коментари',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Може да редактира собствените си коментари',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Може да коментира изображение',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Може да чете коментари',
'PERMISSION_I' => 'Изображения',
'PERMISSION_I_APPROVE' => 'Може да качва без одобрение',
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index 958cecaa..2a99b393 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -238,8 +238,11 @@
'PERMISSION_A_UNLIMITED' => 'Unbegrenzte Anzahl der persönlichen Subalben',
'PERMISSION_C' => 'Kommentare',
'PERMISSION_C_DELETE' => 'Kann eigene Kommentare löschen',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Kann eigene Kommentare bearbeiten',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Kann Bilder kommentieren',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Kann Kommentare lesen',
'PERMISSION_I' => 'Bilder',
'PERMISSION_I_APPROVE' => 'Kann Bilder ohne Freigabe erstellen',
diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
index 190c2b5f..212cc5ca 100644
--- a/core/language/en/gallery_acp.php
+++ b/core/language/en/gallery_acp.php
@@ -237,8 +237,11 @@
'PERMISSION_A_UNLIMITED' => 'Unlimited number of personal subalbums',
'PERMISSION_C' => 'Comments',
'PERMISSION_C_DELETE' => 'Can delete own comments',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Can edit own comments',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Can comment on image',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Can read comments',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Can upload without approval',
diff --git a/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php
index 2acb481e..ed00ec76 100644
--- a/core/language/en/gallery_mcp.php
+++ b/core/language/en/gallery_mcp.php
@@ -106,7 +106,7 @@
'REPORTS_A_OPEN2_CONFIRM' => 'Are you sure, you want to open these reports?',
'REPORT_MOD' => 'Edited by',
- 'REPORT_CLOSED_BY' => 'Report closed by',
+ 'REPORT_CLOSED_BY' => 'Report closed by',
'REPORTED_IMAGES' => 'Reported images',
'REPORTER' => 'Reporting user',
'REPORTER_AND_ALBUM' => 'Reporter & Album',
diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
index f3507214..022d0d68 100644
--- a/core/language/es/gallery_acp.php
+++ b/core/language/es/gallery_acp.php
@@ -237,8 +237,11 @@
'PERMISSION_A_UNLIMITED' => 'Número ilimitado de subalbums personales',
'PERMISSION_C' => 'Comentarios',
'PERMISSION_C_DELETE' => 'Puede eliminar sus propios comentarios',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Puede editar sus propios comentarios',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Puede comentar sobre la imagen',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Puede leer comentarios',
'PERMISSION_I' => 'Imágenes',
'PERMISSION_I_APPROVE' => 'Puede cargar sin aprobación',
diff --git a/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
index 0b7efeb6..1c2250cc 100644
--- a/core/language/fr/gallery_acp.php
+++ b/core/language/fr/gallery_acp.php
@@ -251,8 +251,11 @@
'PERMISSION_A_UNLIMITED' => 'Nombre illimité de sous-albums personnels',
'PERMISSION_C' => 'Commentaires',
'PERMISSION_C_DELETE' => 'Peut supprimer ses commentaires',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Peut modifier ses commentaires',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Peut commenter les images',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Peut lire les commentaires',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Peut envoyer une image sans approbation',
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
index 816297f9..e0750a7e 100644
--- a/core/language/it/gallery_acp.php
+++ b/core/language/it/gallery_acp.php
@@ -235,8 +235,11 @@
'PERMISSION_A_UNLIMITED' => 'Numero illimitato di sotto-albums personali',
'PERMISSION_C' => 'Commenti',
'PERMISSION_C_DELETE' => 'Può cancellare i suoi commenti',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Può modificare i suoi commenti',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Può commentare le immagini',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Può leggere i commenti',
'PERMISSION_I' => 'immagini',
'PERMISSION_I_APPROVE' => 'Può caricare immagini senza approvazione',
@@ -282,6 +285,7 @@
'RECENT_ON_INDEX_COUNT' => 'Conteggio immagini recenti',
'PHPBB_INTEGRATION' => 'integrazione phpBB',
'PNG_ALLOWED' => 'Consenti invio di files PNG',
+ 'WEBP_ALLOWED' => 'Consenti invio di files WEBP',
'PURGED_CACHE' => 'Svuotata la cache',
'RATE_SCALE' => 'Scala voti',
diff --git a/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php
index 2a140b8e..11b3a1f7 100644
--- a/core/language/it/gallery_mcp.php
+++ b/core/language/it/gallery_mcp.php
@@ -106,6 +106,7 @@
'REPORTS_A_OPEN2_CONFIRM' => 'Sei sicuro di voler aprire queste segnalazioni?',
'REPORT_MOD' => 'Modificato da',
+ 'REPORT_CLOSED_BY' => 'Report closed by',
'REPORTED_IMAGES' => 'Immagini segnalate',
'REPORTER' => 'Segnalazione utente',
'REPORTER_AND_ALBUM' => 'Segnalazione & Album',
diff --git a/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
index 08dbe81b..c7792e1c 100644
--- a/core/language/nl/gallery_acp.php
+++ b/core/language/nl/gallery_acp.php
@@ -238,8 +238,11 @@
'PERMISSION_A_UNLIMITED' => 'Ongelimiteerd aantal persoonlijke albums',
'PERMISSION_C' => 'Reacties',
'PERMISSION_C_DELETE' => 'Kan eigen reacties verwijderen',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Kan eigen reacties wijzigen',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Kan op afbeelding reageren',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Kan reacties lezen',
'PERMISSION_I' => 'Afbeeldingen',
'PERMISSION_I_APPROVE' => 'Kan uploaden zonder goedkeuring',
diff --git a/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
index 65d8e8df..ed0b1056 100644
--- a/core/language/ru/gallery_acp.php
+++ b/core/language/ru/gallery_acp.php
@@ -224,8 +224,11 @@
'PERMISSION_A_UNLIMITED' => 'Неограниченное количество вложенных личных альбомов',
'PERMISSION_C' => 'Комментарии',
'PERMISSION_C_DELETE' => 'Может удалять свои комментарии',
+ 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Может редактировать свои комментарии',
+ 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Может комментировать фото',
+ 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Может читать комментарии',
'PERMISSION_I' => 'Фотографии',
'PERMISSION_I_APPROVE' => 'Может загружать без одобрения',
From 4964edb7801a4a3e94b3cafe361de92f373bf947 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:27:28 +0100
Subject: [PATCH 020/138] Refactor get_parents method fixing unserialize use
---
core/album/display.php | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/core/album/display.php b/core/album/display.php
index 73e00a07..0a1dd4bd 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -199,7 +199,8 @@ public function generate_navigation($album_data)
*/
public function get_parents($album_data)
{
- $album_parents = array();
+ $album_parents = [];
+
if ($album_data['parent_id'] > 0)
{
if ($album_data['album_parents'] == '')
@@ -210,30 +211,34 @@ public function get_parents($album_data)
AND right_id > ' . (int) $album_data['right_id'] . '
AND album_user_id = ' . (int) $album_data['album_user_id'] . '
ORDER BY left_id ASC';
+
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
- $album_parents[$row['album_id']] = array($row['album_name'], (int) $row['album_type']);
+ $album_parents[$row['album_id']] = [$row['album_name'], (int) $row['album_type']];
}
$this->db->sql_freeresult($result);
- $album_data['album_parents'] = serialize($album_parents);
+ $album_data['album_parents'] = json_encode($album_parents);
$sql = 'UPDATE ' . $this->table_albums . "
SET album_parents = '" . $this->db->sql_escape($album_data['album_parents']) . "'
WHERE parent_id = " . (int) $album_data['parent_id'];
$this->db->sql_query($sql);
- }
- else
- {
- $album_parents = unserialize($album_data['album_parents']);
+ } else {
+ $album_parents = json_decode($album_data['album_parents'], true);
+ if (!is_array($album_parents))
+ {
+ $album_parents = []; // fallback if corrupted
+ }
}
}
return $album_parents;
}
+
/**
* Obtain list of moderators of each album
*
From ed80629c58b260cb5fd148a8b8493c96eb8521d2 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:28:41 +0100
Subject: [PATCH 021/138] Add missing license file to exif addon extension
---
exif/license.txt | 339 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 339 insertions(+)
create mode 100644 exif/license.txt
diff --git a/exif/license.txt b/exif/license.txt
new file mode 100644
index 00000000..d159169d
--- /dev/null
+++ b/exif/license.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
From 4de51d626aba1e694a5e5ae01dd6307ca2568182 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:38:51 +0100
Subject: [PATCH 022/138] Fix request_var to request variable
---
exif/event/exif_listener.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/exif/event/exif_listener.php b/exif/event/exif_listener.php
index 7274186e..eb060b73 100644
--- a/exif/event/exif_listener.php
+++ b/exif/event/exif_listener.php
@@ -212,10 +212,12 @@ public function user_get_default_values($event)
public function ucp_set_settings_submit($event)
{
+ global $request;
+
$additional_settings = $event['additional_settings'];
if (!in_array('user_viewexif', $additional_settings))
{
- $additional_settings['user_viewexif'] = request_var('viewexifs', false);
+ $additional_settings['user_viewexif'] = $request->variable('viewexifs', false);
$event['additional_settings'] = $additional_settings;
}
}
From d0e90b8ba03ca4440dab96f5747603a237e923fa Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:41:16 +0100
Subject: [PATCH 023/138] Safer unserialize
---
exif/exif.php | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/exif/exif.php b/exif/exif.php
index d4d76734..a52647d5 100644
--- a/exif/exif.php
+++ b/exif/exif.php
@@ -109,7 +109,7 @@ public function interpret($status, $data)
$this->status = $status;
if ($this->status == self::DBSAVED)
{
- $this->data = unserialize($data);
+ $this->data = $this->safe_unserialize($data);
}
else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN))
{
@@ -319,6 +319,21 @@ public function set_status()
$db->sql_query($sql);
}
+ protected function safe_unserialize($data)
+ {
+ if (is_string($data)) {
+ $result = @unserialize($data);
+
+ if ($result === false && $data !== 'b:0;') {
+ return [];
+ }
+
+ return $result;
+ }
+
+ return [];
+ }
+
/**
* There are lots of possible Exif Groups and Values.
* But you will never heard of the missing ones. so we just allow the most common ones.
From 1212b16050b96b0b95d51668fb93d006b7e5ed3a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:47:44 +0100
Subject: [PATCH 024/138] Keep unserialize but safer
---
core/album/display.php | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/core/album/display.php b/core/album/display.php
index 0a1dd4bd..aba75b21 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -220,18 +220,16 @@ public function get_parents($album_data)
}
$this->db->sql_freeresult($result);
- $album_data['album_parents'] = json_encode($album_parents);
+ $album_data['album_parents'] = serialize($album_parents);
$sql = 'UPDATE ' . $this->table_albums . "
SET album_parents = '" . $this->db->sql_escape($album_data['album_parents']) . "'
WHERE parent_id = " . (int) $album_data['parent_id'];
$this->db->sql_query($sql);
- } else {
- $album_parents = json_decode($album_data['album_parents'], true);
- if (!is_array($album_parents))
- {
- $album_parents = []; // fallback if corrupted
- }
+ }
+ else
+ {
+ $album_parents = $this->safe_unserialize($album_data['album_parents']);
}
}
@@ -798,4 +796,19 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
return array($active_album_ary, array());
}
+
+ protected function safe_unserialize($data)
+ {
+ if (is_string($data)) {
+ $result = @unserialize($data);
+
+ if ($result === false && $data !== 'b:0;') {
+ return [];
+ }
+
+ return $result;
+ }
+
+ return [];
+ }
}
From 1ebe4a477af019acf43ed9c6daafbc683ea1ae03 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:51:38 +0100
Subject: [PATCH 025/138] Escape on template instead
---
exif/exif.php | 2 +-
.../prosilver/template/event/gallery_viewimage_details.bkp | 2 +-
.../prosilver/template/event/gallery_viewimage_details.html | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/exif/exif.php b/exif/exif.php
index a52647d5..abdbf18a 100644
--- a/exif/exif.php
+++ b/exif/exif.php
@@ -290,7 +290,7 @@ public function send_to_template($expand_view = true, $block = 'exif_value')
{
$template->assign_block_vars($block, array(
'EXIF_NAME' => $user->lang[strtoupper($exif)],
- 'EXIF_VALUE' => htmlspecialchars($value),
+ 'EXIF_VALUE' => $value,
));
}
$template->assign_vars(array(
diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp b/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
index f2c2457a..82d81174 100644
--- a/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
+++ b/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
@@ -5,7 +5,7 @@
{exif_value.EXIF_NAME}{L_COLON}
- {exif_value.EXIF_VALUE}
+ {exif_value.EXIF_VALUE|escape('html')}
diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.html b/exif/styles/prosilver/template/event/gallery_viewimage_details.html
index 8445ac72..f82d213a 100644
--- a/exif/styles/prosilver/template/event/gallery_viewimage_details.html
+++ b/exif/styles/prosilver/template/event/gallery_viewimage_details.html
@@ -5,7 +5,7 @@ {L_EXIF_DATA}
{exif_value.EXIF_NAME}{L_COLON}
- {exif_value.EXIF_VALUE}
+ {exif_value.EXIF_VALUE|escape('html')}
From d7aa3540bafdf332e65764f65ff479cad91e6e6a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:52:33 +0100
Subject: [PATCH 026/138] Add missing license file to acp cleanup and import
adons
---
acpcleanup/license.txt | 339 +++++++++++++++++++++++++++++++++++++++++
acpimport/license.txt | 339 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 678 insertions(+)
create mode 100644 acpcleanup/license.txt
create mode 100644 acpimport/license.txt
diff --git a/acpcleanup/license.txt b/acpcleanup/license.txt
new file mode 100644
index 00000000..d159169d
--- /dev/null
+++ b/acpcleanup/license.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/acpimport/license.txt b/acpimport/license.txt
new file mode 100644
index 00000000..d159169d
--- /dev/null
+++ b/acpimport/license.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
From f75c0449bb7964282e37198114f8d1ce2f95b847 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 16:54:20 +0100
Subject: [PATCH 027/138] Fix eslint
---
core/album/display.php | 6 ++++--
exif/exif.php | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/core/album/display.php b/core/album/display.php
index aba75b21..1065bd54 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -799,10 +799,12 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
protected function safe_unserialize($data)
{
- if (is_string($data)) {
+ if (is_string($data))
+ {
$result = @unserialize($data);
- if ($result === false && $data !== 'b:0;') {
+ if ($result === false && $data !== 'b:0;')
+ {
return [];
}
diff --git a/exif/exif.php b/exif/exif.php
index abdbf18a..9236f97e 100644
--- a/exif/exif.php
+++ b/exif/exif.php
@@ -321,10 +321,12 @@ public function set_status()
protected function safe_unserialize($data)
{
- if (is_string($data)) {
+ if (is_string($data))
+ {
$result = @unserialize($data);
- if ($result === false && $data !== 'b:0;') {
+ if ($result === false && $data !== 'b:0;')
+ {
return [];
}
From 21245ea62c822c2ca0e867afe86b122d76e3c52c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:03:46 +0100
Subject: [PATCH 028/138] Improve tests and project structure
---
.travis.yml | 2 +-
.../acpcleanup}/acp/main_info.php | 2 +-
.../acpcleanup}/acp/main_module.php | 2 +-
.../adm/style/gallery_cleanup.html | 0
.../acpcleanup}/adm/style/index.htm | 0
.../phpbbgallery/acpcleanup}/cleanup.php | 0
.../phpbbgallery/acpcleanup}/composer.json | 0
.../acpcleanup}/config/services.yml | 0
.../phpbbgallery/acpcleanup}/ext.php | 0
.../language/bg/info_acp_gallery_cleanup.php | 2 +-
.../language/de/info_acp_gallery_cleanup.php | 2 +-
.../language/en/info_acp_gallery_cleanup.php | 2 +-
.../language/fr/info_acp_gallery_cleanup.php | 2 +-
.../language/it/info_acp_gallery_cleanup.php | 2 +-
.../language/ru/info_acp_gallery_cleanup.php | 2 +-
.../phpbbgallery/acpcleanup}/license.txt | 0
.../acpcleanup}/migrations/m1_init.php | 0
.../phpbbgallery/acpimport}/acp/main_info.php | 2 +-
.../acpimport}/acp/main_module.php | 2 +-
.../adm/style/gallery_acpimport.html | 0
.../phpbbgallery/acpimport}/composer.json | 0
.../phpbbgallery/acpimport}/ext.php | 0
.../bg/info_acp_gallery_acpimport.php | 2 +-
.../de/info_acp_gallery_acpimport.php | 2 +-
.../en/info_acp_gallery_acpimport.php | 2 +-
.../fr/info_acp_gallery_acpimport.php | 2 +-
.../it/info_acp_gallery_acpimport.php | 2 +-
.../ru/info_acp_gallery_acpimport.php | 2 +-
.../phpbbgallery/acpimport}/license.txt | 0
.../acpimport}/migrations/m1_init.php | 0
.../phpbbgallery/core}/acp/albums_info.php | 0
.../phpbbgallery/core}/acp/albums_module.php | 0
.../phpbbgallery/core}/acp/config_info.php | 2 +-
.../phpbbgallery/core}/acp/config_module.php | 2 +-
.../core}/acp/gallery_logs_info.php | 0
.../core}/acp/gallery_logs_module.php | 0
.../phpbbgallery/core}/acp/main_info.php | 0
.../phpbbgallery/core}/acp/main_module.php | 0
.../core}/acp/permissions_info.php | 0
.../core}/acp/permissions_module.php | 0
{core => ext/phpbbgallery/core}/adm/index.htm | 0
.../core}/adm/style/gallery_albums.html | 0
.../core}/adm/style/gallery_logs.html | 0
.../core}/adm/style/gallery_main.html | 0
.../core}/adm/style/gallery_permissions.html | 0
.../phpbbgallery/core}/adm/style/index.htm | 0
.../phpbbgallery/core}/album/album.php | 0
.../phpbbgallery/core}/album/display.php | 0
.../phpbbgallery/core}/album/loader.php | 0
.../phpbbgallery/core}/album/manage.php | 0
{core => ext/phpbbgallery/core}/auth/auth.php | 0
.../phpbbgallery/core}/auth/level.php | 0
{core => ext/phpbbgallery/core}/auth/set.php | 0
{core => ext/phpbbgallery/core}/block.bkp | 0
{core => ext/phpbbgallery/core}/block.php | 0
{core => ext/phpbbgallery/core}/cache.php | 0
{core => ext/phpbbgallery/core}/comment.php | 0
{core => ext/phpbbgallery/core}/composer.json | 0
{core => ext/phpbbgallery/core}/config.php | 0
.../phpbbgallery/core}/config/routing.yml | 588 ++++++++--------
.../phpbbgallery/core}/config/services.yml | 666 +++++++++---------
.../core}/config/services_controller.yml | 0
.../core}/config/services_files.yml | 0
.../config/services_notification_types.yml | 0
.../phpbbgallery/core}/config/tables.yml | 0
{core => ext/phpbbgallery/core}/constants.php | 0
{core => ext/phpbbgallery/core}/contest.php | 0
.../phpbbgallery/core}/controller/album.php | 0
.../phpbbgallery/core}/controller/comment.php | 0
.../phpbbgallery/core}/controller/file.php | 0
.../phpbbgallery/core}/controller/image.php | 0
.../phpbbgallery/core}/controller/index.php | 0
.../core}/controller/moderate.php | 0
.../phpbbgallery/core}/controller/search.php | 0
.../phpbbgallery/core}/controller/upload.php | 0
.../phpbbgallery/core}/cron/cron_cleaner.php | 0
.../phpbbgallery/core}/docs/tables.md | 0
.../core}/event/main_listener.php | 0
{core => ext/phpbbgallery/core}/ext.php | 0
{core => ext/phpbbgallery/core}/file/file.php | 0
.../core}/file/types/multiform.php | 0
.../phpbbgallery/core}/image/image.php | 0
.../phpbbgallery/core}/images/icon_delete.gif | Bin
.../core}/images/icon_delete_disabled.gif | Bin
.../phpbbgallery/core}/images/icon_down.gif | Bin
.../core}/images/icon_down_disabled.gif | Bin
.../phpbbgallery/core}/images/icon_edit.gif | Bin
.../core}/images/icon_edit_disabled.gif | Bin
.../phpbbgallery/core}/images/icon_up.gif | Bin
.../core}/images/icon_up_disabled.gif | Bin
.../core}/images/legacy/watermark.png | Bin
.../core}/images/upload/image_not_exist.jpg | Bin
.../core}/images/upload/index.htm | 0
.../core}/images/upload/no_hotlinking.jpg | Bin
.../core}/images/upload/not_authorised.jpg | Bin
.../phpbbgallery/core}/images/watermark.png | Bin
.../language/bg/email/newcomment_notify.txt | 0
.../language/bg/email/newimage_notify.txt | 0
.../core}/language/bg/gallery.php | 0
.../core}/language/bg/gallery_acp.php | 0
.../core}/language/bg/gallery_mcp.php | 0
.../language/bg/gallery_notifications.php | 0
.../core}/language/bg/gallery_ucp.php | 0
.../core}/language/bg/info_acp_gallery.php | 0
.../language/bg/info_acp_gallery_logs.php | 0
.../core}/language/bg/info_ucp_gallery.php | 0
.../core}/language/bg/install_gallery.php | 0
.../core}/language/bg/permissions_gallery.php | 0
.../language/de/email/newcomment_notify.txt | 0
.../language/de/email/newimage_notify.txt | 0
.../core}/language/de/gallery.php | 0
.../core}/language/de/gallery_acp.php | 0
.../core}/language/de/gallery_mcp.php | 0
.../language/de/gallery_notifications.php | 0
.../core}/language/de/gallery_ucp.php | 0
.../phpbbgallery/core}/language/de/index.htm | 0
.../core}/language/de/info_acp_gallery.php | 0
.../language/de/info_acp_gallery_logs.php | 0
.../core}/language/de/info_ucp_gallery.php | 0
.../core}/language/de/install_gallery.php | 0
.../core}/language/de/permissions_gallery.php | 0
.../language/en/email/newcomment_notify.txt | 0
.../language/en/email/newimage_notify.txt | 0
.../core}/language/en/gallery.php | 0
.../core}/language/en/gallery_acp.php | 0
.../core}/language/en/gallery_mcp.php | 0
.../language/en/gallery_notifications.php | 0
.../core}/language/en/gallery_ucp.php | 0
.../core}/language/en/info_acp_gallery.php | 0
.../language/en/info_acp_gallery_logs.php | 0
.../core}/language/en/info_ucp_gallery.php | 0
.../core}/language/en/install_gallery.php | 0
.../core}/language/en/permissions_gallery.php | 0
.../language/es/email/newcomment_notify.txt | 0
.../language/es/email/newimage_notify.txt | 0
.../core}/language/es/gallery.php | 0
.../core}/language/es/gallery_acp.php | 0
.../core}/language/es/gallery_mcp.php | 0
.../language/es/gallery_notifications.php | 0
.../core}/language/es/gallery_ucp.php | 0
.../core}/language/es/info_acp_gallery.php | 0
.../language/es/info_acp_gallery_logs.php | 0
.../core}/language/es/info_ucp_gallery.php | 0
.../core}/language/es/install_gallery.php | 0
.../core}/language/es/permissions_gallery.php | 0
.../language/fr/email/newcomment_notify.txt | 0
.../language/fr/email/newimage_notify.txt | 0
.../core}/language/fr/gallery.php | 0
.../core}/language/fr/gallery_acp.php | 0
.../core}/language/fr/gallery_mcp.php | 0
.../language/fr/gallery_notifications.php | 0
.../core}/language/fr/gallery_ucp.php | 0
.../core}/language/fr/info_acp_gallery.php | 0
.../language/fr/info_acp_gallery_logs.php | 0
.../core}/language/fr/info_ucp_gallery.php | 0
.../core}/language/fr/install_gallery.php | 0
.../core}/language/fr/permissions_gallery.php | 0
.../language/it/email/newcomment_notify.txt | 0
.../language/it/email/newimage_notify.txt | 0
.../core}/language/it/gallery.php | 0
.../core}/language/it/gallery_acp.php | 0
.../core}/language/it/gallery_mcp.php | 0
.../language/it/gallery_notifications.php | 0
.../core}/language/it/gallery_ucp.php | 0
.../core}/language/it/info_acp_gallery.php | 0
.../language/it/info_acp_gallery_logs.php | 0
.../core}/language/it/info_ucp_gallery.php | 0
.../core}/language/it/install_gallery.php | 0
.../core}/language/it/permissions_gallery.php | 0
.../language/nl/email/newcomment_notify.txt | 0
.../language/nl/email/newimage_notify.txt | 0
.../core}/language/nl/gallery.php | 0
.../core}/language/nl/gallery_acp.php | 0
.../core}/language/nl/gallery_mcp.php | 0
.../language/nl/gallery_notifications.php | 0
.../core}/language/nl/gallery_ucp.php | 0
.../core}/language/nl/info_acp_gallery.php | 0
.../language/nl/info_acp_gallery_logs.php | 0
.../core}/language/nl/info_ucp_gallery.php | 0
.../core}/language/nl/install_gallery.php | 0
.../core}/language/nl/permissions_gallery.php | 0
.../language/ru/email/newcomment_notify.txt | 0
.../language/ru/email/newimage_notify.txt | 0
.../core}/language/ru/gallery.php | 0
.../core}/language/ru/gallery_acp.php | 0
.../core}/language/ru/gallery_mcp.php | 0
.../language/ru/gallery_notifications.php | 0
.../core}/language/ru/gallery_ucp.php | 0
.../core}/language/ru/info_acp_gallery.php | 0
.../language/ru/info_acp_gallery_logs.php | 0
.../core}/language/ru/info_ucp_gallery.php | 0
.../core}/language/ru/install_gallery.php | 0
.../core}/language/ru/permissions_gallery.php | 0
{core => ext/phpbbgallery/core}/license.txt | 0
{core => ext/phpbbgallery/core}/log.php | 0
.../core}/migrations/release_1_2_0.php | 0
.../migrations/release_1_2_0_add_bbcode.php | 0
.../release_1_2_0_create_filesystem.php | 0
.../migrations/release_1_2_0_db_create.php | 0
.../core}/migrations/release_3_2_1_0.php | 0
.../core}/migrations/release_3_2_1_1.php | 0
.../core}/migrations/release_3_3_0.php | 0
.../migrations/split_ucp_module_settings.php | 0
{core => ext/phpbbgallery/core}/misc.php | 0
{core => ext/phpbbgallery/core}/moderate.php | 0
.../phpbbgallery/core}/notification.php | 0
.../events/phpbbgallery_image_approved.php | 0
.../phpbbgallery_image_for_approval.php | 0
.../phpbbgallery_image_not_approved.php | 0
.../events/phpbbgallery_new_comment.php | 0
.../events/phpbbgallery_new_image.php | 0
.../events/phpbbgallery_new_report.php | 0
.../core}/notification/helper.php | 0
{core => ext/phpbbgallery/core}/rating.php | 0
{core => ext/phpbbgallery/core}/report.php | 0
{core => ext/phpbbgallery/core}/search.php | 0
.../template/event/overall_footer_after.html | 0
.../event/overall_header_head_append.html | 0
.../styles/all/template/js/jquery-ui.min.js | 0
.../template/js/jquery.fileupload-angular.js | 0
.../template/js/jquery.fileupload-audio.js | 0
.../template/js/jquery.fileupload-image.js | 0
.../js/jquery.fileupload-jquery-ui.js | 0
.../template/js/jquery.fileupload-process.js | 0
.../all/template/js/jquery.fileupload-ui.js | 0
.../template/js/jquery.fileupload-validate.js | 0
.../template/js/jquery.fileupload-video.js | 0
.../all/template/js/jquery.fileupload.js | 0
.../template/js/jquery.iframe-transport.js | 0
.../all/template/js/jquery.ui.widget.js | 0
.../all/template/js/load-image.all.min.js | 0
.../all/template/js/load-image.all.min.js.map | 0
.../core}/styles/all/theme/default.css | 0
.../all/theme/images/icon_contact_gallery.png | Bin
.../event/index_body_block_stats_append.html | 0
.../event/memberlist_view_content_append.html | 0
...memberlist_view_user_statistics_after.html | 0
.../navbar_header_user_profile_prepend.html | 0
.../event/overall_header_head_append.html | 0
.../overall_header_navigation_prepend.html | 0
.../template/gallery/album_body.html | 0
.../template/gallery/albumlist_body.html | 0
.../template/gallery/albumlist_polaroid.html | 0
.../template/gallery/comment_body.html | 0
.../prosilver/template/gallery/gallery.js | 0
.../template/gallery/gallery_footer.html | 0
.../template/gallery/gallery_header.html | 0
.../template/gallery/image_edit_body.html | 0
.../template/gallery/imageblock_body.html | 0
.../template/gallery/imageblock_polaroid.html | 0
.../template/gallery/imageblock_popup.html | 0
.../template/gallery/index_body.html | 0
.../template/gallery/mcp_approve.html | 0
.../prosilver/template/gallery/mcp_body.html | 0
.../prosilver/template/gallery/message.html | 0
.../template/gallery/moderate_actions.html | 0
.../gallery/moderate_actions_queue.html | 0
.../gallery/moderate_album_overview.html | 0
.../template/gallery/moderate_approve.html | 0
.../gallery/moderate_approve_queue.html | 0
.../gallery/moderate_image_overview.html | 0
.../template/gallery/moderate_overview.html | 0
.../gallery/moderate_report_queue.html | 0
.../template/gallery/moderate_reports.html | 0
.../template/gallery/plugins_header.html | 0
.../template/gallery/posting_body.html | 0
.../template/gallery/posting_javascript.html | 0
.../template/gallery/recent_body.html | 0
.../template/gallery/search_body.html | 0
.../template/gallery/search_random.html | 0
.../template/gallery/search_recent.html | 0
.../template/gallery/search_results.html | 0
.../template/gallery/ucp_gallery.html | 0
.../template/gallery/viewimage_body.html | 0
.../prosilver/template/message_body.html | 0
.../styles/prosilver/theme/gallery-color.css | 0
.../core}/styles/prosilver/theme/gallery.css | 0
.../theme/images/icon_contact_gallery.gif | Bin
.../theme/images/icon_gallery_locked.gif | Bin
.../theme/images/icon_gallery_reported.gif | Bin
.../theme/images/icon_gallery_unapproved.gif | Bin
.../theme/images/icon_topic_unapproved.png | Bin
.../styles/prosilver/theme/images/lock.png | Bin
.../phpbbgallery/core}/ucp/main_info.php | 0
.../phpbbgallery/core}/ucp/main_module.php | 0
.../phpbbgallery/core}/ucp/settings_info.php | 0
.../core}/ucp/settings_module.php | 0
{core => ext/phpbbgallery/core}/upload.php | 0
{core => ext/phpbbgallery/core}/url.php | 0
{core => ext/phpbbgallery/core}/user.php | 0
{exif => ext/phpbbgallery/exif}/composer.json | 0
.../phpbbgallery/exif}/config/services.yml | 8 +-
.../exif}/event/exif_listener.php | 2 +-
{exif => ext/phpbbgallery/exif}/exif.php | 2 +-
{exif => ext/phpbbgallery/exif}/ext.php | 0
.../phpbbgallery/exif}/language/bg/exif.php | 2 +-
.../phpbbgallery/exif}/language/bg/index.htm | 0
.../phpbbgallery/exif}/language/de/exif.php | 2 +-
.../phpbbgallery/exif}/language/en/exif.php | 2 +-
.../phpbbgallery/exif}/language/en/index.htm | 0
.../phpbbgallery/exif}/language/fr/exif.php | 2 +-
.../phpbbgallery/exif}/language/it/exif.php | 2 +-
.../phpbbgallery/exif}/language/it/index.htm | 0
.../phpbbgallery/exif}/language/ru/exif.php | 2 +-
{exif => ext/phpbbgallery/exif}/license.txt | 0
.../phpbbgallery/exif}/migrations/m1_init.php | 0
.../event/gallery_ucp_settings_fieldset.html | 0
.../event/gallery_viewimage_details.bkp | 0
.../event/gallery_viewimage_details.html | 0
phpunit.xml.dist | 16 +-
travis/prepare-covarage.sh | 2 +-
travis/run-slow-tests.sh | 2 +-
travis/run-tests.sh | 2 +-
travis/send-coverage.sh | 2 +-
314 files changed, 670 insertions(+), 670 deletions(-)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/acp/main_info.php (92%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/acp/main_module.php (99%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/adm/style/gallery_cleanup.html (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/adm/style/index.htm (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/cleanup.php (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/composer.json (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/config/services.yml (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/ext.php (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/bg/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/de/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/en/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/fr/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/it/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/language/ru/info_acp_gallery_cleanup.php (98%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/license.txt (100%)
rename {acpcleanup => ext/phpbbgallery/acpcleanup}/migrations/m1_init.php (100%)
rename {acpimport => ext/phpbbgallery/acpimport}/acp/main_info.php (92%)
rename {acpimport => ext/phpbbgallery/acpimport}/acp/main_module.php (99%)
rename {acpimport => ext/phpbbgallery/acpimport}/adm/style/gallery_acpimport.html (100%)
rename {acpimport => ext/phpbbgallery/acpimport}/composer.json (100%)
rename {acpimport => ext/phpbbgallery/acpimport}/ext.php (100%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/bg/info_acp_gallery_acpimport.php (97%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/de/info_acp_gallery_acpimport.php (97%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/en/info_acp_gallery_acpimport.php (96%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/fr/info_acp_gallery_acpimport.php (97%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/it/info_acp_gallery_acpimport.php (96%)
rename {acpimport => ext/phpbbgallery/acpimport}/language/ru/info_acp_gallery_acpimport.php (98%)
rename {acpimport => ext/phpbbgallery/acpimport}/license.txt (100%)
rename {acpimport => ext/phpbbgallery/acpimport}/migrations/m1_init.php (100%)
rename {core => ext/phpbbgallery/core}/acp/albums_info.php (100%)
rename {core => ext/phpbbgallery/core}/acp/albums_module.php (100%)
rename {core => ext/phpbbgallery/core}/acp/config_info.php (92%)
rename {core => ext/phpbbgallery/core}/acp/config_module.php (99%)
rename {core => ext/phpbbgallery/core}/acp/gallery_logs_info.php (100%)
rename {core => ext/phpbbgallery/core}/acp/gallery_logs_module.php (100%)
rename {core => ext/phpbbgallery/core}/acp/main_info.php (100%)
rename {core => ext/phpbbgallery/core}/acp/main_module.php (100%)
rename {core => ext/phpbbgallery/core}/acp/permissions_info.php (100%)
rename {core => ext/phpbbgallery/core}/acp/permissions_module.php (100%)
rename {core => ext/phpbbgallery/core}/adm/index.htm (100%)
rename {core => ext/phpbbgallery/core}/adm/style/gallery_albums.html (100%)
rename {core => ext/phpbbgallery/core}/adm/style/gallery_logs.html (100%)
rename {core => ext/phpbbgallery/core}/adm/style/gallery_main.html (100%)
rename {core => ext/phpbbgallery/core}/adm/style/gallery_permissions.html (100%)
rename {core => ext/phpbbgallery/core}/adm/style/index.htm (100%)
rename {core => ext/phpbbgallery/core}/album/album.php (100%)
rename {core => ext/phpbbgallery/core}/album/display.php (100%)
rename {core => ext/phpbbgallery/core}/album/loader.php (100%)
rename {core => ext/phpbbgallery/core}/album/manage.php (100%)
rename {core => ext/phpbbgallery/core}/auth/auth.php (100%)
rename {core => ext/phpbbgallery/core}/auth/level.php (100%)
rename {core => ext/phpbbgallery/core}/auth/set.php (100%)
rename {core => ext/phpbbgallery/core}/block.bkp (100%)
rename {core => ext/phpbbgallery/core}/block.php (100%)
rename {core => ext/phpbbgallery/core}/cache.php (100%)
rename {core => ext/phpbbgallery/core}/comment.php (100%)
rename {core => ext/phpbbgallery/core}/composer.json (100%)
rename {core => ext/phpbbgallery/core}/config.php (100%)
rename {core => ext/phpbbgallery/core}/config/routing.yml (97%)
rename {core => ext/phpbbgallery/core}/config/services.yml (97%)
rename {core => ext/phpbbgallery/core}/config/services_controller.yml (100%)
rename {core => ext/phpbbgallery/core}/config/services_files.yml (100%)
rename {core => ext/phpbbgallery/core}/config/services_notification_types.yml (100%)
rename {core => ext/phpbbgallery/core}/config/tables.yml (100%)
rename {core => ext/phpbbgallery/core}/constants.php (100%)
rename {core => ext/phpbbgallery/core}/contest.php (100%)
rename {core => ext/phpbbgallery/core}/controller/album.php (100%)
rename {core => ext/phpbbgallery/core}/controller/comment.php (100%)
rename {core => ext/phpbbgallery/core}/controller/file.php (100%)
rename {core => ext/phpbbgallery/core}/controller/image.php (100%)
rename {core => ext/phpbbgallery/core}/controller/index.php (100%)
rename {core => ext/phpbbgallery/core}/controller/moderate.php (100%)
rename {core => ext/phpbbgallery/core}/controller/search.php (100%)
rename {core => ext/phpbbgallery/core}/controller/upload.php (100%)
rename {core => ext/phpbbgallery/core}/cron/cron_cleaner.php (100%)
rename {core => ext/phpbbgallery/core}/docs/tables.md (100%)
rename {core => ext/phpbbgallery/core}/event/main_listener.php (100%)
rename {core => ext/phpbbgallery/core}/ext.php (100%)
rename {core => ext/phpbbgallery/core}/file/file.php (100%)
rename {core => ext/phpbbgallery/core}/file/types/multiform.php (100%)
rename {core => ext/phpbbgallery/core}/image/image.php (100%)
rename {core => ext/phpbbgallery/core}/images/icon_delete.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_delete_disabled.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_down.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_down_disabled.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_edit.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_edit_disabled.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_up.gif (100%)
rename {core => ext/phpbbgallery/core}/images/icon_up_disabled.gif (100%)
rename {core => ext/phpbbgallery/core}/images/legacy/watermark.png (100%)
rename {core => ext/phpbbgallery/core}/images/upload/image_not_exist.jpg (100%)
rename {core => ext/phpbbgallery/core}/images/upload/index.htm (100%)
rename {core => ext/phpbbgallery/core}/images/upload/no_hotlinking.jpg (100%)
rename {core => ext/phpbbgallery/core}/images/upload/not_authorised.jpg (100%)
rename {core => ext/phpbbgallery/core}/images/watermark.png (100%)
rename {core => ext/phpbbgallery/core}/language/bg/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/bg/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/bg/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/bg/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/de/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/de/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/index.htm (100%)
rename {core => ext/phpbbgallery/core}/language/de/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/de/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/en/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/en/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/en/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/es/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/es/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/es/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/fr/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/fr/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/fr/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/it/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/it/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/it/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/nl/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/nl/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/nl/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/email/newcomment_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/ru/email/newimage_notify.txt (100%)
rename {core => ext/phpbbgallery/core}/language/ru/gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/gallery_acp.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/gallery_mcp.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/gallery_notifications.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/gallery_ucp.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/info_acp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/info_acp_gallery_logs.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/info_ucp_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/install_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/language/ru/permissions_gallery.php (100%)
rename {core => ext/phpbbgallery/core}/license.txt (100%)
rename {core => ext/phpbbgallery/core}/log.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_1_2_0.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_1_2_0_add_bbcode.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_1_2_0_create_filesystem.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_1_2_0_db_create.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_3_2_1_0.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_3_2_1_1.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/release_3_3_0.php (100%)
rename {core => ext/phpbbgallery/core}/migrations/split_ucp_module_settings.php (100%)
rename {core => ext/phpbbgallery/core}/misc.php (100%)
rename {core => ext/phpbbgallery/core}/moderate.php (100%)
rename {core => ext/phpbbgallery/core}/notification.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_image_approved.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_image_for_approval.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_image_not_approved.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_new_comment.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_new_image.php (100%)
rename {core => ext/phpbbgallery/core}/notification/events/phpbbgallery_new_report.php (100%)
rename {core => ext/phpbbgallery/core}/notification/helper.php (100%)
rename {core => ext/phpbbgallery/core}/rating.php (100%)
rename {core => ext/phpbbgallery/core}/report.php (100%)
rename {core => ext/phpbbgallery/core}/search.php (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/event/overall_footer_after.html (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/event/overall_header_head_append.html (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery-ui.min.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-angular.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-audio.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-image.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-jquery-ui.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-process.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-ui.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-validate.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload-video.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.fileupload.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.iframe-transport.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/jquery.ui.widget.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/load-image.all.min.js (100%)
rename {core => ext/phpbbgallery/core}/styles/all/template/js/load-image.all.min.js.map (100%)
rename {core => ext/phpbbgallery/core}/styles/all/theme/default.css (100%)
rename {core => ext/phpbbgallery/core}/styles/all/theme/images/icon_contact_gallery.png (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/index_body_block_stats_append.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/memberlist_view_content_append.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/memberlist_view_user_statistics_after.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/navbar_header_user_profile_prepend.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/overall_header_head_append.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/event/overall_header_navigation_prepend.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/album_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/albumlist_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/albumlist_polaroid.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/comment_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/gallery.js (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/gallery_footer.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/gallery_header.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/image_edit_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_polaroid.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_popup.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/index_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/mcp_approve.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/mcp_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/message.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_actions.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_actions_queue.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_album_overview.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_approve.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_approve_queue.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_image_overview.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_overview.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_report_queue.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/moderate_reports.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/plugins_header.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/posting_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/posting_javascript.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/recent_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/search_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/search_random.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/search_recent.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/search_results.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/ucp_gallery.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/gallery/viewimage_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/template/message_body.html (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/gallery-color.css (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/gallery.css (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/icon_contact_gallery.gif (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_locked.gif (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_reported.gif (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_unapproved.gif (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/icon_topic_unapproved.png (100%)
rename {core => ext/phpbbgallery/core}/styles/prosilver/theme/images/lock.png (100%)
rename {core => ext/phpbbgallery/core}/ucp/main_info.php (100%)
rename {core => ext/phpbbgallery/core}/ucp/main_module.php (100%)
rename {core => ext/phpbbgallery/core}/ucp/settings_info.php (100%)
rename {core => ext/phpbbgallery/core}/ucp/settings_module.php (100%)
rename {core => ext/phpbbgallery/core}/upload.php (100%)
rename {core => ext/phpbbgallery/core}/url.php (100%)
rename {core => ext/phpbbgallery/core}/user.php (100%)
rename {exif => ext/phpbbgallery/exif}/composer.json (100%)
rename {exif => ext/phpbbgallery/exif}/config/services.yml (98%)
rename {exif => ext/phpbbgallery/exif}/event/exif_listener.php (99%)
rename {exif => ext/phpbbgallery/exif}/exif.php (99%)
rename {exif => ext/phpbbgallery/exif}/ext.php (100%)
rename {exif => ext/phpbbgallery/exif}/language/bg/exif.php (98%)
rename {exif => ext/phpbbgallery/exif}/language/bg/index.htm (100%)
rename {exif => ext/phpbbgallery/exif}/language/de/exif.php (98%)
rename {exif => ext/phpbbgallery/exif}/language/en/exif.php (98%)
rename {exif => ext/phpbbgallery/exif}/language/en/index.htm (100%)
rename {exif => ext/phpbbgallery/exif}/language/fr/exif.php (98%)
rename {exif => ext/phpbbgallery/exif}/language/it/exif.php (98%)
rename {exif => ext/phpbbgallery/exif}/language/it/index.htm (100%)
rename {exif => ext/phpbbgallery/exif}/language/ru/exif.php (99%)
rename {exif => ext/phpbbgallery/exif}/license.txt (100%)
rename {exif => ext/phpbbgallery/exif}/migrations/m1_init.php (100%)
rename {exif => ext/phpbbgallery/exif}/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html (100%)
rename {exif => ext/phpbbgallery/exif}/styles/prosilver/template/event/gallery_viewimage_details.bkp (100%)
rename {exif => ext/phpbbgallery/exif}/styles/prosilver/template/event/gallery_viewimage_details.html (100%)
diff --git a/.travis.yml b/.travis.yml
index d7af8adc..aa95c49b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,7 +36,7 @@ env:
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
- PHPBB_BRANCH="3.3.x"
- - COVERAGE="1" # Should we run covarage?
+ - COVERAGE="1" # Should we run coverage?
branches:
only:
diff --git a/acpcleanup/acp/main_info.php b/ext/phpbbgallery/acpcleanup/acp/main_info.php
similarity index 92%
rename from acpcleanup/acp/main_info.php
rename to ext/phpbbgallery/acpcleanup/acp/main_info.php
index 8a9a7f24..da3d8ca7 100644
--- a/acpcleanup/acp/main_info.php
+++ b/ext/phpbbgallery/acpcleanup/acp/main_info.php
@@ -1,7 +1,7 @@
./
- ./acpcleanup/language/
- ./acpcleanup/migrations/
- ./acpimport/language/
- ./acpimport/migrations/
- ./exif/language/
- ./exif/migrations/
- ./core/language/
- ./core/migrations/
+ ./ext/phpbbgallery/acpcleanup/language/
+ ./ext/phpbbgallery/acpcleanup/migrations/
+ ./ext/phpbbgallery/acpimport/language/
+ ./ext/phpbbgallery/acpimport/migrations/
+ ./ext/phpbbgallery/exif/language/
+ ./ext/phpbbgallery/exif/migrations/
+ ./ext/phpbbgallery/core/language/
+ ./ext/phpbbgallery/core/migrations/
./tests/
diff --git a/travis/prepare-covarage.sh b/travis/prepare-covarage.sh
index 8d3880ee..7d2bb525 100755
--- a/travis/prepare-covarage.sh
+++ b/travis/prepare-covarage.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Collapsible Categories extension for the phpBB Forum Software package.
+# phpBB Gallery extension for the phpBB Forum Software package.
#
# @copyright (c) 2015 phpBB Limited
# @license GNU General Public License, version 2 (GPL-2.0)
diff --git a/travis/run-slow-tests.sh b/travis/run-slow-tests.sh
index be8165c7..60f07e52 100755
--- a/travis/run-slow-tests.sh
+++ b/travis/run-slow-tests.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Collapsible Categories extension for the phpBB Forum Software package.
+# phpBB Gallery extension for the phpBB Forum Software package.
#
# @copyright (c) 2015 phpBB Limited
# @license GNU General Public License, version 2 (GPL-2.0)
diff --git a/travis/run-tests.sh b/travis/run-tests.sh
index eeb21c4d..ed1ce3a7 100755
--- a/travis/run-tests.sh
+++ b/travis/run-tests.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Collapsible Categories extension for the phpBB Forum Software package.
+# phpBB Gallery extension for the phpBB Forum Software package.
#
# @copyright (c) 2015 phpBB Limited
# @license GNU General Public License, version 2 (GPL-2.0)
diff --git a/travis/send-coverage.sh b/travis/send-coverage.sh
index 6fd7824a..a53be0a1 100755
--- a/travis/send-coverage.sh
+++ b/travis/send-coverage.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Collapsible Categories extension for the phpBB Forum Software package.
+# phpBB Gallery extension for the phpBB Forum Software package.
#
# @copyright (c) 2015 phpBB Limited
# @license GNU General Public License, version 2 (GPL-2.0)
From 2a7bc0e240059b1b3ee5b7759c7d87f9532b8e10 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:14:18 +0100
Subject: [PATCH 029/138] Move tests too
---
.../tests}/controller/controller_base.php | 764 +--
.../tests}/controller/fixtures/fixture.xml | 1792 +++---
.../tests}/controller/gallery_album_test.php | 1060 ++--
.../controller/gallery_comment_test.php | 0
.../tests}/controller/gallery_index_test.php | 1936 +++----
.../controller/gallery_moderate_test.php | 328 +-
.../tests}/core/album/core_album_test.php | 296 +-
.../tests}/core/album/core_display_test.php | 614 +-
.../tests}/core/core_auth_test.php | 904 +--
.../phpbbgallery/tests}/core/core_base.php | 308 +-
.../tests}/core/core_block_test.php | 136 +-
.../tests}/core/core_cache_test.php | 294 +-
.../tests}/core/core_comment_test.php | 0
.../tests}/core/core_config_test.php | 734 +--
.../tests}/core/core_contest_test.php | 202 +-
.../tests}/core/core_image_test.php | 558 +-
.../tests}/core/core_notification_test.php | 206 +-
.../tests}/core/core_rating_test.php | 402 +-
.../tests}/core/core_report_test.php | 0
.../tests}/core/core_search_test.php | 2640 ++++-----
.../tests}/core/core_url_test.php | 0
.../tests}/core/core_user_test.php | 556 +-
.../tests}/core/fixtures/fixture.xml | 1828 +++---
.../tests}/event/fixtures/fixture.xml | 306 +-
.../tests}/event/main_event_test.php | 514 +-
.../tests}/functional/images/valid.gif | Bin
.../tests}/functional/images/valid.jpg | Bin
.../tests}/functional/images/valid.png | Bin
.../tests}/functional/images/valid.webp | Bin
.../tests}/functional/images/valid.zip | Bin
.../functional/phpbbgallery_alpha_test.php | 2600 ++++-----
.../tests}/functional/phpbbgallery_base.php | 128 +-
.../functional/phpbbgallery_beta_test.php | 4930 ++++++++---------
.../functional/phpbbgallery_charlie_test.php | 90 +-
.../functional/phpbbgallery_delta_test.php | 570 +-
35 files changed, 12348 insertions(+), 12348 deletions(-)
rename {tests => ext/phpbbgallery/tests}/controller/controller_base.php (95%)
rename {tests => ext/phpbbgallery/tests}/controller/fixtures/fixture.xml (95%)
rename {tests => ext/phpbbgallery/tests}/controller/gallery_album_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/controller/gallery_comment_test.php (100%)
rename {tests => ext/phpbbgallery/tests}/controller/gallery_index_test.php (97%)
rename {tests => ext/phpbbgallery/tests}/controller/gallery_moderate_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/album/core_album_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/core/album/core_display_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/core_auth_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/core/core_base.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/core_block_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/core_cache_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/core/core_comment_test.php (100%)
rename {tests => ext/phpbbgallery/tests}/core/core_config_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/core_contest_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/core/core_image_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/core/core_notification_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/core_rating_test.php (94%)
rename {tests => ext/phpbbgallery/tests}/core/core_report_test.php (100%)
rename {tests => ext/phpbbgallery/tests}/core/core_search_test.php (97%)
rename {tests => ext/phpbbgallery/tests}/core/core_url_test.php (100%)
rename {tests => ext/phpbbgallery/tests}/core/core_user_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/core/fixtures/fixture.xml (95%)
rename {tests => ext/phpbbgallery/tests}/event/fixtures/fixture.xml (96%)
rename {tests => ext/phpbbgallery/tests}/event/main_event_test.php (95%)
rename {tests => ext/phpbbgallery/tests}/functional/images/valid.gif (100%)
rename {tests => ext/phpbbgallery/tests}/functional/images/valid.jpg (100%)
rename {tests => ext/phpbbgallery/tests}/functional/images/valid.png (100%)
rename {tests => ext/phpbbgallery/tests}/functional/images/valid.webp (100%)
rename {tests => ext/phpbbgallery/tests}/functional/images/valid.zip (100%)
rename {tests => ext/phpbbgallery/tests}/functional/phpbbgallery_alpha_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/functional/phpbbgallery_base.php (95%)
rename {tests => ext/phpbbgallery/tests}/functional/phpbbgallery_beta_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/functional/phpbbgallery_charlie_test.php (96%)
rename {tests => ext/phpbbgallery/tests}/functional/phpbbgallery_delta_test.php (97%)
diff --git a/tests/controller/controller_base.php b/ext/phpbbgallery/tests/controller/controller_base.php
similarity index 95%
rename from tests/controller/controller_base.php
rename to ext/phpbbgallery/tests/controller/controller_base.php
index dd877e63..be0007f6 100644
--- a/tests/controller/controller_base.php
+++ b/ext/phpbbgallery/tests/controller/controller_base.php
@@ -1,382 +1,382 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\controller;
-
-/**
-* @group controller
-*/
-
-class controller_base extends \phpbb_database_test_case
-{
- /**
- * Define the extensions to be tested
- *
- * @return array vendor/name of extension(s) to test
- */
- static protected function setup_extensions()
- {
- return array('phpbbgallery/core');
- }
- /**
- * Get data set fixtures
- */
- public function getDataSet()
- {
- return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
- }
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
- global $request, $user, $config, $phpbb_root_path, $phpEx;
- parent::setUp();
- //Let's build some deps
- $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
- ->disableOriginalConstructor()
- ->getMock();
-
- $auth = $this->auth;
-
- $config = $this->config = new \phpbb\config\config(array());
- $this->config['force_server_vars'] = false;
-
- $config = $this->config;
-
- $this->db = $this->new_dbal();
- $db = $this->db;
-
- $request = $this->request = $this->getMockBuilder('\phpbb\request\request')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
-
- $this->template = $this->getMockBuilder('\phpbb\template\template')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->language = $this->getMockBuilder('\phpbb\language\language')
- ->disableOriginalConstructor()
- ->getMock();
- $this->language->method('lang')
- ->will($this->returnArgument(0));
-
- $this->user = $this->getMockBuilder('\phpbb\user')
- ->setConstructorArgs(array(
- new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
- '\phpbb\datetime'
- ))
- ->getMock();
- $this->user
- ->method('lang')
- ->will($this->returnArgument(0));
- $this->user->expects($this->any())
- ->method('create_datetime')
- ->will($this->returnCallback(array($this, 'create_datetime_callback')));
- $this->user->timezone = new \DateTimeZone('UTC');
- $this->user->lang = array(
- 'datetime' => array(),
- 'DATE_FORMAT' => 'm/d/Y',
- 'ASCENDING' => 'ASC',
- 'DESCENDING' => 'DESC',
- 'GUEST' => 'Guest',
- );
- $this->user->host = '';
- $data_array = array(
- 'user_form_salt' => '',
- 'username' => 'admin',
- 'user_colour' => '',
- );
-
- $this->user->data = $data_array;
-
- $user = $this->user;
-
- $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
- ->disableOriginalConstructor()
- ->getMock();
- $this->controller_helper->expects($this->any())
- ->method('render')
- ->willReturnCallback(function ($template_file, $page_title = '', $status_code = 200, $display_online_list = false) {
- return new \Symfony\Component\HttpFoundation\Response($template_file, $status_code);
- });
- $this->controller_helper
- ->method('route')
- ->will($this->returnArgument(0));
-
- $phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
-
- $cache = $this->cache = new \phpbb\cache\service(
- new \phpbb\cache\driver\dummy(),
- $this->config,
- $this->db,
- $phpbb_dispatcher,
- $phpbb_root_path,
- $phpEx
- );
-
- $this->cache->purge();
-
- $this->pagination = $this->getMockBuilder('\phpbb\pagination')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
- ->disableOriginalConstructor()
- ->getMock();
-
- $phpbb_dispatcher = $this->dispatcher = new \phpbb_mock_event_dispatcher();
- $this->phpbb_container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->user_loader = $this->getMockBuilder('\phpbb\user_loader')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->gallery_notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
-
- $this->gallery_auth_level = new \phpbbgallery\core\auth\level(
- $this->gallery_auth,
- $this->config,
- $this->template,
- $this->user,
- $this->language
- );
-
- $this->misc = $this->getMockBuilder('\phpbbgallery\core\misc')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->display = new \phpbbgallery\core\album\display(
- $this->auth,
- $this->config,
- $this->controller_helper,
- $this->db,
- $this->pagination,
- $this->request,
- $this->template,
- $this->user,
- $this->language,
- $this->gallery_auth,
- $this->gallery_user,
- $this->misc,
- '/',
- 'php',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_contests',
- 'phpbb_gallery_albums_track',
- 'phpbb_gallery_modscache'
- );
-
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
-
- $this->gallery_contest = new \phpbbgallery\core\contest(
- $this->db,
- $this->gallery_config,
- 'phpbb_images_table',
- 'phpbb_contests_table'
- );
-
- $this->gallery_loader = new \phpbbgallery\core\album\loader(
- $this->db,
- $this->user,
- $this->gallery_contest,
- 'phpbb_gallery_albums'
- );
-
- $this->block = new \phpbbgallery\core\block();
-
- $this->gallery_album = new \phpbbgallery\core\album\album(
- $this->db,
- $this->user,
- $this->language,
- $this->user_cpf,
- $this->gallery_auth,
- $this->gallery_cache,
- $this->block,
- $this->gallery_config,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images',
- 'phpbb_gallery_watch',
- 'phpbb_gallery_contests'
- );
-
- $this->gallery_url = new \phpbbgallery\core\url(
- $this->template,
- $this->request,
- $this->config,
- '/',
- 'adm'
- );
-
- $this->log = new \phpbbgallery\core\log(
- $this->db,
- $this->user,
- $this->language,
- $this->user_loader,
- $this->template,
- $this->controller_helper,
- $this->pagination,
- $this->gallery_auth,
- $this->gallery_config,
- 'phpbb_gallery_log',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_report = new \phpbbgallery\core\report(
- $this->log,
- $this->gallery_auth,
- $this->user,
- $this->language,
- $this->db,
- $this->user_loader,
- $this->gallery_album,
- $this->template,
- $this->controller_helper,
- $this->gallery_config,
- $this->pagination,
- $this->gallery_notification_helper,
- 'phpbb_gallery_images',
- 'phpbb_gallery_reports'
- );
-
- $this->gallery_file = new \phpbbgallery\core\file\file(
- $this->request,
- $this->gallery_url,
- $this->gallery_config,
- 2
- );
-
- $this->gallery_image = new \phpbbgallery\core\image\image(
- $this->db,
- $this->user,
- $this->language,
- $this->template,
- $this->phpbb_dispatcher,
- $this->gallery_auth,
- $this->gallery_album,
- $this->gallery_config,
- $this->controller_helper,
- $this->gallery_url,
- $this->log,
- $this->gallery_notification_helper,
- $this->gallery_report,
- $this->gallery_cache,
- $this->gallery_user,
- $this->gallery_contest,
- $this->gallery_file,
- 'phpbb_gallery_images'
- );
-
- // Let's build Search
- $this->gallery_search = new \phpbbgallery\core\search(
- $this->db,
- $this->template,
- $this->user,
- $this->language,
- $this->controller_helper,
- $this->gallery_config,
- $this->gallery_auth,
- $this->gallery_album,
- $this->gallery_image,
- $this->pagination,
- $this->user_loader,
- 'phpbb_gallery_images',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_comments'
- );
-
- $this->gallery_comment = new \phpbbgallery\core\comment(
- $this->user,
- $this->db,
- $this->gallery_config,
- $this->gallery_auth,
- $this->block,
- 'phpbb_gallery_comments',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_rating = new \phpbbgallery\core\rating(
- $this->db,
- $this->template,
- $this->user,
- $this->language,
- $this->request,
- $this->gallery_config,
- $this->gallery_auth,
- 'phpbb_gallery_images',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_rates'
- );
-
- $this->gallery_notification = new \phpbbgallery\core\notification(
- $this->db,
- $this->user,
- 'phpbb_gallery_watch'
- );
- $this->gallery_moderate = new \phpbbgallery\core\moderate(
- $this->db,
- $this->template,
- $this->controller_helper,
- $this->user,
- $this->language,
- $this->user_loader,
- $this->gallery_album,
- $this->gallery_auth,
- $this->pagination,
- $this->gallery_comment,
- $this->gallery_report,
- $this->gallery_image,
- $this->gallery_config,
- $this->gallery_notification,
- $this->gallery_rating,
- 'phpbb_gallery_images'
- );
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\controller;
+
+/**
+* @group controller
+*/
+
+class controller_base extends \phpbb_database_test_case
+{
+ /**
+ * Define the extensions to be tested
+ *
+ * @return array vendor/name of extension(s) to test
+ */
+ static protected function setup_extensions()
+ {
+ return array('phpbbgallery/core');
+ }
+ /**
+ * Get data set fixtures
+ */
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
+ }
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+ global $request, $user, $config, $phpbb_root_path, $phpEx;
+ parent::setUp();
+ //Let's build some deps
+ $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $auth = $this->auth;
+
+ $config = $this->config = new \phpbb\config\config(array());
+ $this->config['force_server_vars'] = false;
+
+ $config = $this->config;
+
+ $this->db = $this->new_dbal();
+ $db = $this->db;
+
+ $request = $this->request = $this->getMockBuilder('\phpbb\request\request')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
+
+ $this->template = $this->getMockBuilder('\phpbb\template\template')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->language = $this->getMockBuilder('\phpbb\language\language')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->language->method('lang')
+ ->will($this->returnArgument(0));
+
+ $this->user = $this->getMockBuilder('\phpbb\user')
+ ->setConstructorArgs(array(
+ new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
+ '\phpbb\datetime'
+ ))
+ ->getMock();
+ $this->user
+ ->method('lang')
+ ->will($this->returnArgument(0));
+ $this->user->expects($this->any())
+ ->method('create_datetime')
+ ->will($this->returnCallback(array($this, 'create_datetime_callback')));
+ $this->user->timezone = new \DateTimeZone('UTC');
+ $this->user->lang = array(
+ 'datetime' => array(),
+ 'DATE_FORMAT' => 'm/d/Y',
+ 'ASCENDING' => 'ASC',
+ 'DESCENDING' => 'DESC',
+ 'GUEST' => 'Guest',
+ );
+ $this->user->host = '';
+ $data_array = array(
+ 'user_form_salt' => '',
+ 'username' => 'admin',
+ 'user_colour' => '',
+ );
+
+ $this->user->data = $data_array;
+
+ $user = $this->user;
+
+ $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->controller_helper->expects($this->any())
+ ->method('render')
+ ->willReturnCallback(function ($template_file, $page_title = '', $status_code = 200, $display_online_list = false) {
+ return new \Symfony\Component\HttpFoundation\Response($template_file, $status_code);
+ });
+ $this->controller_helper
+ ->method('route')
+ ->will($this->returnArgument(0));
+
+ $phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
+
+ $cache = $this->cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\dummy(),
+ $this->config,
+ $this->db,
+ $phpbb_dispatcher,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $this->cache->purge();
+
+ $this->pagination = $this->getMockBuilder('\phpbb\pagination')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $phpbb_dispatcher = $this->dispatcher = new \phpbb_mock_event_dispatcher();
+ $this->phpbb_container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->user_loader = $this->getMockBuilder('\phpbb\user_loader')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->gallery_notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+
+ $this->gallery_auth_level = new \phpbbgallery\core\auth\level(
+ $this->gallery_auth,
+ $this->config,
+ $this->template,
+ $this->user,
+ $this->language
+ );
+
+ $this->misc = $this->getMockBuilder('\phpbbgallery\core\misc')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->display = new \phpbbgallery\core\album\display(
+ $this->auth,
+ $this->config,
+ $this->controller_helper,
+ $this->db,
+ $this->pagination,
+ $this->request,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->gallery_auth,
+ $this->gallery_user,
+ $this->misc,
+ '/',
+ 'php',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_contests',
+ 'phpbb_gallery_albums_track',
+ 'phpbb_gallery_modscache'
+ );
+
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+
+ $this->gallery_contest = new \phpbbgallery\core\contest(
+ $this->db,
+ $this->gallery_config,
+ 'phpbb_images_table',
+ 'phpbb_contests_table'
+ );
+
+ $this->gallery_loader = new \phpbbgallery\core\album\loader(
+ $this->db,
+ $this->user,
+ $this->gallery_contest,
+ 'phpbb_gallery_albums'
+ );
+
+ $this->block = new \phpbbgallery\core\block();
+
+ $this->gallery_album = new \phpbbgallery\core\album\album(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_cpf,
+ $this->gallery_auth,
+ $this->gallery_cache,
+ $this->block,
+ $this->gallery_config,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_watch',
+ 'phpbb_gallery_contests'
+ );
+
+ $this->gallery_url = new \phpbbgallery\core\url(
+ $this->template,
+ $this->request,
+ $this->config,
+ '/',
+ 'adm'
+ );
+
+ $this->log = new \phpbbgallery\core\log(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_loader,
+ $this->template,
+ $this->controller_helper,
+ $this->pagination,
+ $this->gallery_auth,
+ $this->gallery_config,
+ 'phpbb_gallery_log',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_report = new \phpbbgallery\core\report(
+ $this->log,
+ $this->gallery_auth,
+ $this->user,
+ $this->language,
+ $this->db,
+ $this->user_loader,
+ $this->gallery_album,
+ $this->template,
+ $this->controller_helper,
+ $this->gallery_config,
+ $this->pagination,
+ $this->gallery_notification_helper,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_reports'
+ );
+
+ $this->gallery_file = new \phpbbgallery\core\file\file(
+ $this->request,
+ $this->gallery_url,
+ $this->gallery_config,
+ 2
+ );
+
+ $this->gallery_image = new \phpbbgallery\core\image\image(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->template,
+ $this->phpbb_dispatcher,
+ $this->gallery_auth,
+ $this->gallery_album,
+ $this->gallery_config,
+ $this->controller_helper,
+ $this->gallery_url,
+ $this->log,
+ $this->gallery_notification_helper,
+ $this->gallery_report,
+ $this->gallery_cache,
+ $this->gallery_user,
+ $this->gallery_contest,
+ $this->gallery_file,
+ 'phpbb_gallery_images'
+ );
+
+ // Let's build Search
+ $this->gallery_search = new \phpbbgallery\core\search(
+ $this->db,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->controller_helper,
+ $this->gallery_config,
+ $this->gallery_auth,
+ $this->gallery_album,
+ $this->gallery_image,
+ $this->pagination,
+ $this->user_loader,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_comments'
+ );
+
+ $this->gallery_comment = new \phpbbgallery\core\comment(
+ $this->user,
+ $this->db,
+ $this->gallery_config,
+ $this->gallery_auth,
+ $this->block,
+ 'phpbb_gallery_comments',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_rating = new \phpbbgallery\core\rating(
+ $this->db,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->request,
+ $this->gallery_config,
+ $this->gallery_auth,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_rates'
+ );
+
+ $this->gallery_notification = new \phpbbgallery\core\notification(
+ $this->db,
+ $this->user,
+ 'phpbb_gallery_watch'
+ );
+ $this->gallery_moderate = new \phpbbgallery\core\moderate(
+ $this->db,
+ $this->template,
+ $this->controller_helper,
+ $this->user,
+ $this->language,
+ $this->user_loader,
+ $this->gallery_album,
+ $this->gallery_auth,
+ $this->pagination,
+ $this->gallery_comment,
+ $this->gallery_report,
+ $this->gallery_image,
+ $this->gallery_config,
+ $this->gallery_notification,
+ $this->gallery_rating,
+ 'phpbb_gallery_images'
+ );
+ }
+}
diff --git a/tests/controller/fixtures/fixture.xml b/ext/phpbbgallery/tests/controller/fixtures/fixture.xml
similarity index 95%
rename from tests/controller/fixtures/fixture.xml
rename to ext/phpbbgallery/tests/controller/fixtures/fixture.xml
index 7f906ae2..a1827ff5 100644
--- a/tests/controller/fixtures/fixture.xml
+++ b/ext/phpbbgallery/tests/controller/fixtures/fixture.xml
@@ -1,896 +1,896 @@
-
-
-
- config_name
- config_value
- is_dynamic
-
- phpbb_gallery_description_length
- 2000
- 0
-
-
- phpbb_gallery_allow_resize
- 1
- 0
-
-
- phpbb_gallery_link_thumbnail
- image_page
- 0
-
-
-
- album_id
- parent_id
- left_id
- right_id
- album_parents
- album_type
- album_status
- album_contest
- album_name
- album_desc
- album_desc_options
- album_desc_uid
- album_desc_bitfield
- album_user_id
- album_images
- album_images_real
- album_last_image_id
- album_image
- album_last_image_time
- album_last_image_name
- album_last_username
- album_last_user_colour
- album_last_user_id
- album_watermark
- album_sort_key
- album_sort_dir
- display_in_rrc
- display_on_index
- display_subalbum_list
- album_feed
- album_auth_access
-
- 1
- 0
- 0
- 0
-
- 1
- 0
- 0
- TestPublicAlbum1
-
- 7
-
-
- 0
- 3
- 3
- 3
-
- 0
- TestImage3
- admin
-
- 2
- 1
-
-
- 1
- 1
- 1
- 1
- 0
-
-
- 2
- 1
- 1
- 3
- a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
- 1
- 0
- 0
- TestPublicAlbumSubAlbum1
-
- 7
-
-
- 0
- 3
- 3
- 6
-
- 0
- TestImage6
- admin
-
- 2
- 1
-
-
- 0
- 1
- 1
- 1
- 0
-
-
- 3
- 1
- 1
- 2
- a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
- 1
- 0
- 0
- TestPublicAlbumSubAlbum2
-
- 7
-
-
- 0
- 3
- 3
- 9
-
- 0
- TestImage9
- admin
-
- 2
- 1
-
-
- 1
- 1
- 1
- 1
- 0
-
-
- 4
- 0
- 1
- 3
-
- 1
- 0
- 0
- TestUserAlbum1
-
- 7
-
-
- 2
- 0
- 0
- 0
-
- 0
-
-
-
- 0
- 0
-
-
- 1
- 1
- 1
- 1
- 0
-
-
- 5
- 0
- 1
- 3
-
- 1
- 0
- 0
- TestUserAlbum2
-
- 7
-
-
- 52
- 0
- 0
- 0
-
- 0
-
-
-
- 0
- 0
-
-
- 1
- 1
- 1
- 1
- 0
-
-
-
- comment_id
- comment_image_id
- comment_user_id
- comment_time
- comment
-
- 1
- 1
- 52
- 1438791990
- This is test comment 1!!!!!
-
-
- 2
- 2
- 52
- 1438792100
- This is test comment 2!!!!!
-
-
- 3
- 3
- 52
- 1438792200
- This is test comment 3!!!!!
-
-
- 4
- 4
- 2
- 1438792300
- This is test comment 4!!!!!
-
-
- 5
- 5
- 2
- 1438792400
- This is test comment 5!!!!!
-
-
- 6
- 6
- 2
- 1438792500
- This is test comment 6!!!!!
-
-
-
- image_id
- image_filename
- image_name
- image_name_clean
- image_desc
- image_desc_uid
- image_desc_bitfield
- image_user_id
- image_username
- image_username_clean
- image_user_colour
- image_user_ip
- image_time
- image_album_id
- image_view_count
- image_status
- image_contest
- image_contest_end
- image_contest_rank
- image_filemissing
- image_rates
- image_rate_points
- image_rate_avg
- image_comments
- image_last_comment
- image_allow_comments
- image_favorited
- image_reported
- filesize_upload
- filesize_medium
- filesize_cache
-
- 1
- md5hashednamefor1.jpg
- TestImage1
- testimage1
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 2
- md5hashednamefor2.jpg
- TestImage2
- testimage2
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 2
- 30
- 150
- 1
- 2
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 3
- md5hashednamefor3.jpg
- TestImage3
- testimage3
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 3
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 4
- md5hashednamefor4.jpg
- TestImage4
- testimage4
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 4
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 5
- md5hashednamefor5.jpg
- TestImage5
- testimage5
-
- 10fu4clu
-
- 53
- Test2
- Test2
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 10
- 1000
- 1
- 5
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 6
- md5hashednamefor6.jpg
- TestImage6
- testimage6
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 6
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 7
- md5hashednamefor7.jpg
- TestImage7
- testimage7
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 8
- md5hashednamefor8.jpg
- TestImage8
- testimage8
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 9
- md5hashednamefor9.jpg
- TestImage9
- testimage9
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
-
- album_id
- user_id
- username
- group_id
- group_name
- display_on_index
-
- 1
- 0
-
- 5
- ADMINISTRATORS
- 1
-
-
-
- perm_id
- perm_role_id
- perm_album_id
- perm_user_id
- perm_group_id
- perm_system
-
- 1
- 1
- 1
- 0
- 5
- 0
-
-
- 2
- 2
- 1
- 0
- 2
- 0
-
-
- 3
- 1
- 2
- 0
- 5
- 0
-
-
- 4
- 1
- 0
- 0
- 5
- -2
-
-
- 5
- 1
- 0
- 0
- 5
- -3
-
-
-
- role_id
- a_list
- i_view
- i_watermark
- i_upload
- i_edit
- i_delete
- i_rate
- i_approve
- i_lock
- i_report
- i_count
- i_unlimited
- c_read
- c_post
- c_edit
- c_delete
- m_comments
- m_delete
- m_edit
- m_move
- m_report
- m_status
- a_count
- a_unlimited
- a_restrict
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- 0
-
-
- 2
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- user_id
- watch_own
- watch_favo
- watch_com
- user_images
- personal_album_id
- user_lastmark
- user_last_update
- user_permissions
- user_permissions_changed
- user_allow_comments
- subscribe_pegas
-
- 2
- 1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 0
-
-
- 52
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
-
-
-
- group_id
- group_type
- group_founder_manage
- group_name
- group_desc
- group_skip_auth
-
- 5
- 3
- 1
- ADMINISTRATORS
- ADMINISTRATORS
- 0
-
-
- 2
- 3
- 1
- REGISTERED
- REGISTERED
- 0
-
-
-
- user_id
- username
- username_clean
- user_birthday
- user_permissions
- user_sig
-
- 2
- Admin
- admin
-
- 0
- 0
-
-
- 52
- TestUser1
- testuser1
-
- 0
- 0
-
-
- 56
- BdayUser1
- bdayuser1
-
- 0
- 0
-
-
- 57
- BdayUser2
- bdayuser2
-
- 0
- 0
-
-
-
- group_id
- user_id
- group_leader
- user_pending
-
- 5
- 2
- 1
- 0
-
-
- 2
- 52
- 0
- 0
-
-
-
- user_id
- zebra_id
- friend
- foe
-
- 2
- 52
- 1
- 0
-
-
- 52
- 2
- 1
- 0
-
-
- 53
- 2
- 0
- 1
-
-
-
+
+
+
+ config_name
+ config_value
+ is_dynamic
+
+ phpbb_gallery_description_length
+ 2000
+ 0
+
+
+ phpbb_gallery_allow_resize
+ 1
+ 0
+
+
+ phpbb_gallery_link_thumbnail
+ image_page
+ 0
+
+
+
+ album_id
+ parent_id
+ left_id
+ right_id
+ album_parents
+ album_type
+ album_status
+ album_contest
+ album_name
+ album_desc
+ album_desc_options
+ album_desc_uid
+ album_desc_bitfield
+ album_user_id
+ album_images
+ album_images_real
+ album_last_image_id
+ album_image
+ album_last_image_time
+ album_last_image_name
+ album_last_username
+ album_last_user_colour
+ album_last_user_id
+ album_watermark
+ album_sort_key
+ album_sort_dir
+ display_in_rrc
+ display_on_index
+ display_subalbum_list
+ album_feed
+ album_auth_access
+
+ 1
+ 0
+ 0
+ 0
+
+ 1
+ 0
+ 0
+ TestPublicAlbum1
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 3
+
+ 0
+ TestImage3
+ admin
+
+ 2
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+ 2
+ 1
+ 1
+ 3
+ a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
+ 1
+ 0
+ 0
+ TestPublicAlbumSubAlbum1
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 6
+
+ 0
+ TestImage6
+ admin
+
+ 2
+ 1
+
+
+ 0
+ 1
+ 1
+ 1
+ 0
+
+
+ 3
+ 1
+ 1
+ 2
+ a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
+ 1
+ 0
+ 0
+ TestPublicAlbumSubAlbum2
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 9
+
+ 0
+ TestImage9
+ admin
+
+ 2
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+ 4
+ 0
+ 1
+ 3
+
+ 1
+ 0
+ 0
+ TestUserAlbum1
+
+ 7
+
+
+ 2
+ 0
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+ 5
+ 0
+ 1
+ 3
+
+ 1
+ 0
+ 0
+ TestUserAlbum2
+
+ 7
+
+
+ 52
+ 0
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+
+ comment_id
+ comment_image_id
+ comment_user_id
+ comment_time
+ comment
+
+ 1
+ 1
+ 52
+ 1438791990
+ This is test comment 1!!!!!
+
+
+ 2
+ 2
+ 52
+ 1438792100
+ This is test comment 2!!!!!
+
+
+ 3
+ 3
+ 52
+ 1438792200
+ This is test comment 3!!!!!
+
+
+ 4
+ 4
+ 2
+ 1438792300
+ This is test comment 4!!!!!
+
+
+ 5
+ 5
+ 2
+ 1438792400
+ This is test comment 5!!!!!
+
+
+ 6
+ 6
+ 2
+ 1438792500
+ This is test comment 6!!!!!
+
+
+
+ image_id
+ image_filename
+ image_name
+ image_name_clean
+ image_desc
+ image_desc_uid
+ image_desc_bitfield
+ image_user_id
+ image_username
+ image_username_clean
+ image_user_colour
+ image_user_ip
+ image_time
+ image_album_id
+ image_view_count
+ image_status
+ image_contest
+ image_contest_end
+ image_contest_rank
+ image_filemissing
+ image_rates
+ image_rate_points
+ image_rate_avg
+ image_comments
+ image_last_comment
+ image_allow_comments
+ image_favorited
+ image_reported
+ filesize_upload
+ filesize_medium
+ filesize_cache
+
+ 1
+ md5hashednamefor1.jpg
+ TestImage1
+ testimage1
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 2
+ md5hashednamefor2.jpg
+ TestImage2
+ testimage2
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 2
+ 30
+ 150
+ 1
+ 2
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 3
+ md5hashednamefor3.jpg
+ TestImage3
+ testimage3
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 3
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 4
+ md5hashednamefor4.jpg
+ TestImage4
+ testimage4
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 4
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 5
+ md5hashednamefor5.jpg
+ TestImage5
+ testimage5
+
+ 10fu4clu
+
+ 53
+ Test2
+ Test2
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 10
+ 1000
+ 1
+ 5
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 6
+ md5hashednamefor6.jpg
+ TestImage6
+ testimage6
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 6
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 7
+ md5hashednamefor7.jpg
+ TestImage7
+ testimage7
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 8
+ md5hashednamefor8.jpg
+ TestImage8
+ testimage8
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 9
+ md5hashednamefor9.jpg
+ TestImage9
+ testimage9
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ album_id
+ user_id
+ username
+ group_id
+ group_name
+ display_on_index
+
+ 1
+ 0
+
+ 5
+ ADMINISTRATORS
+ 1
+
+
+
+ perm_id
+ perm_role_id
+ perm_album_id
+ perm_user_id
+ perm_group_id
+ perm_system
+
+ 1
+ 1
+ 1
+ 0
+ 5
+ 0
+
+
+ 2
+ 2
+ 1
+ 0
+ 2
+ 0
+
+
+ 3
+ 1
+ 2
+ 0
+ 5
+ 0
+
+
+ 4
+ 1
+ 0
+ 0
+ 5
+ -2
+
+
+ 5
+ 1
+ 0
+ 0
+ 5
+ -3
+
+
+
+ role_id
+ a_list
+ i_view
+ i_watermark
+ i_upload
+ i_edit
+ i_delete
+ i_rate
+ i_approve
+ i_lock
+ i_report
+ i_count
+ i_unlimited
+ c_read
+ c_post
+ c_edit
+ c_delete
+ m_comments
+ m_delete
+ m_edit
+ m_move
+ m_report
+ m_status
+ a_count
+ a_unlimited
+ a_restrict
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 2
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ user_id
+ watch_own
+ watch_favo
+ watch_com
+ user_images
+ personal_album_id
+ user_lastmark
+ user_last_update
+ user_permissions
+ user_permissions_changed
+ user_allow_comments
+ subscribe_pegas
+
+ 2
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ 52
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+
+ group_id
+ group_type
+ group_founder_manage
+ group_name
+ group_desc
+ group_skip_auth
+
+ 5
+ 3
+ 1
+ ADMINISTRATORS
+ ADMINISTRATORS
+ 0
+
+
+ 2
+ 3
+ 1
+ REGISTERED
+ REGISTERED
+ 0
+
+
+
+ user_id
+ username
+ username_clean
+ user_birthday
+ user_permissions
+ user_sig
+
+ 2
+ Admin
+ admin
+
+ 0
+ 0
+
+
+ 52
+ TestUser1
+ testuser1
+
+ 0
+ 0
+
+
+ 56
+ BdayUser1
+ bdayuser1
+
+ 0
+ 0
+
+
+ 57
+ BdayUser2
+ bdayuser2
+
+ 0
+ 0
+
+
+
+ group_id
+ user_id
+ group_leader
+ user_pending
+
+ 5
+ 2
+ 1
+ 0
+
+
+ 2
+ 52
+ 0
+ 0
+
+
+
+ user_id
+ zebra_id
+ friend
+ foe
+
+ 2
+ 52
+ 1
+ 0
+
+
+ 52
+ 2
+ 1
+ 0
+
+
+ 53
+ 2
+ 0
+ 1
+
+
+
diff --git a/tests/controller/gallery_album_test.php b/ext/phpbbgallery/tests/controller/gallery_album_test.php
similarity index 96%
rename from tests/controller/gallery_album_test.php
rename to ext/phpbbgallery/tests/controller/gallery_album_test.php
index e0758652..363719f0 100644
--- a/tests/controller/gallery_album_test.php
+++ b/ext/phpbbgallery/tests/controller/gallery_album_test.php
@@ -1,530 +1,530 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\controller;
-
-/**
-* @group controller
-*/
-
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
-
-class gallery_album_test extends controller_base
-{
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
-
- parent::setUp();
-
- global $phpbb_dispatcher, $auth, $user, $cache, $db, $request;
-
- $phpbb_dispatcher = $this->dispatcher;
-
- $auth = $this->auth;
-
- $user = $this->user;
-
- $cache = $this->cache;
-
- $db = $this->db;
-
- $request = $this->request;
-
- }
-
- public function get_controller($user_id, $group, $is_registered)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group'] = $group;
- $this->user->data['is_registered'] = $is_registered;
- $controller = new \phpbbgallery\core\controller\album(
- $this->config,
- $this->controller_helper,
- $this->db,
- $this->pagination,
- $this->template,
- $this->user,
- $this->language,
- $this->display,
- $this->gallery_loader,
- $this->gallery_auth,
- $this->gallery_auth_level,
- $this->gallery_config,
- $this->gallery_notification_helper,
- $this->gallery_url,
- $this->gallery_image,
- $this->request,
- $this->gallery_contest,
- 'phpbb_gallery_images'
- );
-
- return $controller;
- }
-
- public function test_for_base_clean()
- {
- $this->template->expects($this->exactly(10))
- ->method('assign_block_vars')
- ->withConsecutive(
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_VIEW_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_UPLOAD_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_EDIT_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_DELETE_CAN'
- )
- ),
- array(
- 'navlinks',
- array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- )
- ),
- array(
- 'navlinks',
- array(
- 'FORUM_NAME' => 'TestPublicAlbum1',
- 'FORUM_ID' => 1,
- 'U_VIEW_FORUM' => 'phpbbgallery_core_album'
- )
- ),
- array(
- 'imageblock',
- array(
- 'BLOCK_NAME' => 'TestPublicAlbum1'
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 1,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage1',
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'admin ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => '',
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 2,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage2',
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'admin ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => '',
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 3,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage3',
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'testuser ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => '',
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- )
- );
- $this->template->expects($this->exactly(4))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'U_VIEW_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_CONTEST_START' => '',
- 'ALBUM_CONTEST_RATING' => '',
- 'ALBUM_CONTEST_END' => ''
- )
- ),
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => false,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => ''
-
- )
- ),
- array(
- array(
- 'S_IS_POSTABLE' => true,
- 'S_IS_LOCKED' => false,
- 'U_RETURN_LINK' => 'phpbbgallery_core_index',
- 'L_RETURN_LINK' => 'RETURN_TO_GALLERY',
- 'S_ALBUM_ACTION' => 'phpbbgallery_core_album',
- 'S_IS_WATCHED' => false,
- 'U_WATCH_TOGLE' => 'phpbbgallery_core_album_watch'
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES',
- 'S_SELECT_SORT_DIR' => 'ASC DESC ',
- 'S_SELECT_SORT_KEY' => 'TIME IMAGE_NAME GALLERY_VIEWS SORT_USERNAME '
- )
- )
- );
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base(1);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Let's test for base with some options
- * so we can get some more coveralls to go cover
- */
- public function test_for_base_load_modreators_allow_rates_and_comments()
- {
- $this->template->expects($this->exactly(12))
- ->method('assign_block_vars')
- ->withConsecutive(
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_VIEW_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_UPLOAD_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_EDIT_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_DELETE_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_COMMENT_CAN'
- )
- ),
- array(
- 'rules',
- array(
- 'RULE' => 'ALBUM_RATE_CAN'
- )
- ),
- array(
- 'navlinks',
- array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- )
- ),
- array(
- 'navlinks',
- array(
- 'FORUM_NAME' => 'TestPublicAlbum1',
- 'FORUM_ID' => 1,
- 'U_VIEW_FORUM' => 'phpbbgallery_core_album'
- )
- ),
- array(
- 'imageblock',
- array(
- 'BLOCK_NAME' => 'TestPublicAlbum1'
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 1,
- 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
- 'UC_IMAGE_NAME' => 'TestImage1',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'admin ',
- 'TIME' => null,
- 'S_RATINGS' => 'NOT_RATED',
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => 1,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 2,
- 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
- 'UC_IMAGE_NAME' => 'TestImage2',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'admin ',
- 'TIME' => null,
- 'S_RATINGS' => 1.5,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => 1,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- ),
- array(
- 'imageblock.image',
- array(
- 'IMAGE_ID' => 3,
- 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
- 'UC_IMAGE_NAME' => 'TestImage3',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'testuser ',
- 'TIME' => null,
- 'S_RATINGS' => 'NOT_RATED',
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => 1,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- 'S_CONTEST_RANK' => 0
- )
- )
- );
- $this->template->expects($this->exactly(5))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'U_VIEW_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_CONTEST_START' => '',
- 'ALBUM_CONTEST_RATING' => '',
- 'ALBUM_CONTEST_END' => ''
- )
- ),
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => false,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => ''
-
- )
- ),
- array(
- array(
- 'L_MODERATORS' => 'MODERATOR',
- 'MODERATORS' => 'G_ADMINISTRATORS '
- )
- ),
- array(
- array(
- 'S_IS_POSTABLE' => true,
- 'S_IS_LOCKED' => false,
- 'U_RETURN_LINK' => 'phpbbgallery_core_index',
- 'L_RETURN_LINK' => 'RETURN_TO_GALLERY',
- 'S_ALBUM_ACTION' => 'phpbbgallery_core_album',
- 'S_IS_WATCHED' => false,
- 'U_WATCH_TOGLE' => 'phpbbgallery_core_album_watch'
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES',
- 'S_SELECT_SORT_DIR' => 'ASC DESC ',
- 'S_SELECT_SORT_KEY' => 'TIME IMAGE_NAME GALLERY_VIEWS SORT_USERNAME RATING RATES_COUNT COMMENTS NEW_COMMENT '
- )
- )
- );
- $this->config['load_moderators'] = true;
- $this->config['phpbb_gallery_allow_rates'] = true;
- $this->config['phpbb_gallery_allow_comments'] = true;
- $this->config['phpbb_gallery_album_display'] = 255;
- $this->config['phpbb_gallery_link_thumbnail'] = 'image';
- $this->config['phpbb_gallery_link_image_name'] = 'image';
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base(1);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * We will test try to load wrong album
- */
- public function test_controller_album_fail_no_album()
- {
- $controller = $this->get_controller(2, 5, true);
- try
- {
- $controller->base(99);
- $this->fail('This should trow \phpbb\exception\http_exception');
- }
- catch (\phpbb\exception\http_exception $exception)
- {
- $this->assertEquals(404, $exception->getStatusCode());
- $this->assertEquals('ALBUM_NOT_EXIST', $exception->getMessage());
- }
- //$this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- //$this->assertEquals('404', $response->getStatusCode());
- }
- protected function tearDown() : void
- {
- parent::tearDown();
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\controller;
+
+/**
+* @group controller
+*/
+
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
+
+class gallery_album_test extends controller_base
+{
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+
+ parent::setUp();
+
+ global $phpbb_dispatcher, $auth, $user, $cache, $db, $request;
+
+ $phpbb_dispatcher = $this->dispatcher;
+
+ $auth = $this->auth;
+
+ $user = $this->user;
+
+ $cache = $this->cache;
+
+ $db = $this->db;
+
+ $request = $this->request;
+
+ }
+
+ public function get_controller($user_id, $group, $is_registered)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group'] = $group;
+ $this->user->data['is_registered'] = $is_registered;
+ $controller = new \phpbbgallery\core\controller\album(
+ $this->config,
+ $this->controller_helper,
+ $this->db,
+ $this->pagination,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->display,
+ $this->gallery_loader,
+ $this->gallery_auth,
+ $this->gallery_auth_level,
+ $this->gallery_config,
+ $this->gallery_notification_helper,
+ $this->gallery_url,
+ $this->gallery_image,
+ $this->request,
+ $this->gallery_contest,
+ 'phpbb_gallery_images'
+ );
+
+ return $controller;
+ }
+
+ public function test_for_base_clean()
+ {
+ $this->template->expects($this->exactly(10))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_VIEW_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_UPLOAD_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_EDIT_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_DELETE_CAN'
+ )
+ ),
+ array(
+ 'navlinks',
+ array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ )
+ ),
+ array(
+ 'navlinks',
+ array(
+ 'FORUM_NAME' => 'TestPublicAlbum1',
+ 'FORUM_ID' => 1,
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_album'
+ )
+ ),
+ array(
+ 'imageblock',
+ array(
+ 'BLOCK_NAME' => 'TestPublicAlbum1'
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 1,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage1',
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'admin ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => '',
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 2,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage2',
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'admin ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => '',
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 3,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage3',
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'testuser ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => '',
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ )
+ );
+ $this->template->expects($this->exactly(4))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'U_VIEW_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_CONTEST_START' => '',
+ 'ALBUM_CONTEST_RATING' => '',
+ 'ALBUM_CONTEST_END' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => false,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => ''
+
+ )
+ ),
+ array(
+ array(
+ 'S_IS_POSTABLE' => true,
+ 'S_IS_LOCKED' => false,
+ 'U_RETURN_LINK' => 'phpbbgallery_core_index',
+ 'L_RETURN_LINK' => 'RETURN_TO_GALLERY',
+ 'S_ALBUM_ACTION' => 'phpbbgallery_core_album',
+ 'S_IS_WATCHED' => false,
+ 'U_WATCH_TOGLE' => 'phpbbgallery_core_album_watch'
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES',
+ 'S_SELECT_SORT_DIR' => 'ASC DESC ',
+ 'S_SELECT_SORT_KEY' => 'TIME IMAGE_NAME GALLERY_VIEWS SORT_USERNAME '
+ )
+ )
+ );
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base(1);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Let's test for base with some options
+ * so we can get some more coveralls to go cover
+ */
+ public function test_for_base_load_modreators_allow_rates_and_comments()
+ {
+ $this->template->expects($this->exactly(12))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_VIEW_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_UPLOAD_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_EDIT_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_DELETE_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_COMMENT_CAN'
+ )
+ ),
+ array(
+ 'rules',
+ array(
+ 'RULE' => 'ALBUM_RATE_CAN'
+ )
+ ),
+ array(
+ 'navlinks',
+ array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ )
+ ),
+ array(
+ 'navlinks',
+ array(
+ 'FORUM_NAME' => 'TestPublicAlbum1',
+ 'FORUM_ID' => 1,
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_album'
+ )
+ ),
+ array(
+ 'imageblock',
+ array(
+ 'BLOCK_NAME' => 'TestPublicAlbum1'
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 1,
+ 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
+ 'UC_IMAGE_NAME' => 'TestImage1',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'admin ',
+ 'TIME' => null,
+ 'S_RATINGS' => 'NOT_RATED',
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => 1,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 2,
+ 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
+ 'UC_IMAGE_NAME' => 'TestImage2',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'admin ',
+ 'TIME' => null,
+ 'S_RATINGS' => 1.5,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => 1,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ ),
+ array(
+ 'imageblock.image',
+ array(
+ 'IMAGE_ID' => 3,
+ 'U_IMAGE' => 'phpbbgallery_core_image_file_source',
+ 'UC_IMAGE_NAME' => 'TestImage3',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image_file_source',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'testuser ',
+ 'TIME' => null,
+ 'S_RATINGS' => 'NOT_RATED',
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => 1,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ 'S_CONTEST_RANK' => 0
+ )
+ )
+ );
+ $this->template->expects($this->exactly(5))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'U_VIEW_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_CONTEST_START' => '',
+ 'ALBUM_CONTEST_RATING' => '',
+ 'ALBUM_CONTEST_END' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => false,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => ''
+
+ )
+ ),
+ array(
+ array(
+ 'L_MODERATORS' => 'MODERATOR',
+ 'MODERATORS' => 'G_ADMINISTRATORS '
+ )
+ ),
+ array(
+ array(
+ 'S_IS_POSTABLE' => true,
+ 'S_IS_LOCKED' => false,
+ 'U_RETURN_LINK' => 'phpbbgallery_core_index',
+ 'L_RETURN_LINK' => 'RETURN_TO_GALLERY',
+ 'S_ALBUM_ACTION' => 'phpbbgallery_core_album',
+ 'S_IS_WATCHED' => false,
+ 'U_WATCH_TOGLE' => 'phpbbgallery_core_album_watch'
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES',
+ 'S_SELECT_SORT_DIR' => 'ASC DESC ',
+ 'S_SELECT_SORT_KEY' => 'TIME IMAGE_NAME GALLERY_VIEWS SORT_USERNAME RATING RATES_COUNT COMMENTS NEW_COMMENT '
+ )
+ )
+ );
+ $this->config['load_moderators'] = true;
+ $this->config['phpbb_gallery_allow_rates'] = true;
+ $this->config['phpbb_gallery_allow_comments'] = true;
+ $this->config['phpbb_gallery_album_display'] = 255;
+ $this->config['phpbb_gallery_link_thumbnail'] = 'image';
+ $this->config['phpbb_gallery_link_image_name'] = 'image';
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base(1);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * We will test try to load wrong album
+ */
+ public function test_controller_album_fail_no_album()
+ {
+ $controller = $this->get_controller(2, 5, true);
+ try
+ {
+ $controller->base(99);
+ $this->fail('This should trow \phpbb\exception\http_exception');
+ }
+ catch (\phpbb\exception\http_exception $exception)
+ {
+ $this->assertEquals(404, $exception->getStatusCode());
+ $this->assertEquals('ALBUM_NOT_EXIST', $exception->getMessage());
+ }
+ //$this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ //$this->assertEquals('404', $response->getStatusCode());
+ }
+ protected function tearDown() : void
+ {
+ parent::tearDown();
+ }
+}
diff --git a/tests/controller/gallery_comment_test.php b/ext/phpbbgallery/tests/controller/gallery_comment_test.php
similarity index 100%
rename from tests/controller/gallery_comment_test.php
rename to ext/phpbbgallery/tests/controller/gallery_comment_test.php
diff --git a/tests/controller/gallery_index_test.php b/ext/phpbbgallery/tests/controller/gallery_index_test.php
similarity index 97%
rename from tests/controller/gallery_index_test.php
rename to ext/phpbbgallery/tests/controller/gallery_index_test.php
index d3883943..e4fad1de 100644
--- a/tests/controller/gallery_index_test.php
+++ b/ext/phpbbgallery/tests/controller/gallery_index_test.php
@@ -1,968 +1,968 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\controller;
-
-/**
-* @group controller
-*/
-
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
-
-class gallery_index_test extends controller_base
-{
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
-
- parent::setUp();
-
- global $phpbb_dispatcher, $auth, $user, $cache, $db;
-
- $phpbb_dispatcher = $this->dispatcher;
-
- $auth = $this->auth;
-
- $user = $this->user;
-
- $cache = $this->cache;
-
- $db = $this->db;
-
- }
-
- // Add external function
- public function create_datetime_callback($time = 'now', \DateTimeZone $timezone = null)
- {
- $timezone = $timezone ?: $this->user->timezone;
- return new \phpbb\datetime($this->user, $time, $timezone);
- }
-
- public function test_install()
- {
- $db_tools = new \phpbb\db\tools\tools($this->db);
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_albums'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_albums_track'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_comments'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_contests'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_favorites'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_images'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_modscache'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_permissions'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_rates'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_reports'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_roles'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_users'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_watch'));
- $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_log'));
- }
-
- public function get_controller($user_id, $group, $is_registered)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group'] = $group;
- $this->user->data['is_registered'] = $is_registered;
- $this->user->lang['GUEST'] = 'Guest';
- $controller = new \phpbbgallery\core\controller\index(
- $this->auth,
- $this->config,
- $this->db,
- $this->request,
- $this->template,
- $this->user,
- $this->language,
- $this->controller_helper,
- $this->display,
- $this->gallery_config,
- $this->gallery_auth,
- $this->gallery_search,
- $this->pagination,
- $this->gallery_user,
- $this->gallery_image,
- './',
- 'php'
- );
-
- return $controller;
- }
-
- /**
- * Test controller index
- * function base()
- * As I can't pass parameters to ->withConsecutive but I want to
- * will have to make diferent test for each case
- *
- */
- public function test_controller_base_case_1()
- {
- $this->template->expects($this->exactly(3))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => true,
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 6,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => '',
- 'LAST_IMAGE_TIME' => null,
- 'LAST_USER_FULL' => 'admin ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
- 'L_SUBALBUM_STR' => 'SUBALBUM',
- 'L_ALBUM_FOLDER_ALT' => '',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('albumrow.subalbum', array(
- 'U_SUBALBUM' => 'phpbbgallery_core_album',
- 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'S_UNREAD' => false,
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
- ))
- );
- $this->template->expects($this->exactly(6))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUM',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- )
- ),
- array(
- array(
- 'S_USERS_PERSONAL_GALLERIES' => true,
- 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
- 'U_PERSONAL_GALLERIES_IMAGES' => 0,
- 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
- 'U_IMAGENAME' => false,
- 'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
- 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
- 'U_TIME' => false,
- 'U_UPLOADER' => false
- )
- ),
- array(
- array(
- 'S_PERSONAL_ALBUM' => true,
- 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
- 'U_PERSONAL_ALBUM_USER' => 'admin',
- 'U_PERSONAL_ALBUM_COLOR' => null
- )
- ),
- array(
- array(
- 'LEGEND' => ''
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
- 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
- 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
- 'NEWEST_PGALLERIES' => ''
- )
- ),
- array(
- array(
- 'U_MCP' => 'phpbbgallery_core_moderate',
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
- 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
- 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
- 'U_G_SEARCH_COMMENTED' => false,
- 'U_G_SEARCH_RECENT' => false,
- 'U_G_SEARCH_RANDOM' => false,
- 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
- 'U_G_SEARCH_TOPRATED' => ''
- )
- )
- );
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('link_image_icon', 'image_page');
- $this->gallery_config->set('pegas_index_album', 0);
- $this->gallery_config->set('disp_birthdays', 0);
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base();
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Case 2 -> show user albums
- * pegas_index_album -> 1
- */
- public function test_controller_base_case_2()
- {
- $this->template->expects($this->exactly(5))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => true,
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 6,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => '',
- 'LAST_IMAGE_TIME' => null,
- 'LAST_USER_FULL' => 'admin ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
- 'L_SUBALBUM_STR' => 'SUBALBUM',
- 'L_ALBUM_FOLDER_ALT' => '',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('albumrow.subalbum', array(
- 'U_SUBALBUM' => 'phpbbgallery_core_album',
- 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'S_UNREAD' => false
- )),
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => false,
- 'ALBUM_ID' => 4,
- 'ALBUM_NAME' => 'TestUserAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 0,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
- 'LAST_IMAGE_TIME' => 0,
- 'LAST_USER_FULL' => 'Guest ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => '',
- 'L_SUBALBUM_STR' => '',
- 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => false,
- 'ALBUM_ID' => 5,
- 'ALBUM_NAME' => 'TestUserAlbum2',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 0,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
- 'LAST_IMAGE_TIME' => 0,
- 'LAST_USER_FULL' => 'Guest ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => '',
- 'L_SUBALBUM_STR' => '',
- 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
- ))
- );
- $this->template->expects($this->exactly(5))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUM',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- )
- ),
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- )
- ),
- array(
- array(
- 'LEGEND' => ''
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
- 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
- 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
- 'NEWEST_PGALLERIES' => ''
- )
- ),
- array(
- array(
- 'U_MCP' => 'phpbbgallery_core_moderate',
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
- 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
- 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
- 'U_G_SEARCH_COMMENTED' => false,
- 'U_G_SEARCH_RECENT' => false,
- 'U_G_SEARCH_RANDOM' => false,
- 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
- 'U_G_SEARCH_TOPRATED' => ''
- )
- )
- );
- $this->gallery_config->set('link_image_icon', 'image');
- $this->gallery_config->set('pegas_index_album', 1);
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('disp_birthdays', 0);
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base();
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Case 3 admin with display birthdays
- * disp_birthdays -> 1
- */
- public function test_controller_base_case_3()
- {
- $this->template->expects($this->exactly(3))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => true,
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 6,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => '',
- 'LAST_IMAGE_TIME' => null,
- 'LAST_USER_FULL' => 'admin ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
- 'L_SUBALBUM_STR' => 'SUBALBUM',
- 'L_ALBUM_FOLDER_ALT' => '',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('albumrow.subalbum', array(
- 'U_SUBALBUM' => 'phpbbgallery_core_album',
- 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'S_UNREAD' => false,
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
- ))
- );
- $this->template->expects($this->exactly(7))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUM',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- )
- ),
- array(
- array(
- 'S_USERS_PERSONAL_GALLERIES' => true,
- 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
- 'U_PERSONAL_GALLERIES_IMAGES' => 0,
- 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
- 'U_IMAGENAME' => false,
- 'U_IMAGE_ACTION' => false,
- 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
- 'U_TIME' => false,
- 'U_UPLOADER' => false
- )
- ),
- array(
- array(
- 'S_PERSONAL_ALBUM' => true,
- 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
- 'U_PERSONAL_ALBUM_USER' => 'admin',
- 'U_PERSONAL_ALBUM_COLOR' => null
- )
- ),
- array(
- array(
- 'LEGEND' => ''
- )
- ),
- array(
- array(
- 'S_DISPLAY_BIRTHDAY_LIST' => true
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
- 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
- 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
- 'NEWEST_PGALLERIES' => ''
- )
- ),
- array(
- array(
- 'U_MCP' => 'phpbbgallery_core_moderate',
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
- 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
- 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
- 'U_G_SEARCH_COMMENTED' => false,
- 'U_G_SEARCH_RECENT' => false,
- 'U_G_SEARCH_RANDOM' => false,
- 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
- 'U_G_SEARCH_TOPRATED' => ''
- )
- )
- );
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('link_image_icon', 'none');
- $this->gallery_config->set('pegas_index_album', 0);
- $this->gallery_config->set('disp_birthdays', 1);
- $this->config->set('load_birthdays', 1);
- $this->config->set('allow_birthdays', 1);
- $this->auth->method('acl_gets')
- ->willReturn(true);
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base();
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Test RRC Gallery Index Mode to show Recent images
- * rrc_gindex_mode -> 1
- */
- public function test_controller_base_case_4()
- {
- if (getenv('DB') == 'postgres')
- {
- $this->template->expects($this->exactly(5))
- ->method('assign_block_vars');
- }
- else
- {
- $this->template->expects($this->exactly(5))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => true,
- 'ALBUM_ID' => 1,
- 'ALBUM_NAME' => 'TestPublicAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 6,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => '',
- 'LAST_IMAGE_TIME' => null,
- 'LAST_USER_FULL' => 'admin ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
- 'L_SUBALBUM_STR' => 'SUBALBUM',
- 'L_ALBUM_FOLDER_ALT' => '',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('albumrow.subalbum', array(
- 'U_SUBALBUM' => 'phpbbgallery_core_album',
- 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'S_UNREAD' => false,
- )),
- array('imageblock', array(
- 'BLOCK_NAME' => 'RECENT_IMAGES',
- 'U_BLOCK' => 'phpbbgallery_core_search_recent'
- )),
- array('imageblock.image', array(
- 'IMAGE_ID' => 6,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage6',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'testuser ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS'
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- ))
- );
- }
-
- $this->template->expects($this->exactly(8))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUM',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- )
- ),
- array(
- array(
- 'S_USERS_PERSONAL_GALLERIES' => true,
- 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
- 'U_PERSONAL_GALLERIES_IMAGES' => 0,
- 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
- 'U_IMAGENAME' => false,
- 'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
- 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
- 'U_TIME' => false,
- 'U_UPLOADER' => false
- )
- ),
- array(
- array(
- 'S_PERSONAL_ALBUM' => true,
- 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
- 'U_PERSONAL_ALBUM_USER' => 'admin',
- 'U_PERSONAL_ALBUM_COLOR' => null
- )
- ),
- array(
- array(
- 'U_RECENT' => true
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES'
- )
- ),
- array(
- array(
- 'LEGEND' => ''
- )
- ),
- array(
- array(
- 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
- 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
- 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
- 'NEWEST_PGALLERIES' => ''
- )
- ),
- array(
- array(
- 'U_MCP' => 'phpbbgallery_core_moderate',
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
- 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
- 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
- 'U_G_SEARCH_COMMENTED' => false,
- 'U_G_SEARCH_RECENT' => 'phpbbgallery_core_search_recent',
- 'U_G_SEARCH_RANDOM' => false,
- 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
- 'U_G_SEARCH_TOPRATED' => ''
- )
- )
- );
- $this->gallery_config->set('rrc_gindex_mode', 1);
- $this->gallery_config->set('pegas_index_rct_count', 1);
- $this->gallery_config->set('default_sort_key', 't');
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->base();
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
- // Here we should have few more cases but let's move to personal albums
- /**
- * Test controller index
- * function personal()
- * As I can't pass parameters to ->withConsecutive but I want to
- * will have to make diferent test for each case
- * Default case -> admin see all personal albums with default per page
- */
- public function test_index_personal_case_1()
- {
- $this->template->expects($this->exactly(4))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => false,
- 'ALBUM_ID' => 4,
- 'ALBUM_NAME' => 'TestUserAlbum1',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 0,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
- 'LAST_IMAGE_TIME' => 0,
- 'LAST_USER_FULL' => 'Guest ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => '',
- 'L_SUBALBUM_STR' => '',
- 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
-
- )),
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => false,
- 'ALBUM_ID' => 5,
- 'ALBUM_NAME' => 'TestUserAlbum2',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 0,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
- 'LAST_IMAGE_TIME' => 0,
- 'LAST_USER_FULL' => 'Guest ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => '',
- 'L_SUBALBUM_STR' => '',
- 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'PERSONAL_ALBUMS',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
- ))
- );
- $this->template->expects($this->exactly(3))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => ''
- )
- ),
- array(
- array(
- 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
- )
- ),
- array(
- array(
- 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
- )
- )
- );
- $this->user->lang = array(
- 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
- 'TOTAL_PEGAS_SHORT_SPRINTF_1',
- 'TOTAL_PEGAS_SHORT_SPRINTF_2',
- 'TOTAL_PEGAS_SHORT_SPRINTF_3'
- )
- );
- $this->gallery_config->set('link_image_icon', 'image');
- $this->gallery_config->set('pegas_index_album', 1);
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('disp_birthdays', 0);
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->personal(1);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Case 2 -> test pagination!
- */
- public function test_index_personal_case_2()
- {
- $this->template->expects($this->exactly(3))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('albumrow', array(
- 'S_IS_CAT' => false,
- 'S_NO_CAT' => false,
- 'S_LOCKED_ALBUM' => false,
- 'S_UNREAD_ALBUM' => false,
- 'S_LIST_SUBALBUMS' => true,
- 'S_SUBALBUMS' => false,
- 'ALBUM_ID' => 5,
- 'ALBUM_NAME' => 'TestUserAlbum2',
- 'ALBUM_DESC' => '',
- 'IMAGES' => 0,
- 'UNAPPROVED_IMAGES' => 0,
- 'ALBUM_IMG_STYLE' => 'forum_read',
- 'ALBUM_FOLDER_IMG' => null,
- 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
- 'LAST_IMAGE_TIME' => 0,
- 'LAST_USER_FULL' => 'Guest ',
- 'UC_THUMBNAIL' => '',
- 'UC_FAKE_THUMBNAIL' => '',
- 'UC_IMAGE_NAME' => '',
- 'UC_LASTIMAGE_ICON' => '',
- 'ALBUM_COLOUR' => '',
- 'MODERATORS' => '',
- 'SUBALBUMS' => '',
- 'L_SUBALBUM_STR' => '',
- 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
- 'L_MODERATOR_STR' => '',
- 'U_VIEWALBUM' => 'phpbbgallery_core_album',
- 'UC_IMAGE_URL' => '',
- 'ALBUM_IMAGE' => ''
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'PERSONAL_ALBUMS',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
- ))
- );
- $this->template->expects($this->exactly(3))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => ''
- )
- ),
- array(
- array(
- 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
- )
- ),
- array(
- array(
- 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
- )
- )
- );
- $this->user->lang = array(
- 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
- 'TOTAL_PEGAS_SHORT_SPRINTF_1',
- 'TOTAL_PEGAS_SHORT_SPRINTF_2',
- 'TOTAL_PEGAS_SHORT_SPRINTF_3'
- )
- );
- $this->gallery_config->set('items_per_page', 1);
- $this->gallery_config->set('link_image_icon', 'image');
- $this->gallery_config->set('pegas_index_album', 1);
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('disp_birthdays', 0);
- $controller = $this->get_controller(2, 5, true);
- $response = $controller->personal(2);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- /**
- * Case 3 -> User see no albums!
- */
- public function test_index_personal_case_3()
- {
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('navlinks', array(
- 'FORUM_NAME' => 'GALLERY',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
- )),
- array('navlinks', array(
- 'FORUM_NAME' => 'PERSONAL_ALBUMS',
- 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
- ))
- );
- $this->template->expects($this->exactly(3))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- array(
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => false,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => ''
- )
- ),
- array(
- array(
- 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
- )
- ),
- array(
- array(
- 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
- )
- )
- );
- $this->user->lang = array(
- 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
- 'TOTAL_PEGAS_SHORT_SPRINTF_1',
- 'TOTAL_PEGAS_SHORT_SPRINTF_2',
- 'TOTAL_PEGAS_SHORT_SPRINTF_3'
- )
- );
- $this->gallery_config->set('items_per_page', 1);
- $this->gallery_config->set('link_image_icon', 'image');
- $this->gallery_config->set('pegas_index_album', 1);
- $this->gallery_config->set('rrc_gindex_mode', 0);
- $this->gallery_config->set('disp_birthdays', 0);
- $controller = $this->get_controller(52, 2, true);
- $response = $controller->personal(1);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
-
- protected function tearDown() : void
- {
- parent::tearDown();
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\controller;
+
+/**
+* @group controller
+*/
+
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
+
+class gallery_index_test extends controller_base
+{
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+
+ parent::setUp();
+
+ global $phpbb_dispatcher, $auth, $user, $cache, $db;
+
+ $phpbb_dispatcher = $this->dispatcher;
+
+ $auth = $this->auth;
+
+ $user = $this->user;
+
+ $cache = $this->cache;
+
+ $db = $this->db;
+
+ }
+
+ // Add external function
+ public function create_datetime_callback($time = 'now', \DateTimeZone $timezone = null)
+ {
+ $timezone = $timezone ?: $this->user->timezone;
+ return new \phpbb\datetime($this->user, $time, $timezone);
+ }
+
+ public function test_install()
+ {
+ $db_tools = new \phpbb\db\tools\tools($this->db);
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_albums'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_albums_track'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_comments'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_contests'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_favorites'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_images'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_modscache'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_permissions'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_rates'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_reports'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_roles'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_users'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_watch'));
+ $this->assertTrue($db_tools->sql_table_exists('phpbb_gallery_log'));
+ }
+
+ public function get_controller($user_id, $group, $is_registered)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group'] = $group;
+ $this->user->data['is_registered'] = $is_registered;
+ $this->user->lang['GUEST'] = 'Guest';
+ $controller = new \phpbbgallery\core\controller\index(
+ $this->auth,
+ $this->config,
+ $this->db,
+ $this->request,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->controller_helper,
+ $this->display,
+ $this->gallery_config,
+ $this->gallery_auth,
+ $this->gallery_search,
+ $this->pagination,
+ $this->gallery_user,
+ $this->gallery_image,
+ './',
+ 'php'
+ );
+
+ return $controller;
+ }
+
+ /**
+ * Test controller index
+ * function base()
+ * As I can't pass parameters to ->withConsecutive but I want to
+ * will have to make diferent test for each case
+ *
+ */
+ public function test_controller_base_case_1()
+ {
+ $this->template->expects($this->exactly(3))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => true,
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 6,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => '',
+ 'LAST_IMAGE_TIME' => null,
+ 'LAST_USER_FULL' => 'admin ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
+ 'L_SUBALBUM_STR' => 'SUBALBUM',
+ 'L_ALBUM_FOLDER_ALT' => '',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('albumrow.subalbum', array(
+ 'U_SUBALBUM' => 'phpbbgallery_core_album',
+ 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'S_UNREAD' => false,
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
+ ))
+ );
+ $this->template->expects($this->exactly(6))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUM',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ )
+ ),
+ array(
+ array(
+ 'S_USERS_PERSONAL_GALLERIES' => true,
+ 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
+ 'U_PERSONAL_GALLERIES_IMAGES' => 0,
+ 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
+ 'U_IMAGENAME' => false,
+ 'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
+ 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
+ 'U_TIME' => false,
+ 'U_UPLOADER' => false
+ )
+ ),
+ array(
+ array(
+ 'S_PERSONAL_ALBUM' => true,
+ 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
+ 'U_PERSONAL_ALBUM_USER' => 'admin',
+ 'U_PERSONAL_ALBUM_COLOR' => null
+ )
+ ),
+ array(
+ array(
+ 'LEGEND' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
+ 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
+ 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
+ 'NEWEST_PGALLERIES' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MCP' => 'phpbbgallery_core_moderate',
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
+ 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
+ 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
+ 'U_G_SEARCH_COMMENTED' => false,
+ 'U_G_SEARCH_RECENT' => false,
+ 'U_G_SEARCH_RANDOM' => false,
+ 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
+ 'U_G_SEARCH_TOPRATED' => ''
+ )
+ )
+ );
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('link_image_icon', 'image_page');
+ $this->gallery_config->set('pegas_index_album', 0);
+ $this->gallery_config->set('disp_birthdays', 0);
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base();
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Case 2 -> show user albums
+ * pegas_index_album -> 1
+ */
+ public function test_controller_base_case_2()
+ {
+ $this->template->expects($this->exactly(5))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => true,
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 6,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => '',
+ 'LAST_IMAGE_TIME' => null,
+ 'LAST_USER_FULL' => 'admin ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
+ 'L_SUBALBUM_STR' => 'SUBALBUM',
+ 'L_ALBUM_FOLDER_ALT' => '',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('albumrow.subalbum', array(
+ 'U_SUBALBUM' => 'phpbbgallery_core_album',
+ 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'S_UNREAD' => false
+ )),
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => false,
+ 'ALBUM_ID' => 4,
+ 'ALBUM_NAME' => 'TestUserAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 0,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
+ 'LAST_IMAGE_TIME' => 0,
+ 'LAST_USER_FULL' => 'Guest ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => '',
+ 'L_SUBALBUM_STR' => '',
+ 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => false,
+ 'ALBUM_ID' => 5,
+ 'ALBUM_NAME' => 'TestUserAlbum2',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 0,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
+ 'LAST_IMAGE_TIME' => 0,
+ 'LAST_USER_FULL' => 'Guest ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => '',
+ 'L_SUBALBUM_STR' => '',
+ 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
+ ))
+ );
+ $this->template->expects($this->exactly(5))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUM',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ )
+ ),
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ )
+ ),
+ array(
+ array(
+ 'LEGEND' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
+ 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
+ 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
+ 'NEWEST_PGALLERIES' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MCP' => 'phpbbgallery_core_moderate',
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
+ 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
+ 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
+ 'U_G_SEARCH_COMMENTED' => false,
+ 'U_G_SEARCH_RECENT' => false,
+ 'U_G_SEARCH_RANDOM' => false,
+ 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
+ 'U_G_SEARCH_TOPRATED' => ''
+ )
+ )
+ );
+ $this->gallery_config->set('link_image_icon', 'image');
+ $this->gallery_config->set('pegas_index_album', 1);
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('disp_birthdays', 0);
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base();
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Case 3 admin with display birthdays
+ * disp_birthdays -> 1
+ */
+ public function test_controller_base_case_3()
+ {
+ $this->template->expects($this->exactly(3))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => true,
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 6,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => '',
+ 'LAST_IMAGE_TIME' => null,
+ 'LAST_USER_FULL' => 'admin ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
+ 'L_SUBALBUM_STR' => 'SUBALBUM',
+ 'L_ALBUM_FOLDER_ALT' => '',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('albumrow.subalbum', array(
+ 'U_SUBALBUM' => 'phpbbgallery_core_album',
+ 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'S_UNREAD' => false,
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index',
+ ))
+ );
+ $this->template->expects($this->exactly(7))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUM',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ )
+ ),
+ array(
+ array(
+ 'S_USERS_PERSONAL_GALLERIES' => true,
+ 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
+ 'U_PERSONAL_GALLERIES_IMAGES' => 0,
+ 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
+ 'U_IMAGENAME' => false,
+ 'U_IMAGE_ACTION' => false,
+ 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
+ 'U_TIME' => false,
+ 'U_UPLOADER' => false
+ )
+ ),
+ array(
+ array(
+ 'S_PERSONAL_ALBUM' => true,
+ 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
+ 'U_PERSONAL_ALBUM_USER' => 'admin',
+ 'U_PERSONAL_ALBUM_COLOR' => null
+ )
+ ),
+ array(
+ array(
+ 'LEGEND' => ''
+ )
+ ),
+ array(
+ array(
+ 'S_DISPLAY_BIRTHDAY_LIST' => true
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
+ 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
+ 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
+ 'NEWEST_PGALLERIES' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MCP' => 'phpbbgallery_core_moderate',
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
+ 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
+ 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
+ 'U_G_SEARCH_COMMENTED' => false,
+ 'U_G_SEARCH_RECENT' => false,
+ 'U_G_SEARCH_RANDOM' => false,
+ 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
+ 'U_G_SEARCH_TOPRATED' => ''
+ )
+ )
+ );
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('link_image_icon', 'none');
+ $this->gallery_config->set('pegas_index_album', 0);
+ $this->gallery_config->set('disp_birthdays', 1);
+ $this->config->set('load_birthdays', 1);
+ $this->config->set('allow_birthdays', 1);
+ $this->auth->method('acl_gets')
+ ->willReturn(true);
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base();
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Test RRC Gallery Index Mode to show Recent images
+ * rrc_gindex_mode -> 1
+ */
+ public function test_controller_base_case_4()
+ {
+ if (getenv('DB') == 'postgres')
+ {
+ $this->template->expects($this->exactly(5))
+ ->method('assign_block_vars');
+ }
+ else
+ {
+ $this->template->expects($this->exactly(5))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => true,
+ 'ALBUM_ID' => 1,
+ 'ALBUM_NAME' => 'TestPublicAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 6,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read_subforum',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => '',
+ 'LAST_IMAGE_TIME' => null,
+ 'LAST_USER_FULL' => 'admin ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => 'TestPublicAlbumSubAlbum1 ',
+ 'L_SUBALBUM_STR' => 'SUBALBUM',
+ 'L_ALBUM_FOLDER_ALT' => '',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('albumrow.subalbum', array(
+ 'U_SUBALBUM' => 'phpbbgallery_core_album',
+ 'SUBALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'S_UNREAD' => false,
+ )),
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'RECENT_IMAGES',
+ 'U_BLOCK' => 'phpbbgallery_core_search_recent'
+ )),
+ array('imageblock.image', array(
+ 'IMAGE_ID' => 6,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage6',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'testuser ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS'
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ ))
+ );
+ }
+
+ $this->template->expects($this->exactly(8))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUM',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ )
+ ),
+ array(
+ array(
+ 'S_USERS_PERSONAL_GALLERIES' => true,
+ 'U_USERS_PERSONAL_GALLERIES' => 'phpbbgallery_core_personal',
+ 'U_PERSONAL_GALLERIES_IMAGES' => 0,
+ 'U_PERSONAL_GALLERIES_LAST_IMAGE' => 'phpbbgallery_core_image_file_mini',
+ 'U_IMAGENAME' => false,
+ 'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
+ 'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
+ 'U_TIME' => false,
+ 'U_UPLOADER' => false
+ )
+ ),
+ array(
+ array(
+ 'S_PERSONAL_ALBUM' => true,
+ 'U_PERSONAL_ALBUM' => 'phpbbgallery_core_album',
+ 'U_PERSONAL_ALBUM_USER' => 'admin',
+ 'U_PERSONAL_ALBUM_COLOR' => null
+ )
+ ),
+ array(
+ array(
+ 'U_RECENT' => true
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'VIEW_ALBUM_IMAGES'
+ )
+ ),
+ array(
+ array(
+ 'LEGEND' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_IMAGES' => 'TOTAL_IMAGES_SPRINTF',
+ 'TOTAL_COMMENTS' => 'TOTAL_COMMENTS_SPRINTF',
+ 'TOTAL_PGALLERIES' => 'TOTAL_PEGAS_SPRINTF',
+ 'NEWEST_PGALLERIES' => ''
+ )
+ ),
+ array(
+ array(
+ 'U_MCP' => 'phpbbgallery_core_moderate',
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_index',
+ 'S_LOGIN_ACTION' => './ucp.php?mode=login&redirect=phpbbgallery_core_index',
+ 'U_GALLERY_SEARCH' => 'phpbbgallery_core_search',
+ 'U_G_SEARCH_COMMENTED' => false,
+ 'U_G_SEARCH_RECENT' => 'phpbbgallery_core_search_recent',
+ 'U_G_SEARCH_RANDOM' => false,
+ 'U_G_SEARCH_SELF' => 'phpbbgallery_core_search_egosearch',
+ 'U_G_SEARCH_TOPRATED' => ''
+ )
+ )
+ );
+ $this->gallery_config->set('rrc_gindex_mode', 1);
+ $this->gallery_config->set('pegas_index_rct_count', 1);
+ $this->gallery_config->set('default_sort_key', 't');
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->base();
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+ // Here we should have few more cases but let's move to personal albums
+ /**
+ * Test controller index
+ * function personal()
+ * As I can't pass parameters to ->withConsecutive but I want to
+ * will have to make diferent test for each case
+ * Default case -> admin see all personal albums with default per page
+ */
+ public function test_index_personal_case_1()
+ {
+ $this->template->expects($this->exactly(4))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => false,
+ 'ALBUM_ID' => 4,
+ 'ALBUM_NAME' => 'TestUserAlbum1',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 0,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
+ 'LAST_IMAGE_TIME' => 0,
+ 'LAST_USER_FULL' => 'Guest ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => '',
+ 'L_SUBALBUM_STR' => '',
+ 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+
+ )),
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => false,
+ 'ALBUM_ID' => 5,
+ 'ALBUM_NAME' => 'TestUserAlbum2',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 0,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
+ 'LAST_IMAGE_TIME' => 0,
+ 'LAST_USER_FULL' => 'Guest ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => '',
+ 'L_SUBALBUM_STR' => '',
+ 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'PERSONAL_ALBUMS',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
+ ))
+ );
+ $this->template->expects($this->exactly(3))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
+ )
+ ),
+ array(
+ array(
+ 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
+ )
+ )
+ );
+ $this->user->lang = array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF_1',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_2',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_3'
+ )
+ );
+ $this->gallery_config->set('link_image_icon', 'image');
+ $this->gallery_config->set('pegas_index_album', 1);
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('disp_birthdays', 0);
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->personal(1);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Case 2 -> test pagination!
+ */
+ public function test_index_personal_case_2()
+ {
+ $this->template->expects($this->exactly(3))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('albumrow', array(
+ 'S_IS_CAT' => false,
+ 'S_NO_CAT' => false,
+ 'S_LOCKED_ALBUM' => false,
+ 'S_UNREAD_ALBUM' => false,
+ 'S_LIST_SUBALBUMS' => true,
+ 'S_SUBALBUMS' => false,
+ 'ALBUM_ID' => 5,
+ 'ALBUM_NAME' => 'TestUserAlbum2',
+ 'ALBUM_DESC' => '',
+ 'IMAGES' => 0,
+ 'UNAPPROVED_IMAGES' => 0,
+ 'ALBUM_IMG_STYLE' => 'forum_read',
+ 'ALBUM_FOLDER_IMG' => null,
+ 'ALBUM_FOLDER_IMG_ALT' => 'NO_NEW_IMAGES',
+ 'LAST_IMAGE_TIME' => 0,
+ 'LAST_USER_FULL' => 'Guest ',
+ 'UC_THUMBNAIL' => '',
+ 'UC_FAKE_THUMBNAIL' => '',
+ 'UC_IMAGE_NAME' => '',
+ 'UC_LASTIMAGE_ICON' => '',
+ 'ALBUM_COLOUR' => '',
+ 'MODERATORS' => '',
+ 'SUBALBUMS' => '',
+ 'L_SUBALBUM_STR' => '',
+ 'L_ALBUM_FOLDER_ALT' => 'NO_NEW_IMAGES',
+ 'L_MODERATOR_STR' => '',
+ 'U_VIEWALBUM' => 'phpbbgallery_core_album',
+ 'UC_IMAGE_URL' => '',
+ 'ALBUM_IMAGE' => ''
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'PERSONAL_ALBUMS',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
+ ))
+ );
+ $this->template->expects($this->exactly(3))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
+ )
+ ),
+ array(
+ array(
+ 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
+ )
+ )
+ );
+ $this->user->lang = array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF_1',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_2',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_3'
+ )
+ );
+ $this->gallery_config->set('items_per_page', 1);
+ $this->gallery_config->set('link_image_icon', 'image');
+ $this->gallery_config->set('pegas_index_album', 1);
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('disp_birthdays', 0);
+ $controller = $this->get_controller(2, 5, true);
+ $response = $controller->personal(2);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ /**
+ * Case 3 -> User see no albums!
+ */
+ public function test_index_personal_case_3()
+ {
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('navlinks', array(
+ 'FORUM_NAME' => 'GALLERY',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_index'
+ )),
+ array('navlinks', array(
+ 'FORUM_NAME' => 'PERSONAL_ALBUMS',
+ 'U_VIEW_FORUM' => 'phpbbgallery_core_personal'
+ ))
+ );
+ $this->template->expects($this->exactly(3))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ array(
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => false,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => ''
+ )
+ ),
+ array(
+ array(
+ 'TOTAL_ALBUMS' => 'TOTAL_PEGAS_SHORT_SPRINTF'
+ )
+ ),
+ array(
+ array(
+ 'S_CHAR_OPTIONS' => 'ALL A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
+ )
+ )
+ );
+ $this->user->lang = array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF' => array(
+ 'TOTAL_PEGAS_SHORT_SPRINTF_1',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_2',
+ 'TOTAL_PEGAS_SHORT_SPRINTF_3'
+ )
+ );
+ $this->gallery_config->set('items_per_page', 1);
+ $this->gallery_config->set('link_image_icon', 'image');
+ $this->gallery_config->set('pegas_index_album', 1);
+ $this->gallery_config->set('rrc_gindex_mode', 0);
+ $this->gallery_config->set('disp_birthdays', 0);
+ $controller = $this->get_controller(52, 2, true);
+ $response = $controller->personal(1);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+
+ protected function tearDown() : void
+ {
+ parent::tearDown();
+ }
+}
diff --git a/tests/controller/gallery_moderate_test.php b/ext/phpbbgallery/tests/controller/gallery_moderate_test.php
similarity index 96%
rename from tests/controller/gallery_moderate_test.php
rename to ext/phpbbgallery/tests/controller/gallery_moderate_test.php
index b929fcbb..f084f260 100644
--- a/tests/controller/gallery_moderate_test.php
+++ b/ext/phpbbgallery/tests/controller/gallery_moderate_test.php
@@ -1,164 +1,164 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\controller;
-
-/**
-* @group controller
-*/
-
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
-
-class gallery_moderate_test extends controller_base
-{
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
-
- parent::setUp();
-
- global $phpbb_dispatcher, $auth, $user, $cache, $db, $request;
-
- $phpbb_dispatcher = $this->dispatcher;
-
- $auth = $this->auth;
-
- $user = $this->user;
-
- $cache = $this->cache;
-
- $db = $this->db;
-
- $request = $this->request;
-
- }
-
- public function get_controller($user_id, $group, $is_registered)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group'] = $group;
- $this->user->data['is_registered'] = $is_registered;
- $controller = new \phpbbgallery\core\controller\moderate(
- $this->config,
- $this->request,
- $this->template,
- $this->user,
- $this->language,
- $this->controller_helper,
- $this->display,
- $this->gallery_moderate,
- $this->gallery_auth,
- $this->misc,
- $this->gallery_album,
- $this->gallery_image,
- $this->gallery_notification_helper,
- $this->gallery_url,
- $this->log,
- $this->gallery_report,
- $this->user_loader,
- '/',
- 'php'
- );
-
- return $controller;
- }
-
- /**
- * Provide data for test_for_base
- */
- public function for_base_data()
- {
- return array(
- 'base' => array(
- 2, // user_id
- 5, // group_id
- true, //is_registered
- 0, // album
- array( // menu
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => true,
- 'L_SUBFORUM' => 'SUBALBUM',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- ),
- array(
- 'S_HAS_LOGS' => false,
- 'TOTAL_PAGES' => 'PAGE_TITLE_NUMBER'
- ),
- array( //expected
- 'U_GALLERY_MODERATE_OVERVIEW' => 'phpbbgallery_core_moderate',
- 'U_GALLERY_MODERATE_APPROVE' => 'phpbbgallery_core_moderate_queue_approve',
- 'U_GALLERY_MODERATE_REPORT' => 'phpbbgallery_core_moderate_reports',
- 'U_ALBUM_OVERVIEW' => false,
- 'U_GALLERY_MCP_LOGS' => 'phpbbgallery_core_moderate_action_log',
- 'U_ALBUM_NAME' => false,
- 'U_OVERVIEW' => true,
- )
- ),
- 'user' => array(
- 53, // user_id
- 2, // group_id
- true, //is_registered
- 0, // album
- array( // menu
- 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
- 'S_HAS_SUBALBUM' => false,
- 'L_SUBFORUM' => 'SUBALBUMS',
- 'LAST_POST_IMG' => null,
- 'FAKE_THUMB_SIZE' => '',
- ),
- array(
- 'S_HAS_LOGS' => false,
- 'TOTAL_PAGES' => 'PAGE_TITLE_NUMBER'
- ),
- array( //expected
- 'U_GALLERY_MODERATE_OVERVIEW' => 'phpbbgallery_core_moderate',
- 'U_GALLERY_MODERATE_APPROVE' => 'phpbbgallery_core_moderate_queue_approve',
- 'U_GALLERY_MODERATE_REPORT' => 'phpbbgallery_core_moderate_reports',
- 'U_ALBUM_OVERVIEW' => false,
- 'U_GALLERY_MCP_LOGS' => 'phpbbgallery_core_moderate_action_log',
- 'U_ALBUM_NAME' => false,
- 'U_OVERVIEW' => true,
- )
- )
- );
- }
- /**
- * Test base case scenario - User is admin and has not given any album
- * @dataProvider for_base_data
- */
- public function test_for_base($user_id, $group_id, $is_registered, $album, $menu, $populate, $expected)
- {
- $this->template->expects($this->exactly(3))
- ->method('assign_vars')
- ->withConsecutive(
- array(
- $menu
- ),
- array(
- $populate
- ),
- array(
- $expected
- )
- );
- $controller = $this->get_controller($user_id, $group_id, $is_registered);
- $response = $controller->base($album);
- $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
- $this->assertEquals('200', $response->getStatusCode());
- }
- protected function tearDown() : void
- {
- parent::tearDown();
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\controller;
+
+/**
+* @group controller
+*/
+
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
+
+class gallery_moderate_test extends controller_base
+{
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+
+ parent::setUp();
+
+ global $phpbb_dispatcher, $auth, $user, $cache, $db, $request;
+
+ $phpbb_dispatcher = $this->dispatcher;
+
+ $auth = $this->auth;
+
+ $user = $this->user;
+
+ $cache = $this->cache;
+
+ $db = $this->db;
+
+ $request = $this->request;
+
+ }
+
+ public function get_controller($user_id, $group, $is_registered)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group'] = $group;
+ $this->user->data['is_registered'] = $is_registered;
+ $controller = new \phpbbgallery\core\controller\moderate(
+ $this->config,
+ $this->request,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->controller_helper,
+ $this->display,
+ $this->gallery_moderate,
+ $this->gallery_auth,
+ $this->misc,
+ $this->gallery_album,
+ $this->gallery_image,
+ $this->gallery_notification_helper,
+ $this->gallery_url,
+ $this->log,
+ $this->gallery_report,
+ $this->user_loader,
+ '/',
+ 'php'
+ );
+
+ return $controller;
+ }
+
+ /**
+ * Provide data for test_for_base
+ */
+ public function for_base_data()
+ {
+ return array(
+ 'base' => array(
+ 2, // user_id
+ 5, // group_id
+ true, //is_registered
+ 0, // album
+ array( // menu
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => true,
+ 'L_SUBFORUM' => 'SUBALBUM',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ ),
+ array(
+ 'S_HAS_LOGS' => false,
+ 'TOTAL_PAGES' => 'PAGE_TITLE_NUMBER'
+ ),
+ array( //expected
+ 'U_GALLERY_MODERATE_OVERVIEW' => 'phpbbgallery_core_moderate',
+ 'U_GALLERY_MODERATE_APPROVE' => 'phpbbgallery_core_moderate_queue_approve',
+ 'U_GALLERY_MODERATE_REPORT' => 'phpbbgallery_core_moderate_reports',
+ 'U_ALBUM_OVERVIEW' => false,
+ 'U_GALLERY_MCP_LOGS' => 'phpbbgallery_core_moderate_action_log',
+ 'U_ALBUM_NAME' => false,
+ 'U_OVERVIEW' => true,
+ )
+ ),
+ 'user' => array(
+ 53, // user_id
+ 2, // group_id
+ true, //is_registered
+ 0, // album
+ array( // menu
+ 'U_MARK_ALBUMS' => 'phpbbgallery_core_album',
+ 'S_HAS_SUBALBUM' => false,
+ 'L_SUBFORUM' => 'SUBALBUMS',
+ 'LAST_POST_IMG' => null,
+ 'FAKE_THUMB_SIZE' => '',
+ ),
+ array(
+ 'S_HAS_LOGS' => false,
+ 'TOTAL_PAGES' => 'PAGE_TITLE_NUMBER'
+ ),
+ array( //expected
+ 'U_GALLERY_MODERATE_OVERVIEW' => 'phpbbgallery_core_moderate',
+ 'U_GALLERY_MODERATE_APPROVE' => 'phpbbgallery_core_moderate_queue_approve',
+ 'U_GALLERY_MODERATE_REPORT' => 'phpbbgallery_core_moderate_reports',
+ 'U_ALBUM_OVERVIEW' => false,
+ 'U_GALLERY_MCP_LOGS' => 'phpbbgallery_core_moderate_action_log',
+ 'U_ALBUM_NAME' => false,
+ 'U_OVERVIEW' => true,
+ )
+ )
+ );
+ }
+ /**
+ * Test base case scenario - User is admin and has not given any album
+ * @dataProvider for_base_data
+ */
+ public function test_for_base($user_id, $group_id, $is_registered, $album, $menu, $populate, $expected)
+ {
+ $this->template->expects($this->exactly(3))
+ ->method('assign_vars')
+ ->withConsecutive(
+ array(
+ $menu
+ ),
+ array(
+ $populate
+ ),
+ array(
+ $expected
+ )
+ );
+ $controller = $this->get_controller($user_id, $group_id, $is_registered);
+ $response = $controller->base($album);
+ $this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
+ $this->assertEquals('200', $response->getStatusCode());
+ }
+ protected function tearDown() : void
+ {
+ parent::tearDown();
+ }
+}
diff --git a/tests/core/album/core_album_test.php b/ext/phpbbgallery/tests/core/album/core_album_test.php
similarity index 95%
rename from tests/core/album/core_album_test.php
rename to ext/phpbbgallery/tests/core/album/core_album_test.php
index 59cd88fd..98936d35 100644
--- a/tests/core/album/core_album_test.php
+++ b/ext/phpbbgallery/tests/core/album/core_album_test.php
@@ -1,148 +1,148 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core\album;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../../includes/functions.php';
-
-class core_album_test extends \phpbbgallery\tests\core\core_base
-{
- public function setUp() : void
- {
- parent::setUp();
-
- $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
- $this->block = new \phpbbgallery\core\block();
-
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
-
- $this->album = new \phpbbgallery\core\album\album(
- $this->db,
- $this->user,
- $this->language,
- $this->user_cpf,
- $this->gallery_auth,
- $this->gallery_cache,
- $this->block,
- $this->gallery_config,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images',
- 'phpbb_gallery_watch',
- 'phpbb_gallery_contests'
- );
- }
-
- /**
- * Test get_info
- * Here we test only exception.
- * Normal get info is tested in core_search_test where it is called!
-
- public function test_get_info_fail()
- {
- try
- {
- $this->album->get_info(99);
- $this->fail('This should trow \phpbb\exception\http_exception');
- }
- catch (\phpbb\exception\http_exception $exception)
- {
- $this->assertEquals(404, $exception->getStatusCode());
- $this->assertEquals('ALBUM_NOT_EXIST', $exception->getMessage());
- }
- }
- */
- /**
- * Test check_user
- * Here we check valid state
- */
- public function test_check_user_valid()
- {
- $this->user->data['user_id'] = 2;
- $this->assertTrue($this->album->check_user(4));
- }
-
- /**
- * Test check_user
- * Here we test only exception.
- *
- */
- public function test_check_user_fail_case_wrong_user()
- {
- $this->user->data['user_id'] = 3;
- try
- {
- $this->assertTrue($this->album->check_user(4));
- $this->fail('This should trow \phpbb\exception\http_exception');
- }
- catch (\phpbb\exception\http_exception $exception)
- {
- $this->assertEquals(403, $exception->getStatusCode());
- $this->assertEquals('NO_ALBUM_STEALING', $exception->getMessage());
- }
- }
- /**
- * Test check_user
- * Here we test only exception.
- *
- */
- public function test_check_user_fail_case_wrong_passed_user()
- {
- $this->user->data['user_id'] = 2;
- try
- {
- $this->assertTrue($this->album->check_user(4, 3));
- $this->fail('This should trow \phpbb\exception\http_exception');
- }
- catch (\phpbb\exception\http_exception $exception)
- {
- $this->assertEquals(403, $exception->getStatusCode());
- $this->assertEquals('NO_ALBUM_STEALING', $exception->getMessage());
- }
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core\album;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../../includes/functions.php';
+
+class core_album_test extends \phpbbgallery\tests\core\core_base
+{
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+ $this->block = new \phpbbgallery\core\block();
+
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+
+ $this->album = new \phpbbgallery\core\album\album(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_cpf,
+ $this->gallery_auth,
+ $this->gallery_cache,
+ $this->block,
+ $this->gallery_config,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_watch',
+ 'phpbb_gallery_contests'
+ );
+ }
+
+ /**
+ * Test get_info
+ * Here we test only exception.
+ * Normal get info is tested in core_search_test where it is called!
+
+ public function test_get_info_fail()
+ {
+ try
+ {
+ $this->album->get_info(99);
+ $this->fail('This should trow \phpbb\exception\http_exception');
+ }
+ catch (\phpbb\exception\http_exception $exception)
+ {
+ $this->assertEquals(404, $exception->getStatusCode());
+ $this->assertEquals('ALBUM_NOT_EXIST', $exception->getMessage());
+ }
+ }
+ */
+ /**
+ * Test check_user
+ * Here we check valid state
+ */
+ public function test_check_user_valid()
+ {
+ $this->user->data['user_id'] = 2;
+ $this->assertTrue($this->album->check_user(4));
+ }
+
+ /**
+ * Test check_user
+ * Here we test only exception.
+ *
+ */
+ public function test_check_user_fail_case_wrong_user()
+ {
+ $this->user->data['user_id'] = 3;
+ try
+ {
+ $this->assertTrue($this->album->check_user(4));
+ $this->fail('This should trow \phpbb\exception\http_exception');
+ }
+ catch (\phpbb\exception\http_exception $exception)
+ {
+ $this->assertEquals(403, $exception->getStatusCode());
+ $this->assertEquals('NO_ALBUM_STEALING', $exception->getMessage());
+ }
+ }
+ /**
+ * Test check_user
+ * Here we test only exception.
+ *
+ */
+ public function test_check_user_fail_case_wrong_passed_user()
+ {
+ $this->user->data['user_id'] = 2;
+ try
+ {
+ $this->assertTrue($this->album->check_user(4, 3));
+ $this->fail('This should trow \phpbb\exception\http_exception');
+ }
+ catch (\phpbb\exception\http_exception $exception)
+ {
+ $this->assertEquals(403, $exception->getStatusCode());
+ $this->assertEquals('NO_ALBUM_STEALING', $exception->getMessage());
+ }
+ }
+}
diff --git a/tests/core/album/core_display_test.php b/ext/phpbbgallery/tests/core/album/core_display_test.php
similarity index 96%
rename from tests/core/album/core_display_test.php
rename to ext/phpbbgallery/tests/core/album/core_display_test.php
index e6408ae2..b1fc0b31 100644
--- a/tests/core/album/core_display_test.php
+++ b/ext/phpbbgallery/tests/core/album/core_display_test.php
@@ -1,307 +1,307 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../../includes/functions.php';
-
-class core_display_test extends \phpbbgallery\tests\core\core_base
-{
- public function setUp() : void
- {
- parent::setUp();
-
- $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
-
- $this->misc = $this->getMockBuilder('\phpbbgallery\core\misc')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->display = new \phpbbgallery\core\album\display(
- $this->auth,
- $this->config,
- $this->controller_helper,
- $this->db,
- $this->pagination,
- $this->request,
- $this->template,
- $this->user,
- $this->language,
- $this->gallery_auth,
- $this->gallery_user,
- $this->misc,
- '/',
- 'php',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_contests',
- 'phpbb_gallery_albums_track',
- 'phpbb_gallery_albums_modscache'
- );
- }
- /**
- * Test data for the test_get_branch test
- *
- * @return array Test data
- */
- public function get_branch_data()
- {
- return array(
- 'album1_default' => array(
- 0, // branch user id
- 1, // album_id,
- 'all', // Type
- 'descending', // Order
- true, // Include album
- array( // expected
- 0 => Array (
- 'album_id' => '1',
- 'parent_id' => '0',
- 'left_id' => '0',
- 'right_id' => '0',
- 'album_parents' => '',
- 'album_type' => '1',
- 'album_status' => '0',
- 'album_contest' => '0',
- 'album_name' => 'TestPublicAlbum1',
- 'album_desc' => '',
- 'album_desc_options' => '7',
- 'album_desc_uid' => '',
- 'album_desc_bitfield' => '',
- 'album_user_id' => '0',
- 'album_images' => '3',
- 'album_images_real' => '3',
- 'album_last_image_id' => '3',
- 'album_image' => '',
- 'album_last_image_time' => '0',
- 'album_last_image_name' => 'TestImage3',
- 'album_last_username' => 'admin',
- 'album_last_user_colour' => '',
- 'album_last_user_id' => '2',
- 'album_watermark' => '1',
- 'album_sort_key' => '',
- 'album_sort_dir' => '',
- 'display_in_rrc' => '1',
- 'display_on_index' => '1',
- 'display_subalbum_list' => '1',
- 'album_feed' => '1',
- 'album_auth_access' => '0',
- )
- )
- ),
- 'album1_children' => array(
- 0, // branch user id
- 1, // album_id,
- 'children', // Type
- 'descending', // Order
- true, // Include album
- array( // expected
- 0 => Array (
- 'album_id' => '1',
- 'parent_id' => '0',
- 'left_id' => '0',
- 'right_id' => '0',
- 'album_parents' => '',
- 'album_type' => '1',
- 'album_status' => '0',
- 'album_contest' => '0',
- 'album_name' => 'TestPublicAlbum1',
- 'album_desc' => '',
- 'album_desc_options' => '7',
- 'album_desc_uid' => '',
- 'album_desc_bitfield' => '',
- 'album_user_id' => '0',
- 'album_images' => '3',
- 'album_images_real' => '3',
- 'album_last_image_id' => '3',
- 'album_image' => '',
- 'album_last_image_time' => '0',
- 'album_last_image_name' => 'TestImage3',
- 'album_last_username' => 'admin',
- 'album_last_user_colour' => '',
- 'album_last_user_id' => '2',
- 'album_watermark' => '1',
- 'album_sort_key' => '',
- 'album_sort_dir' => '',
- 'display_in_rrc' => '1',
- 'display_on_index' => '1',
- 'display_subalbum_list' => '1',
- 'album_feed' => '1',
- 'album_auth_access' => '0',
- )
- )
- ),
- 'album2' => array(
- 0, // branch user id
- 2, // album_id,
- 'all', // Type
- 'descending', // Order
- true, // Include album
- array( // expected
- 0 => array(
- 'album_id' => '2',
- 'parent_id' => '1',
- 'left_id' => '1',
- 'right_id' => '3',
- 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
- 'album_type' => '1',
- 'album_status' => '0',
- 'album_contest' => '0',
- 'album_name' => 'TestPublicAlbumSubAlbum1',
- 'album_desc' => '',
- 'album_desc_options' => '7',
- 'album_desc_uid' => '',
- 'album_desc_bitfield' => '',
- 'album_user_id' => '0',
- 'album_images' => '3',
- 'album_images_real' => '3',
- 'album_last_image_id' => '6',
- 'album_image' => '',
- 'album_last_image_time' => '0',
- 'album_last_image_name' => 'TestImage6',
- 'album_last_username' => 'admin',
- 'album_last_user_colour' => '',
- 'album_last_user_id' => '2',
- 'album_watermark' => '1',
- 'album_sort_key' => '',
- 'album_sort_dir' => '',
- 'display_in_rrc' => '0',
- 'display_on_index' => '1',
- 'display_subalbum_list' => '1',
- 'album_feed' => '1',
- 'album_auth_access' => '0',
- ),
- 1 => array(
- 'album_id' => '3',
- 'parent_id' => '1',
- 'left_id' => '1',
- 'right_id' => '2',
- 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
- 'album_type' => '1',
- 'album_status' => '0',
- 'album_contest' => '0',
- 'album_name' => 'TestPublicAlbumSubAlbum2',
- 'album_desc' => '',
- 'album_desc_options' => '7',
- 'album_desc_uid' => '',
- 'album_desc_bitfield' => '',
- 'album_user_id' => '0',
- 'album_images' => '3',
- 'album_images_real' => '3',
- 'album_last_image_id' => '9',
- 'album_image' => '',
- 'album_last_image_time' => '0',
- 'album_last_image_name' => 'TestImage9',
- 'album_last_username' => 'admin',
- 'album_last_user_colour' => '',
- 'album_last_user_id' => '2',
- 'album_watermark' => '1',
- 'album_sort_key' => '',
- 'album_sort_dir' => '',
- 'display_in_rrc' => '1',
- 'display_on_index' => '1',
- 'display_subalbum_list' => '1',
- 'album_feed' => '1',
- 'album_auth_access' => '0',
- )
- )
- ),
- 'album2_revert_no_album' => array(
- 0, // branch user id
- 2, // album_id,
- 'all', // Type
- 'asc', // Order
- false, // Include album
- array( // expected
- 0 => array(
- 'album_id' => '3',
- 'parent_id' => '1',
- 'left_id' => '1',
- 'right_id' => '2',
- 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
- 'album_type' => '1',
- 'album_status' => '0',
- 'album_contest' => '0',
- 'album_name' => 'TestPublicAlbumSubAlbum2',
- 'album_desc' => '',
- 'album_desc_options' => '7',
- 'album_desc_uid' => '',
- 'album_desc_bitfield' => '',
- 'album_user_id' => '0',
- 'album_images' => '3',
- 'album_images_real' => '3',
- 'album_last_image_id' => '9',
- 'album_image' => '',
- 'album_last_image_time' => '0',
- 'album_last_image_name' => 'TestImage9',
- 'album_last_username' => 'admin',
- 'album_last_user_colour' => '',
- 'album_last_user_id' => '2',
- 'album_watermark' => '1',
- 'album_sort_key' => '',
- 'album_sort_dir' => '',
- 'display_in_rrc' => '1',
- 'display_on_index' => '1',
- 'display_subalbum_list' => '1',
- 'album_feed' => '1',
- 'album_auth_access' => '0',
- )
- )
- )
- );
- }
- /**
- * test_get_branch
- *
- * @dataProvider get_branch_data
- */
- public function test_get_branch($branch_user_id, $album_id, $type, $order, $include_album, $expected)
- {
- $this->assertEquals($expected, $this->display->get_branch($branch_user_id, $album_id, $type, $order, $include_album));
- }
-
-
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../../includes/functions.php';
+
+class core_display_test extends \phpbbgallery\tests\core\core_base
+{
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+
+ $this->misc = $this->getMockBuilder('\phpbbgallery\core\misc')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->display = new \phpbbgallery\core\album\display(
+ $this->auth,
+ $this->config,
+ $this->controller_helper,
+ $this->db,
+ $this->pagination,
+ $this->request,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->gallery_auth,
+ $this->gallery_user,
+ $this->misc,
+ '/',
+ 'php',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_contests',
+ 'phpbb_gallery_albums_track',
+ 'phpbb_gallery_albums_modscache'
+ );
+ }
+ /**
+ * Test data for the test_get_branch test
+ *
+ * @return array Test data
+ */
+ public function get_branch_data()
+ {
+ return array(
+ 'album1_default' => array(
+ 0, // branch user id
+ 1, // album_id,
+ 'all', // Type
+ 'descending', // Order
+ true, // Include album
+ array( // expected
+ 0 => Array (
+ 'album_id' => '1',
+ 'parent_id' => '0',
+ 'left_id' => '0',
+ 'right_id' => '0',
+ 'album_parents' => '',
+ 'album_type' => '1',
+ 'album_status' => '0',
+ 'album_contest' => '0',
+ 'album_name' => 'TestPublicAlbum1',
+ 'album_desc' => '',
+ 'album_desc_options' => '7',
+ 'album_desc_uid' => '',
+ 'album_desc_bitfield' => '',
+ 'album_user_id' => '0',
+ 'album_images' => '3',
+ 'album_images_real' => '3',
+ 'album_last_image_id' => '3',
+ 'album_image' => '',
+ 'album_last_image_time' => '0',
+ 'album_last_image_name' => 'TestImage3',
+ 'album_last_username' => 'admin',
+ 'album_last_user_colour' => '',
+ 'album_last_user_id' => '2',
+ 'album_watermark' => '1',
+ 'album_sort_key' => '',
+ 'album_sort_dir' => '',
+ 'display_in_rrc' => '1',
+ 'display_on_index' => '1',
+ 'display_subalbum_list' => '1',
+ 'album_feed' => '1',
+ 'album_auth_access' => '0',
+ )
+ )
+ ),
+ 'album1_children' => array(
+ 0, // branch user id
+ 1, // album_id,
+ 'children', // Type
+ 'descending', // Order
+ true, // Include album
+ array( // expected
+ 0 => Array (
+ 'album_id' => '1',
+ 'parent_id' => '0',
+ 'left_id' => '0',
+ 'right_id' => '0',
+ 'album_parents' => '',
+ 'album_type' => '1',
+ 'album_status' => '0',
+ 'album_contest' => '0',
+ 'album_name' => 'TestPublicAlbum1',
+ 'album_desc' => '',
+ 'album_desc_options' => '7',
+ 'album_desc_uid' => '',
+ 'album_desc_bitfield' => '',
+ 'album_user_id' => '0',
+ 'album_images' => '3',
+ 'album_images_real' => '3',
+ 'album_last_image_id' => '3',
+ 'album_image' => '',
+ 'album_last_image_time' => '0',
+ 'album_last_image_name' => 'TestImage3',
+ 'album_last_username' => 'admin',
+ 'album_last_user_colour' => '',
+ 'album_last_user_id' => '2',
+ 'album_watermark' => '1',
+ 'album_sort_key' => '',
+ 'album_sort_dir' => '',
+ 'display_in_rrc' => '1',
+ 'display_on_index' => '1',
+ 'display_subalbum_list' => '1',
+ 'album_feed' => '1',
+ 'album_auth_access' => '0',
+ )
+ )
+ ),
+ 'album2' => array(
+ 0, // branch user id
+ 2, // album_id,
+ 'all', // Type
+ 'descending', // Order
+ true, // Include album
+ array( // expected
+ 0 => array(
+ 'album_id' => '2',
+ 'parent_id' => '1',
+ 'left_id' => '1',
+ 'right_id' => '3',
+ 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
+ 'album_type' => '1',
+ 'album_status' => '0',
+ 'album_contest' => '0',
+ 'album_name' => 'TestPublicAlbumSubAlbum1',
+ 'album_desc' => '',
+ 'album_desc_options' => '7',
+ 'album_desc_uid' => '',
+ 'album_desc_bitfield' => '',
+ 'album_user_id' => '0',
+ 'album_images' => '3',
+ 'album_images_real' => '3',
+ 'album_last_image_id' => '6',
+ 'album_image' => '',
+ 'album_last_image_time' => '0',
+ 'album_last_image_name' => 'TestImage6',
+ 'album_last_username' => 'admin',
+ 'album_last_user_colour' => '',
+ 'album_last_user_id' => '2',
+ 'album_watermark' => '1',
+ 'album_sort_key' => '',
+ 'album_sort_dir' => '',
+ 'display_in_rrc' => '0',
+ 'display_on_index' => '1',
+ 'display_subalbum_list' => '1',
+ 'album_feed' => '1',
+ 'album_auth_access' => '0',
+ ),
+ 1 => array(
+ 'album_id' => '3',
+ 'parent_id' => '1',
+ 'left_id' => '1',
+ 'right_id' => '2',
+ 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
+ 'album_type' => '1',
+ 'album_status' => '0',
+ 'album_contest' => '0',
+ 'album_name' => 'TestPublicAlbumSubAlbum2',
+ 'album_desc' => '',
+ 'album_desc_options' => '7',
+ 'album_desc_uid' => '',
+ 'album_desc_bitfield' => '',
+ 'album_user_id' => '0',
+ 'album_images' => '3',
+ 'album_images_real' => '3',
+ 'album_last_image_id' => '9',
+ 'album_image' => '',
+ 'album_last_image_time' => '0',
+ 'album_last_image_name' => 'TestImage9',
+ 'album_last_username' => 'admin',
+ 'album_last_user_colour' => '',
+ 'album_last_user_id' => '2',
+ 'album_watermark' => '1',
+ 'album_sort_key' => '',
+ 'album_sort_dir' => '',
+ 'display_in_rrc' => '1',
+ 'display_on_index' => '1',
+ 'display_subalbum_list' => '1',
+ 'album_feed' => '1',
+ 'album_auth_access' => '0',
+ )
+ )
+ ),
+ 'album2_revert_no_album' => array(
+ 0, // branch user id
+ 2, // album_id,
+ 'all', // Type
+ 'asc', // Order
+ false, // Include album
+ array( // expected
+ 0 => array(
+ 'album_id' => '3',
+ 'parent_id' => '1',
+ 'left_id' => '1',
+ 'right_id' => '2',
+ 'album_parents' => 'a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}',
+ 'album_type' => '1',
+ 'album_status' => '0',
+ 'album_contest' => '0',
+ 'album_name' => 'TestPublicAlbumSubAlbum2',
+ 'album_desc' => '',
+ 'album_desc_options' => '7',
+ 'album_desc_uid' => '',
+ 'album_desc_bitfield' => '',
+ 'album_user_id' => '0',
+ 'album_images' => '3',
+ 'album_images_real' => '3',
+ 'album_last_image_id' => '9',
+ 'album_image' => '',
+ 'album_last_image_time' => '0',
+ 'album_last_image_name' => 'TestImage9',
+ 'album_last_username' => 'admin',
+ 'album_last_user_colour' => '',
+ 'album_last_user_id' => '2',
+ 'album_watermark' => '1',
+ 'album_sort_key' => '',
+ 'album_sort_dir' => '',
+ 'display_in_rrc' => '1',
+ 'display_on_index' => '1',
+ 'display_subalbum_list' => '1',
+ 'album_feed' => '1',
+ 'album_auth_access' => '0',
+ )
+ )
+ )
+ );
+ }
+ /**
+ * test_get_branch
+ *
+ * @dataProvider get_branch_data
+ */
+ public function test_get_branch($branch_user_id, $album_id, $type, $order, $include_album, $expected)
+ {
+ $this->assertEquals($expected, $this->display->get_branch($branch_user_id, $album_id, $type, $order, $include_album));
+ }
+
+
+}
diff --git a/tests/core/core_auth_test.php b/ext/phpbbgallery/tests/core/core_auth_test.php
similarity index 95%
rename from tests/core/core_auth_test.php
rename to ext/phpbbgallery/tests/core/core_auth_test.php
index 0f79151c..778a3683 100644
--- a/tests/core/core_auth_test.php
+++ b/ext/phpbbgallery/tests/core/core_auth_test.php
@@ -1,452 +1,452 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_auth_test extends core_base
-{
- protected $gallery_cache;
- protected $gallery_user;
- protected $gallery_auth;
-
- public function setUp() : void
- {
- parent::setUp();
- global $table_prefix;
- $table_prefix = 'phpbb_';
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
- }
-
- public function test_get_own_album()
- {
- $this->assertEquals(-2, $this->gallery_auth->get_own_album());
- }
- /**
- * Test data for the get_user_zebra test
- *
- * @return array Test data
- */
- public function data_get_user_zebra()
- {
- return array(
- 'admin' => array(
- 2,
- array(
- 'friend' => array(
- 52
- ),
- 'foe' => array(
- 53
- ),
- 'bff' => array(),
- ),
- ),
- 'user1' => array(
- 52,
- array(
- 'friend' => array(
- 2
- ),
- 'foe' => array(),
- 'bff' => array(),
- ),
- ),
- 'user2' => array(
- 53,
- array(
- 'friend' => array(),
- 'foe' => array(),
- 'bff' => array(),
- ),
- ),
- );
- }
- /**
- * get_user_zebra
- *
- * @dataProvider data_get_user_zebra
- */
- public function test_get_user_zebra($user, $expected)
- {
- $zebra = $this->gallery_auth->get_user_zebra($user);
- $this->assertEquals($zebra, $expected);
- }
-
- /**
- * Test data for the test_acl_check test
- *
- * @return array Test data
- */
- public function data_acl_check()
- {
- return array(
- 'admin' => array(
- 2, // User ID
- 5, // User Group
- 1, // album
- 'i_view', // ACL to check
- true // Expected
- ),
- 'user_false' => array(
- 52,
- 2,
- 1,
- 'm_comments',
- false
- ),
- 'user_true' => array(
- 52,
- 2,
- 1,
- 'i_view',
- true
- ),
- 'admin_no_rights' => array(
- 2, // User ID
- 5, // User Group
- 2, // album
- 'i_view', // ACL to check
- true // Expected
- ),
- 'user_no_rights' => array(
- 52,
- 2,
- 2,
- 'm_comments',
- false
- ),
- 'user_false_no_rights' => array(
- 52,
- 2,
- 2,
- 'i_view',
- false
- ),
- 'admin2' => array(
- 2, // User ID
- 5, // User Group
- 3, // album
- 'i_view', // ACL to check
- false // Expected
- ),
- );
- }
- /**
- * acl_check
- *
- * @dataProvider data_acl_check
- */
- public function test_acl_check($user_id, $group_id, $album_id, $permission, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- if ($expected)
- {
- $this->assertTrue($this->gallery_auth->acl_check($permission, $album_id, 0));
- }
- else
- {
- $this->assertFalse($this->gallery_auth->acl_check($permission, $album_id, 0));
- }
- }
- /**
- * Test data for the set_user_permissions test
- *
- * @return array Test data
- */
- public function data_set_user_permissions()
- {
- return array(
- array(
- 2, // User ID
- 5, // Group ID
- //'0:0:0::-2:-3:2:3',
- '0:0:0::-2:-3:3',
- '18219007:0:0::1'
- ),
- /**
- * TODO: FIX THIS SHITY TEST BECOUSE IT'S SHIT!!!!!!
- **/
- //array(
- // 52, // User ID
- // 2, // Group ID
- // '0:0:0::-2:-3:2:3',
- // '1312767:0:0::1'
- //),
- array(
- 53, // User ID
- 1, // Group ID
- null,
- null
- ),
- );
- }
- /**
- * set_user_permissions
- *
- * @dataProvider data_set_user_permissions
- */
- public function test_set_user_permissions($user_id, $group_id, $expected1, $expected2)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $sql = 'SELECT user_permissions FROM phpbb_gallery_users WHERE user_id = ' . $user_id;
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- if ($expected1 !== null)
- {
- $this->assertStringContainsString($expected1, $row['user_permissions']);
- $this->assertStringContainsString($expected2, $row['user_permissions']);
- }
- }
-
- /**
- * Test data for the acl_check_global test
- *
- * @return array Test data
- */
- public function acl_check_global_data()
- {
- return array(
- array(
- 2, // User ID
- 5, // User Group
- 'i_view', // permission
- true // result
- ),
- array(
- 52, // User ID
- 2, // User Group
- 'i_view', // permission
- true // result
- ),
- array(
- 53, // User ID
- 1, // User Group
- 'i_view', // permission
- false // result
- ),
- array(
- 52, // User ID
- 2, // User Group
- 'm_comments', // permission
- false // result
- ),
- array(
- 2, // User ID
- 5, // User Group
- 'm_comments', // permission
- true // result
- ),
- );
- }
- /**
- * set_user_permissions
- *
- * @dataProvider acl_check_global_data
- */
- public function test_acl_check_global($user_id, $group_id, $acl, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- if ($expected)
- {
- $this->assertTrue($this->gallery_auth->acl_check_global($acl));
- }
- else
- {
- $this->assertFalse($this->gallery_auth->acl_check_global($acl));
- }
- }
-
- /**
- * Test data for the acl_album_ids test
- *
- * @return array Test data
- */
- public function acl_album_ids_data()
- {
- return array(
- array(
- 2, // User ID
- 5, // Group ID
- 'i_view', // ACL
- 'array', // Return type
- false, // display_in_rrc
- array( 1, 2) // Expected
- ),
- array(
- 2, // User ID
- 5, // Group ID
- 'i_view', // ACL
- 'string', // Return type
- false, // display_in_rrc
- '1, 2' // Expected
- ),
- array(
- 2, // User ID
- 5, // Group ID
- 'i_view', // ACL
- 'array', // Return type
- true, // display_in_rrc
- array(1) // Expected
- ),
- array(
- 2, // User ID
- 5, // Group ID
- 'i_view', // ACL
- 'string', // Return type
- true, // display_in_rrc
- '1' // Expected
- ),
- array(
- 52, // User ID
- 2, // Group ID
- 'i_view', // ACL
- 'array', // Return type
- false, // display_in_rrc
- array(1) // Expected
- ),
- array(
- 52, // User ID
- 2, // Group ID
- 'i_view', // ACL
- 'string', // Return type
- false, // display_in_rrc
- '1' // Expected
- ),
- array(
- 52, // User ID
- 2, // Group ID
- 'm_comments', // ACL
- 'array', // Return type
- false, // display_in_rrc
- array() // Expected
- ),
- array(
- 53, // User ID
- 1, // Group ID
- 'i_view', // ACL
- 'string', // Return type
- false, // display_in_rrc
- '' // Expected
- ),
- );
- }
- /**
- * acl_album_ids
- *
- * @dataProvider acl_album_ids_data
- */
- public function test_acl_album_ids($user_id, $group_id, $acl, $return_type, $rrc, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $actual = $this->gallery_auth->acl_album_ids($acl, $return_type, $rrc);
- if (is_array($expected))
- {
- $this->assertEmpty(array_merge(array_diff($expected, $actual), array_diff($actual, $expected)));
- }
- else
- {
- $this->assertEquals($expected, $this->gallery_auth->acl_album_ids($acl, $return_type, $rrc));
- }
- }
-
- /**
- * Test data for the acl_user_ids test
- *
- * @return array Test data
- */
- public function acl_users_ids_data()
- {
- return array(
- array(
- 'i_view', // ACL
- 1, // album
- array(2, 52) // Expected
- ),
- array(
- 'm_comments', // ACL
- 1, // album
- array(2) // Expected
- ),
- array(
- 'i_view', // ACL
- 2, // album
- array(2) // Expected
- ),
- );
- }
- /**
- * acl_user_ids'
- *
- * @dataProvider acl_users_ids_data
- */
- public function test_acl_users_ids($acl, $album_id, $expected)
- {
- $actual = $this->gallery_auth->acl_users_ids($acl, $album_id);
- $this->assertEmpty(array_merge(array_diff($expected, $actual), array_diff($actual, $expected)));
- }
- /**
- * List of functions to be tested:
- * get_own_album -> test_get_own_album
- * load_user_permissions -> test_acl_check
- * get_user_zebra -> test_get_user_zebra
- * get_zebra_state
- * get_usergroups-> test_acl_check
- * set_user_permissions -> test_set_user_permissions
- * acl_check -> test_acl_check
- * acl_check_global -> test_acl_check_global
- * acl_album_ids - > test_acl_album_ids (TO DO - expand test to personal)
- * acl_users_ids -> test_acl_users_ids (TO DO - expand test to personal)
- * get_exclude_zebra
- */
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_auth_test extends core_base
+{
+ protected $gallery_cache;
+ protected $gallery_user;
+ protected $gallery_auth;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+ global $table_prefix;
+ $table_prefix = 'phpbb_';
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+ }
+
+ public function test_get_own_album()
+ {
+ $this->assertEquals(-2, $this->gallery_auth->get_own_album());
+ }
+ /**
+ * Test data for the get_user_zebra test
+ *
+ * @return array Test data
+ */
+ public function data_get_user_zebra()
+ {
+ return array(
+ 'admin' => array(
+ 2,
+ array(
+ 'friend' => array(
+ 52
+ ),
+ 'foe' => array(
+ 53
+ ),
+ 'bff' => array(),
+ ),
+ ),
+ 'user1' => array(
+ 52,
+ array(
+ 'friend' => array(
+ 2
+ ),
+ 'foe' => array(),
+ 'bff' => array(),
+ ),
+ ),
+ 'user2' => array(
+ 53,
+ array(
+ 'friend' => array(),
+ 'foe' => array(),
+ 'bff' => array(),
+ ),
+ ),
+ );
+ }
+ /**
+ * get_user_zebra
+ *
+ * @dataProvider data_get_user_zebra
+ */
+ public function test_get_user_zebra($user, $expected)
+ {
+ $zebra = $this->gallery_auth->get_user_zebra($user);
+ $this->assertEquals($zebra, $expected);
+ }
+
+ /**
+ * Test data for the test_acl_check test
+ *
+ * @return array Test data
+ */
+ public function data_acl_check()
+ {
+ return array(
+ 'admin' => array(
+ 2, // User ID
+ 5, // User Group
+ 1, // album
+ 'i_view', // ACL to check
+ true // Expected
+ ),
+ 'user_false' => array(
+ 52,
+ 2,
+ 1,
+ 'm_comments',
+ false
+ ),
+ 'user_true' => array(
+ 52,
+ 2,
+ 1,
+ 'i_view',
+ true
+ ),
+ 'admin_no_rights' => array(
+ 2, // User ID
+ 5, // User Group
+ 2, // album
+ 'i_view', // ACL to check
+ true // Expected
+ ),
+ 'user_no_rights' => array(
+ 52,
+ 2,
+ 2,
+ 'm_comments',
+ false
+ ),
+ 'user_false_no_rights' => array(
+ 52,
+ 2,
+ 2,
+ 'i_view',
+ false
+ ),
+ 'admin2' => array(
+ 2, // User ID
+ 5, // User Group
+ 3, // album
+ 'i_view', // ACL to check
+ false // Expected
+ ),
+ );
+ }
+ /**
+ * acl_check
+ *
+ * @dataProvider data_acl_check
+ */
+ public function test_acl_check($user_id, $group_id, $album_id, $permission, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ if ($expected)
+ {
+ $this->assertTrue($this->gallery_auth->acl_check($permission, $album_id, 0));
+ }
+ else
+ {
+ $this->assertFalse($this->gallery_auth->acl_check($permission, $album_id, 0));
+ }
+ }
+ /**
+ * Test data for the set_user_permissions test
+ *
+ * @return array Test data
+ */
+ public function data_set_user_permissions()
+ {
+ return array(
+ array(
+ 2, // User ID
+ 5, // Group ID
+ //'0:0:0::-2:-3:2:3',
+ '0:0:0::-2:-3:3',
+ '18219007:0:0::1'
+ ),
+ /**
+ * TODO: FIX THIS SHITY TEST BECOUSE IT'S SHIT!!!!!!
+ **/
+ //array(
+ // 52, // User ID
+ // 2, // Group ID
+ // '0:0:0::-2:-3:2:3',
+ // '1312767:0:0::1'
+ //),
+ array(
+ 53, // User ID
+ 1, // Group ID
+ null,
+ null
+ ),
+ );
+ }
+ /**
+ * set_user_permissions
+ *
+ * @dataProvider data_set_user_permissions
+ */
+ public function test_set_user_permissions($user_id, $group_id, $expected1, $expected2)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $sql = 'SELECT user_permissions FROM phpbb_gallery_users WHERE user_id = ' . $user_id;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ if ($expected1 !== null)
+ {
+ $this->assertStringContainsString($expected1, $row['user_permissions']);
+ $this->assertStringContainsString($expected2, $row['user_permissions']);
+ }
+ }
+
+ /**
+ * Test data for the acl_check_global test
+ *
+ * @return array Test data
+ */
+ public function acl_check_global_data()
+ {
+ return array(
+ array(
+ 2, // User ID
+ 5, // User Group
+ 'i_view', // permission
+ true // result
+ ),
+ array(
+ 52, // User ID
+ 2, // User Group
+ 'i_view', // permission
+ true // result
+ ),
+ array(
+ 53, // User ID
+ 1, // User Group
+ 'i_view', // permission
+ false // result
+ ),
+ array(
+ 52, // User ID
+ 2, // User Group
+ 'm_comments', // permission
+ false // result
+ ),
+ array(
+ 2, // User ID
+ 5, // User Group
+ 'm_comments', // permission
+ true // result
+ ),
+ );
+ }
+ /**
+ * set_user_permissions
+ *
+ * @dataProvider acl_check_global_data
+ */
+ public function test_acl_check_global($user_id, $group_id, $acl, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ if ($expected)
+ {
+ $this->assertTrue($this->gallery_auth->acl_check_global($acl));
+ }
+ else
+ {
+ $this->assertFalse($this->gallery_auth->acl_check_global($acl));
+ }
+ }
+
+ /**
+ * Test data for the acl_album_ids test
+ *
+ * @return array Test data
+ */
+ public function acl_album_ids_data()
+ {
+ return array(
+ array(
+ 2, // User ID
+ 5, // Group ID
+ 'i_view', // ACL
+ 'array', // Return type
+ false, // display_in_rrc
+ array( 1, 2) // Expected
+ ),
+ array(
+ 2, // User ID
+ 5, // Group ID
+ 'i_view', // ACL
+ 'string', // Return type
+ false, // display_in_rrc
+ '1, 2' // Expected
+ ),
+ array(
+ 2, // User ID
+ 5, // Group ID
+ 'i_view', // ACL
+ 'array', // Return type
+ true, // display_in_rrc
+ array(1) // Expected
+ ),
+ array(
+ 2, // User ID
+ 5, // Group ID
+ 'i_view', // ACL
+ 'string', // Return type
+ true, // display_in_rrc
+ '1' // Expected
+ ),
+ array(
+ 52, // User ID
+ 2, // Group ID
+ 'i_view', // ACL
+ 'array', // Return type
+ false, // display_in_rrc
+ array(1) // Expected
+ ),
+ array(
+ 52, // User ID
+ 2, // Group ID
+ 'i_view', // ACL
+ 'string', // Return type
+ false, // display_in_rrc
+ '1' // Expected
+ ),
+ array(
+ 52, // User ID
+ 2, // Group ID
+ 'm_comments', // ACL
+ 'array', // Return type
+ false, // display_in_rrc
+ array() // Expected
+ ),
+ array(
+ 53, // User ID
+ 1, // Group ID
+ 'i_view', // ACL
+ 'string', // Return type
+ false, // display_in_rrc
+ '' // Expected
+ ),
+ );
+ }
+ /**
+ * acl_album_ids
+ *
+ * @dataProvider acl_album_ids_data
+ */
+ public function test_acl_album_ids($user_id, $group_id, $acl, $return_type, $rrc, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $actual = $this->gallery_auth->acl_album_ids($acl, $return_type, $rrc);
+ if (is_array($expected))
+ {
+ $this->assertEmpty(array_merge(array_diff($expected, $actual), array_diff($actual, $expected)));
+ }
+ else
+ {
+ $this->assertEquals($expected, $this->gallery_auth->acl_album_ids($acl, $return_type, $rrc));
+ }
+ }
+
+ /**
+ * Test data for the acl_user_ids test
+ *
+ * @return array Test data
+ */
+ public function acl_users_ids_data()
+ {
+ return array(
+ array(
+ 'i_view', // ACL
+ 1, // album
+ array(2, 52) // Expected
+ ),
+ array(
+ 'm_comments', // ACL
+ 1, // album
+ array(2) // Expected
+ ),
+ array(
+ 'i_view', // ACL
+ 2, // album
+ array(2) // Expected
+ ),
+ );
+ }
+ /**
+ * acl_user_ids'
+ *
+ * @dataProvider acl_users_ids_data
+ */
+ public function test_acl_users_ids($acl, $album_id, $expected)
+ {
+ $actual = $this->gallery_auth->acl_users_ids($acl, $album_id);
+ $this->assertEmpty(array_merge(array_diff($expected, $actual), array_diff($actual, $expected)));
+ }
+ /**
+ * List of functions to be tested:
+ * get_own_album -> test_get_own_album
+ * load_user_permissions -> test_acl_check
+ * get_user_zebra -> test_get_user_zebra
+ * get_zebra_state
+ * get_usergroups-> test_acl_check
+ * set_user_permissions -> test_set_user_permissions
+ * acl_check -> test_acl_check
+ * acl_check_global -> test_acl_check_global
+ * acl_album_ids - > test_acl_album_ids (TO DO - expand test to personal)
+ * acl_users_ids -> test_acl_users_ids (TO DO - expand test to personal)
+ * get_exclude_zebra
+ */
+}
diff --git a/tests/core/core_base.php b/ext/phpbbgallery/tests/core/core_base.php
similarity index 96%
rename from tests/core/core_base.php
rename to ext/phpbbgallery/tests/core/core_base.php
index fccc6d3e..ec9c253a 100644
--- a/tests/core/core_base.php
+++ b/ext/phpbbgallery/tests/core/core_base.php
@@ -1,154 +1,154 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
-
-class core_base extends \phpbb_database_test_case
-{
- /**
- * Define the extensions to be tested
- *
- * @return array vendor/name of extension(s) to test
- */
- static protected function setup_extensions()
- {
- return array('phpbbgallery/core');
- }
-
- protected $db;
- protected $config;
- protected $dispatcher;
- protected $template;
- protected $language;
- protected $user;
- protected $auth;
- protected $controller_helper;
- protected $cache;
- protected $gallery_config;
- protected $pagination;
- protected $user_loader;
- protected $request;
- protected $user_cpf;
-
- /**
- * Get data set fixtures
- */
- public function getDataSet()
- {
- return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
- }
-
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
- global $auth, $config, $phpbb_dispatcher, $user, $cache, $request, $db, $phpbb_root_path, $phpEx;
-
-
-
- /*$sql = 'DELETE FROM phpbb_config;';
- $sql .= 'DELETE FROM phpbb_gallery_albums;';
- $sql .= 'DELETE FROM phpbb_gallery_comments;';
- $sql .= 'DELETE FROM phpbb_gallery_images;';
- $sql .= 'DELETE FROM phpbb_gallery_permissions;';
- $sql .= 'DELETE FROM phpbb_gallery_roles;';
- $sql .= 'DELETE FROM phpbb_gallery_users;';
- $sql .= 'DELETE FROM phpbb_groups;';
- $sql .= 'DELETE FROM phpbb_users;';
- $sql .= 'DELETE FROM phpbb_user_group;';
- $sql .= 'DELETE FROM phpbb_zebra;';
-
- $this->db->sql_query($sql);*/
-
- parent::setUp();
-
- $db = $this->db = $this->new_dbal();
-
- $config = $this->config = new \phpbb\config\config(array());
- $phpbb_dispatcher = $this->dispatcher = new \phpbb_mock_event_dispatcher();
-
- $this->template = $this->getMockBuilder('\phpbb\template\template')
- ->getMock();
-
- $this->language = $this->getMockBuilder('\phpbb\language\language')
- ->disableOriginalConstructor()
- ->getMock();
- $this->language->method('lang')
- ->will($this->returnArgument(0));
-
- $this->user = $this->getMockBuilder('\phpbb\user')
- ->setConstructorArgs(array(
- new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
- '\phpbb\datetime'
- ))
- ->getMock();
- $user = $this->user;
-
- $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
- ->disableOriginalConstructor()
- ->getMock();
-
- $auth = $this->auth;
-
- $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
- ->disableOriginalConstructor()
- ->getMock();
- // Define some controller_helper stuff
- $this->controller_helper->method('route')->will($this->returnArgument(0));
-
- $controller_helper = $this->controller_helper;
-
- $phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
- $cache = $this->cache = new \phpbb\cache\service(
- new \phpbb\cache\driver\dummy(),
- $this->config,
- $this->db,
- $phpbb_dispatcher,
- $phpbb_root_path,
- $phpEx
- );
-
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
-
- $this->cache->purge();
-
- $this->pagination = $this->getMockBuilder('\phpbb\pagination')->disableOriginalConstructor()
- ->getMock();
-
- //$this->user_loader = new \phpbb\user_loader($this->db, __DIR__ . '/../../../', 'php', 'phpbb_users');
- $this->user_loader = $this->getMockBuilder('\phpbb\user_loader')
- ->disableOriginalConstructor()
- ->getMock();
- $this->user_loader->method('get_username')
- ->will($this->returnArgument(0));
-
- $request = $this->request = $this->getMockBuilder('\phpbb\request\request')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
- ->disableOriginalConstructor()
- ->getMock();
-
- }
-
- protected function tearDown() : void
- {
- parent::tearDown();
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+require_once dirname(__FILE__) . '/../../../../includes/functions_content.php';
+
+class core_base extends \phpbb_database_test_case
+{
+ /**
+ * Define the extensions to be tested
+ *
+ * @return array vendor/name of extension(s) to test
+ */
+ static protected function setup_extensions()
+ {
+ return array('phpbbgallery/core');
+ }
+
+ protected $db;
+ protected $config;
+ protected $dispatcher;
+ protected $template;
+ protected $language;
+ protected $user;
+ protected $auth;
+ protected $controller_helper;
+ protected $cache;
+ protected $gallery_config;
+ protected $pagination;
+ protected $user_loader;
+ protected $request;
+ protected $user_cpf;
+
+ /**
+ * Get data set fixtures
+ */
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
+ }
+
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+ global $auth, $config, $phpbb_dispatcher, $user, $cache, $request, $db, $phpbb_root_path, $phpEx;
+
+
+
+ /*$sql = 'DELETE FROM phpbb_config;';
+ $sql .= 'DELETE FROM phpbb_gallery_albums;';
+ $sql .= 'DELETE FROM phpbb_gallery_comments;';
+ $sql .= 'DELETE FROM phpbb_gallery_images;';
+ $sql .= 'DELETE FROM phpbb_gallery_permissions;';
+ $sql .= 'DELETE FROM phpbb_gallery_roles;';
+ $sql .= 'DELETE FROM phpbb_gallery_users;';
+ $sql .= 'DELETE FROM phpbb_groups;';
+ $sql .= 'DELETE FROM phpbb_users;';
+ $sql .= 'DELETE FROM phpbb_user_group;';
+ $sql .= 'DELETE FROM phpbb_zebra;';
+
+ $this->db->sql_query($sql);*/
+
+ parent::setUp();
+
+ $db = $this->db = $this->new_dbal();
+
+ $config = $this->config = new \phpbb\config\config(array());
+ $phpbb_dispatcher = $this->dispatcher = new \phpbb_mock_event_dispatcher();
+
+ $this->template = $this->getMockBuilder('\phpbb\template\template')
+ ->getMock();
+
+ $this->language = $this->getMockBuilder('\phpbb\language\language')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->language->method('lang')
+ ->will($this->returnArgument(0));
+
+ $this->user = $this->getMockBuilder('\phpbb\user')
+ ->setConstructorArgs(array(
+ new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
+ '\phpbb\datetime'
+ ))
+ ->getMock();
+ $user = $this->user;
+
+ $this->auth = $this->getMockBuilder('\phpbb\auth\auth')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $auth = $this->auth;
+
+ $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+ // Define some controller_helper stuff
+ $this->controller_helper->method('route')->will($this->returnArgument(0));
+
+ $controller_helper = $this->controller_helper;
+
+ $phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
+ $cache = $this->cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\dummy(),
+ $this->config,
+ $this->db,
+ $phpbb_dispatcher,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+
+ $this->cache->purge();
+
+ $this->pagination = $this->getMockBuilder('\phpbb\pagination')->disableOriginalConstructor()
+ ->getMock();
+
+ //$this->user_loader = new \phpbb\user_loader($this->db, __DIR__ . '/../../../', 'php', 'phpbb_users');
+ $this->user_loader = $this->getMockBuilder('\phpbb\user_loader')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->user_loader->method('get_username')
+ ->will($this->returnArgument(0));
+
+ $request = $this->request = $this->getMockBuilder('\phpbb\request\request')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->user_cpf = $this->getMockBuilder('\phpbb\profilefields\manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ }
+
+ protected function tearDown() : void
+ {
+ parent::tearDown();
+ }
+}
diff --git a/tests/core/core_block_test.php b/ext/phpbbgallery/tests/core/core_block_test.php
similarity index 96%
rename from tests/core/core_block_test.php
rename to ext/phpbbgallery/tests/core/core_block_test.php
index af70d982..d79b1fed 100644
--- a/tests/core/core_block_test.php
+++ b/ext/phpbbgallery/tests/core/core_block_test.php
@@ -1,68 +1,68 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
- * @group core
- */
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_block_test extends core_base
-{
- /**
- * @var \phpbbgallery\core\block
- */
- protected $gallery_block;
-
- public function setUp() : void
- {
- parent::setUp();
-
- $this->gallery_block = new \phpbbgallery\core\block();
- }
-
- public function test_get_album_status_locked()
- {
- $this->assertEquals($this->gallery_block->get_album_status_locked(), \phpbbgallery\core\block::ALBUM_LOCKED);
- }
- public function test_get_album_public()
- {
- $this->assertEquals($this->gallery_block->get_album_public(), \phpbbgallery\core\block::PUBLIC_ALBUM);
- }
- public function test_get_album_type_upload()
- {
- $this->assertEquals($this->gallery_block->get_album_type_upload(), \phpbbgallery\core\block::TYPE_UPLOAD);
- }
-
- public function test_get_image_status_unapproved()
- {
- $this->assertEquals($this->gallery_block->get_image_status_unapproved(), \phpbbgallery\core\block::STATUS_UNAPPROVED);
- }
- public function test_get_image_status_approved()
- {
- $this->assertEquals($this->gallery_block->get_image_status_approved(), \phpbbgallery\core\block::STATUS_APPROVED);
- }
- public function test_get_image_status_locked()
- {
- $this->assertEquals($this->gallery_block->get_image_status_locked(), \phpbbgallery\core\block::STATUS_LOCKED);
- }
- public function test_get_image_status_orphan()
- {
- $this->assertEquals($this->gallery_block->get_image_status_orphan(), \phpbbgallery\core\block::STATUS_ORPHAN);
- }
- public function test_get_no_contest()
- {
- $this->assertEquals($this->gallery_block->get_no_contest(), \phpbbgallery\core\block::NO_CONTEST);
- }
- public function test_get_in_contest()
- {
- $this->assertEquals($this->gallery_block->get_in_contest(), \phpbbgallery\core\block::IN_CONTEST);
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+ * @group core
+ */
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_block_test extends core_base
+{
+ /**
+ * @var \phpbbgallery\core\block
+ */
+ protected $gallery_block;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->gallery_block = new \phpbbgallery\core\block();
+ }
+
+ public function test_get_album_status_locked()
+ {
+ $this->assertEquals($this->gallery_block->get_album_status_locked(), \phpbbgallery\core\block::ALBUM_LOCKED);
+ }
+ public function test_get_album_public()
+ {
+ $this->assertEquals($this->gallery_block->get_album_public(), \phpbbgallery\core\block::PUBLIC_ALBUM);
+ }
+ public function test_get_album_type_upload()
+ {
+ $this->assertEquals($this->gallery_block->get_album_type_upload(), \phpbbgallery\core\block::TYPE_UPLOAD);
+ }
+
+ public function test_get_image_status_unapproved()
+ {
+ $this->assertEquals($this->gallery_block->get_image_status_unapproved(), \phpbbgallery\core\block::STATUS_UNAPPROVED);
+ }
+ public function test_get_image_status_approved()
+ {
+ $this->assertEquals($this->gallery_block->get_image_status_approved(), \phpbbgallery\core\block::STATUS_APPROVED);
+ }
+ public function test_get_image_status_locked()
+ {
+ $this->assertEquals($this->gallery_block->get_image_status_locked(), \phpbbgallery\core\block::STATUS_LOCKED);
+ }
+ public function test_get_image_status_orphan()
+ {
+ $this->assertEquals($this->gallery_block->get_image_status_orphan(), \phpbbgallery\core\block::STATUS_ORPHAN);
+ }
+ public function test_get_no_contest()
+ {
+ $this->assertEquals($this->gallery_block->get_no_contest(), \phpbbgallery\core\block::NO_CONTEST);
+ }
+ public function test_get_in_contest()
+ {
+ $this->assertEquals($this->gallery_block->get_in_contest(), \phpbbgallery\core\block::IN_CONTEST);
+ }
+}
diff --git a/tests/core/core_cache_test.php b/ext/phpbbgallery/tests/core/core_cache_test.php
similarity index 95%
rename from tests/core/core_cache_test.php
rename to ext/phpbbgallery/tests/core/core_cache_test.php
index 15cdb49b..6d343106 100644
--- a/tests/core/core_cache_test.php
+++ b/ext/phpbbgallery/tests/core/core_cache_test.php
@@ -1,147 +1,147 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_cache_test extends core_base
-{
- /** @var \phpbbgallery\core\cache */
- protected $gallery_cache;
-
- public function setUp() : void
- {
- parent::setUp();
-
- global $table_prefix;
- $table_prefix = 'phpbb_';
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
- }
- /**
- * Test get_albums function in cache
- * Test is disabled untill I find a way to make it not conflict with controller
-
- public function test_get_albums()
- {
- $test_array = array(
- '1' => array(
- 'album_id' => 1,
- 'parent_id' => 0,
- 'album_name' => 'TestPublicAlbum1',
- 'album_type' => 1,
- 'left_id' => 0,
- 'right_id' => 0,
- 'album_user_id' => 0,
- 'display_in_rrc' => true,
- 'album_auth_access' => 0
- ),
- '2' => array(
- 'album_id' => 2,
- 'parent_id' => 1,
- 'album_name' => 'TestPublicAlbumSubAlbum1',
- 'album_type' => 1,
- 'left_id' => 1,
- 'right_id' => 3,
- 'album_user_id' => 0,
- 'display_in_rrc' => false,
- 'album_auth_access' => 0
- ),
- '3' => array(
- 'album_id' => 3,
- 'parent_id' => 1,
- 'album_name' => 'TestPublicAlbumSubAlbum2',
- 'album_type' => 1,
- 'left_id' => 1,
- 'right_id' => 2,
- 'album_user_id' => 0,
- 'display_in_rrc' => true,
- 'album_auth_access' => 0
- ),
- '4' => array(
- 'album_id' => 4,
- 'parent_id' => 0,
- 'album_name' => 'TestUserAlbum1',
- 'album_type' => 1,
- 'left_id' => 0,
- 'right_id' => 0,
- 'album_user_id' => 2,
- 'display_in_rrc' => true,
- 'album_auth_access' => 0
- )
- );
- // Let's first destroy the cached albums (controller makes some fun with them)
- $this->gallery_cache->destroy_albums();
- $this->assertEquals($test_array, $this->gallery_cache->get_albums());
- }*/
- /**
- * Test data for the test_get_images test
- *
- * @return array Test data
- */
- public function data_get_images()
- {
- return array(
- 'image_1' => array(
- array(1),
- array(
- 1 => array(
- 'image_id' => 1,
- 'image_filename' => 'md5hashednamefor1.jpg',
- 'image_name' => 'TestImage1',
- 'image_name_clean' => 'testimage1',
- 'image_desc' => '',
- 'image_desc_uid' => '10fu4clu',
- 'image_desc_bitfield' => '',
- 'image_user_id' => 2,
- 'image_username' => 'admin',
- 'image_username_clean' => 'admin',
- 'image_user_colour' => '',
- 'image_user_ip' => '127.0.0.1',
- 'image_time' => 0,
- 'image_album_id' => 1,
- 'image_view_count' => 0,
- 'image_status' => 1,
- 'image_filemissing' => 0,
- 'image_rates' => 0,
- 'image_rate_points' => 0,
- 'image_rate_avg' => 0,
- 'image_comments' => 1,
- 'image_last_comment' => 1,
- 'image_allow_comments' => 1,
- 'image_favorited' => 0,
- 'image_reported' => 0,
- 'filesize_upload' => 0,
- 'filesize_medium' => 0,
- 'filesize_cache' => 0,
- 'album_name' => 'TestPublicAlbum1',
- )
- )
- )
- );
- }
- /**
- * get_images
- *
- * @dataProvider data_get_images
- */
- public function test_get_images($request, $expected)
- {
- $this->assertEquals($this->gallery_cache->get_images($request), $expected);
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_cache_test extends core_base
+{
+ /** @var \phpbbgallery\core\cache */
+ protected $gallery_cache;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ global $table_prefix;
+ $table_prefix = 'phpbb_';
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+ }
+ /**
+ * Test get_albums function in cache
+ * Test is disabled untill I find a way to make it not conflict with controller
+
+ public function test_get_albums()
+ {
+ $test_array = array(
+ '1' => array(
+ 'album_id' => 1,
+ 'parent_id' => 0,
+ 'album_name' => 'TestPublicAlbum1',
+ 'album_type' => 1,
+ 'left_id' => 0,
+ 'right_id' => 0,
+ 'album_user_id' => 0,
+ 'display_in_rrc' => true,
+ 'album_auth_access' => 0
+ ),
+ '2' => array(
+ 'album_id' => 2,
+ 'parent_id' => 1,
+ 'album_name' => 'TestPublicAlbumSubAlbum1',
+ 'album_type' => 1,
+ 'left_id' => 1,
+ 'right_id' => 3,
+ 'album_user_id' => 0,
+ 'display_in_rrc' => false,
+ 'album_auth_access' => 0
+ ),
+ '3' => array(
+ 'album_id' => 3,
+ 'parent_id' => 1,
+ 'album_name' => 'TestPublicAlbumSubAlbum2',
+ 'album_type' => 1,
+ 'left_id' => 1,
+ 'right_id' => 2,
+ 'album_user_id' => 0,
+ 'display_in_rrc' => true,
+ 'album_auth_access' => 0
+ ),
+ '4' => array(
+ 'album_id' => 4,
+ 'parent_id' => 0,
+ 'album_name' => 'TestUserAlbum1',
+ 'album_type' => 1,
+ 'left_id' => 0,
+ 'right_id' => 0,
+ 'album_user_id' => 2,
+ 'display_in_rrc' => true,
+ 'album_auth_access' => 0
+ )
+ );
+ // Let's first destroy the cached albums (controller makes some fun with them)
+ $this->gallery_cache->destroy_albums();
+ $this->assertEquals($test_array, $this->gallery_cache->get_albums());
+ }*/
+ /**
+ * Test data for the test_get_images test
+ *
+ * @return array Test data
+ */
+ public function data_get_images()
+ {
+ return array(
+ 'image_1' => array(
+ array(1),
+ array(
+ 1 => array(
+ 'image_id' => 1,
+ 'image_filename' => 'md5hashednamefor1.jpg',
+ 'image_name' => 'TestImage1',
+ 'image_name_clean' => 'testimage1',
+ 'image_desc' => '',
+ 'image_desc_uid' => '10fu4clu',
+ 'image_desc_bitfield' => '',
+ 'image_user_id' => 2,
+ 'image_username' => 'admin',
+ 'image_username_clean' => 'admin',
+ 'image_user_colour' => '',
+ 'image_user_ip' => '127.0.0.1',
+ 'image_time' => 0,
+ 'image_album_id' => 1,
+ 'image_view_count' => 0,
+ 'image_status' => 1,
+ 'image_filemissing' => 0,
+ 'image_rates' => 0,
+ 'image_rate_points' => 0,
+ 'image_rate_avg' => 0,
+ 'image_comments' => 1,
+ 'image_last_comment' => 1,
+ 'image_allow_comments' => 1,
+ 'image_favorited' => 0,
+ 'image_reported' => 0,
+ 'filesize_upload' => 0,
+ 'filesize_medium' => 0,
+ 'filesize_cache' => 0,
+ 'album_name' => 'TestPublicAlbum1',
+ )
+ )
+ )
+ );
+ }
+ /**
+ * get_images
+ *
+ * @dataProvider data_get_images
+ */
+ public function test_get_images($request, $expected)
+ {
+ $this->assertEquals($this->gallery_cache->get_images($request), $expected);
+ }
+}
diff --git a/tests/core/core_comment_test.php b/ext/phpbbgallery/tests/core/core_comment_test.php
similarity index 100%
rename from tests/core/core_comment_test.php
rename to ext/phpbbgallery/tests/core/core_comment_test.php
diff --git a/tests/core/core_config_test.php b/ext/phpbbgallery/tests/core/core_config_test.php
similarity index 96%
rename from tests/core/core_config_test.php
rename to ext/phpbbgallery/tests/core/core_config_test.php
index 0b74fa64..feb038dd 100644
--- a/tests/core/core_config_test.php
+++ b/ext/phpbbgallery/tests/core/core_config_test.php
@@ -1,367 +1,367 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_config_test extends core_base
-{
- public function setUp() : void
- {
- parent::setUp();
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
- }
- public function test_config_get_all()
- {
- $configs_array = array(
- 'album_display' => 254,
- 'album_images' => 2500,
- 'allow_comments' => true,
- 'allow_gif' => true,
- 'allow_hotlinking' => true,
- 'allow_jpg' => true,
- 'allow_png' => true,
- 'allow_webp' => true,
- 'allow_rates' => true,
- 'allow_resize' => true,
- 'allow_rotate' => true,
- 'allow_zip' => false,
- 'captcha_comment' => true,
- 'captcha_upload' => true,
- 'comment_length' => 2000,
- 'comment_user_control' => true,
- 'contests_ended' => 0,
- 'current_upload_dir_size' => 0,
- 'current_upload_dir' => 0,
- 'default_sort_dir' => 'd',
- 'default_sort_key' => 't',
- 'description_length'=> 2000,
- 'disp_birthdays' => false,
- 'disp_image_url' => true,
- 'disp_login' => true,
- 'disp_nextprev_thumbnail' => false,
- 'disp_statistic' => true,
- 'disp_total_images' => true,
- 'disp_whoisonline' => true,
- 'gdlib_version' => 2,
- 'hotlinking_domains' => 'anavaro.com',
- 'jpg_quality' => 100,
- 'link_thumbnail' => 'image_page',
- 'link_imagepage' => 'image',
- 'link_image_name' => 'image_page',
- 'link_image_icon' => 'image_page',
- 'max_filesize' => 512000,
- 'max_height' => 1024,
- 'max_rating' => 10,
- 'max_width' => 1280,
- 'medium_cache' => true,
- 'medium_height' => 600,
- 'medium_width' => 800,
- 'mini_thumbnail_disp' => true,
- 'mini_thumbnail_size' => 70,
- 'mvc_ignore' => 0,
- 'mvc_time' => 0,
- 'mvc_version' => '',
- 'newest_pega_user_id' => 0,
- 'newest_pega_username' => '',
- 'newest_pega_user_colour' => '',
- 'newest_pega_album_id' => 0,
- 'num_comments' => 0,
- 'num_images' => 0,
- 'num_pegas' => 0,
- 'num_uploads' => 10,
- 'pegas_index_album' => false,
- //'pegas_index_random' => true,
- 'pegas_index_rnd_count' => 4,
- //'pegas_index_recent' => true,
- 'pegas_index_rct_count' => 4,
- 'items_per_page' => 15,
- 'profile_user_images' => true,
- 'profile_pega' => true,
- 'prune_orphan_time' => 0,
- 'rrc_gindex_comments' => false,
- //'rrc_gindex_contests' => 1,
- 'rrc_gindex_display' => 173,
- 'rrc_gindex_mode' => 7,
- 'rrc_gindex_pegas' => true,
- 'rrc_profile_items' => 4,
- 'rrc_profile_display' => 141,
- 'rrc_profile_mode' => 3,
- //'rrc_profile_pegas' => true,
- 'search_display' => 45,
- //'thumbnail_cache' => true,
- 'thumbnail_height' => 160,
- //'thumbnail_infoline' => false,
- 'thumbnail_quality' => 50,
- 'thumbnail_width' => 240,
- 'version' => '',
- //'viewtopic_icon' => true,
- //'viewtopic_images' => true,
- //'viewtopic_link' => false,
- 'watermark_changed' => 0,
- 'watermark_enabled' => true,
- 'watermark_height' => 50,
- 'watermark_position' => 20,
- 'watermark_source' => 'gallery/images/watermark.png',
- 'watermark_width' => 200,
- );
- $this->assertTrue($this->arrays_are_similar($configs_array, $this->gallery_config->get_all()));
- }
- // We should be able to get seted parts of config
- public function test_config_get_all_with_set()
- {
- $configs_array = array(
- 'album_display' => 173,
- 'album_images' => 2500,
- 'allow_comments' => true,
- 'allow_gif' => true,
- 'allow_hotlinking' => true,
- 'allow_jpg' => true,
- 'allow_png' => true,
- 'allow_webp' => true,
- 'allow_rates' => true,
- 'allow_resize' => true,
- 'allow_rotate' => true,
- 'allow_zip' => false,
- 'captcha_comment' => true,
- 'captcha_upload' => true,
- 'comment_length' => 2000,
- 'comment_user_control' => true,
- 'contests_ended' => 0,
- 'current_upload_dir_size' => 0,
- 'current_upload_dir' => 0,
- 'default_sort_dir' => 'd',
- 'default_sort_key' => 't',
- 'description_length'=> 2000,
- 'disp_birthdays' => false,
- 'disp_image_url' => true,
- 'disp_login' => true,
- 'disp_nextprev_thumbnail' => false,
- 'disp_statistic' => true,
- 'disp_total_images' => true,
- 'disp_whoisonline' => true,
- 'gdlib_version' => 2,
- 'hotlinking_domains' => 'anavaro.com',
- 'jpg_quality' => 100,
- 'link_thumbnail' => 'image_page',
- 'link_imagepage' => 'image',
- 'link_image_name' => 'image_page',
- 'link_image_icon' => 'image_page',
- 'max_filesize' => 512000,
- 'max_height' => 1024,
- 'max_rating' => 10,
- 'max_width' => 1280,
- 'medium_cache' => true,
- 'medium_height' => 600,
- 'medium_width' => 800,
- 'mini_thumbnail_disp' => true,
- 'mini_thumbnail_size' => 70,
- 'mvc_ignore' => 0,
- 'mvc_time' => 0,
- 'mvc_version' => '',
- 'newest_pega_user_id' => 0,
- 'newest_pega_username' => '',
- 'newest_pega_user_colour' => '',
- 'newest_pega_album_id' => 0,
- 'num_comments' => 0,
- 'num_images' => 0,
- 'num_pegas' => 0,
- 'num_uploads' => 10,
- 'pegas_index_album' => false,
- //'pegas_index_random' => true,
- 'pegas_index_rnd_count' => 4,
- //'pegas_index_recent' => true,
- 'pegas_index_rct_count' => 4,
- 'items_per_page' => 15,
- 'profile_user_images' => true,
- 'profile_pega' => true,
- 'prune_orphan_time' => 0,
- 'rrc_gindex_comments' => false,
- //'rrc_gindex_contests' => 1,
- 'rrc_gindex_display' => 173,
- 'rrc_gindex_mode' => 7,
- 'rrc_gindex_pegas' => true,
- 'rrc_profile_items' => 4,
- 'rrc_profile_display' => 141,
- 'rrc_profile_mode' => 3,
- //'rrc_profile_pegas' => true,
- 'search_display' => 45,
- //'thumbnail_cache' => true,
- 'thumbnail_height' => 160,
- //'thumbnail_infoline' => false,
- 'thumbnail_quality' => 50,
- 'thumbnail_width' => 240,
- 'version' => '',
- //'viewtopic_icon' => true,
- //'viewtopic_images' => true,
- //'viewtopic_link' => false,
- 'watermark_changed' => 0,
- 'watermark_enabled' => true,
- 'watermark_height' => 50,
- 'watermark_position' => 20,
- 'watermark_source' => 'gallery/images/watermark.png',
- 'watermark_width' => 200,
- );
- $this->config['phpbb_gallery_album_display'] = 173;
- $this->assertTrue($this->arrays_are_similar($configs_array, $this->gallery_config->get_all()));
- }
- /**
- * Test data for the test_config_get test
- *
- * @return array Test data
- */
- public function config_get_data()
- {
- return array(
- 'get_existing_numeric' => array(
- 'description_length', // request
- 2000, //expect
- false // Should we destroy the object before requestin it
- ),
- 'get_existing_bool' => array(
- 'allow_resize',
- 1,
- false
- ),
- 'get_existing_string' => array(
- 'link_thumbnail',
- 'image_page',
- false
- ),
- 'get_non_existing_string' => array(
- 'link_imagepage',
- 'image',
- true
- ),
- 'get_non_existing_bool' => array(
- 'allow_gif',
- 1,
- true
- ),
- 'get_existing_numeric' => array(
- 'album_images', // request
- 2500, //expect
- true // Should we destroy the object before requestin it
- ),
- );
- }
- /**
- * Test get function of config
- *
- * @dataProvider config_get_data
- */
- public function test_config_get($variable, $expectation, $shenanigans)
- {
- if ($shenanigans)
- {
- $sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE config_name = \'' . $variable . '\'';
- $this->db->sql_query($sql);
- }
- if (is_numeric($expectation))
- {
- $this->assertEquals($this->gallery_config->get($variable), $expectation);
- }
- else
- {
- $this->assertStringContainsString($this->gallery_config->get($variable), $expectation);
- }
- }
-
- /**
- * Test data for the test_config_set test
- *
- * @return array Test data
- */
- public function config_set_data()
- {
- return array(
- 'set_numeric' => array(
- 'description_length', // Config name
- 2000, // Old Value
- 2500 // New value
- ),
- 'set_boolean' => array(
- 'allow_resize', // Config name
- 1, // Old Value
- 0 // New value
- ),
- 'set_string' => array(
- 'link_thumbnail',
- 'image_page',
- 'image'
- ),
- );
- }
- /**
- * Test set function of config
- *
- * @dataProvider config_set_data
- */
- public function test_config_set($variable, $old, $new)
- {
- if (is_numeric($old))
- {
- $this->assertEquals($this->gallery_config->get($variable), $old);
- $this->gallery_config->set($variable, $new);
- $this->assertEquals($this->gallery_config->get($variable), $new);
- }
- else
- {
- $this->assertStringContainsString($this->gallery_config->get($variable), $old);
- $this->gallery_config->set($variable, $new);
- $this->assertStringContainsString($this->gallery_config->get($variable), $new);
- }
- }
- public function test_config_inc()
- {
- $this->gallery_config->inc('description_length', 1);
- $this->gallery_config->inc('description_length', 1);
- $this->gallery_config->inc('description_length', 1);
- $this->assertEquals($this->config['phpbb_gallery_description_length'], 3);
- }
- public function test_config_dec()
- {
- $this->gallery_config->dec('description_length', 1);
- $this->gallery_config->dec('description_length', 1);
- $this->gallery_config->dec('description_length', 1);
- $this->assertEquals($this->config['phpbb_gallery_description_length'], -3);
- }
- /**
- * Determine if two associative arrays are similar
- *
- * Both arrays must have the same indexes with identical values
- * without respect to key ordering
- *
- * @param array $a
- * @param array $b
- * @return bool
- * This is taken from stack overflow http://stackoverflow.com/questions/3838288/phpunit-assert-two-arrays-are-equal-but-order-of-elements-not-important
- */
- function arrays_are_similar($a, $b) {
- // if the indexes don't match, return immediately
- if (count(array_diff_assoc($a, $b))) {
- return false;
- }
- // we know that the indexes, but maybe not values, match.
- // compare the values between the two arrays
- foreach($a as $k => $v) {
- if ($v !== $b[$k]) {
- return false;
- }
- }
- // we have identical indexes, and no unequal values
- return true;
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_config_test extends core_base
+{
+ public function setUp() : void
+ {
+ parent::setUp();
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+ }
+ public function test_config_get_all()
+ {
+ $configs_array = array(
+ 'album_display' => 254,
+ 'album_images' => 2500,
+ 'allow_comments' => true,
+ 'allow_gif' => true,
+ 'allow_hotlinking' => true,
+ 'allow_jpg' => true,
+ 'allow_png' => true,
+ 'allow_webp' => true,
+ 'allow_rates' => true,
+ 'allow_resize' => true,
+ 'allow_rotate' => true,
+ 'allow_zip' => false,
+ 'captcha_comment' => true,
+ 'captcha_upload' => true,
+ 'comment_length' => 2000,
+ 'comment_user_control' => true,
+ 'contests_ended' => 0,
+ 'current_upload_dir_size' => 0,
+ 'current_upload_dir' => 0,
+ 'default_sort_dir' => 'd',
+ 'default_sort_key' => 't',
+ 'description_length'=> 2000,
+ 'disp_birthdays' => false,
+ 'disp_image_url' => true,
+ 'disp_login' => true,
+ 'disp_nextprev_thumbnail' => false,
+ 'disp_statistic' => true,
+ 'disp_total_images' => true,
+ 'disp_whoisonline' => true,
+ 'gdlib_version' => 2,
+ 'hotlinking_domains' => 'anavaro.com',
+ 'jpg_quality' => 100,
+ 'link_thumbnail' => 'image_page',
+ 'link_imagepage' => 'image',
+ 'link_image_name' => 'image_page',
+ 'link_image_icon' => 'image_page',
+ 'max_filesize' => 512000,
+ 'max_height' => 1024,
+ 'max_rating' => 10,
+ 'max_width' => 1280,
+ 'medium_cache' => true,
+ 'medium_height' => 600,
+ 'medium_width' => 800,
+ 'mini_thumbnail_disp' => true,
+ 'mini_thumbnail_size' => 70,
+ 'mvc_ignore' => 0,
+ 'mvc_time' => 0,
+ 'mvc_version' => '',
+ 'newest_pega_user_id' => 0,
+ 'newest_pega_username' => '',
+ 'newest_pega_user_colour' => '',
+ 'newest_pega_album_id' => 0,
+ 'num_comments' => 0,
+ 'num_images' => 0,
+ 'num_pegas' => 0,
+ 'num_uploads' => 10,
+ 'pegas_index_album' => false,
+ //'pegas_index_random' => true,
+ 'pegas_index_rnd_count' => 4,
+ //'pegas_index_recent' => true,
+ 'pegas_index_rct_count' => 4,
+ 'items_per_page' => 15,
+ 'profile_user_images' => true,
+ 'profile_pega' => true,
+ 'prune_orphan_time' => 0,
+ 'rrc_gindex_comments' => false,
+ //'rrc_gindex_contests' => 1,
+ 'rrc_gindex_display' => 173,
+ 'rrc_gindex_mode' => 7,
+ 'rrc_gindex_pegas' => true,
+ 'rrc_profile_items' => 4,
+ 'rrc_profile_display' => 141,
+ 'rrc_profile_mode' => 3,
+ //'rrc_profile_pegas' => true,
+ 'search_display' => 45,
+ //'thumbnail_cache' => true,
+ 'thumbnail_height' => 160,
+ //'thumbnail_infoline' => false,
+ 'thumbnail_quality' => 50,
+ 'thumbnail_width' => 240,
+ 'version' => '',
+ //'viewtopic_icon' => true,
+ //'viewtopic_images' => true,
+ //'viewtopic_link' => false,
+ 'watermark_changed' => 0,
+ 'watermark_enabled' => true,
+ 'watermark_height' => 50,
+ 'watermark_position' => 20,
+ 'watermark_source' => 'gallery/images/watermark.png',
+ 'watermark_width' => 200,
+ );
+ $this->assertTrue($this->arrays_are_similar($configs_array, $this->gallery_config->get_all()));
+ }
+ // We should be able to get seted parts of config
+ public function test_config_get_all_with_set()
+ {
+ $configs_array = array(
+ 'album_display' => 173,
+ 'album_images' => 2500,
+ 'allow_comments' => true,
+ 'allow_gif' => true,
+ 'allow_hotlinking' => true,
+ 'allow_jpg' => true,
+ 'allow_png' => true,
+ 'allow_webp' => true,
+ 'allow_rates' => true,
+ 'allow_resize' => true,
+ 'allow_rotate' => true,
+ 'allow_zip' => false,
+ 'captcha_comment' => true,
+ 'captcha_upload' => true,
+ 'comment_length' => 2000,
+ 'comment_user_control' => true,
+ 'contests_ended' => 0,
+ 'current_upload_dir_size' => 0,
+ 'current_upload_dir' => 0,
+ 'default_sort_dir' => 'd',
+ 'default_sort_key' => 't',
+ 'description_length'=> 2000,
+ 'disp_birthdays' => false,
+ 'disp_image_url' => true,
+ 'disp_login' => true,
+ 'disp_nextprev_thumbnail' => false,
+ 'disp_statistic' => true,
+ 'disp_total_images' => true,
+ 'disp_whoisonline' => true,
+ 'gdlib_version' => 2,
+ 'hotlinking_domains' => 'anavaro.com',
+ 'jpg_quality' => 100,
+ 'link_thumbnail' => 'image_page',
+ 'link_imagepage' => 'image',
+ 'link_image_name' => 'image_page',
+ 'link_image_icon' => 'image_page',
+ 'max_filesize' => 512000,
+ 'max_height' => 1024,
+ 'max_rating' => 10,
+ 'max_width' => 1280,
+ 'medium_cache' => true,
+ 'medium_height' => 600,
+ 'medium_width' => 800,
+ 'mini_thumbnail_disp' => true,
+ 'mini_thumbnail_size' => 70,
+ 'mvc_ignore' => 0,
+ 'mvc_time' => 0,
+ 'mvc_version' => '',
+ 'newest_pega_user_id' => 0,
+ 'newest_pega_username' => '',
+ 'newest_pega_user_colour' => '',
+ 'newest_pega_album_id' => 0,
+ 'num_comments' => 0,
+ 'num_images' => 0,
+ 'num_pegas' => 0,
+ 'num_uploads' => 10,
+ 'pegas_index_album' => false,
+ //'pegas_index_random' => true,
+ 'pegas_index_rnd_count' => 4,
+ //'pegas_index_recent' => true,
+ 'pegas_index_rct_count' => 4,
+ 'items_per_page' => 15,
+ 'profile_user_images' => true,
+ 'profile_pega' => true,
+ 'prune_orphan_time' => 0,
+ 'rrc_gindex_comments' => false,
+ //'rrc_gindex_contests' => 1,
+ 'rrc_gindex_display' => 173,
+ 'rrc_gindex_mode' => 7,
+ 'rrc_gindex_pegas' => true,
+ 'rrc_profile_items' => 4,
+ 'rrc_profile_display' => 141,
+ 'rrc_profile_mode' => 3,
+ //'rrc_profile_pegas' => true,
+ 'search_display' => 45,
+ //'thumbnail_cache' => true,
+ 'thumbnail_height' => 160,
+ //'thumbnail_infoline' => false,
+ 'thumbnail_quality' => 50,
+ 'thumbnail_width' => 240,
+ 'version' => '',
+ //'viewtopic_icon' => true,
+ //'viewtopic_images' => true,
+ //'viewtopic_link' => false,
+ 'watermark_changed' => 0,
+ 'watermark_enabled' => true,
+ 'watermark_height' => 50,
+ 'watermark_position' => 20,
+ 'watermark_source' => 'gallery/images/watermark.png',
+ 'watermark_width' => 200,
+ );
+ $this->config['phpbb_gallery_album_display'] = 173;
+ $this->assertTrue($this->arrays_are_similar($configs_array, $this->gallery_config->get_all()));
+ }
+ /**
+ * Test data for the test_config_get test
+ *
+ * @return array Test data
+ */
+ public function config_get_data()
+ {
+ return array(
+ 'get_existing_numeric' => array(
+ 'description_length', // request
+ 2000, //expect
+ false // Should we destroy the object before requestin it
+ ),
+ 'get_existing_bool' => array(
+ 'allow_resize',
+ 1,
+ false
+ ),
+ 'get_existing_string' => array(
+ 'link_thumbnail',
+ 'image_page',
+ false
+ ),
+ 'get_non_existing_string' => array(
+ 'link_imagepage',
+ 'image',
+ true
+ ),
+ 'get_non_existing_bool' => array(
+ 'allow_gif',
+ 1,
+ true
+ ),
+ 'get_existing_numeric' => array(
+ 'album_images', // request
+ 2500, //expect
+ true // Should we destroy the object before requestin it
+ ),
+ );
+ }
+ /**
+ * Test get function of config
+ *
+ * @dataProvider config_get_data
+ */
+ public function test_config_get($variable, $expectation, $shenanigans)
+ {
+ if ($shenanigans)
+ {
+ $sql = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE config_name = \'' . $variable . '\'';
+ $this->db->sql_query($sql);
+ }
+ if (is_numeric($expectation))
+ {
+ $this->assertEquals($this->gallery_config->get($variable), $expectation);
+ }
+ else
+ {
+ $this->assertStringContainsString($this->gallery_config->get($variable), $expectation);
+ }
+ }
+
+ /**
+ * Test data for the test_config_set test
+ *
+ * @return array Test data
+ */
+ public function config_set_data()
+ {
+ return array(
+ 'set_numeric' => array(
+ 'description_length', // Config name
+ 2000, // Old Value
+ 2500 // New value
+ ),
+ 'set_boolean' => array(
+ 'allow_resize', // Config name
+ 1, // Old Value
+ 0 // New value
+ ),
+ 'set_string' => array(
+ 'link_thumbnail',
+ 'image_page',
+ 'image'
+ ),
+ );
+ }
+ /**
+ * Test set function of config
+ *
+ * @dataProvider config_set_data
+ */
+ public function test_config_set($variable, $old, $new)
+ {
+ if (is_numeric($old))
+ {
+ $this->assertEquals($this->gallery_config->get($variable), $old);
+ $this->gallery_config->set($variable, $new);
+ $this->assertEquals($this->gallery_config->get($variable), $new);
+ }
+ else
+ {
+ $this->assertStringContainsString($this->gallery_config->get($variable), $old);
+ $this->gallery_config->set($variable, $new);
+ $this->assertStringContainsString($this->gallery_config->get($variable), $new);
+ }
+ }
+ public function test_config_inc()
+ {
+ $this->gallery_config->inc('description_length', 1);
+ $this->gallery_config->inc('description_length', 1);
+ $this->gallery_config->inc('description_length', 1);
+ $this->assertEquals($this->config['phpbb_gallery_description_length'], 3);
+ }
+ public function test_config_dec()
+ {
+ $this->gallery_config->dec('description_length', 1);
+ $this->gallery_config->dec('description_length', 1);
+ $this->gallery_config->dec('description_length', 1);
+ $this->assertEquals($this->config['phpbb_gallery_description_length'], -3);
+ }
+ /**
+ * Determine if two associative arrays are similar
+ *
+ * Both arrays must have the same indexes with identical values
+ * without respect to key ordering
+ *
+ * @param array $a
+ * @param array $b
+ * @return bool
+ * This is taken from stack overflow http://stackoverflow.com/questions/3838288/phpunit-assert-two-arrays-are-equal-but-order-of-elements-not-important
+ */
+ function arrays_are_similar($a, $b) {
+ // if the indexes don't match, return immediately
+ if (count(array_diff_assoc($a, $b))) {
+ return false;
+ }
+ // we know that the indexes, but maybe not values, match.
+ // compare the values between the two arrays
+ foreach($a as $k => $v) {
+ if ($v !== $b[$k]) {
+ return false;
+ }
+ }
+ // we have identical indexes, and no unequal values
+ return true;
+ }
+}
diff --git a/tests/core/core_contest_test.php b/ext/phpbbgallery/tests/core/core_contest_test.php
similarity index 95%
rename from tests/core/core_contest_test.php
rename to ext/phpbbgallery/tests/core/core_contest_test.php
index dee7604f..520ee760 100644
--- a/tests/core/core_contest_test.php
+++ b/ext/phpbbgallery/tests/core/core_contest_test.php
@@ -1,101 +1,101 @@
-
- * @license GNU General Public License, version 2 (GPL-2.0)
- *
- */
-
-namespace phpbbgallery\tests\core;
-/**
- * @group core
- */
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-
-class core_contest_test extends core_base
-{
- protected $gallery_contest;
-
- public function setUp() : void
- {
- parent::setUp();
-
- $this->gallery_contest = new \phpbbgallery\core\contest(
- $this->db,
- $this->gallery_config,
- 'phpbb_gallery_images',
- 'phpbb_gallery_contests'
- );
- }
-
- public function test_get_contest()
- {
- $test = $this->gallery_contest->get_contest(1);
- $this->assertEquals($test['contest_album_id'], 5);
- }
- public function test_get_contest_album_parm()
- {
- $test = $this->gallery_contest->get_contest(6, 'album');
- $this->assertEquals($test['contest_id'], 2);
- }
-
- /*
- * Provide data for get is_step
- */
- public function data_is_step()
- {
- $time = time();
- return array(
- 'contest_in_upload' => array(
- array(//album data
- 'contest_id' => 1,
- 'contest_start' => $time - 20,
- 'contest_rating' => $time + 50,
- 'contest_end' => $time + 100,
- ),
- true,
- false,
- false
-
- ),
- 'contest_in_rate' => array(
- array(//album data
- 'contest_id' => 1,
- 'contest_start' => $time - 20,
- 'contest_rating' => $time - 10,
- 'contest_end' => $time + 100,
- ),
- true,
- false,
- false
- ),
- 'contest_in_comment' => array(
- array(//album data
- 'contest_id' => 1,
- 'contest_start' => $time - 50,
- 'contest_rating' => $time - 20,
- 'contest_end' => $time - 10,
- ),
- true,
- false,
- false
- ),
- );
- }
-
-
- /**
- * Test is_step
- * @dataProvider data_is_step
- **/
-
- public function test_is_step($album_data, $upload, $rating, $comment)
- {
- $this->assertEquals($upload, $this->gallery_contest->is_step('upload', $album_data));
- $this->assertEquals($rating, $this->gallery_contest->is_step('rate', $album_data));
- $this->assertEquals($comment, $this->gallery_contest->is_step('comment', $album_data));
- }
-}
+
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ */
+
+namespace phpbbgallery\tests\core;
+/**
+ * @group core
+ */
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+
+class core_contest_test extends core_base
+{
+ protected $gallery_contest;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->gallery_contest = new \phpbbgallery\core\contest(
+ $this->db,
+ $this->gallery_config,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_contests'
+ );
+ }
+
+ public function test_get_contest()
+ {
+ $test = $this->gallery_contest->get_contest(1);
+ $this->assertEquals($test['contest_album_id'], 5);
+ }
+ public function test_get_contest_album_parm()
+ {
+ $test = $this->gallery_contest->get_contest(6, 'album');
+ $this->assertEquals($test['contest_id'], 2);
+ }
+
+ /*
+ * Provide data for get is_step
+ */
+ public function data_is_step()
+ {
+ $time = time();
+ return array(
+ 'contest_in_upload' => array(
+ array(//album data
+ 'contest_id' => 1,
+ 'contest_start' => $time - 20,
+ 'contest_rating' => $time + 50,
+ 'contest_end' => $time + 100,
+ ),
+ true,
+ false,
+ false
+
+ ),
+ 'contest_in_rate' => array(
+ array(//album data
+ 'contest_id' => 1,
+ 'contest_start' => $time - 20,
+ 'contest_rating' => $time - 10,
+ 'contest_end' => $time + 100,
+ ),
+ true,
+ false,
+ false
+ ),
+ 'contest_in_comment' => array(
+ array(//album data
+ 'contest_id' => 1,
+ 'contest_start' => $time - 50,
+ 'contest_rating' => $time - 20,
+ 'contest_end' => $time - 10,
+ ),
+ true,
+ false,
+ false
+ ),
+ );
+ }
+
+
+ /**
+ * Test is_step
+ * @dataProvider data_is_step
+ **/
+
+ public function test_is_step($album_data, $upload, $rating, $comment)
+ {
+ $this->assertEquals($upload, $this->gallery_contest->is_step('upload', $album_data));
+ $this->assertEquals($rating, $this->gallery_contest->is_step('rate', $album_data));
+ $this->assertEquals($comment, $this->gallery_contest->is_step('comment', $album_data));
+ }
+}
diff --git a/tests/core/core_image_test.php b/ext/phpbbgallery/tests/core/core_image_test.php
similarity index 95%
rename from tests/core/core_image_test.php
rename to ext/phpbbgallery/tests/core/core_image_test.php
index 67ee16bf..75cb4fdb 100644
--- a/tests/core/core_image_test.php
+++ b/ext/phpbbgallery/tests/core/core_image_test.php
@@ -1,279 +1,279 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_image_test extends core_base
-{
- protected $gallery_cache;
- protected $gallery_user;
- protected $gallery_auth;
- protected $block;
- protected $album;
- protected $url;
- protected $log;
- protected $notification_helper;
- protected $report;
- protected $file;
- protected $contest;
- protected $image;
-
- public function setUp() : void
- {
- parent::setUp();
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
-
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
-
- $this->block = new \phpbbgallery\core\block();
-
- $this->album = new \phpbbgallery\core\album\album(
- $this->db,
- $this->user,
- $this->language,
- $this->user_cpf,
- $this->gallery_auth,
- $this->gallery_cache,
- $this->block,
- $this->gallery_config,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images',
- 'phpbb_gallery_watch',
- 'phpbb_gallery_contests'
- );
-
- $this->url = new \phpbbgallery\core\url(
- $this->template,
- $this->request,
- $this->config,
- 'phpBB/',
- 'php'
- );
-
- $this->log = new \phpbbgallery\core\log(
- $this->db,
- $this->user,
- $this->language,
- $this->user_loader,
- $this->template,
- $this->controller_helper,
- $this->pagination,
- $this->gallery_auth,
- $this->gallery_config,
- 'phpbb_gallery_log',
- 'phpbb_gallery_images'
- );
- $this->notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->report = new \phpbbgallery\core\report(
- $this->log,
- $this->gallery_auth,
- $this->user,
- $this->language,
- $this->db,
- $this->user_loader,
- $this->album,
- $this->template,
- $this->controller_helper,
- $this->gallery_config,
- $this->pagination,
- $this->notification_helper,
- 'phpbb_gallery_images',
- 'phpbb_gallery_reports'
- );
- $this->file = new \phpbbgallery\core\file\file(
- $this->request,
- $this->url,
- $this->gallery_config,
- 2
- );
- $this->contest = new \phpbbgallery\core\contest(
- $this->db,
- $this->gallery_config,
- 'phpbb_gallery_images',
- 'phpbb_gallery_contests'
- );
- $this->image = new \phpbbgallery\core\image\image(
- $this->db,
- $this->user,
- $this->language,
- $this->template,
- $this->dispatcher,
- $this->gallery_auth,
- $this->album,
- $this->gallery_config,
- $this->controller_helper,
- $this->url,
- $this->log,
- $this->notification_helper,
- $this->report,
- $this->gallery_cache,
- $this->gallery_user,
- $this->contest,
- $this->file,
- 'phpbb_gallery_images'
- );
- }
-
- /*
- * Provide data for get user_info
- */
- public function data_get_new_author_info()
- {
- return array(
- 'admin' => array(
- 'admin', //request
- array(
- 'username' => 'admin',
- 'user_colour' => '',
- 'user_id' => 2
- )
- ),
- 'none' => array(
- 'blabla', //request
- false
- ),
- );
- }
-
- /**
- * Test get_new_author_info
- * @dataProvider data_get_new_author_info
- **/
- public function test_get_new_author_info($request, $expected)
- {
- $this->assertEquals($expected, $this->image->get_new_author_info($request));
- }
-
-
- /**
- * TODO: Add tests for delete_images()
- **/
- /**
- * This is data for test_get_filenames
- */
- public function data_get_filenames()
- {
- return array(
- 'all_array' => array(
- array(1, 2, 3, 4, 5, 6), //Request
- array( // Response
- 1 => 'md5hashednamefor1.jpg',
- 2 => 'md5hashednamefor2.jpg',
- 3 => 'md5hashednamefor3.jpg',
- 4 => 'md5hashednamefor4.jpg',
- 5 => 'md5hashednamefor5.jpg',
- 6 => 'md5hashednamefor6.jpg'
- )
- ),
- 'single_array' => array(
- array(1), //Request
- array( // Response
- 1 => 'md5hashednamefor1.jpg'
- )
- ),
- 'single_int' => array(
- 1, //Request
- array( // Response
- 1 => 'md5hashednamefor1.jpg'
- )
- ),
- 'invalid' => array(
- array(11), //Request
- array() // Respons
- )
- );
- }
-
- /**
- * This tests the get_filenames
- * @dataProvider data_get_filenames
- */
- public function test_get_filenames($request, $expected)
- {
- $this->assertEquals($expected, $this->image->get_filenames($request));
- }
-
- /**
- * TODO: Add test for generate_link
- */
-
- /**
- * TODO: Add test for handle_counter
- */
-
- /**
- * TODO: Add test for get_image_data
- */
-
- /**
- * TODO: Add test for approve_images
- */
-
- /**
- * TODO: Add test for unapprove_images
- */
-
- /**
- * TODO: Add test for move_image
- */
-
- /**
- * TODO: Add test for lock_image
- */
-
- /**
- * TODO: Add test for get_last_image
- */
-
- /**
- * Test for assign_block is done in tests\core\core_search_test
- */
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_image_test extends core_base
+{
+ protected $gallery_cache;
+ protected $gallery_user;
+ protected $gallery_auth;
+ protected $block;
+ protected $album;
+ protected $url;
+ protected $log;
+ protected $notification_helper;
+ protected $report;
+ protected $file;
+ protected $contest;
+ protected $image;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+
+ $this->block = new \phpbbgallery\core\block();
+
+ $this->album = new \phpbbgallery\core\album\album(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_cpf,
+ $this->gallery_auth,
+ $this->gallery_cache,
+ $this->block,
+ $this->gallery_config,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_watch',
+ 'phpbb_gallery_contests'
+ );
+
+ $this->url = new \phpbbgallery\core\url(
+ $this->template,
+ $this->request,
+ $this->config,
+ 'phpBB/',
+ 'php'
+ );
+
+ $this->log = new \phpbbgallery\core\log(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_loader,
+ $this->template,
+ $this->controller_helper,
+ $this->pagination,
+ $this->gallery_auth,
+ $this->gallery_config,
+ 'phpbb_gallery_log',
+ 'phpbb_gallery_images'
+ );
+ $this->notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->report = new \phpbbgallery\core\report(
+ $this->log,
+ $this->gallery_auth,
+ $this->user,
+ $this->language,
+ $this->db,
+ $this->user_loader,
+ $this->album,
+ $this->template,
+ $this->controller_helper,
+ $this->gallery_config,
+ $this->pagination,
+ $this->notification_helper,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_reports'
+ );
+ $this->file = new \phpbbgallery\core\file\file(
+ $this->request,
+ $this->url,
+ $this->gallery_config,
+ 2
+ );
+ $this->contest = new \phpbbgallery\core\contest(
+ $this->db,
+ $this->gallery_config,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_contests'
+ );
+ $this->image = new \phpbbgallery\core\image\image(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->template,
+ $this->dispatcher,
+ $this->gallery_auth,
+ $this->album,
+ $this->gallery_config,
+ $this->controller_helper,
+ $this->url,
+ $this->log,
+ $this->notification_helper,
+ $this->report,
+ $this->gallery_cache,
+ $this->gallery_user,
+ $this->contest,
+ $this->file,
+ 'phpbb_gallery_images'
+ );
+ }
+
+ /*
+ * Provide data for get user_info
+ */
+ public function data_get_new_author_info()
+ {
+ return array(
+ 'admin' => array(
+ 'admin', //request
+ array(
+ 'username' => 'admin',
+ 'user_colour' => '',
+ 'user_id' => 2
+ )
+ ),
+ 'none' => array(
+ 'blabla', //request
+ false
+ ),
+ );
+ }
+
+ /**
+ * Test get_new_author_info
+ * @dataProvider data_get_new_author_info
+ **/
+ public function test_get_new_author_info($request, $expected)
+ {
+ $this->assertEquals($expected, $this->image->get_new_author_info($request));
+ }
+
+
+ /**
+ * TODO: Add tests for delete_images()
+ **/
+ /**
+ * This is data for test_get_filenames
+ */
+ public function data_get_filenames()
+ {
+ return array(
+ 'all_array' => array(
+ array(1, 2, 3, 4, 5, 6), //Request
+ array( // Response
+ 1 => 'md5hashednamefor1.jpg',
+ 2 => 'md5hashednamefor2.jpg',
+ 3 => 'md5hashednamefor3.jpg',
+ 4 => 'md5hashednamefor4.jpg',
+ 5 => 'md5hashednamefor5.jpg',
+ 6 => 'md5hashednamefor6.jpg'
+ )
+ ),
+ 'single_array' => array(
+ array(1), //Request
+ array( // Response
+ 1 => 'md5hashednamefor1.jpg'
+ )
+ ),
+ 'single_int' => array(
+ 1, //Request
+ array( // Response
+ 1 => 'md5hashednamefor1.jpg'
+ )
+ ),
+ 'invalid' => array(
+ array(11), //Request
+ array() // Respons
+ )
+ );
+ }
+
+ /**
+ * This tests the get_filenames
+ * @dataProvider data_get_filenames
+ */
+ public function test_get_filenames($request, $expected)
+ {
+ $this->assertEquals($expected, $this->image->get_filenames($request));
+ }
+
+ /**
+ * TODO: Add test for generate_link
+ */
+
+ /**
+ * TODO: Add test for handle_counter
+ */
+
+ /**
+ * TODO: Add test for get_image_data
+ */
+
+ /**
+ * TODO: Add test for approve_images
+ */
+
+ /**
+ * TODO: Add test for unapprove_images
+ */
+
+ /**
+ * TODO: Add test for move_image
+ */
+
+ /**
+ * TODO: Add test for lock_image
+ */
+
+ /**
+ * TODO: Add test for get_last_image
+ */
+
+ /**
+ * Test for assign_block is done in tests\core\core_search_test
+ */
+}
diff --git a/tests/core/core_notification_test.php b/ext/phpbbgallery/tests/core/core_notification_test.php
similarity index 96%
rename from tests/core/core_notification_test.php
rename to ext/phpbbgallery/tests/core/core_notification_test.php
index ee45064d..8597945b 100644
--- a/tests/core/core_notification_test.php
+++ b/ext/phpbbgallery/tests/core/core_notification_test.php
@@ -1,103 +1,103 @@
-notification = new \phpbbgallery\core\notification(
- $this->db,
- $this->user,
- 'phpbb_gallery_watch'
- );
- }
-
- /*
- * Provide data for get user_info
- */
- public function data_add_vew()
- {
- return array(
- 'base' => array(
- array((int) 1, (int) 2, (int) 3, (int) 4), // albums as array
- 2, // user_id forced
- 4 // expected
- ),
- 'int' => array(
- (int) 1, // albums as array
- 2, // user_id forced
- 1 // expected
- ),
- 'str' => array(
- '1', // albums as array
- 2, // user_id forced
- 1 // expected
- ),
- 'dup' => array(
- (int) 6, // albums as array
- 6, // user_id forced
- 2 // expected
- )
- );
- }
-
- /**
- * Test add_albums
- * @dataProvider data_add_vew
- **/
- public function test_add($albums, $user_id, $expected)
- {
- $this->notification->add($albums, $user_id);
- $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = ' . $user_id);
- $answer = $this->db->sql_fetchfield('eq1');
- $this->assertEquals($answer, $expected);
- }
-
- /**
- * Test add_albums
- * @dataProvider data_add_vew
- **/
- public function test_add_albums($albums, $user_id, $expected)
- {
- $this->notification->add_albums($albums, $user_id);
- $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = ' . $user_id);
- $answer = $this->db->sql_fetchfield('eq1');
- $this->assertEquals($answer, $expected);
- }
-
- public function test_remove()
- {
- $this->notification->remove(6, 6);
- $this->notification->remove_albums(6, 6);
- $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = 6');
- $answer = $this->db->sql_fetchfield('eq1');
- $this->assertEquals($answer, 0);
- }
-
- public function test_delete()
- {
- $this->notification->delete_images(array(6));
- $this->notification->delete_albums(6);
- $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = 6');
- $answer = $this->db->sql_fetchfield('eq1');
- $this->assertEquals($answer, 0);
- }
-}
+notification = new \phpbbgallery\core\notification(
+ $this->db,
+ $this->user,
+ 'phpbb_gallery_watch'
+ );
+ }
+
+ /*
+ * Provide data for get user_info
+ */
+ public function data_add_vew()
+ {
+ return array(
+ 'base' => array(
+ array((int) 1, (int) 2, (int) 3, (int) 4), // albums as array
+ 2, // user_id forced
+ 4 // expected
+ ),
+ 'int' => array(
+ (int) 1, // albums as array
+ 2, // user_id forced
+ 1 // expected
+ ),
+ 'str' => array(
+ '1', // albums as array
+ 2, // user_id forced
+ 1 // expected
+ ),
+ 'dup' => array(
+ (int) 6, // albums as array
+ 6, // user_id forced
+ 2 // expected
+ )
+ );
+ }
+
+ /**
+ * Test add_albums
+ * @dataProvider data_add_vew
+ **/
+ public function test_add($albums, $user_id, $expected)
+ {
+ $this->notification->add($albums, $user_id);
+ $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = ' . $user_id);
+ $answer = $this->db->sql_fetchfield('eq1');
+ $this->assertEquals($answer, $expected);
+ }
+
+ /**
+ * Test add_albums
+ * @dataProvider data_add_vew
+ **/
+ public function test_add_albums($albums, $user_id, $expected)
+ {
+ $this->notification->add_albums($albums, $user_id);
+ $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = ' . $user_id);
+ $answer = $this->db->sql_fetchfield('eq1');
+ $this->assertEquals($answer, $expected);
+ }
+
+ public function test_remove()
+ {
+ $this->notification->remove(6, 6);
+ $this->notification->remove_albums(6, 6);
+ $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = 6');
+ $answer = $this->db->sql_fetchfield('eq1');
+ $this->assertEquals($answer, 0);
+ }
+
+ public function test_delete()
+ {
+ $this->notification->delete_images(array(6));
+ $this->notification->delete_albums(6);
+ $this->db->sql_query('SELECT COUNT(watch_id) as eq1 FROM phpbb_gallery_watch WHERE user_id = 6');
+ $answer = $this->db->sql_fetchfield('eq1');
+ $this->assertEquals($answer, 0);
+ }
+}
diff --git a/tests/core/core_rating_test.php b/ext/phpbbgallery/tests/core/core_rating_test.php
similarity index 94%
rename from tests/core/core_rating_test.php
rename to ext/phpbbgallery/tests/core/core_rating_test.php
index f607a026..9c675bcb 100644
--- a/tests/core/core_rating_test.php
+++ b/ext/phpbbgallery/tests/core/core_rating_test.php
@@ -1,201 +1,201 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core_dev
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_rating_test extends core_base
-{
- protected $gallery_cache;
- protected $gallery_user;
- protected $gallery_auth;
- protected $gallery_rating;
-
- public function setUp() : void
- {
- parent::setUp();
-
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
-
- $this->gallery_rating = new \phpbbgallery\core\rating(
- $this->db,
- $this->template,
- $this->user,
- $this->language,
- $this->request,
- $this->gallery_config,
- $this->gallery_auth,
- 'phpbb_gallery_images',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_rates'
- );
- }
-
- /**
- * Test rating loader
- */
-
- public function test_loader()
- {
- $this->gallery_rating->loader(1);
- $this->assertEquals($this->gallery_rating->image_id, 1);
-
- }
-
- /**
- * Test rating get_image_rating
- */
- public function test_get_image_rating()
- {
- //empty for now
- }
-
- /*
- * Provide data for get get_user_rating
- */
- public function data_get_user_rating()
- {
- return array(
- 'anon' => array(
- 1,
- -1
- ),
- 'uid2' => array(
- 2,
- 10
- ),
- 'uid3' => array(
- 3,
- 9
- ),
- 'uid4' => array(
- 4,
- 2
- ),
- );
- }
- /**
- * Test rating get_user_rating
- *
- * @dataProvider data_get_user_rating
- */
- public function test_get_user_rating($uid, $test)
- {
- $this->gallery_rating->loader(1);
- $this->gallery_rating->user_rating = array('4' => 2);
- if ($test == -1)
- {
- $this->assertFalse($this->gallery_rating->get_user_rating($uid));
- }
- else
- {
- $this->assertEquals($this->gallery_rating->get_user_rating($uid), $test);
- }
- }
-
- /*
- * Provide data for get get_submit_rating
- */
- public function data_submit_rating()
- {
- return array(
- 'norm' => array(
- 2, // Loader
- 3, // User Id
- 3, // Score
- '1', //IP
- 3 // Expected
- ),
- /*'change_req' => array(
- 2, // Loader
- 3, // User Id
- 4, // Score
- '1', //IP
- -1 // Expected
- ),*/
- 'anon' => array(
- 2, // Loader
- 1, // User Id
- 4, // Score
- '1', //IP
- -1 // Expected
- ),
- 'image_in_Db_norm_change' => array(
- 1, // Loader
- 2, // User Id
- 3, // Score
- '1', //IP
- -1 // Expected
- ),
- 'image_in_Db_anon' => array(
- 1, // Loader
- 1, // User Id
- 3, // Score
- '1', //IP
- -1 // Expected
- ),
- );
- }
-
- /**
- * Test rating submit_rating
- *
- * @dataProvider data_submit_rating
- */
- public function test_submit_rating($loader, $user_id, $score, $ip, $expected)
- {
- $this->gallery_rating->loader($loader);
- if ($expected == -1)
- {
- $this->assertFalse($this->gallery_rating->submit_rating($user_id, $score, $ip));
- }
- else
- {
- $this->gallery_rating->submit_rating($user_id, $score, $ip);
- $this->assertEquals($this->gallery_rating->user_rating[$user_id], $expected);
- }
-
-
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core_dev
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_rating_test extends core_base
+{
+ protected $gallery_cache;
+ protected $gallery_user;
+ protected $gallery_auth;
+ protected $gallery_rating;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+
+ $this->gallery_rating = new \phpbbgallery\core\rating(
+ $this->db,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->request,
+ $this->gallery_config,
+ $this->gallery_auth,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_rates'
+ );
+ }
+
+ /**
+ * Test rating loader
+ */
+
+ public function test_loader()
+ {
+ $this->gallery_rating->loader(1);
+ $this->assertEquals($this->gallery_rating->image_id, 1);
+
+ }
+
+ /**
+ * Test rating get_image_rating
+ */
+ public function test_get_image_rating()
+ {
+ //empty for now
+ }
+
+ /*
+ * Provide data for get get_user_rating
+ */
+ public function data_get_user_rating()
+ {
+ return array(
+ 'anon' => array(
+ 1,
+ -1
+ ),
+ 'uid2' => array(
+ 2,
+ 10
+ ),
+ 'uid3' => array(
+ 3,
+ 9
+ ),
+ 'uid4' => array(
+ 4,
+ 2
+ ),
+ );
+ }
+ /**
+ * Test rating get_user_rating
+ *
+ * @dataProvider data_get_user_rating
+ */
+ public function test_get_user_rating($uid, $test)
+ {
+ $this->gallery_rating->loader(1);
+ $this->gallery_rating->user_rating = array('4' => 2);
+ if ($test == -1)
+ {
+ $this->assertFalse($this->gallery_rating->get_user_rating($uid));
+ }
+ else
+ {
+ $this->assertEquals($this->gallery_rating->get_user_rating($uid), $test);
+ }
+ }
+
+ /*
+ * Provide data for get get_submit_rating
+ */
+ public function data_submit_rating()
+ {
+ return array(
+ 'norm' => array(
+ 2, // Loader
+ 3, // User Id
+ 3, // Score
+ '1', //IP
+ 3 // Expected
+ ),
+ /*'change_req' => array(
+ 2, // Loader
+ 3, // User Id
+ 4, // Score
+ '1', //IP
+ -1 // Expected
+ ),*/
+ 'anon' => array(
+ 2, // Loader
+ 1, // User Id
+ 4, // Score
+ '1', //IP
+ -1 // Expected
+ ),
+ 'image_in_Db_norm_change' => array(
+ 1, // Loader
+ 2, // User Id
+ 3, // Score
+ '1', //IP
+ -1 // Expected
+ ),
+ 'image_in_Db_anon' => array(
+ 1, // Loader
+ 1, // User Id
+ 3, // Score
+ '1', //IP
+ -1 // Expected
+ ),
+ );
+ }
+
+ /**
+ * Test rating submit_rating
+ *
+ * @dataProvider data_submit_rating
+ */
+ public function test_submit_rating($loader, $user_id, $score, $ip, $expected)
+ {
+ $this->gallery_rating->loader($loader);
+ if ($expected == -1)
+ {
+ $this->assertFalse($this->gallery_rating->submit_rating($user_id, $score, $ip));
+ }
+ else
+ {
+ $this->gallery_rating->submit_rating($user_id, $score, $ip);
+ $this->assertEquals($this->gallery_rating->user_rating[$user_id], $expected);
+ }
+
+
+ }
+}
diff --git a/tests/core/core_report_test.php b/ext/phpbbgallery/tests/core/core_report_test.php
similarity index 100%
rename from tests/core/core_report_test.php
rename to ext/phpbbgallery/tests/core/core_report_test.php
diff --git a/tests/core/core_search_test.php b/ext/phpbbgallery/tests/core/core_search_test.php
similarity index 97%
rename from tests/core/core_search_test.php
rename to ext/phpbbgallery/tests/core/core_search_test.php
index 2a7c20ee..fa9f9104 100644
--- a/tests/core/core_search_test.php
+++ b/ext/phpbbgallery/tests/core/core_search_test.php
@@ -1,1320 +1,1320 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-* TO DO:
-* Test Rating function
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_search_test extends core_base
-{
- protected $gallery_cache;
- protected $gallery_user;
- protected $gallery_auth;
- protected $block;
- protected $gallery_album;
- protected $url;
- protected $notification_helper;
- protected $log;
- protected $report;
- protected $file;
- protected $contest;
- protected $gallery_image;
- protected $gallery_search;
-
- public function setUp() : void
- {
- parent::setUp();
- $this->gallery_cache = new \phpbbgallery\core\cache(
- $this->cache,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images'
- );
-
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
-
- // Let's build auth class
- $this->gallery_auth = new \phpbbgallery\core\auth\auth(
- $this->gallery_cache,
- $this->db,
- $this->gallery_user,
- $this->user,
- $this->auth,
- 'phpbb_gallery_permissions',
- 'phpbb_gallery_roles',
- 'phpbb_gallery_users',
- 'phpbb_gallery_albums'
- );
-
- $this->gallery_config = new \phpbbgallery\core\config(
- $this->config
- );
- $this->block = new \phpbbgallery\core\block();
- $this->gallery_album = new \phpbbgallery\core\album\album(
- $this->db,
- $this->user,
- $this->language,
- $this->user_cpf,
- $this->gallery_auth,
- $this->gallery_cache,
- $this->block,
- $this->gallery_config,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_images',
- 'phpbb_gallery_watch',
- 'phpbb_gallery_contests'
- );
- $this->url = new \phpbbgallery\core\url(
- $this->template,
- $this->request,
- $this->config,
- '/',
- 'php'
- );
- $this->log = new \phpbbgallery\core\log(
- $this->db,
- $this->user,
- $this->language,
- $this->user_loader,
- $this->template,
- $this->controller_helper,
- $this->pagination,
- $this->gallery_auth,
- $this->gallery_config,
- 'phpbb_gallery_log',
- 'phpbb_gallery_images'
- );
- $this->notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->report = new \phpbbgallery\core\report(
- $this->log,
- $this->gallery_auth,
- $this->user,
- $this->language,
- $this->db,
- $this->user_loader,
- $this->gallery_album,
- $this->template,
- $this->controller_helper,
- $this->gallery_config,
- $this->pagination,
- $this->notification_helper,
- 'phpbb_gallery_images',
- 'phpbb_gallery_reports'
- );
-
- $this->file = new \phpbbgallery\core\file\file(
- $this->request,
- $this->url,
- $this->gallery_config,
- 2
- );
- $this->contest = new \phpbbgallery\core\contest(
- $this->db,
- $this->gallery_config,
- 'phpbb_gallery_images',
- 'phpbb_gallery_contests'
- );
- $this->gallery_image = new \phpbbgallery\core\image\image(
- $this->db,
- $this->user,
- $this->language,
- $this->template,
- $this->dispatcher,
- $this->gallery_auth,
- $this->gallery_album,
- $this->gallery_config,
- $this->controller_helper,
- $this->url,
- $this->log,
- $this->notification_helper,
- $this->report,
- $this->gallery_cache,
- $this->gallery_user,
- $this->contest,
- $this->file,
- 'phpbb_gallery_image'
- );
-
- // Let's build Search
- $this->gallery_search = new \phpbbgallery\core\search(
- $this->db,
- $this->template,
- $this->user,
- $this->language,
- $this->controller_helper,
- $this->gallery_config,
- $this->gallery_auth,
- $this->gallery_album,
- $this->gallery_image,
- $this->pagination,
- $this->user_loader,
- 'phpbb_gallery_images',
- 'phpbb_gallery_albums',
- 'phpbb_gallery_comments'
- );
- }
-
- // TEST RRC GENERATION!
- /**
- * Test data for Random image
- *
- * @return array Test DATA!
- */
- public function random_test_data()
- {
- return array(
- 'admin_all' => array(
- 2, // User ID
- 5, // User group
- 10, // Limit
- 0, // Search User
- 7 // Expected
- ),
- 'admin_self' => array(
- 2, // User ID
- 5, // User group
- 10, // Limit
- 2, // Search User
- 4 // Expected
- ),
- 'admin_limit' => array(
- 2, // User ID
- 5, // User group
- 1, // Limit
- 0, // Search User
- 2 // Expected
- ),
- 'admin_user' => array(
- 2, // User ID
- 5, // User group
- 10, // Limit
- 52, // Search User
- 3 // Expected
- ),
- 'user' => array(
- 52, // User ID
- 2, // User group
- 10, // Limit
- 0, // Search User
- 4 // Expected
- ),
- 'user_admin' => array(
- 52, // User ID
- 2, // User group
- 10, // Limit
- 2, // Search User
- 3 // Expected
- ),
- 'user_self' => array(
- 52, // User ID
- 2, // User group
- 10, // Limit
- 52, // Search User
- 2 // Expected
- ),
- );
- }
- /**
- * Test random images function
- * @dataProvider random_test_data
- */
- public function test_random($user_id, $group_id, $limit, $search_user, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly($expected))
- ->method('assign_block_vars');
- $this->gallery_search->random($limit, $search_user, 'rrc_gindex_display', 'random');
- }
- /**
- * Test recent images function
- * @dataProvider random_test_data
- */
- public function test_recent($user_id, $group_id, $limit, $search_user, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->user->data['username'] = $user_id;
- $this->gallery_config->set('default_sort_dir', 'a');
- $this->gallery_config->set('default_sort_key', 't');
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly($expected))
- ->method('assign_block_vars');
- $this->gallery_search->recent($limit, 0, $search_user, 'rrc_gindex_display', 'recent');
- }
-
- /**
- * TEST RRC POLAROID FOR PROFILE AND GALLERY INDEX
- * Tested
- * - Random images in gallery index
- * - Recent images in gallery index
- * - Random images in user profile
- * - Recent images is user profile
- */
-
- /**
- * Test data for rrc_gindex_display
- *
- * @return array Test DATA!
- */
- public function rrc_gindex_display_test_data()
- {
- return array(
- '255' => array(
- 255, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'Test2 ',
- 'TIME' => null,
- 'S_RATINGS' => 10,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => 1,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '173' => array(
- 173, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'Test2 ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- /* '128' => array(
- 128, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 6,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => '127.0.0.1',
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ), Skip 128 as auth witll not allow admin IDin */
- '64' => array(
- 64, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => 10,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '32' => array(
- 32, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'Test2 ',
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '16' => array(
- 16, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => 0,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '8' => array(
- 8, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '4' => array(
- 4, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '2' => array(
- 2, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => 1,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '1' => array(
- 1, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- '0' => array(
- 0, //rrc_gindex_display state
- array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => false,
- 'UC_IMAGE_NAME' => false,
- 'U_ALBUM' => false,
- 'ALBUM_NAME' => false,
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => false,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- )
- ),
- );
- }
- /**
- * Test rrc_gindex_display and rrc_profile_display
- * @dataProvider rrc_gindex_display_test_data
- */
- public function test_rrc_gindex_display_recent($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('rrc_gindex_display', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'recent',
- 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
- )),
- array('imageblock.image', $expect)
- );
- $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
- }
- /**
- * Test rrc_gindex_display and rrc_profile_display
- * @dataProvider rrc_gindex_display_test_data
- */
- public function test_rrc_profile_display_recent($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('rrc_profile_display', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'recent',
- 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
- )),
- array('imageblock.image', $expect)
- );
- $this->gallery_search->recent(1, 0, 53, 'rrc_profile_display', 'recent');
- }
- /**
- * Test rrc_gindex_display and rrc_profile_display
- * @dataProvider rrc_gindex_display_test_data
- */
- public function test_rrc_gindex_display_random($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('rrc_gindex_display', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'random',
- 'U_BLOCK' => 'phpbbgallery_core_search_random'
- )),
- array('imageblock.image', $expect)
- );
- $this->gallery_search->random(1, 53, 'rrc_gindex_display', 'random');
- }
- /**
- * Test rrc_gindex_display and rrc_profile_display
- * @dataProvider rrc_gindex_display_test_data
- */
- public function test_rrc_profile_display_random($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('rrc_profile_display', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'random',
- 'U_BLOCK' => 'phpbbgallery_core_search_random'
- )),
- array('imageblock.image', $expect)
- );
- $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
- }
-
-
- /**
- * TEST LINK GENERATION FOR THUMBAIL AND IMAGE NAME
- * - link_thumbnail in recent()
- * - link_thumbnail in random()
- * + link_thumbnail in rating()
- * - link_image_name in recent()
- * - link_image_name in random()
- * + link_image_name in rating()
- */
- /**
- * Provide data for link generation test
- */
- public function link_image_name_data()
- {
- return array(
- 'image_page' => array(
- 'image_page', // Input
- 'phpbbgallery_core_image', // expected
- ),
- 'image' => array(
- 'image', // Input
- 'phpbbgallery_core_image_file_source', // expected
- ),
- 'other' => array(
- 'none',
- false
- )
- );
- }
- /**
- * Test link_thumbnail in recent
- * @dataProvider link_image_name_data
- */
- public function test_link_thumbnail_recent($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('link_thumbnail', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'recent',
- 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
- )),
- array('imageblock.image', array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => $expect,
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'Test2 ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- ))
- );
- $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
- }
- /**
- * Test link_thumbnail in random
- * @dataProvider link_image_name_data
- */
- public function test_link_thumbnail_random($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('link_thumbnail', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'random',
- 'U_BLOCK' => 'phpbbgallery_core_search_random'
- )),
- array('imageblock.image', array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => 'phpbbgallery_core_image',
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => $expect,
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- ))
- );
- $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
- }
- /**
- * Test link_image_name in recent
- * @dataProvider link_image_name_data
- */
- public function test_link_image_name_recent($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('link_image_name', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'recent',
- 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
- )),
- array('imageblock.image', array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => $expect,
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => 'Test2 ',
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- ))
- );
- $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
- }
- /**
- * Test link_image_name in random
- * @dataProvider link_image_name_data
- */
- public function test_link_image_name_random($state, $expect)
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_config->set('link_image_name', $state);
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('imageblock', array(
- 'BLOCK_NAME' => 'random',
- 'U_BLOCK' => 'phpbbgallery_core_search_random'
- )),
- array('imageblock.image', array(
- 'IMAGE_ID' => 5,
- 'U_IMAGE' => $expect,
- 'UC_IMAGE_NAME' => 'TestImage5',
- 'U_ALBUM' => 'phpbbgallery_core_album',
- 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
- 'IMAGE_VIEWS' => -1,
- 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
- 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
- 'S_UNAPPROVED' => false,
- 'S_LOCKED' => false,
- 'S_REPORTED' => false,
- 'POSTER' => false,
- 'TIME' => null,
- 'S_RATINGS' => false,
- 'U_RATINGS' => 'phpbbgallery_core_image#rating',
- 'L_COMMENTS' => 'COMMENT',
- 'S_COMMENTS' => false,
- 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
- 'U_USER_IP' => false,
- 'S_IMAGE_REPORTED' => 0,
- 'U_IMAGE_REPORTED' => '',
- 'S_STATUS_APPROVED' => true,
- 'S_STATUS_UNAPPROVED' => false,
- 'S_STATUS_UNAPPROVED_ACTION' => '',
- 'S_STATUS_LOCKED' => false,
- 'U_REPORT' => '',
- 'U_STATUS' => '',
- 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
- ))
- );
- $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
- }
- // Test recent_count
- /**
- * Test data for Random image
- *
- * @return array Test DATA!
- */
- public function recent_count_data()
- {
- return array(
- 'admin_all' => array(
- 2, // User ID
- 5, // User group
- 6 // Expected
- ),
- 'user' => array(
- 52, // User ID
- 2, // User group
- 3 // Expected
- ),
- );
- }
- /**
- * Test recent_count
- * @dataProvider recent_count_data
- */
- public function test_recent_count($user_id, $group_id, $expected)
- {
- $this->user->data['user_id'] = $user_id;
- $this->user->data['group_id'] = $group_id;
- $this->user->data['username'] = $user_id;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->assertEquals($this->gallery_search->recent_count(), $expected);
- }
- // Recent comments testing
- /**
- * Test recent comments
- */
- public function test_recent_comments_admin()
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(6))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 6,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_6',
- 'POST_AUTHOR_FULL' => 2,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 6!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage6 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 5,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_5',
- 'POST_AUTHOR_FULL' => 2,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 5!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage5 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 53,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 4,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_4',
- 'POST_AUTHOR_FULL' => 2,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 4!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage4 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 3,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 3!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage3 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 2,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 2!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage2 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 1,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 1!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage1 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(10);
- }
- public function test_recent_comments_admin_limit()
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 6,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_6',
- 'POST_AUTHOR_FULL' => 2,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 6!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage6 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 5,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_5',
- 'POST_AUTHOR_FULL' => 2,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 5!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage5 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 53,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(2);
- }
- public function test_recent_comments_admin_limit_start()
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 3,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 3!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage3 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 2,
- 'U_DELETE' => 'phpbbgallery_core_comment_delete',
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 2!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage2 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(2,3);
- }
- public function test_recent_comments_admin_limit_start_overflow()
- {
- $this->user->data['user_id'] = 2;
- $this->user->data['group_id'] = 5;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(1))
- ->method('assign_vars');
- $this->gallery_search->recent_comments(2,15);
- }
- public function test_recent_comments_user()
- {
- $this->user->data['user_id'] = 52;
- $this->user->data['group_id'] = 2;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(3))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 3,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 3!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage3 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 2,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 2!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage2 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 1,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 1!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage1 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(10);
- }
- public function test_recent_comments_user_limit()
- {
- $this->user->data['user_id'] = 52;
- $this->user->data['group_id'] = 2;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(1))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 3,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 3!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage3 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 52,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(1);
- }
- public function test_recent_comments_user_limit_start()
- {
- $this->user->data['user_id'] = 52;
- $this->user->data['group_id'] = 2;
- $this->user->data['username'] = 2;
- $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
- $this->template->expects($this->exactly(2))
- ->method('assign_block_vars')
- ->withConsecutive(
- array('commentrow', array(
- 'COMMENT_ID' => 2,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 2!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage2 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- )),
- array('commentrow', array(
- 'COMMENT_ID' => 1,
- 'U_DELETE' => false,
- 'U_EDIT' => 'phpbbgallery_core_comment_edit',
- 'U_QUOTE' => 'phpbbgallery_core_comment_add',
- 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
- 'POST_AUTHOR_FULL' => 52,
- 'TIME' => null,
- 'TEXT' => 'This is test comment 1!!!!!',
- 'UC_IMAGE_NAME' => 'TestImage1 ',
- 'UC_THUMBNAIL' => ' ',
- 'IMAGE_AUTHOR' => 2,
- 'IMAGE_TIME' => null,
- ))
- );
- $this->gallery_search->recent_comments(2, 1);
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+* TO DO:
+* Test Rating function
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_search_test extends core_base
+{
+ protected $gallery_cache;
+ protected $gallery_user;
+ protected $gallery_auth;
+ protected $block;
+ protected $gallery_album;
+ protected $url;
+ protected $notification_helper;
+ protected $log;
+ protected $report;
+ protected $file;
+ protected $contest;
+ protected $gallery_image;
+ protected $gallery_search;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+ $this->gallery_cache = new \phpbbgallery\core\cache(
+ $this->cache,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images'
+ );
+
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+
+ // Let's build auth class
+ $this->gallery_auth = new \phpbbgallery\core\auth\auth(
+ $this->gallery_cache,
+ $this->db,
+ $this->gallery_user,
+ $this->user,
+ $this->auth,
+ 'phpbb_gallery_permissions',
+ 'phpbb_gallery_roles',
+ 'phpbb_gallery_users',
+ 'phpbb_gallery_albums'
+ );
+
+ $this->gallery_config = new \phpbbgallery\core\config(
+ $this->config
+ );
+ $this->block = new \phpbbgallery\core\block();
+ $this->gallery_album = new \phpbbgallery\core\album\album(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_cpf,
+ $this->gallery_auth,
+ $this->gallery_cache,
+ $this->block,
+ $this->gallery_config,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_watch',
+ 'phpbb_gallery_contests'
+ );
+ $this->url = new \phpbbgallery\core\url(
+ $this->template,
+ $this->request,
+ $this->config,
+ '/',
+ 'php'
+ );
+ $this->log = new \phpbbgallery\core\log(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->user_loader,
+ $this->template,
+ $this->controller_helper,
+ $this->pagination,
+ $this->gallery_auth,
+ $this->gallery_config,
+ 'phpbb_gallery_log',
+ 'phpbb_gallery_images'
+ );
+ $this->notification_helper = $this->getMockBuilder('\phpbbgallery\core\notification\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->report = new \phpbbgallery\core\report(
+ $this->log,
+ $this->gallery_auth,
+ $this->user,
+ $this->language,
+ $this->db,
+ $this->user_loader,
+ $this->gallery_album,
+ $this->template,
+ $this->controller_helper,
+ $this->gallery_config,
+ $this->pagination,
+ $this->notification_helper,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_reports'
+ );
+
+ $this->file = new \phpbbgallery\core\file\file(
+ $this->request,
+ $this->url,
+ $this->gallery_config,
+ 2
+ );
+ $this->contest = new \phpbbgallery\core\contest(
+ $this->db,
+ $this->gallery_config,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_contests'
+ );
+ $this->gallery_image = new \phpbbgallery\core\image\image(
+ $this->db,
+ $this->user,
+ $this->language,
+ $this->template,
+ $this->dispatcher,
+ $this->gallery_auth,
+ $this->gallery_album,
+ $this->gallery_config,
+ $this->controller_helper,
+ $this->url,
+ $this->log,
+ $this->notification_helper,
+ $this->report,
+ $this->gallery_cache,
+ $this->gallery_user,
+ $this->contest,
+ $this->file,
+ 'phpbb_gallery_image'
+ );
+
+ // Let's build Search
+ $this->gallery_search = new \phpbbgallery\core\search(
+ $this->db,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->controller_helper,
+ $this->gallery_config,
+ $this->gallery_auth,
+ $this->gallery_album,
+ $this->gallery_image,
+ $this->pagination,
+ $this->user_loader,
+ 'phpbb_gallery_images',
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_comments'
+ );
+ }
+
+ // TEST RRC GENERATION!
+ /**
+ * Test data for Random image
+ *
+ * @return array Test DATA!
+ */
+ public function random_test_data()
+ {
+ return array(
+ 'admin_all' => array(
+ 2, // User ID
+ 5, // User group
+ 10, // Limit
+ 0, // Search User
+ 7 // Expected
+ ),
+ 'admin_self' => array(
+ 2, // User ID
+ 5, // User group
+ 10, // Limit
+ 2, // Search User
+ 4 // Expected
+ ),
+ 'admin_limit' => array(
+ 2, // User ID
+ 5, // User group
+ 1, // Limit
+ 0, // Search User
+ 2 // Expected
+ ),
+ 'admin_user' => array(
+ 2, // User ID
+ 5, // User group
+ 10, // Limit
+ 52, // Search User
+ 3 // Expected
+ ),
+ 'user' => array(
+ 52, // User ID
+ 2, // User group
+ 10, // Limit
+ 0, // Search User
+ 4 // Expected
+ ),
+ 'user_admin' => array(
+ 52, // User ID
+ 2, // User group
+ 10, // Limit
+ 2, // Search User
+ 3 // Expected
+ ),
+ 'user_self' => array(
+ 52, // User ID
+ 2, // User group
+ 10, // Limit
+ 52, // Search User
+ 2 // Expected
+ ),
+ );
+ }
+ /**
+ * Test random images function
+ * @dataProvider random_test_data
+ */
+ public function test_random($user_id, $group_id, $limit, $search_user, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly($expected))
+ ->method('assign_block_vars');
+ $this->gallery_search->random($limit, $search_user, 'rrc_gindex_display', 'random');
+ }
+ /**
+ * Test recent images function
+ * @dataProvider random_test_data
+ */
+ public function test_recent($user_id, $group_id, $limit, $search_user, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->user->data['username'] = $user_id;
+ $this->gallery_config->set('default_sort_dir', 'a');
+ $this->gallery_config->set('default_sort_key', 't');
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly($expected))
+ ->method('assign_block_vars');
+ $this->gallery_search->recent($limit, 0, $search_user, 'rrc_gindex_display', 'recent');
+ }
+
+ /**
+ * TEST RRC POLAROID FOR PROFILE AND GALLERY INDEX
+ * Tested
+ * - Random images in gallery index
+ * - Recent images in gallery index
+ * - Random images in user profile
+ * - Recent images is user profile
+ */
+
+ /**
+ * Test data for rrc_gindex_display
+ *
+ * @return array Test DATA!
+ */
+ public function rrc_gindex_display_test_data()
+ {
+ return array(
+ '255' => array(
+ 255, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'Test2 ',
+ 'TIME' => null,
+ 'S_RATINGS' => 10,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => 1,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '173' => array(
+ 173, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'Test2 ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ /* '128' => array(
+ 128, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 6,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => '127.0.0.1',
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ), Skip 128 as auth witll not allow admin IDin */
+ '64' => array(
+ 64, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => 10,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '32' => array(
+ 32, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'Test2 ',
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '16' => array(
+ 16, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => 0,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '8' => array(
+ 8, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '4' => array(
+ 4, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '2' => array(
+ 2, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => 1,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '1' => array(
+ 1, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ '0' => array(
+ 0, //rrc_gindex_display state
+ array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => false,
+ 'UC_IMAGE_NAME' => false,
+ 'U_ALBUM' => false,
+ 'ALBUM_NAME' => false,
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => false,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ )
+ ),
+ );
+ }
+ /**
+ * Test rrc_gindex_display and rrc_profile_display
+ * @dataProvider rrc_gindex_display_test_data
+ */
+ public function test_rrc_gindex_display_recent($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('rrc_gindex_display', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'recent',
+ 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
+ )),
+ array('imageblock.image', $expect)
+ );
+ $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
+ }
+ /**
+ * Test rrc_gindex_display and rrc_profile_display
+ * @dataProvider rrc_gindex_display_test_data
+ */
+ public function test_rrc_profile_display_recent($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('rrc_profile_display', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'recent',
+ 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
+ )),
+ array('imageblock.image', $expect)
+ );
+ $this->gallery_search->recent(1, 0, 53, 'rrc_profile_display', 'recent');
+ }
+ /**
+ * Test rrc_gindex_display and rrc_profile_display
+ * @dataProvider rrc_gindex_display_test_data
+ */
+ public function test_rrc_gindex_display_random($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('rrc_gindex_display', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'random',
+ 'U_BLOCK' => 'phpbbgallery_core_search_random'
+ )),
+ array('imageblock.image', $expect)
+ );
+ $this->gallery_search->random(1, 53, 'rrc_gindex_display', 'random');
+ }
+ /**
+ * Test rrc_gindex_display and rrc_profile_display
+ * @dataProvider rrc_gindex_display_test_data
+ */
+ public function test_rrc_profile_display_random($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('rrc_profile_display', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'random',
+ 'U_BLOCK' => 'phpbbgallery_core_search_random'
+ )),
+ array('imageblock.image', $expect)
+ );
+ $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
+ }
+
+
+ /**
+ * TEST LINK GENERATION FOR THUMBAIL AND IMAGE NAME
+ * - link_thumbnail in recent()
+ * - link_thumbnail in random()
+ * + link_thumbnail in rating()
+ * - link_image_name in recent()
+ * - link_image_name in random()
+ * + link_image_name in rating()
+ */
+ /**
+ * Provide data for link generation test
+ */
+ public function link_image_name_data()
+ {
+ return array(
+ 'image_page' => array(
+ 'image_page', // Input
+ 'phpbbgallery_core_image', // expected
+ ),
+ 'image' => array(
+ 'image', // Input
+ 'phpbbgallery_core_image_file_source', // expected
+ ),
+ 'other' => array(
+ 'none',
+ false
+ )
+ );
+ }
+ /**
+ * Test link_thumbnail in recent
+ * @dataProvider link_image_name_data
+ */
+ public function test_link_thumbnail_recent($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('link_thumbnail', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'recent',
+ 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
+ )),
+ array('imageblock.image', array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => $expect,
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'Test2 ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ ))
+ );
+ $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
+ }
+ /**
+ * Test link_thumbnail in random
+ * @dataProvider link_image_name_data
+ */
+ public function test_link_thumbnail_random($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('link_thumbnail', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'random',
+ 'U_BLOCK' => 'phpbbgallery_core_search_random'
+ )),
+ array('imageblock.image', array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => 'phpbbgallery_core_image',
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => $expect,
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ ))
+ );
+ $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
+ }
+ /**
+ * Test link_image_name in recent
+ * @dataProvider link_image_name_data
+ */
+ public function test_link_image_name_recent($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('link_image_name', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'recent',
+ 'U_BLOCK' => 'phpbbgallery_core_search_egosearch'
+ )),
+ array('imageblock.image', array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => $expect,
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => 'Test2 ',
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ ))
+ );
+ $this->gallery_search->recent(1, 0, 53, 'rrc_gindex_display', 'recent');
+ }
+ /**
+ * Test link_image_name in random
+ * @dataProvider link_image_name_data
+ */
+ public function test_link_image_name_random($state, $expect)
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_config->set('link_image_name', $state);
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('imageblock', array(
+ 'BLOCK_NAME' => 'random',
+ 'U_BLOCK' => 'phpbbgallery_core_search_random'
+ )),
+ array('imageblock.image', array(
+ 'IMAGE_ID' => 5,
+ 'U_IMAGE' => $expect,
+ 'UC_IMAGE_NAME' => 'TestImage5',
+ 'U_ALBUM' => 'phpbbgallery_core_album',
+ 'ALBUM_NAME' => 'TestPublicAlbumSubAlbum1',
+ 'IMAGE_VIEWS' => -1,
+ 'UC_THUMBNAIL' => 'phpbbgallery_core_image_file_mini',
+ 'UC_THUMBNAIL_ACTION' => 'phpbbgallery_core_image',
+ 'S_UNAPPROVED' => false,
+ 'S_LOCKED' => false,
+ 'S_REPORTED' => false,
+ 'POSTER' => false,
+ 'TIME' => null,
+ 'S_RATINGS' => false,
+ 'U_RATINGS' => 'phpbbgallery_core_image#rating',
+ 'L_COMMENTS' => 'COMMENT',
+ 'S_COMMENTS' => false,
+ 'U_COMMENTS' => 'phpbbgallery_core_image#comments',
+ 'U_USER_IP' => false,
+ 'S_IMAGE_REPORTED' => 0,
+ 'U_IMAGE_REPORTED' => '',
+ 'S_STATUS_APPROVED' => true,
+ 'S_STATUS_UNAPPROVED' => false,
+ 'S_STATUS_UNAPPROVED_ACTION' => '',
+ 'S_STATUS_LOCKED' => false,
+ 'U_REPORT' => '',
+ 'U_STATUS' => '',
+ 'L_STATUS' => 'CHANGE_IMAGE_STATUS',
+ ))
+ );
+ $this->gallery_search->random(1, 53, 'rrc_profile_display', 'random');
+ }
+ // Test recent_count
+ /**
+ * Test data for Random image
+ *
+ * @return array Test DATA!
+ */
+ public function recent_count_data()
+ {
+ return array(
+ 'admin_all' => array(
+ 2, // User ID
+ 5, // User group
+ 6 // Expected
+ ),
+ 'user' => array(
+ 52, // User ID
+ 2, // User group
+ 3 // Expected
+ ),
+ );
+ }
+ /**
+ * Test recent_count
+ * @dataProvider recent_count_data
+ */
+ public function test_recent_count($user_id, $group_id, $expected)
+ {
+ $this->user->data['user_id'] = $user_id;
+ $this->user->data['group_id'] = $group_id;
+ $this->user->data['username'] = $user_id;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->assertEquals($this->gallery_search->recent_count(), $expected);
+ }
+ // Recent comments testing
+ /**
+ * Test recent comments
+ */
+ public function test_recent_comments_admin()
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(6))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 6,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_6',
+ 'POST_AUTHOR_FULL' => 2,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 6!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage6 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 5,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_5',
+ 'POST_AUTHOR_FULL' => 2,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 5!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage5 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 53,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 4,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_4',
+ 'POST_AUTHOR_FULL' => 2,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 4!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage4 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 3,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 3!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage3 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 2,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 2!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage2 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 1,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 1!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage1 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(10);
+ }
+ public function test_recent_comments_admin_limit()
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 6,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_6',
+ 'POST_AUTHOR_FULL' => 2,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 6!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage6 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 5,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_5',
+ 'POST_AUTHOR_FULL' => 2,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 5!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage5 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 53,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(2);
+ }
+ public function test_recent_comments_admin_limit_start()
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 3,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 3!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage3 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 2,
+ 'U_DELETE' => 'phpbbgallery_core_comment_delete',
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 2!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage2 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(2,3);
+ }
+ public function test_recent_comments_admin_limit_start_overflow()
+ {
+ $this->user->data['user_id'] = 2;
+ $this->user->data['group_id'] = 5;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(1))
+ ->method('assign_vars');
+ $this->gallery_search->recent_comments(2,15);
+ }
+ public function test_recent_comments_user()
+ {
+ $this->user->data['user_id'] = 52;
+ $this->user->data['group_id'] = 2;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(3))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 3,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 3!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage3 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 2,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 2!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage2 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 1,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 1!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage1 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(10);
+ }
+ public function test_recent_comments_user_limit()
+ {
+ $this->user->data['user_id'] = 52;
+ $this->user->data['group_id'] = 2;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(1))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 3,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_3',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 3!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage3 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 52,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(1);
+ }
+ public function test_recent_comments_user_limit_start()
+ {
+ $this->user->data['user_id'] = 52;
+ $this->user->data['group_id'] = 2;
+ $this->user->data['username'] = 2;
+ $this->gallery_auth->load_user_permissions($this->user->data['user_id']);
+ $this->template->expects($this->exactly(2))
+ ->method('assign_block_vars')
+ ->withConsecutive(
+ array('commentrow', array(
+ 'COMMENT_ID' => 2,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_2',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 2!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage2 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ )),
+ array('commentrow', array(
+ 'COMMENT_ID' => 1,
+ 'U_DELETE' => false,
+ 'U_EDIT' => 'phpbbgallery_core_comment_edit',
+ 'U_QUOTE' => 'phpbbgallery_core_comment_add',
+ 'U_COMMENT' => 'phpbbgallery_core_image#comment_1',
+ 'POST_AUTHOR_FULL' => 52,
+ 'TIME' => null,
+ 'TEXT' => 'This is test comment 1!!!!!',
+ 'UC_IMAGE_NAME' => 'TestImage1 ',
+ 'UC_THUMBNAIL' => ' ',
+ 'IMAGE_AUTHOR' => 2,
+ 'IMAGE_TIME' => null,
+ ))
+ );
+ $this->gallery_search->recent_comments(2, 1);
+ }
+}
diff --git a/tests/core/core_url_test.php b/ext/phpbbgallery/tests/core/core_url_test.php
similarity index 100%
rename from tests/core/core_url_test.php
rename to ext/phpbbgallery/tests/core/core_url_test.php
diff --git a/tests/core/core_user_test.php b/ext/phpbbgallery/tests/core/core_user_test.php
similarity index 96%
rename from tests/core/core_user_test.php
rename to ext/phpbbgallery/tests/core/core_user_test.php
index 7d8bc526..425168c6 100644
--- a/tests/core/core_user_test.php
+++ b/ext/phpbbgallery/tests/core/core_user_test.php
@@ -1,278 +1,278 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\core;
-/**
-* @group core
-*/
-require_once dirname(__FILE__) . '/../../../../includes/functions.php';
-
-class core_user_test extends core_base
-{
- /**
- * @var \phpbbgallery\core\user
- */
- protected $gallery_user;
-
- public function setUp() : void
- {
- parent::setUp();
- $this->gallery_user = new \phpbbgallery\core\user(
- $this->db,
- $this->dispatcher,
- $this->user,
- $this->user_cpf,
- $this->config,
- $this->auth,
- 'phpbb_gallery_users',
- '/',
- 'php'
- );
- }
-
- /**
- * Test data for the test_set_user_id test
- *
- * @return array Test data
- */
- public function data_set_user_id()
- {
- return array(
- 'base' => array(
- 2, // User_id
- true, // Expected
- 1 // Album ID
- ),
- 'non_existing_user' => array(
- 3, // User_id
- false, // Expected
- 0 // Has album
- ),
- 'existin_user_with_no_album' => array(
- 52,
- true,
- 0
- )
- );
- }
- /**
- * Test user id and load user data
- *
- * @dataProvider data_set_user_id
- */
- public function test_set_user_id($user_id, $expected, $album_id)
- {
- $this->gallery_user->set_user_id($user_id);
- if ($expected)
- {
- $this->assertTrue($this->gallery_user->entry_exists);
- $this->assertEquals($this->gallery_user->get_data('personal_album_id'), $album_id);
- $this->assertTrue($this->gallery_user->is_user($user_id));
- $this->assertFalse($this->gallery_user->is_user(1));
- $this->gallery_user->destroy();
- $this->assertNull($this->gallery_user->entry_exists);
- $this->assertNull($this->gallery_user->user_id);
- }
- else
- {
- $this->assertFalse($this->gallery_user->entry_exists);
- $this->gallery_user->destroy();
- }
- }
- /**
- * Test data for the test_udpate_data test
- *
- * @return array Test data
- */
- public function data_update_data()
- {
- return array(
- 'base' => array(
- 2, // User_id
- 2 // Album ID
- ),
- 'non_existing_user' => array(
- 3, // User_id
- 1 // Has album
- ),
- );
- }
- /**
- * Test Update Data
- * @dataProvider data_update_data
- */
- public function test_udpate_data($user_id, $new_var)
- {
- $this->gallery_user->set_user_id($user_id, false);
- $this->assertTrue($this->gallery_user->update_data(array('personal_album_id' => $new_var)));
- $this->assertEquals($new_var, $this->gallery_user->get_data('personal_album_id'));
- $this->assertTrue($this->gallery_user->entry_exists);
- $this->gallery_user->destroy();
- }
-
-
- /**
- * Test update images
- */
- public function test_update_images()
- {
- $this->gallery_user->set_user_id(2);
- $this->assertEquals($this->gallery_user->get_data('user_images'), 0);
- $this->gallery_user->update_images(5);
- $this->assertEquals($this->gallery_user->get_data('user_images'), 5);
- $this->gallery_user->update_images(5);
- $this->assertEquals($this->gallery_user->get_data('user_images'), 10);
- $this->gallery_user->update_images(-10);
- $this->assertEquals($this->gallery_user->get_data('user_images'), 0);
- $this->gallery_user->destroy();
- }
-
- /**
- * Test delete user
- * Before deleting them we will have to create few users
- */
- public function test_delete()
- {
- // First we will create 3 users
- $this->gallery_user->set_user_id(53);
- $this->gallery_user->update_data(array('personal_album_id' => 2));
- $this->gallery_user->set_user_id(54);
- $this->gallery_user->update_data(array('personal_album_id' => 3));
- $this->gallery_user->set_user_id(55);
- $this->gallery_user->update_data(array('personal_album_id' => 4));
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
- $this->assertEquals(5, $row['count']);
- $this->gallery_user->delete();
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
- $this->assertEquals(4, $row['count']);
- $this->gallery_user->destroy();
- }
-
- /**
- * Test delete users
- * Test single ID, array of IDs or string of all
- */
- public function test_delete_users()
- {
- $this->gallery_user->set_user_id(55);
- $this->gallery_user->update_data(array('personal_album_id' => 4));
- $this->gallery_user->delete_users(array(53, 54));
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
- $this->assertEquals(3, $row['count']);
- $this->gallery_user->delete_users(52);
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
- $this->assertEquals(2, $row['count']);
- $this->gallery_user->delete_users('all');
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
- $this->assertEquals(0, $row['count']);
- }
-
- /**
- * Test update users
- * Test single ID, array of IDs or string of all
- * First we create 5 new users
- */
- public function test_update_users()
- {
- $this->gallery_user->set_user_id(2);
- $this->gallery_user->update_data(array('personal_album_id' => 1));
- $this->gallery_user->set_user_id(52);
- $this->gallery_user->update_data(array('personal_album_id' => 2));
- $this->gallery_user->set_user_id(53);
- $this->gallery_user->update_data(array('personal_album_id' => 3));
- $this->gallery_user->set_user_id(54);
- $this->gallery_user->update_data(array('personal_album_id' => 4));
- $this->gallery_user->set_user_id(55);
- $this->gallery_user->update_data(array('personal_album_id' => 5));
- $this->gallery_user->destroy();
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->assertEquals(0, $row['count']);
- $data = array(
- 'user_images' => 3,
- );
- $this->gallery_user->update_users(2, $data);
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->assertEquals(1, $row['count']);
-
- $this->gallery_user->update_users(array(52,53), $data);
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->assertEquals(3, $row['count']);
-
- $this->gallery_user->update_users('all', $data);
- $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->assertEquals(5, $row['count']);
- }
-
- public function data_sql_build_where()
- {
- return array(
- 'single' => array(
- 2,
- 'WHERE user_id = 2'
- ),
- 'array' => array(
- array(2,3),
- 'WHERE user_id IN (2, 3)',
- ),
- 'all' => array(
- 'all',
- '',
- ),
- );
- }
-
- /**
- * Test SQL Build Where
- * @dataProvider data_sql_build_where
- */
- public function test_sql_build_where($input, $expected)
- {
- if ($input == 'all')
- {
- $this->assertEmpty($this->gallery_user->sql_build_where($input));
- }
- else
- {
- $this->assertStringContainsString($expected, $this->gallery_user->sql_build_where($input));
- }
- }
-
- public function test_get_own_root_album()
- {
- $this->gallery_user->set_user_id(2);
- $this->assertEquals(1, $this->gallery_user->get_own_root_album());
- $this->gallery_user->set_user_id(3);
- $this->assertEquals(0, $this->gallery_user->get_own_root_album());
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\core;
+/**
+* @group core
+*/
+require_once dirname(__FILE__) . '/../../../../includes/functions.php';
+
+class core_user_test extends core_base
+{
+ /**
+ * @var \phpbbgallery\core\user
+ */
+ protected $gallery_user;
+
+ public function setUp() : void
+ {
+ parent::setUp();
+ $this->gallery_user = new \phpbbgallery\core\user(
+ $this->db,
+ $this->dispatcher,
+ $this->user,
+ $this->user_cpf,
+ $this->config,
+ $this->auth,
+ 'phpbb_gallery_users',
+ '/',
+ 'php'
+ );
+ }
+
+ /**
+ * Test data for the test_set_user_id test
+ *
+ * @return array Test data
+ */
+ public function data_set_user_id()
+ {
+ return array(
+ 'base' => array(
+ 2, // User_id
+ true, // Expected
+ 1 // Album ID
+ ),
+ 'non_existing_user' => array(
+ 3, // User_id
+ false, // Expected
+ 0 // Has album
+ ),
+ 'existin_user_with_no_album' => array(
+ 52,
+ true,
+ 0
+ )
+ );
+ }
+ /**
+ * Test user id and load user data
+ *
+ * @dataProvider data_set_user_id
+ */
+ public function test_set_user_id($user_id, $expected, $album_id)
+ {
+ $this->gallery_user->set_user_id($user_id);
+ if ($expected)
+ {
+ $this->assertTrue($this->gallery_user->entry_exists);
+ $this->assertEquals($this->gallery_user->get_data('personal_album_id'), $album_id);
+ $this->assertTrue($this->gallery_user->is_user($user_id));
+ $this->assertFalse($this->gallery_user->is_user(1));
+ $this->gallery_user->destroy();
+ $this->assertNull($this->gallery_user->entry_exists);
+ $this->assertNull($this->gallery_user->user_id);
+ }
+ else
+ {
+ $this->assertFalse($this->gallery_user->entry_exists);
+ $this->gallery_user->destroy();
+ }
+ }
+ /**
+ * Test data for the test_udpate_data test
+ *
+ * @return array Test data
+ */
+ public function data_update_data()
+ {
+ return array(
+ 'base' => array(
+ 2, // User_id
+ 2 // Album ID
+ ),
+ 'non_existing_user' => array(
+ 3, // User_id
+ 1 // Has album
+ ),
+ );
+ }
+ /**
+ * Test Update Data
+ * @dataProvider data_update_data
+ */
+ public function test_udpate_data($user_id, $new_var)
+ {
+ $this->gallery_user->set_user_id($user_id, false);
+ $this->assertTrue($this->gallery_user->update_data(array('personal_album_id' => $new_var)));
+ $this->assertEquals($new_var, $this->gallery_user->get_data('personal_album_id'));
+ $this->assertTrue($this->gallery_user->entry_exists);
+ $this->gallery_user->destroy();
+ }
+
+
+ /**
+ * Test update images
+ */
+ public function test_update_images()
+ {
+ $this->gallery_user->set_user_id(2);
+ $this->assertEquals($this->gallery_user->get_data('user_images'), 0);
+ $this->gallery_user->update_images(5);
+ $this->assertEquals($this->gallery_user->get_data('user_images'), 5);
+ $this->gallery_user->update_images(5);
+ $this->assertEquals($this->gallery_user->get_data('user_images'), 10);
+ $this->gallery_user->update_images(-10);
+ $this->assertEquals($this->gallery_user->get_data('user_images'), 0);
+ $this->gallery_user->destroy();
+ }
+
+ /**
+ * Test delete user
+ * Before deleting them we will have to create few users
+ */
+ public function test_delete()
+ {
+ // First we will create 3 users
+ $this->gallery_user->set_user_id(53);
+ $this->gallery_user->update_data(array('personal_album_id' => 2));
+ $this->gallery_user->set_user_id(54);
+ $this->gallery_user->update_data(array('personal_album_id' => 3));
+ $this->gallery_user->set_user_id(55);
+ $this->gallery_user->update_data(array('personal_album_id' => 4));
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ $this->assertEquals(5, $row['count']);
+ $this->gallery_user->delete();
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ $this->assertEquals(4, $row['count']);
+ $this->gallery_user->destroy();
+ }
+
+ /**
+ * Test delete users
+ * Test single ID, array of IDs or string of all
+ */
+ public function test_delete_users()
+ {
+ $this->gallery_user->set_user_id(55);
+ $this->gallery_user->update_data(array('personal_album_id' => 4));
+ $this->gallery_user->delete_users(array(53, 54));
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ $this->assertEquals(3, $row['count']);
+ $this->gallery_user->delete_users(52);
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ $this->assertEquals(2, $row['count']);
+ $this->gallery_user->delete_users('all');
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_id > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ $this->assertEquals(0, $row['count']);
+ }
+
+ /**
+ * Test update users
+ * Test single ID, array of IDs or string of all
+ * First we create 5 new users
+ */
+ public function test_update_users()
+ {
+ $this->gallery_user->set_user_id(2);
+ $this->gallery_user->update_data(array('personal_album_id' => 1));
+ $this->gallery_user->set_user_id(52);
+ $this->gallery_user->update_data(array('personal_album_id' => 2));
+ $this->gallery_user->set_user_id(53);
+ $this->gallery_user->update_data(array('personal_album_id' => 3));
+ $this->gallery_user->set_user_id(54);
+ $this->gallery_user->update_data(array('personal_album_id' => 4));
+ $this->gallery_user->set_user_id(55);
+ $this->gallery_user->update_data(array('personal_album_id' => 5));
+ $this->gallery_user->destroy();
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->assertEquals(0, $row['count']);
+ $data = array(
+ 'user_images' => 3,
+ );
+ $this->gallery_user->update_users(2, $data);
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->assertEquals(1, $row['count']);
+
+ $this->gallery_user->update_users(array(52,53), $data);
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->assertEquals(3, $row['count']);
+
+ $this->gallery_user->update_users('all', $data);
+ $sql = 'SELECT COUNT(user_id) as count FROM phpbb_gallery_users WHERE user_images > 0';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->assertEquals(5, $row['count']);
+ }
+
+ public function data_sql_build_where()
+ {
+ return array(
+ 'single' => array(
+ 2,
+ 'WHERE user_id = 2'
+ ),
+ 'array' => array(
+ array(2,3),
+ 'WHERE user_id IN (2, 3)',
+ ),
+ 'all' => array(
+ 'all',
+ '',
+ ),
+ );
+ }
+
+ /**
+ * Test SQL Build Where
+ * @dataProvider data_sql_build_where
+ */
+ public function test_sql_build_where($input, $expected)
+ {
+ if ($input == 'all')
+ {
+ $this->assertEmpty($this->gallery_user->sql_build_where($input));
+ }
+ else
+ {
+ $this->assertStringContainsString($expected, $this->gallery_user->sql_build_where($input));
+ }
+ }
+
+ public function test_get_own_root_album()
+ {
+ $this->gallery_user->set_user_id(2);
+ $this->assertEquals(1, $this->gallery_user->get_own_root_album());
+ $this->gallery_user->set_user_id(3);
+ $this->assertEquals(0, $this->gallery_user->get_own_root_album());
+ }
+}
diff --git a/tests/core/fixtures/fixture.xml b/ext/phpbbgallery/tests/core/fixtures/fixture.xml
similarity index 95%
rename from tests/core/fixtures/fixture.xml
rename to ext/phpbbgallery/tests/core/fixtures/fixture.xml
index 9ac672db..5a959814 100644
--- a/tests/core/fixtures/fixture.xml
+++ b/ext/phpbbgallery/tests/core/fixtures/fixture.xml
@@ -1,914 +1,914 @@
-
-
-
- config_name
- config_value
- is_dynamic
-
- phpbb_gallery_description_length
- 2000
- 0
-
-
- phpbb_gallery_allow_resize
- 1
- 0
-
-
- phpbb_gallery_link_thumbnail
- image_page
- 0
-
-
-
- album_id
- parent_id
- left_id
- right_id
- album_parents
- album_type
- album_status
- album_contest
- album_name
- album_desc
- album_desc_options
- album_desc_uid
- album_desc_bitfield
- album_user_id
- album_images
- album_images_real
- album_last_image_id
- album_image
- album_last_image_time
- album_last_image_name
- album_last_username
- album_last_user_colour
- album_last_user_id
- album_watermark
- album_sort_key
- album_sort_dir
- display_in_rrc
- display_on_index
- display_subalbum_list
- album_feed
- album_auth_access
-
- 1
- 0
- 0
- 0
-
- 1
- 0
- 0
- TestPublicAlbum1
-
- 7
-
-
- 0
- 3
- 3
- 3
-
- 0
- TestImage3
- admin
-
- 2
- 1
-
-
- 1
- 1
- 1
- 1
- 0
-
-
- 2
- 1
- 1
- 3
- a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
- 1
- 0
- 0
- TestPublicAlbumSubAlbum1
-
- 7
-
-
- 0
- 3
- 3
- 6
-
- 0
- TestImage6
- admin
-
- 2
- 1
-
-
- 0
- 1
- 1
- 1
- 0
-
-
- 3
- 1
- 1
- 2
- a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
- 1
- 0
- 0
- TestPublicAlbumSubAlbum2
-
- 7
-
-
- 0
- 3
- 3
- 9
-
- 0
- TestImage9
- admin
-
- 2
- 1
-
-
- 1
- 1
- 1
- 1
- 0
-
-
- 4
- 0
- 0
- 0
-
- 1
- 0
- 0
- TestUserAlbum1
-
- 7
-
-
- 2
- 0
- 0
- 0
-
- 0
-
-
-
- 0
- 0
-
-
- 1
- 1
- 1
- 1
- 0
-
-
-
- contest_id
- contest_album_id
- contest_start
- contest_rating
- contest_end
- contest_marked
- contest_first
- contest_second
- contest_third
-
- 1
- 5
- 1
- 3
- 5
- 1
- 0
- 0
- 0
-
-
- 2
- 6
- 1
- 3
- 5
- 1
- 0
- 0
- 0
-
-
-
- comment_id
- comment_image_id
- comment_user_id
- comment_time
- comment
-
- 1
- 1
- 52
- 1438791990
- This is test comment 1!!!!!
-
-
- 2
- 2
- 52
- 1438792100
- This is test comment 2!!!!!
-
-
- 3
- 3
- 52
- 1438792200
- This is test comment 3!!!!!
-
-
- 4
- 4
- 2
- 1438792300
- This is test comment 4!!!!!
-
-
- 5
- 5
- 2
- 1438792400
- This is test comment 5!!!!!
-
-
- 6
- 6
- 2
- 1438792500
- This is test comment 6!!!!!
-
-
-
- image_id
- image_filename
- image_name
- image_name_clean
- image_desc
- image_desc_uid
- image_desc_bitfield
- image_user_id
- image_username
- image_username_clean
- image_user_colour
- image_user_ip
- image_time
- image_album_id
- image_view_count
- image_status
- image_contest
- image_contest_end
- image_contest_rank
- image_filemissing
- image_rates
- image_rate_points
- image_rate_avg
- image_comments
- image_last_comment
- image_allow_comments
- image_favorited
- image_reported
- filesize_upload
- filesize_medium
- filesize_cache
-
- 1
- md5hashednamefor1.jpg
- TestImage1
- testimage1
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 2
- md5hashednamefor2.jpg
- TestImage2
- testimage2
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 2
- 30
- 150
- 1
- 2
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 3
- md5hashednamefor3.jpg
- TestImage3
- testimage3
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 3
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 4
- md5hashednamefor4.jpg
- TestImage4
- testimage4
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 4
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 5
- md5hashednamefor5.jpg
- TestImage5
- testimage5
-
- 10fu4clu
-
- 53
- Test2
- Test2
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 10
- 1000
- 1
- 5
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 6
- md5hashednamefor6.jpg
- TestImage6
- testimage6
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 2
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 6
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 7
- md5hashednamefor7.jpg
- TestImage7
- testimage7
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 8
- md5hashednamefor8.jpg
- TestImage8
- testimage8
-
- 10fu4clu
-
- 2
- admin
- admin
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 9
- md5hashednamefor9.jpg
- TestImage9
- testimage9
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 3
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
- 10
- md5hashednamefor10.jpg
- TestImage10
- testimage10
-
- 10fu4clu
-
- 52
- testuser
- testuser
-
- 127.0.0.1
- 0
- 4
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
-
-
-
- perm_id
- perm_role_id
- perm_album_id
- perm_user_id
- perm_group_id
- perm_system
-
- 1
- 1
- 1
- 0
- 5
- 0
-
-
- 2
- 2
- 1
- 0
- 2
- 0
-
-
- 3
- 1
- 2
- 0
- 5
- 0
-
-
-
- rate_image_id
- rate_user_id
- rate_user_ip
- rate_point
-
- 1
- 2
- localhost
- 10
-
-
- 1
- 3
- localhost
- 9
-
-
-
- role_id
- a_list
- i_view
- i_watermark
- i_upload
- i_edit
- i_delete
- i_rate
- i_approve
- i_lock
- i_report
- i_count
- i_unlimited
- c_read
- c_post
- c_edit
- c_delete
- m_comments
- m_delete
- m_edit
- m_move
- m_report
- m_status
- a_count
- a_unlimited
- a_restrict
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- 0
-
-
- 2
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- user_id
- watch_own
- watch_favo
- watch_com
- user_images
- personal_album_id
- user_lastmark
- user_last_update
- user_permissions
- user_permissions_changed
- user_allow_comments
- subscribe_pegas
-
- 2
- 1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 0
-
-
- 52
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
-
-
-
- watch_id
- album_id
- image_id
- user_id
-
- 1
- 6
- 0
- 6
-
-
- 2
- 0
- 6
- 6
-
-
-
- group_id
- group_type
- group_founder_manage
- group_name
- group_desc
- group_skip_auth
-
- 5
- 3
- 1
- ADMINISTRATORS
- ADMINISTRATORS
- 0
-
-
- 2
- 3
- 1
- REGISTERED
- REGISTERED
- 0
-
-
-
- user_id
- username
- username_clean
- user_permissions
- user_sig
-
- 2
- admin
- admin
- someval
- someval
-
-
- 52
- testuser1
- testuser1
- someval
- someval
-
-
-
- group_id
- user_id
- group_leader
- user_pending
-
- 5
- 2
- 1
- 0
-
-
- 2
- 52
- 0
- 0
-
-
-
- user_id
- zebra_id
- friend
- foe
-
- 2
- 52
- 1
- 0
-
-
- 52
- 2
- 1
- 0
-
-
- 53
- 2
- 0
- 1
-
-
-
+
+
+
+ config_name
+ config_value
+ is_dynamic
+
+ phpbb_gallery_description_length
+ 2000
+ 0
+
+
+ phpbb_gallery_allow_resize
+ 1
+ 0
+
+
+ phpbb_gallery_link_thumbnail
+ image_page
+ 0
+
+
+
+ album_id
+ parent_id
+ left_id
+ right_id
+ album_parents
+ album_type
+ album_status
+ album_contest
+ album_name
+ album_desc
+ album_desc_options
+ album_desc_uid
+ album_desc_bitfield
+ album_user_id
+ album_images
+ album_images_real
+ album_last_image_id
+ album_image
+ album_last_image_time
+ album_last_image_name
+ album_last_username
+ album_last_user_colour
+ album_last_user_id
+ album_watermark
+ album_sort_key
+ album_sort_dir
+ display_in_rrc
+ display_on_index
+ display_subalbum_list
+ album_feed
+ album_auth_access
+
+ 1
+ 0
+ 0
+ 0
+
+ 1
+ 0
+ 0
+ TestPublicAlbum1
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 3
+
+ 0
+ TestImage3
+ admin
+
+ 2
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+ 2
+ 1
+ 1
+ 3
+ a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
+ 1
+ 0
+ 0
+ TestPublicAlbumSubAlbum1
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 6
+
+ 0
+ TestImage6
+ admin
+
+ 2
+ 1
+
+
+ 0
+ 1
+ 1
+ 1
+ 0
+
+
+ 3
+ 1
+ 1
+ 2
+ a:1:{i:1;a:2:{i:0;s:8:"TestPublicAlbum1";i:1;i:1;}}
+ 1
+ 0
+ 0
+ TestPublicAlbumSubAlbum2
+
+ 7
+
+
+ 0
+ 3
+ 3
+ 9
+
+ 0
+ TestImage9
+ admin
+
+ 2
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+ 4
+ 0
+ 0
+ 0
+
+ 1
+ 0
+ 0
+ TestUserAlbum1
+
+ 7
+
+
+ 2
+ 0
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+
+ contest_id
+ contest_album_id
+ contest_start
+ contest_rating
+ contest_end
+ contest_marked
+ contest_first
+ contest_second
+ contest_third
+
+ 1
+ 5
+ 1
+ 3
+ 5
+ 1
+ 0
+ 0
+ 0
+
+
+ 2
+ 6
+ 1
+ 3
+ 5
+ 1
+ 0
+ 0
+ 0
+
+
+
+ comment_id
+ comment_image_id
+ comment_user_id
+ comment_time
+ comment
+
+ 1
+ 1
+ 52
+ 1438791990
+ This is test comment 1!!!!!
+
+
+ 2
+ 2
+ 52
+ 1438792100
+ This is test comment 2!!!!!
+
+
+ 3
+ 3
+ 52
+ 1438792200
+ This is test comment 3!!!!!
+
+
+ 4
+ 4
+ 2
+ 1438792300
+ This is test comment 4!!!!!
+
+
+ 5
+ 5
+ 2
+ 1438792400
+ This is test comment 5!!!!!
+
+
+ 6
+ 6
+ 2
+ 1438792500
+ This is test comment 6!!!!!
+
+
+
+ image_id
+ image_filename
+ image_name
+ image_name_clean
+ image_desc
+ image_desc_uid
+ image_desc_bitfield
+ image_user_id
+ image_username
+ image_username_clean
+ image_user_colour
+ image_user_ip
+ image_time
+ image_album_id
+ image_view_count
+ image_status
+ image_contest
+ image_contest_end
+ image_contest_rank
+ image_filemissing
+ image_rates
+ image_rate_points
+ image_rate_avg
+ image_comments
+ image_last_comment
+ image_allow_comments
+ image_favorited
+ image_reported
+ filesize_upload
+ filesize_medium
+ filesize_cache
+
+ 1
+ md5hashednamefor1.jpg
+ TestImage1
+ testimage1
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 2
+ md5hashednamefor2.jpg
+ TestImage2
+ testimage2
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 2
+ 30
+ 150
+ 1
+ 2
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 3
+ md5hashednamefor3.jpg
+ TestImage3
+ testimage3
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 3
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 4
+ md5hashednamefor4.jpg
+ TestImage4
+ testimage4
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 4
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 5
+ md5hashednamefor5.jpg
+ TestImage5
+ testimage5
+
+ 10fu4clu
+
+ 53
+ Test2
+ Test2
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 10
+ 1000
+ 1
+ 5
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 6
+ md5hashednamefor6.jpg
+ TestImage6
+ testimage6
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 2
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 6
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 7
+ md5hashednamefor7.jpg
+ TestImage7
+ testimage7
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 8
+ md5hashednamefor8.jpg
+ TestImage8
+ testimage8
+
+ 10fu4clu
+
+ 2
+ admin
+ admin
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 9
+ md5hashednamefor9.jpg
+ TestImage9
+ testimage9
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 10
+ md5hashednamefor10.jpg
+ TestImage10
+ testimage10
+
+ 10fu4clu
+
+ 52
+ testuser
+ testuser
+
+ 127.0.0.1
+ 0
+ 4
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ perm_id
+ perm_role_id
+ perm_album_id
+ perm_user_id
+ perm_group_id
+ perm_system
+
+ 1
+ 1
+ 1
+ 0
+ 5
+ 0
+
+
+ 2
+ 2
+ 1
+ 0
+ 2
+ 0
+
+
+ 3
+ 1
+ 2
+ 0
+ 5
+ 0
+
+
+
+ rate_image_id
+ rate_user_id
+ rate_user_ip
+ rate_point
+
+ 1
+ 2
+ localhost
+ 10
+
+
+ 1
+ 3
+ localhost
+ 9
+
+
+
+ role_id
+ a_list
+ i_view
+ i_watermark
+ i_upload
+ i_edit
+ i_delete
+ i_rate
+ i_approve
+ i_lock
+ i_report
+ i_count
+ i_unlimited
+ c_read
+ c_post
+ c_edit
+ c_delete
+ m_comments
+ m_delete
+ m_edit
+ m_move
+ m_report
+ m_status
+ a_count
+ a_unlimited
+ a_restrict
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 2
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ user_id
+ watch_own
+ watch_favo
+ watch_com
+ user_images
+ personal_album_id
+ user_lastmark
+ user_last_update
+ user_permissions
+ user_permissions_changed
+ user_allow_comments
+ subscribe_pegas
+
+ 2
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ 52
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+
+ watch_id
+ album_id
+ image_id
+ user_id
+
+ 1
+ 6
+ 0
+ 6
+
+
+ 2
+ 0
+ 6
+ 6
+
+
+
+ group_id
+ group_type
+ group_founder_manage
+ group_name
+ group_desc
+ group_skip_auth
+
+ 5
+ 3
+ 1
+ ADMINISTRATORS
+ ADMINISTRATORS
+ 0
+
+
+ 2
+ 3
+ 1
+ REGISTERED
+ REGISTERED
+ 0
+
+
+
+ user_id
+ username
+ username_clean
+ user_permissions
+ user_sig
+
+ 2
+ admin
+ admin
+ someval
+ someval
+
+
+ 52
+ testuser1
+ testuser1
+ someval
+ someval
+
+
+
+ group_id
+ user_id
+ group_leader
+ user_pending
+
+ 5
+ 2
+ 1
+ 0
+
+
+ 2
+ 52
+ 0
+ 0
+
+
+
+ user_id
+ zebra_id
+ friend
+ foe
+
+ 2
+ 52
+ 1
+ 0
+
+
+ 52
+ 2
+ 1
+ 0
+
+
+ 53
+ 2
+ 0
+ 1
+
+
+
diff --git a/tests/event/fixtures/fixture.xml b/ext/phpbbgallery/tests/event/fixtures/fixture.xml
similarity index 96%
rename from tests/event/fixtures/fixture.xml
rename to ext/phpbbgallery/tests/event/fixtures/fixture.xml
index dce10780..238c1eca 100644
--- a/tests/event/fixtures/fixture.xml
+++ b/ext/phpbbgallery/tests/event/fixtures/fixture.xml
@@ -1,153 +1,153 @@
-
-
-
- album_id
- parent_id
- left_id
- right_id
- album_parents
- album_type
- album_status
- album_contest
- album_name
- album_desc
- album_desc_options
- album_desc_uid
- album_desc_bitfield
- album_user_id
- album_images
- album_images_real
- album_last_image_id
- album_image
- album_last_image_time
- album_last_image_name
- album_last_username
- album_last_user_colour
- album_last_user_id
- album_watermark
- album_sort_key
- album_sort_dir
- display_in_rrc
- display_on_index
- display_subalbum_list
- album_feed
- album_auth_access
-
- 1
- 0
- 0
- 0
-
- 1
- 0
- 0
- TestPublicAlbum1
-
- 7
-
-
- 2
- 3
- 3
- 3
-
- 0
- TestImage3
- admin
-
- 2
- 1
-
-
- 1
- 1
- 1
- 1
- 0
-
-
-
- user_id
- watch_own
- watch_favo
- watch_com
- user_images
- personal_album_id
- user_lastmark
- user_last_update
- user_permissions
- user_permissions_changed
- user_allow_comments
- subscribe_pegas
-
- 2
- 1
- 0
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 1
- 0
-
-
- 52
- 1
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
-
-
-
- group_id
- group_type
- group_founder_manage
- group_name
- group_desc
- group_skip_auth
-
- 5
- 3
- 1
- ADMINISTRATORS
- ADMINISTRATORS
- 0
-
-
- 2
- 3
- 1
- REGISTERED
- REGISTERED
- 0
-
-
-
- group_id
- user_id
- group_leader
- user_pending
-
- 5
- 2
- 1
- 0
-
-
- 2
- 52
- 0
- 0
-
-
-
+
+
+
+ album_id
+ parent_id
+ left_id
+ right_id
+ album_parents
+ album_type
+ album_status
+ album_contest
+ album_name
+ album_desc
+ album_desc_options
+ album_desc_uid
+ album_desc_bitfield
+ album_user_id
+ album_images
+ album_images_real
+ album_last_image_id
+ album_image
+ album_last_image_time
+ album_last_image_name
+ album_last_username
+ album_last_user_colour
+ album_last_user_id
+ album_watermark
+ album_sort_key
+ album_sort_dir
+ display_in_rrc
+ display_on_index
+ display_subalbum_list
+ album_feed
+ album_auth_access
+
+ 1
+ 0
+ 0
+ 0
+
+ 1
+ 0
+ 0
+ TestPublicAlbum1
+
+ 7
+
+
+ 2
+ 3
+ 3
+ 3
+
+ 0
+ TestImage3
+ admin
+
+ 2
+ 1
+
+
+ 1
+ 1
+ 1
+ 1
+ 0
+
+
+
+ user_id
+ watch_own
+ watch_favo
+ watch_com
+ user_images
+ personal_album_id
+ user_lastmark
+ user_last_update
+ user_permissions
+ user_permissions_changed
+ user_allow_comments
+ subscribe_pegas
+
+ 2
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ 52
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+
+ group_id
+ group_type
+ group_founder_manage
+ group_name
+ group_desc
+ group_skip_auth
+
+ 5
+ 3
+ 1
+ ADMINISTRATORS
+ ADMINISTRATORS
+ 0
+
+
+ 2
+ 3
+ 1
+ REGISTERED
+ REGISTERED
+ 0
+
+
+
+ group_id
+ user_id
+ group_leader
+ user_pending
+
+ 5
+ 2
+ 1
+ 0
+
+
+ 2
+ 52
+ 0
+ 0
+
+
+
diff --git a/tests/event/main_event_test.php b/ext/phpbbgallery/tests/event/main_event_test.php
similarity index 95%
rename from tests/event/main_event_test.php
rename to ext/phpbbgallery/tests/event/main_event_test.php
index 2bdd3e6f..5fb81574 100644
--- a/tests/event/main_event_test.php
+++ b/ext/phpbbgallery/tests/event/main_event_test.php
@@ -1,257 +1,257 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-*/
-
-namespace phpbbgallery\tests\event;
-
-/**
-* @group event
-*/
-
-class main_event_test extends \phpbb_database_test_case
-{
- protected $listener;
- /**
- * Define the extensions to be tested
- *
- * @return array vendor/name of extension(s) to test
- */
- static protected function setup_extensions()
- {
- return array('phpbbgallery/core');
- }
-
- protected $db;
- /**
- * Get data set fixtures
- */
- public function getDataSet()
- {
- return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
- }
-
- /**
- * Setup test environment
- */
- public function setUp() : void
- {
- global $phpbb_root_path, $phpEx;
- parent::setUp();
-
- $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
- ->disableOriginalConstructor()
- ->getMock();
- $this->controller_helper->method('route')->will($this->returnArgument(1));
-
- $this->template = $this->getMockBuilder('\phpbb\template\template')
- ->getMock();
-
- $this->language = $this->getMockBuilder('\phpbb\language\language')
- ->disableOriginalConstructor()
- ->getMock();
- $this->language->method('lang')
- ->will($this->returnArgument(0));
-
- $this->user = $this->getMockBuilder('\phpbb\user')
- ->setConstructorArgs(array(
- new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
- '\phpbb\datetime'
- ))
- ->getMock();
- $this->user->optionset('viewcensors', false);
- $this->user->style['style_path'] = 'prosilver';
-
- $this->gallery_search = $this->getMockBuilder('\phpbbgallery\core\search')
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->config = new \phpbb\config\config(array());
-
- $this->gallery_config = new \phpbbgallery\core\config($this->config);
-
- $this->db = $this->new_dbal();
- }
-
- /**
- * Create our controller
- */
- protected function set_listener()
- {
- $this->listener = new \phpbbgallery\core\event\main_listener(
- $this->controller_helper,
- $this->template,
- $this->user,
- $this->language,
- $this->gallery_search,
- $this->gallery_config,
- $this->db,
- 'phpbb_gallery_albums',
- 'phpbb_gallery_users',
- 'php'
- );
- }
-
- /**
- * Test the event listener is subscribing events
- */
- public function test_getSubscribedEvents()
- {
- $this->assertEquals(array(
- 'core.user_setup',
- 'core.page_header',
- 'core.memberlist_view_profile','core.grab_profile_fields_data',
- ), array_keys(\phpbbgallery\core\event\main_listener::getSubscribedEvents()));
- }
-
- public function load_language_on_setup_data()
- {
- return array(
- 'normal' => array(
- array( //This is config
- 'phpbb_gallery_disp_total_images' => 1,
- 'phpbb_gallery_num_images' => 1,
- ),
- 1, // Expected count
- array( // expected array
- 'PHPBBGALLERY_INDEX_STATS' => 1
- )
- ),
- 'default' => array(
- array( //This is config
- ),
- 1, // Expected count
- array( // expected array
- 'PHPBBGALLERY_INDEX_STATS' => 0
- )
- ),
- 'disable' => array(
- array( //This is config
- 'phpbb_gallery_disp_total_images' => 0,
- ),
- 0, // Expected count
- array( // expected array
- 'PHPBBGALLERY_INDEX_STATS' => 0
- )
- )
- );
- }
- /**
- * Test load_language_on_setup (only test display total images)
- *
- * @dataProvider load_language_on_setup_data
- */
- public function test_load_language_on_setup($config, $count, $expected)
- {
- $lang_set_ext = array();
- $event_data = array('lang_set_ext');
- $event = new \phpbb\event\data(compact($event_data));
- foreach($config as $id => $state)
- {
- $this->config[$id] = $state;
- }
- $this->set_listener();
- $this->template->expects($this->exactly($count))
- ->method('assign_vars')
- ->with($expected);
- $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
- $dispatcher->addListener('core.user_setup', array($this->listener, 'load_language_on_setup'));
- $dispatcher->dispatch('core.user_setup', $event);
- }
-
- /**
- * Test add_page_header_link
- */
- public function test_add_page_header_link()
- {
- $this->set_listener();
- $this->template->expects($this->once())
- ->method('assign_vars')
- ->with(array(
- 'U_GALLERY' => $this->controller_helper->route('phpbbgallery_core_index'),
- ));
- $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
- $dispatcher->addListener('core.page_header', array($this->listener, 'add_page_header_link'));
- $dispatcher->dispatch('core.page_header');
- }
-
- public function user_profile_galleries_data()
- {
- return array(
- array(
- 3,
- 1
- ),
- array(
- 2,
- 1
- ),
- array(
- 1,
- 1
- ),
- array(
- 0,
- 1
- ),
- array(
- 3,
- 0
- ),
- array(
- 2,
- 0
- ),
- array(
- 1,
- 0
- ),
- array(
- 0,
- 0
- ),
- );
- }
- /**
- * Test user_profile_galleries
- *
- * @dataProvider user_profile_galleries_data
- */
- public function test_user_profile_galleries($profile_mode, $profile_user_images)
- {
- $member = array('user_id' => 2);
- $event_data = array('member');
- $event = new \phpbb\event\data(compact($event_data));
- $this->config['phpbb_gallery_rrc_profile_mode'] = $profile_mode;
- $this->config['phpbb_gallery_rrc_profile_items'] = 3;
- $this->config['phpbb_gallery_profile_user_images'] = $profile_user_images;
- $this->set_listener();
- if ($profile_mode == 2 || $profile_mode == 3)
- {
- $this->gallery_search->expects($this->once())
- ->method('random');
- }
- if ($profile_mode == 1 || $profile_mode == 3)
- {
- $this->gallery_search->expects($this->once())
- ->method('recent');
- }
- if ($profile_user_images == 1)
- {
- $this->template->expects($this->once())
- ->method('assign_vars')
- ->with(array(
- 'U_GALLERY_IMAGES_ALLOW' => true,
- 'U_GALLERY_IMAGES' => 0
- ));
- }
- $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
- $dispatcher->addListener('core.memberlist_view_profile', array($this->listener, 'user_profile_galleries'));
- $dispatcher->dispatch('core.memberlist_view_profile', $event);
- }
-}
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+namespace phpbbgallery\tests\event;
+
+/**
+* @group event
+*/
+
+class main_event_test extends \phpbb_database_test_case
+{
+ protected $listener;
+ /**
+ * Define the extensions to be tested
+ *
+ * @return array vendor/name of extension(s) to test
+ */
+ static protected function setup_extensions()
+ {
+ return array('phpbbgallery/core');
+ }
+
+ protected $db;
+ /**
+ * Get data set fixtures
+ */
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/fixture.xml');
+ }
+
+ /**
+ * Setup test environment
+ */
+ public function setUp() : void
+ {
+ global $phpbb_root_path, $phpEx;
+ parent::setUp();
+
+ $this->controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->controller_helper->method('route')->will($this->returnArgument(1));
+
+ $this->template = $this->getMockBuilder('\phpbb\template\template')
+ ->getMock();
+
+ $this->language = $this->getMockBuilder('\phpbb\language\language')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->language->method('lang')
+ ->will($this->returnArgument(0));
+
+ $this->user = $this->getMockBuilder('\phpbb\user')
+ ->setConstructorArgs(array(
+ new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
+ '\phpbb\datetime'
+ ))
+ ->getMock();
+ $this->user->optionset('viewcensors', false);
+ $this->user->style['style_path'] = 'prosilver';
+
+ $this->gallery_search = $this->getMockBuilder('\phpbbgallery\core\search')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->config = new \phpbb\config\config(array());
+
+ $this->gallery_config = new \phpbbgallery\core\config($this->config);
+
+ $this->db = $this->new_dbal();
+ }
+
+ /**
+ * Create our controller
+ */
+ protected function set_listener()
+ {
+ $this->listener = new \phpbbgallery\core\event\main_listener(
+ $this->controller_helper,
+ $this->template,
+ $this->user,
+ $this->language,
+ $this->gallery_search,
+ $this->gallery_config,
+ $this->db,
+ 'phpbb_gallery_albums',
+ 'phpbb_gallery_users',
+ 'php'
+ );
+ }
+
+ /**
+ * Test the event listener is subscribing events
+ */
+ public function test_getSubscribedEvents()
+ {
+ $this->assertEquals(array(
+ 'core.user_setup',
+ 'core.page_header',
+ 'core.memberlist_view_profile','core.grab_profile_fields_data',
+ ), array_keys(\phpbbgallery\core\event\main_listener::getSubscribedEvents()));
+ }
+
+ public function load_language_on_setup_data()
+ {
+ return array(
+ 'normal' => array(
+ array( //This is config
+ 'phpbb_gallery_disp_total_images' => 1,
+ 'phpbb_gallery_num_images' => 1,
+ ),
+ 1, // Expected count
+ array( // expected array
+ 'PHPBBGALLERY_INDEX_STATS' => 1
+ )
+ ),
+ 'default' => array(
+ array( //This is config
+ ),
+ 1, // Expected count
+ array( // expected array
+ 'PHPBBGALLERY_INDEX_STATS' => 0
+ )
+ ),
+ 'disable' => array(
+ array( //This is config
+ 'phpbb_gallery_disp_total_images' => 0,
+ ),
+ 0, // Expected count
+ array( // expected array
+ 'PHPBBGALLERY_INDEX_STATS' => 0
+ )
+ )
+ );
+ }
+ /**
+ * Test load_language_on_setup (only test display total images)
+ *
+ * @dataProvider load_language_on_setup_data
+ */
+ public function test_load_language_on_setup($config, $count, $expected)
+ {
+ $lang_set_ext = array();
+ $event_data = array('lang_set_ext');
+ $event = new \phpbb\event\data(compact($event_data));
+ foreach($config as $id => $state)
+ {
+ $this->config[$id] = $state;
+ }
+ $this->set_listener();
+ $this->template->expects($this->exactly($count))
+ ->method('assign_vars')
+ ->with($expected);
+ $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
+ $dispatcher->addListener('core.user_setup', array($this->listener, 'load_language_on_setup'));
+ $dispatcher->dispatch('core.user_setup', $event);
+ }
+
+ /**
+ * Test add_page_header_link
+ */
+ public function test_add_page_header_link()
+ {
+ $this->set_listener();
+ $this->template->expects($this->once())
+ ->method('assign_vars')
+ ->with(array(
+ 'U_GALLERY' => $this->controller_helper->route('phpbbgallery_core_index'),
+ ));
+ $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
+ $dispatcher->addListener('core.page_header', array($this->listener, 'add_page_header_link'));
+ $dispatcher->dispatch('core.page_header');
+ }
+
+ public function user_profile_galleries_data()
+ {
+ return array(
+ array(
+ 3,
+ 1
+ ),
+ array(
+ 2,
+ 1
+ ),
+ array(
+ 1,
+ 1
+ ),
+ array(
+ 0,
+ 1
+ ),
+ array(
+ 3,
+ 0
+ ),
+ array(
+ 2,
+ 0
+ ),
+ array(
+ 1,
+ 0
+ ),
+ array(
+ 0,
+ 0
+ ),
+ );
+ }
+ /**
+ * Test user_profile_galleries
+ *
+ * @dataProvider user_profile_galleries_data
+ */
+ public function test_user_profile_galleries($profile_mode, $profile_user_images)
+ {
+ $member = array('user_id' => 2);
+ $event_data = array('member');
+ $event = new \phpbb\event\data(compact($event_data));
+ $this->config['phpbb_gallery_rrc_profile_mode'] = $profile_mode;
+ $this->config['phpbb_gallery_rrc_profile_items'] = 3;
+ $this->config['phpbb_gallery_profile_user_images'] = $profile_user_images;
+ $this->set_listener();
+ if ($profile_mode == 2 || $profile_mode == 3)
+ {
+ $this->gallery_search->expects($this->once())
+ ->method('random');
+ }
+ if ($profile_mode == 1 || $profile_mode == 3)
+ {
+ $this->gallery_search->expects($this->once())
+ ->method('recent');
+ }
+ if ($profile_user_images == 1)
+ {
+ $this->template->expects($this->once())
+ ->method('assign_vars')
+ ->with(array(
+ 'U_GALLERY_IMAGES_ALLOW' => true,
+ 'U_GALLERY_IMAGES' => 0
+ ));
+ }
+ $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
+ $dispatcher->addListener('core.memberlist_view_profile', array($this->listener, 'user_profile_galleries'));
+ $dispatcher->dispatch('core.memberlist_view_profile', $event);
+ }
+}
diff --git a/tests/functional/images/valid.gif b/ext/phpbbgallery/tests/functional/images/valid.gif
similarity index 100%
rename from tests/functional/images/valid.gif
rename to ext/phpbbgallery/tests/functional/images/valid.gif
diff --git a/tests/functional/images/valid.jpg b/ext/phpbbgallery/tests/functional/images/valid.jpg
similarity index 100%
rename from tests/functional/images/valid.jpg
rename to ext/phpbbgallery/tests/functional/images/valid.jpg
diff --git a/tests/functional/images/valid.png b/ext/phpbbgallery/tests/functional/images/valid.png
similarity index 100%
rename from tests/functional/images/valid.png
rename to ext/phpbbgallery/tests/functional/images/valid.png
diff --git a/tests/functional/images/valid.webp b/ext/phpbbgallery/tests/functional/images/valid.webp
similarity index 100%
rename from tests/functional/images/valid.webp
rename to ext/phpbbgallery/tests/functional/images/valid.webp
diff --git a/tests/functional/images/valid.zip b/ext/phpbbgallery/tests/functional/images/valid.zip
similarity index 100%
rename from tests/functional/images/valid.zip
rename to ext/phpbbgallery/tests/functional/images/valid.zip
diff --git a/tests/functional/phpbbgallery_alpha_test.php b/ext/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
similarity index 96%
rename from tests/functional/phpbbgallery_alpha_test.php
rename to ext/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
index 2b906dea..64a901bd 100644
--- a/tests/functional/phpbbgallery_alpha_test.php
+++ b/ext/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
@@ -1,1301 +1,1301 @@
- array(
- 'phpbbgallery/core',
- 'gallery_acp',
- 'adm/index.php?i=-phpbbgallery-core-acp-main_module&mode=overview',
- 'ACP_GALLERY_OVERVIEW_EXPLAIN'
- ),
- 'core_config' => array(
- 'phpbbgallery/core',
- 'gallery_acp',
- 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main',
- 'GALLERY_CONFIG'
- ),
- 'core_albums' => array(
- 'phpbbgallery/core',
- 'gallery_acp',
- 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage',
- 'ALBUM_ADMIN'
- ),
- 'core_perms' => array(
- 'phpbbgallery/core',
- 'gallery_acp',
- 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage',
- 'PERMISSIONS_EXPLAIN'
- ),
- 'core_copy_perms' => array(
- 'phpbbgallery/core',
- 'gallery_acp',
- 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=copy',
- 'PERMISSIONS_COPY'
- ),
- 'core_log' => array(
- 'phpbbgallery/core',
- 'info_acp_gallery_logs',
- 'adm/index.php?i=-phpbbgallery-core-acp-gallery_logs_module&mode=main',
- 'LOG_GALLERY_SHOW_LOGS'
- ),
- // This is core, now extensions
- 'exif' => array(
- 'phpbbgallery/exif',
- 'exif',
- 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main',
- 'DISP_EXIF_DATA'
- ),
- 'acp_cleanup' => array(
- 'phpbbgallery/acpcleanup',
- 'info_acp_gallery_cleanup',
- 'adm/index.php?i=-phpbbgallery-acpcleanup-acp-main_module&mode=cleanup',
- 'ACP_GALLERY_CLEANUP'
- ),
- 'acp_import' => array(
- 'phpbbgallery/acpimport',
- 'info_acp_gallery_acpimport',
- 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images',
- 'ACP_IMPORT_ALBUMS'
- ),
- );
- }
- /**
- * @dataProvider install_data
- */
- public function test_install($ext, $lang, $path, $search)
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext($ext, $lang);
- $crawler = self::request('GET', $path . '&sid=' . $this->sid);
- $this->assertContainsLang($search, $crawler->text());
-
- $this->logout();
- $this->logout();
- }
- // Stop core so we can test if all works with all add-ons off
- public function togle_data()
- {
- return array(
- 'core' => array('phpbbgallery/core'),
- 'exif' => array('phpbbgallery/exif'),
- 'acpcleanup' => array('phpbbgallery/acpcleanup'),
- 'acpimport' => array('phpbbgallery/acpimport'),
- );
- }
- /**
- * @dataProvider togle_data
- */
- public function togle_core($ext)
- {
- $this->get_db();
- if (strpos($this->db->get_sql_layer(), 'sqlite3') === 0)
- {
- $this->markTestSkipped('There seems to be issue with SQlite and travis about togling');
- }
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
- $this->add_lang('acp/extensions');
-
- $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=phpbbgallery%2Fcore&sid=' . $this->sid);
- $form = $crawler->selectButton('disable')->form();
- $crawler = self::submit($form);
- $this->assertContainsLang('EXTENSION_DISABLE_SUCCESS', $crawler->filter('.successbox')->text());
-
- $this->assertEquals(0, $this->get_state($ext));
-
- $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=phpbbgallery%2Fcore&sid=' . $this->sid);
- $form = $crawler->selectButton('enable')->form();
- $crawler = self::submit($form);
- $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('.successbox')->text());
-
- $this->assertEquals(1, $this->get_state($ext));
- }
- // Let's test basic functionality
- public function test_basic_gallery_access()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
- $this->add_lang('common');
-
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertContains($this->lang('NO_ALBUMS'), $crawler->text());
- $this->assertContains($this->lang('USERS_PERSONAL_ALBUMS'), $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/users');
- $this->assertContains($this->lang('NO_ALBUMS'), $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/moderate');
- $this->assertContains('You are not authorised to access this area', $crawler->text());
-
- $this->logout();
- }
- public function test_admin_create_album()
- {
- $this->login();
- $this->admin_login();
-
- // Let us create a user we will use for tests
- $this->create_user('testuser1');
- $this->add_user_group('REGISTERED', array('testuser1'));
- // Let me get admin out of registered
- $this->remove_user_group('REGISTERED', array('admin'));
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1
- $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
- $form['album_name'] = 'First test album!';
- $crawler = self::submit($form);
-
- // Step 2 - we should have reached a form for creating album_name
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $crawler = self::submit($form);
-
- // Step 3 - Album should be created and we should have option to add permissions
- $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
- $this->assertContains('First test album!', $crawler->text());
-
-
- $this->logout();
- $this->logout();
- }
- public function test_acl_set_permissions_public()
- {
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertNotContains('First test album!', $crawler->text());
-
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- // Let us set for administration
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = 0;
- $form['album_id'] = array(1);
- $crawler = self::submit($form);
-
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(5);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERMISSION_I_VIEW', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- 1 => array (
- 5 => array(
- 'a_list' => '1',
- 'i_view' => '1',
- 'i_watermark' => '1',
- 'i_upload' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_rate' => '1',
- 'i_approve' => '1',
- 'i_report' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '1',
- 'm_delete' => '1',
- 'm_edit' => '1',
- 'm_move' => '1',
- 'm_report' => '1',
- 'm_status' => '1',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertContains('First test album!', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $this->add_lang('common');
-
- $this->assertContainsLang('MCP_SHORT', $crawler->text());
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
-
- // Now let's set for registered users
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = 0;
- $form['album_id'] = array(1);
- $crawler = self::submit($form);
-
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(2, 1);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERMISSION_I_VIEW', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- 1 => array (
- 2 => array(
- 'a_list' => '1',
- 'i_view' => '1',
- 'i_watermark' => '0',
- 'i_upload' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_rate' => '1',
- 'i_approve' => '0',
- 'i_report' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '0',
- 'm_delete' => '0',
- 'm_edit' => '0',
- 'm_move' => '0',
- 'm_report' => '0',
- 'm_status' => '0',
- ),
- 1 => array(
- 'a_list' => '1',
- 'i_view' => '1',
- 'i_watermark' => '0',
- 'i_upload' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_rate' => '1',
- 'i_approve' => '0',
- 'i_report' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '0',
- 'm_delete' => '0',
- 'm_edit' => '0',
- 'm_move' => '0',
- 'm_report' => '0',
- 'm_status' => '0',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertContains('First test album!', $crawler->text());
-
- $this->login('testuser1');
-
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertContains('First test album!', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $this->assertNotContainsLang('MCP', $crawler->text());
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
-
- $this->logout();
- }
- // Test MCP
- public function mcp_no_action_data()
- {
- return array(
- 'overview_main' => array(
- 'Main',
- 'No images waiting for approval.',
- 'app.php/gallery/moderate'
- ),
- 'waiting_main' => array(
- 'Queue',
- 'No images waiting for approval.',
- 'app.php/gallery/moderate/approve'
- ),
- 'reports_open_main' => array(
- 'Open reports',
- 'The report could not be found.',
- 'app.php/gallery/moderate/reports'
- ),
- 'reports_closed_main' => array(
- 'Closed reports',
- 'The report could not be found.',
- 'app.php/gallery/moderate/reports_closed'
- ),
- 'moderator_log_main' => array(
- 'Moderator logs',
- 'No log entries.',
- 'app.php/gallery/moderate/actions'
- ),
- );
- }
- /**
- * @dataProvider mcp_no_action_data
- */
- public function test_mcp_with_no_action($title, $message, $url)
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
- $this->add_lang('common');
-
- $crawler = self::request('GET', $url);
- $this->assertContains($title, $crawler->text());
- $this->assertContains($message, $crawler->text());
-
- $this->logout();
- }
- public function test_acl_upload_public_admin()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- //$link = $crawler->filter('div.upload-icon > a')->attr('href');
- //$this->assertContains('lalalalalal', $crawler->filter('div.upload-icon > a')->attr('href'));
-
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
-
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- //$this->assertContains('zazazazazaza', $crawler->text());
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Valid',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- $this->assertNotContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
-
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('app.php/gallery/album/1', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
-
- $this->assertContains('1 image', $crawler->text());
- $this->assertContains('Valid', $crawler->text());
- $this->logout();
- }
- public function test_acl_upload_public_user()
- {
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- /*
- // This is going to take some time to figure out how to do it as normal single test.
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
-
- $form['files'] = array(__DIR__ . '/images/valid.jpg', __DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- //$this->assertContains('zazazazazaza', $crawler->text());
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Valid but needs approve',
- 1 => 'Valid but needs delete',
- );
- $crawler = self::submit($form);
-
- $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
- */
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
-
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- //$this->assertContains('zazazazazaza', $crawler->text());
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Valid but needs approve',
- );
- $crawler = self::submit($form);
-
- $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
- //Second image ???
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
-
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $this->assertContains('First test album!', $crawler->text());
-
- //$this->assertContains('zazazazazaza', $crawler->text());
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Valid but needs delete',
- );
- $crawler = self::submit($form);
-
- $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('app.php/gallery/album/1', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
- $this->assertContains('1 image', $crawler->text());
- $this->assertContains('Valid', $crawler->text());
-
- $this->logout();
- }
-
- /*public function test_approve_image()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
- $this->add_lang('common');
- $this->add_lang('mcp');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $image = $crawler->filter('a:contains("Valid but needs approve")')->parents()->parents();
-
- $form = $image->selectButton($this->lang('APPROVE'))->form();
- $crawler = self::submit($form);
-
- $form = $crawler->selectButton($this->lang('YES'))->form();
- $crawler = self::submit($form);
-
- $this->assertContains('In total there is 1 image approved.', $crawler->text());
-
- $this->logout();
- }
-
- public function test_disaprove_image()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
- $this->add_lang('common');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $image = $crawler->filter('a:contains("Valid but needs delete")')->parents()->parents();
-
- $form = $image->selectButton($this->lang('DISAPPROVE'))->form();
- $crawler = self::submit($form);
-
-
- $form = $crawler->selectButton($this->lang('YES'))->form();
- $crawler = self::submit($form);
-
- $this->assertContainsLang('DELETED_IMAGE', $crawler->text());
-
- $this->logout();
- }
-
- public function test_visibility_user()
- {
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $this->assertContains('Valid', $crawler->text());
- $this->assertContains('Valid but needs approve', $crawler->text());
-
- $this->logout();
- }*/
-
- public function test_acl_set_permissions_own()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- // Let us set for administration
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = -2;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(5);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- -2 => array (
- 5 => array(
- 'i_watermark' => '1',
- 'i_upload' => '1',
- 'i_approve' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_report' => '1',
- 'i_rate' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_delete' => '1',
- 'm_comments' => '1',
- 'm_delete' => '1',
- 'm_edit' => '1',
- 'm_report' => '1',
- 'm_status' => '1',
- 'a_list' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'a_count' => '0',
- 'a_unlimited' => '1',
- 'a_restrict' => '1',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- // Now let's set for registered users
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = -2;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(2);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- -2 => array (
- 2 => array(
- 'i_watermark' => '0',
- 'i_upload' => '1',
- 'i_approve' => '0',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_report' => '1',
- 'i_rate' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_delete' => '1',
- 'm_comments' => '0',
- 'm_delete' => '0',
- 'm_edit' => '0',
- 'm_report' => '0',
- 'm_status' => '0',
- 'a_list' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'a_count' => '0',
- 'a_unlimited' => '1',
- 'a_restrict' => '1',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
-
- public function test_acl_set_permissions_personal()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- // Let us set for administration
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = -3;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(5);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- -3 => array (
- 5 => array(
- 'i_view' => '1',
- 'i_watermark' => '1',
- 'i_upload' => '1',
- 'i_report' => '1',
- 'i_rate' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '1',
- 'm_delete' => '1',
- 'm_edit' => '1',
- 'm_move' => '1',
- 'm_report' => '1',
- 'm_status' => '1',
- 'a_list' => '1',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- // Now let's set for registered users
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = -3;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(2);
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- -3 => array (
- 2 => array(
- 'i_view' => '1',
- 'i_watermark' => '0',
- 'i_upload' => '0',
- 'i_report' => '1',
- 'i_rate' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '0',
- 'm_delete' => '0',
- 'm_edit' => '0',
- 'm_move' => '0',
- 'm_report' => '0',
- 'm_status' => '0',
- 'a_list' => '1',
- )
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
-
- public function test_init_personal_album()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('ucp');
-
- $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
-
- $this->assertContains('You don’t have a personal album yet. Here you can create your personal album, with some subalbums.In personal albums only the owner can upload images', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('CREATE_PERSONAL_ALBUM'))->form();
- $crawler = self::submit($form);
-
- $this->assertContainsLang('PERSONAL_ALBUM', $crawler->text());
- $this->assertContainsLang('NO_SUBALBUMS', $crawler->text());
-
- $this->logout();
- }
-
- public function test_create_subalbum_personal()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('ucp');
-
- $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
-
- $form = $crawler->selectButton($this->lang('CREATE_SUBALBUM'))->form();
- $crawler = self::submit($form);
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['album_name'] = 'Personal user subalbum';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('CREATED_SUBALBUM', $crawler->text());
-
- $upload_url = substr($crawler->filter('a:contains("'.$this->lang('BACK_TO_PREV').'")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('MANAGE_SUBALBUMS', $crawler->text());
- $this->assertContains('Personal user subalbum', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/users');
- $this->assertContains('admin', $crawler->filter('div.polaroid')->text());
-
- $this->logout();
- }
-
- public function test_create_subalbum_admin()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1
- $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
- $form['album_name'] = 'First sub test album!';
- $crawler = self::submit($form);
-
- // Step 2 - we should have reached a form for creating album_name
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['parent_id'] = 1;
- $crawler = self::submit($form);
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $id = $crawler->filter('option:contains("First sub test album!")')->attr('value');
-
- $this->assertEquals(4, $id);
-
- // Let us set for administration
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = 0;
- $form['album_id'] = array($id);
- $crawler = self::submit($form);
-
- $this->assertContains('First sub test album!', $crawler->text());
-
- $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
- $form['group_id'] = array(2, 5);
- $crawler = self::submit($form);
-
- $this->assertContains('First sub test album!', $crawler->text());
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- $id => array (
- 2 => array(
- 'a_list' => '1',
- 'i_view' => '1',
- 'i_watermark' => '0',
- 'i_upload' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_rate' => '1',
- 'i_approve' => '0',
- 'i_report' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '0',
- 'm_delete' => '0',
- 'm_edit' => '0',
- 'm_move' => '0',
- 'm_report' => '0',
- 'm_status' => '0',
- ),
- 5 => array(
- 'a_list' => '1',
- 'i_view' => '1',
- 'i_watermark' => '1',
- 'i_upload' => '1',
- 'i_edit' => '1',
- 'i_delete' => '1',
- 'i_rate' => '1',
- 'i_approve' => '1',
- 'i_report' => '1',
- 'i_count' => '0',
- 'i_unlimited' => '1',
- 'c_read' => '1',
- 'c_post' => '1',
- 'c_edit' => '1',
- 'c_delete' => '1',
- 'm_comments' => '1',
- 'm_delete' => '1',
- 'm_edit' => '1',
- 'm_move' => '1',
- 'm_report' => '1',
- 'm_status' => '1',
- )
- ),
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $this->assertContains('First sub test album!', $crawler->text());
-
- $this->logout();
- }
- public function test_upload_to_public_subalbum()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $link = $crawler->filter('div.polaroid')->eq(0)->filter('a')->eq(0)->attr('href');
- //$this->assertContains('zzzazazazaza', substr($link, 1));
- $crawler = self::request('GET', substr($link, 1));
-
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $form = $crawler->selectButton('submit')->form();
- $form['image_name'] = array(
- 0 => 'Image in sublabum to move',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- $crawler = self::request('GET', substr($link, 1));
- $this->assertContains('Image in sublabum to move', $crawler->text());
-
- $this->logout();
- }
- public function test_acp_copy_permissions()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1
- $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
- $form['album_name'] = 'Second subalbum!';
- $crawler = self::submit($form);
-
- // Step 2 - we should have reached a form for creating album_name
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['parent_id'] = 1;
- $crawler = self::submit($form);
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=copy&sid=' . $this->sid);
- $album = $crawler->filter('select#dest_albums')->filter('option:contains("Second subalbum!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['src_album_id'] = 1;
- $form['dest_album_ids'] = array($album);
- $crawler = self::submit($form);
-
- $form = $crawler->selectButton('confirm')->form();
- $crawler = self::submit($form);
-
- $this->assertContainsLang('COPY_PERMISSIONS_SUCCESSFUL', $crawler->text());
- $this->logout();
- $this->logout();
-
- }
- public function test_create_album_copy_permissions()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1
- $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
- $form['album_name'] = 'First subalbum subalbum!';
- $crawler = self::submit($form);
-
- // Step 2 - we should have reached a form for creating album_name
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
-
- $album = $crawler->filter('select#parent_id')->filter('option:contains("First sub test album!")')->attr('value');
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['parent_id'] = $album;
- $form['album_perm_from'] = $album;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
- public function test_a_list_permissions()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1
- $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
- $form['album_name'] = 'Admins see only!';
- $crawler = self::submit($form);
- // Step 2 - we should have reached a form for creating album_name
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
-
- $album = $crawler->filter('select#parent_id')->filter('option:contains("First sub test album!")')->attr('value');
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['album_perm_from'] = $album;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
- $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
-
- $id = $crawler->filter('option:contains("Admins see only!")')->attr('value');
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['p_system'] = 0;
- $form['album_id'] = array($id);
- $crawler = self::submit($form);
-
- $this->assertContains('Admins see only!', $crawler->text());
-
- $form = $crawler->filter('form[id=groups]')->selectButton($this->lang('EDIT_PERMISSIONS'))->form();
- $form['group_id'] = array(2);
- $crawler = self::submit($form);
-
- $this->assertContains('Admins see only!', $crawler->text());
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $data = array(
- 'setting' => array(
- $id => array (
- 2 => array(
- 'a_list' => '0',
- ),
- )
- )
- );
- $form->setValues($data);
- $crawler = self::submit($form);
- $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- $crawler = self::request('GET', 'app.php/gallery');
-
- $this->assertNotContains('Admins see only!', $crawler->text());
-
- $this->login('testuser1');
- $crawler = self::request('GET', 'app.php/gallery');
-
- $this->assertNotContains('Admins see only!', $crawler->text());
- $this->logout();
-
- $this->login();
- $crawler = self::request('GET', 'app.php/gallery');
-
- $this->assertContains('Admins see only!', $crawler->text());
- $this->logout();
-
- }
-
- public function test_delete_album_move_images_and_subalbums()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1 - see subalbums
- $url = $crawler->filter('a:contains("First test album!")')->attr('href');
- $crawler = self::request('GET', substr($url, 5));
-
- $url = $crawler->filter('a:contains("First sub test album!")')->parents()->parents()->filter('td')->eq(2)->filter('a')->eq(3)->attr('href');
- $crawler = self::request('GET', substr($url, 5));
-
- $album = $crawler->filter('select#images_to_id')->filter('option:contains("Second subalbum!")')->attr('value');
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['action_images'] = 'move';
- $form['images_to_id'] = $album;
- $form['action_subalbums'] = 'move';
- $form['subalbums_to_id'] = $album;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_DELETED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/album/' . $album);
-
- $this->assertContains('First subalbum subalbum!', $crawler->text());
- $this->assertContains('Image in sublabum to move', $crawler->text());
- $this->assertEquals(2, $crawler->filter('div.polaroid')->count());
-
- $this->logout();
- $this->logout();
- }
- public function test_delete_album_move_images_and_delete_subalbums()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- // Step 1 - see subalbums
- $url = $crawler->filter('a:contains("First test album!")')->attr('href');
- $crawler = self::request('GET', substr($url, 5));
-
- $url = $crawler->filter('a:contains("Second subalbum!")')->parents()->parents()->filter('td')->eq(2)->filter('a')->eq(2)->attr('href');
- $crawler = self::request('GET', substr($url, 5));
-
- $album = $crawler->filter('select#images_to_id')->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['action_images'] = 'move';
- $form['images_to_id'] = $album;
- $form['action_subalbums'] = 'delete';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_DELETED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/album/' . $album);
-
- $this->assertNotContains('First subalbum subalbum!', $crawler->text());
- $this->assertContains('Image in sublabum to move', $crawler->text());
- $this->assertEquals(4, $crawler->filter('div.polaroid')->count());
-
- $this->logout();
- $this->logout();
- }
- public function test_edit_albums_admin()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/permissions');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
-
- $object = $crawler->filter('a:contains("First test album")')->parents()->parents();
- $edit = $object->filter('img[title=Edit]')->parents()->attr('href');
-
- //$this->assertContains('zazazaza', $edit);
- $crawler = self::request('GET', substr($edit, 5));
-
- $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['album_watermark'] = 0;
- $crawler = self::submit($form);
-
- $this->assertContains('Album has been updated successfully.', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
- public function log_data()
- {
- return array(
- 'all' => array(
- 'all',
- 11
- ),
- 'admin' => array(
- 'admin',
- 9
- ),
- 'moderator' => array(
- 'moderator',
- 3,
- ),
- 'system' => array(
- 'system',
- false
- )
- );
- }
- /**
- * @dataProvider log_data
- */
- /*public function test_log($type, $test)
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'info_acp_gallery_logs');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('acp/common');
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-gallery_logs_module&mode=main&sid=' . $this->sid);
-
- $form = $crawler->selectButton('filter')->form();
- $form['lf'] = $type;
- $crawler = self::submit($form);
-
- if ($test)
- {
- $table = $crawler->filter('table')->filter('tr')->count();
- $this->assertEquals($test, $table);
- }
- else
- {
- $this->assertContainsLang('NO_ENTRIES', $crawler->text());
- }
- }*/
+ array(
+ 'phpbbgallery/core',
+ 'gallery_acp',
+ 'adm/index.php?i=-phpbbgallery-core-acp-main_module&mode=overview',
+ 'ACP_GALLERY_OVERVIEW_EXPLAIN'
+ ),
+ 'core_config' => array(
+ 'phpbbgallery/core',
+ 'gallery_acp',
+ 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main',
+ 'GALLERY_CONFIG'
+ ),
+ 'core_albums' => array(
+ 'phpbbgallery/core',
+ 'gallery_acp',
+ 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage',
+ 'ALBUM_ADMIN'
+ ),
+ 'core_perms' => array(
+ 'phpbbgallery/core',
+ 'gallery_acp',
+ 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage',
+ 'PERMISSIONS_EXPLAIN'
+ ),
+ 'core_copy_perms' => array(
+ 'phpbbgallery/core',
+ 'gallery_acp',
+ 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=copy',
+ 'PERMISSIONS_COPY'
+ ),
+ 'core_log' => array(
+ 'phpbbgallery/core',
+ 'info_acp_gallery_logs',
+ 'adm/index.php?i=-phpbbgallery-core-acp-gallery_logs_module&mode=main',
+ 'LOG_GALLERY_SHOW_LOGS'
+ ),
+ // This is core, now extensions
+ 'exif' => array(
+ 'phpbbgallery/exif',
+ 'exif',
+ 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main',
+ 'DISP_EXIF_DATA'
+ ),
+ 'acp_cleanup' => array(
+ 'phpbbgallery/acpcleanup',
+ 'info_acp_gallery_cleanup',
+ 'adm/index.php?i=-phpbbgallery-acpcleanup-acp-main_module&mode=cleanup',
+ 'ACP_GALLERY_CLEANUP'
+ ),
+ 'acp_import' => array(
+ 'phpbbgallery/acpimport',
+ 'info_acp_gallery_acpimport',
+ 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images',
+ 'ACP_IMPORT_ALBUMS'
+ ),
+ );
+ }
+ /**
+ * @dataProvider install_data
+ */
+ public function test_install($ext, $lang, $path, $search)
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext($ext, $lang);
+ $crawler = self::request('GET', $path . '&sid=' . $this->sid);
+ $this->assertContainsLang($search, $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ // Stop core so we can test if all works with all add-ons off
+ public function togle_data()
+ {
+ return array(
+ 'core' => array('phpbbgallery/core'),
+ 'exif' => array('phpbbgallery/exif'),
+ 'acpcleanup' => array('phpbbgallery/acpcleanup'),
+ 'acpimport' => array('phpbbgallery/acpimport'),
+ );
+ }
+ /**
+ * @dataProvider togle_data
+ */
+ public function togle_core($ext)
+ {
+ $this->get_db();
+ if (strpos($this->db->get_sql_layer(), 'sqlite3') === 0)
+ {
+ $this->markTestSkipped('There seems to be issue with SQlite and travis about togling');
+ }
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+ $this->add_lang('acp/extensions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=phpbbgallery%2Fcore&sid=' . $this->sid);
+ $form = $crawler->selectButton('disable')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('EXTENSION_DISABLE_SUCCESS', $crawler->filter('.successbox')->text());
+
+ $this->assertEquals(0, $this->get_state($ext));
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=phpbbgallery%2Fcore&sid=' . $this->sid);
+ $form = $crawler->selectButton('enable')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('.successbox')->text());
+
+ $this->assertEquals(1, $this->get_state($ext));
+ }
+ // Let's test basic functionality
+ public function test_basic_gallery_access()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertContains($this->lang('NO_ALBUMS'), $crawler->text());
+ $this->assertContains($this->lang('USERS_PERSONAL_ALBUMS'), $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/users');
+ $this->assertContains($this->lang('NO_ALBUMS'), $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/moderate');
+ $this->assertContains('You are not authorised to access this area', $crawler->text());
+
+ $this->logout();
+ }
+ public function test_admin_create_album()
+ {
+ $this->login();
+ $this->admin_login();
+
+ // Let us create a user we will use for tests
+ $this->create_user('testuser1');
+ $this->add_user_group('REGISTERED', array('testuser1'));
+ // Let me get admin out of registered
+ $this->remove_user_group('REGISTERED', array('admin'));
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1
+ $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
+ $form['album_name'] = 'First test album!';
+ $crawler = self::submit($form);
+
+ // Step 2 - we should have reached a form for creating album_name
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $crawler = self::submit($form);
+
+ // Step 3 - Album should be created and we should have option to add permissions
+ $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+ $this->assertContains('First test album!', $crawler->text());
+
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_acl_set_permissions_public()
+ {
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertNotContains('First test album!', $crawler->text());
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ // Let us set for administration
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = 0;
+ $form['album_id'] = array(1);
+ $crawler = self::submit($form);
+
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(5);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERMISSION_I_VIEW', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ 1 => array (
+ 5 => array(
+ 'a_list' => '1',
+ 'i_view' => '1',
+ 'i_watermark' => '1',
+ 'i_upload' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_rate' => '1',
+ 'i_approve' => '1',
+ 'i_report' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '1',
+ 'm_delete' => '1',
+ 'm_edit' => '1',
+ 'm_move' => '1',
+ 'm_report' => '1',
+ 'm_status' => '1',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertContains('First test album!', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $this->add_lang('common');
+
+ $this->assertContainsLang('MCP_SHORT', $crawler->text());
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+
+ // Now let's set for registered users
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = 0;
+ $form['album_id'] = array(1);
+ $crawler = self::submit($form);
+
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(2, 1);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERMISSION_I_VIEW', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ 1 => array (
+ 2 => array(
+ 'a_list' => '1',
+ 'i_view' => '1',
+ 'i_watermark' => '0',
+ 'i_upload' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_rate' => '1',
+ 'i_approve' => '0',
+ 'i_report' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '0',
+ 'm_delete' => '0',
+ 'm_edit' => '0',
+ 'm_move' => '0',
+ 'm_report' => '0',
+ 'm_status' => '0',
+ ),
+ 1 => array(
+ 'a_list' => '1',
+ 'i_view' => '1',
+ 'i_watermark' => '0',
+ 'i_upload' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_rate' => '1',
+ 'i_approve' => '0',
+ 'i_report' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '0',
+ 'm_delete' => '0',
+ 'm_edit' => '0',
+ 'm_move' => '0',
+ 'm_report' => '0',
+ 'm_status' => '0',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertContains('First test album!', $crawler->text());
+
+ $this->login('testuser1');
+
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertContains('First test album!', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $this->assertNotContainsLang('MCP', $crawler->text());
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+
+ $this->logout();
+ }
+ // Test MCP
+ public function mcp_no_action_data()
+ {
+ return array(
+ 'overview_main' => array(
+ 'Main',
+ 'No images waiting for approval.',
+ 'app.php/gallery/moderate'
+ ),
+ 'waiting_main' => array(
+ 'Queue',
+ 'No images waiting for approval.',
+ 'app.php/gallery/moderate/approve'
+ ),
+ 'reports_open_main' => array(
+ 'Open reports',
+ 'The report could not be found.',
+ 'app.php/gallery/moderate/reports'
+ ),
+ 'reports_closed_main' => array(
+ 'Closed reports',
+ 'The report could not be found.',
+ 'app.php/gallery/moderate/reports_closed'
+ ),
+ 'moderator_log_main' => array(
+ 'Moderator logs',
+ 'No log entries.',
+ 'app.php/gallery/moderate/actions'
+ ),
+ );
+ }
+ /**
+ * @dataProvider mcp_no_action_data
+ */
+ public function test_mcp_with_no_action($title, $message, $url)
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', $url);
+ $this->assertContains($title, $crawler->text());
+ $this->assertContains($message, $crawler->text());
+
+ $this->logout();
+ }
+ public function test_acl_upload_public_admin()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ //$link = $crawler->filter('div.upload-icon > a')->attr('href');
+ //$this->assertContains('lalalalalal', $crawler->filter('div.upload-icon > a')->attr('href'));
+
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ //$this->assertContains('zazazazazaza', $crawler->text());
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Valid',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ $this->assertNotContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
+
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('app.php/gallery/album/1', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+
+ $this->assertContains('1 image', $crawler->text());
+ $this->assertContains('Valid', $crawler->text());
+ $this->logout();
+ }
+ public function test_acl_upload_public_user()
+ {
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ /*
+ // This is going to take some time to figure out how to do it as normal single test.
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+
+ $form['files'] = array(__DIR__ . '/images/valid.jpg', __DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ //$this->assertContains('zazazazazaza', $crawler->text());
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Valid but needs approve',
+ 1 => 'Valid but needs delete',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
+ */
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ //$this->assertContains('zazazazazaza', $crawler->text());
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Valid but needs approve',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
+ //Second image ???
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $this->assertContains('First test album!', $crawler->text());
+
+ //$this->assertContains('zazazazazaza', $crawler->text());
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Valid but needs delete',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContains('But your image must be approved by a administrator or a moderator before they are public visible.', $crawler->text());
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('app.php/gallery/album/1', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+ $this->assertContains('1 image', $crawler->text());
+ $this->assertContains('Valid', $crawler->text());
+
+ $this->logout();
+ }
+
+ /*public function test_approve_image()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
+ $this->add_lang('common');
+ $this->add_lang('mcp');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $image = $crawler->filter('a:contains("Valid but needs approve")')->parents()->parents();
+
+ $form = $image->selectButton($this->lang('APPROVE'))->form();
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton($this->lang('YES'))->form();
+ $crawler = self::submit($form);
+
+ $this->assertContains('In total there is 1 image approved.', $crawler->text());
+
+ $this->logout();
+ }
+
+ public function test_disaprove_image()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_mcp');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $image = $crawler->filter('a:contains("Valid but needs delete")')->parents()->parents();
+
+ $form = $image->selectButton($this->lang('DISAPPROVE'))->form();
+ $crawler = self::submit($form);
+
+
+ $form = $crawler->selectButton($this->lang('YES'))->form();
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('DELETED_IMAGE', $crawler->text());
+
+ $this->logout();
+ }
+
+ public function test_visibility_user()
+ {
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $this->assertContains('Valid', $crawler->text());
+ $this->assertContains('Valid but needs approve', $crawler->text());
+
+ $this->logout();
+ }*/
+
+ public function test_acl_set_permissions_own()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ // Let us set for administration
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = -2;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(5);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ -2 => array (
+ 5 => array(
+ 'i_watermark' => '1',
+ 'i_upload' => '1',
+ 'i_approve' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_report' => '1',
+ 'i_rate' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '1',
+ 'm_delete' => '1',
+ 'm_edit' => '1',
+ 'm_report' => '1',
+ 'm_status' => '1',
+ 'a_list' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'a_count' => '0',
+ 'a_unlimited' => '1',
+ 'a_restrict' => '1',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ // Now let's set for registered users
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = -2;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(2);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('OWN_PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ -2 => array (
+ 2 => array(
+ 'i_watermark' => '0',
+ 'i_upload' => '1',
+ 'i_approve' => '0',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_report' => '1',
+ 'i_rate' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '0',
+ 'm_delete' => '0',
+ 'm_edit' => '0',
+ 'm_report' => '0',
+ 'm_status' => '0',
+ 'a_list' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'a_count' => '0',
+ 'a_unlimited' => '1',
+ 'a_restrict' => '1',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+
+ public function test_acl_set_permissions_personal()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ // Let us set for administration
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = -3;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(5);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ -3 => array (
+ 5 => array(
+ 'i_view' => '1',
+ 'i_watermark' => '1',
+ 'i_upload' => '1',
+ 'i_report' => '1',
+ 'i_rate' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '1',
+ 'm_delete' => '1',
+ 'm_edit' => '1',
+ 'm_move' => '1',
+ 'm_report' => '1',
+ 'm_status' => '1',
+ 'a_list' => '1',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ // Now let's set for registered users
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = -3;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(2);
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERSONAL_ALBUMS', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ -3 => array (
+ 2 => array(
+ 'i_view' => '1',
+ 'i_watermark' => '0',
+ 'i_upload' => '0',
+ 'i_report' => '1',
+ 'i_rate' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '0',
+ 'm_delete' => '0',
+ 'm_edit' => '0',
+ 'm_move' => '0',
+ 'm_report' => '0',
+ 'm_status' => '0',
+ 'a_list' => '1',
+ )
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+
+ public function test_init_personal_album()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('ucp');
+
+ $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
+
+ $this->assertContains('You don’t have a personal album yet. Here you can create your personal album, with some subalbums.In personal albums only the owner can upload images', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('CREATE_PERSONAL_ALBUM'))->form();
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('PERSONAL_ALBUM', $crawler->text());
+ $this->assertContainsLang('NO_SUBALBUMS', $crawler->text());
+
+ $this->logout();
+ }
+
+ public function test_create_subalbum_personal()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('ucp');
+
+ $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
+
+ $form = $crawler->selectButton($this->lang('CREATE_SUBALBUM'))->form();
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['album_name'] = 'Personal user subalbum';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('CREATED_SUBALBUM', $crawler->text());
+
+ $upload_url = substr($crawler->filter('a:contains("'.$this->lang('BACK_TO_PREV').'")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('MANAGE_SUBALBUMS', $crawler->text());
+ $this->assertContains('Personal user subalbum', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/users');
+ $this->assertContains('admin', $crawler->filter('div.polaroid')->text());
+
+ $this->logout();
+ }
+
+ public function test_create_subalbum_admin()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1
+ $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
+ $form['album_name'] = 'First sub test album!';
+ $crawler = self::submit($form);
+
+ // Step 2 - we should have reached a form for creating album_name
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['parent_id'] = 1;
+ $crawler = self::submit($form);
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $id = $crawler->filter('option:contains("First sub test album!")')->attr('value');
+
+ $this->assertEquals(4, $id);
+
+ // Let us set for administration
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = 0;
+ $form['album_id'] = array($id);
+ $crawler = self::submit($form);
+
+ $this->assertContains('First sub test album!', $crawler->text());
+
+ $form = $crawler->filter('form[id=add_groups]')->selectButton($this->lang('ADD_PERMISSIONS'))->form();
+ $form['group_id'] = array(2, 5);
+ $crawler = self::submit($form);
+
+ $this->assertContains('First sub test album!', $crawler->text());
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ $id => array (
+ 2 => array(
+ 'a_list' => '1',
+ 'i_view' => '1',
+ 'i_watermark' => '0',
+ 'i_upload' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_rate' => '1',
+ 'i_approve' => '0',
+ 'i_report' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '0',
+ 'm_delete' => '0',
+ 'm_edit' => '0',
+ 'm_move' => '0',
+ 'm_report' => '0',
+ 'm_status' => '0',
+ ),
+ 5 => array(
+ 'a_list' => '1',
+ 'i_view' => '1',
+ 'i_watermark' => '1',
+ 'i_upload' => '1',
+ 'i_edit' => '1',
+ 'i_delete' => '1',
+ 'i_rate' => '1',
+ 'i_approve' => '1',
+ 'i_report' => '1',
+ 'i_count' => '0',
+ 'i_unlimited' => '1',
+ 'c_read' => '1',
+ 'c_post' => '1',
+ 'c_edit' => '1',
+ 'c_delete' => '1',
+ 'm_comments' => '1',
+ 'm_delete' => '1',
+ 'm_edit' => '1',
+ 'm_move' => '1',
+ 'm_report' => '1',
+ 'm_status' => '1',
+ )
+ ),
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $this->assertContains('First sub test album!', $crawler->text());
+
+ $this->logout();
+ }
+ public function test_upload_to_public_subalbum()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $link = $crawler->filter('div.polaroid')->eq(0)->filter('a')->eq(0)->attr('href');
+ //$this->assertContains('zzzazazazaza', substr($link, 1));
+ $crawler = self::request('GET', substr($link, 1));
+
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContainsLang('UPLOAD_IMAGE', $crawler->text());
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('submit')->form();
+ $form['image_name'] = array(
+ 0 => 'Image in sublabum to move',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ $crawler = self::request('GET', substr($link, 1));
+ $this->assertContains('Image in sublabum to move', $crawler->text());
+
+ $this->logout();
+ }
+ public function test_acp_copy_permissions()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1
+ $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
+ $form['album_name'] = 'Second subalbum!';
+ $crawler = self::submit($form);
+
+ // Step 2 - we should have reached a form for creating album_name
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['parent_id'] = 1;
+ $crawler = self::submit($form);
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=copy&sid=' . $this->sid);
+ $album = $crawler->filter('select#dest_albums')->filter('option:contains("Second subalbum!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['src_album_id'] = 1;
+ $form['dest_album_ids'] = array($album);
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('confirm')->form();
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('COPY_PERMISSIONS_SUCCESSFUL', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ }
+ public function test_create_album_copy_permissions()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1
+ $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
+ $form['album_name'] = 'First subalbum subalbum!';
+ $crawler = self::submit($form);
+
+ // Step 2 - we should have reached a form for creating album_name
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+
+ $album = $crawler->filter('select#parent_id')->filter('option:contains("First sub test album!")')->attr('value');
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['parent_id'] = $album;
+ $form['album_perm_from'] = $album;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_a_list_permissions()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1
+ $form = $crawler->selectButton($this->lang('CREATE_ALBUM'))->form();
+ $form['album_name'] = 'Admins see only!';
+ $crawler = self::submit($form);
+ // Step 2 - we should have reached a form for creating album_name
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+
+ $album = $crawler->filter('select#parent_id')->filter('option:contains("First sub test album!")')->attr('value');
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['album_perm_from'] = $album;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_CREATED', $crawler->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-permissions_module&mode=manage&sid=' . $this->sid);
+ $this->assertContainsLang('PERMISSIONS_EXPLAIN', $crawler->text());
+
+ $id = $crawler->filter('option:contains("Admins see only!")')->attr('value');
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['p_system'] = 0;
+ $form['album_id'] = array($id);
+ $crawler = self::submit($form);
+
+ $this->assertContains('Admins see only!', $crawler->text());
+
+ $form = $crawler->filter('form[id=groups]')->selectButton($this->lang('EDIT_PERMISSIONS'))->form();
+ $form['group_id'] = array(2);
+ $crawler = self::submit($form);
+
+ $this->assertContains('Admins see only!', $crawler->text());
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array(
+ 'setting' => array(
+ $id => array (
+ 2 => array(
+ 'a_list' => '0',
+ ),
+ )
+ )
+ );
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PERMISSIONS_STORED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ $crawler = self::request('GET', 'app.php/gallery');
+
+ $this->assertNotContains('Admins see only!', $crawler->text());
+
+ $this->login('testuser1');
+ $crawler = self::request('GET', 'app.php/gallery');
+
+ $this->assertNotContains('Admins see only!', $crawler->text());
+ $this->logout();
+
+ $this->login();
+ $crawler = self::request('GET', 'app.php/gallery');
+
+ $this->assertContains('Admins see only!', $crawler->text());
+ $this->logout();
+
+ }
+
+ public function test_delete_album_move_images_and_subalbums()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1 - see subalbums
+ $url = $crawler->filter('a:contains("First test album!")')->attr('href');
+ $crawler = self::request('GET', substr($url, 5));
+
+ $url = $crawler->filter('a:contains("First sub test album!")')->parents()->parents()->filter('td')->eq(2)->filter('a')->eq(3)->attr('href');
+ $crawler = self::request('GET', substr($url, 5));
+
+ $album = $crawler->filter('select#images_to_id')->filter('option:contains("Second subalbum!")')->attr('value');
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['action_images'] = 'move';
+ $form['images_to_id'] = $album;
+ $form['action_subalbums'] = 'move';
+ $form['subalbums_to_id'] = $album;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_DELETED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/' . $album);
+
+ $this->assertContains('First subalbum subalbum!', $crawler->text());
+ $this->assertContains('Image in sublabum to move', $crawler->text());
+ $this->assertEquals(2, $crawler->filter('div.polaroid')->count());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_delete_album_move_images_and_delete_subalbums()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ // Step 1 - see subalbums
+ $url = $crawler->filter('a:contains("First test album!")')->attr('href');
+ $crawler = self::request('GET', substr($url, 5));
+
+ $url = $crawler->filter('a:contains("Second subalbum!")')->parents()->parents()->filter('td')->eq(2)->filter('a')->eq(2)->attr('href');
+ $crawler = self::request('GET', substr($url, 5));
+
+ $album = $crawler->filter('select#images_to_id')->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['action_images'] = 'move';
+ $form['images_to_id'] = $album;
+ $form['action_subalbums'] = 'delete';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_DELETED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/' . $album);
+
+ $this->assertNotContains('First subalbum subalbum!', $crawler->text());
+ $this->assertContains('Image in sublabum to move', $crawler->text());
+ $this->assertEquals(4, $crawler->filter('div.polaroid')->count());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_edit_albums_admin()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/permissions');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-albums_module&mode=manage&sid=' . $this->sid);
+
+ $object = $crawler->filter('a:contains("First test album")')->parents()->parents();
+ $edit = $object->filter('img[title=Edit]')->parents()->attr('href');
+
+ //$this->assertContains('zazazaza', $edit);
+ $crawler = self::request('GET', substr($edit, 5));
+
+ $this->assertContainsLang('ALBUM_EDIT_EXPLAIN', $crawler->text());
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['album_watermark'] = 0;
+ $crawler = self::submit($form);
+
+ $this->assertContains('Album has been updated successfully.', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function log_data()
+ {
+ return array(
+ 'all' => array(
+ 'all',
+ 11
+ ),
+ 'admin' => array(
+ 'admin',
+ 9
+ ),
+ 'moderator' => array(
+ 'moderator',
+ 3,
+ ),
+ 'system' => array(
+ 'system',
+ false
+ )
+ );
+ }
+ /**
+ * @dataProvider log_data
+ */
+ /*public function test_log($type, $test)
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'info_acp_gallery_logs');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('acp/common');
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-gallery_logs_module&mode=main&sid=' . $this->sid);
+
+ $form = $crawler->selectButton('filter')->form();
+ $form['lf'] = $type;
+ $crawler = self::submit($form);
+
+ if ($test)
+ {
+ $table = $crawler->filter('table')->filter('tr')->count();
+ $this->assertEquals($test, $table);
+ }
+ else
+ {
+ $this->assertContainsLang('NO_ENTRIES', $crawler->text());
+ }
+ }*/
}
\ No newline at end of file
diff --git a/tests/functional/phpbbgallery_base.php b/ext/phpbbgallery/tests/functional/phpbbgallery_base.php
similarity index 95%
rename from tests/functional/phpbbgallery_base.php
rename to ext/phpbbgallery/tests/functional/phpbbgallery_base.php
index eecac8e3..38c8c25a 100644
--- a/tests/functional/phpbbgallery_base.php
+++ b/ext/phpbbgallery/tests/functional/phpbbgallery_base.php
@@ -1,64 +1,64 @@
-path = __DIR__ . '/images/';
-
- }
-
- public function get_state($ext)
- {
- $this->get_db();
- $sql = 'SELECT ext_active
- FROM ' . EXT_TABLE .'
- WHERE ext_name = \'' . $ext . '\'';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- return $row['ext_active'];
- }
- public function get_user_id($username)
- {
- $this->get_db();
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE username_clean = \''.$this->db->sql_escape(utf8_clean_string($username)).'\'';
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- return $row['user_id'];
- }
- public function set_option($option, $value)
- {
- $this->get_db();
- $sql = "UPDATE phpbb_config
- SET config_value = " . $value ."
- WHERE config_name = 'phpbb_gallery_" . $option . "'";
- $this->db->sql_query($sql);
- $this->purge_cache();
- }
- public function get_url_from_meta($url)
- {
- $parts = explode(';', $url);
- $base = end($parts);
-
- return substr($base, 5);
- }
-}
+path = __DIR__ . '/images/';
+
+ }
+
+ public function get_state($ext)
+ {
+ $this->get_db();
+ $sql = 'SELECT ext_active
+ FROM ' . EXT_TABLE .'
+ WHERE ext_name = \'' . $ext . '\'';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ return $row['ext_active'];
+ }
+ public function get_user_id($username)
+ {
+ $this->get_db();
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE username_clean = \''.$this->db->sql_escape(utf8_clean_string($username)).'\'';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ return $row['user_id'];
+ }
+ public function set_option($option, $value)
+ {
+ $this->get_db();
+ $sql = "UPDATE phpbb_config
+ SET config_value = " . $value ."
+ WHERE config_name = 'phpbb_gallery_" . $option . "'";
+ $this->db->sql_query($sql);
+ $this->purge_cache();
+ }
+ public function get_url_from_meta($url)
+ {
+ $parts = explode(';', $url);
+ $base = end($parts);
+
+ return substr($base, 5);
+ }
+}
diff --git a/tests/functional/phpbbgallery_beta_test.php b/ext/phpbbgallery/tests/functional/phpbbgallery_beta_test.php
similarity index 96%
rename from tests/functional/phpbbgallery_beta_test.php
rename to ext/phpbbgallery/tests/functional/phpbbgallery_beta_test.php
index 4a36f322..dc3dc530 100644
--- a/tests/functional/phpbbgallery_beta_test.php
+++ b/ext/phpbbgallery/tests/functional/phpbbgallery_beta_test.php
@@ -1,2466 +1,2466 @@
- array(
- 1
- ),
- 'reset' => array(
- 15
- ),
- );
- }
-
- public function yes_no_data()
- {
- return array(
- 'no' => array(
- 0
- ),
- 'reset' => array(
- 1
- ),
- );
- }
- public function image_on_image_page_data()
- {
- return array(
- 'image' => array(
- 'image',
- true,
- 'app.php/gallery/image/2/source'
- ),
- 'none' => array(
- 'none',
- false,
- false
- ),
- 'next' => array(
- 'next',
- true,
- 'app.php/gallery/image/1'
- ),
- );
- }
- public function thumbnail_link_data()
- {
- return array(
- 'image' => array(
- 'image',
- true,
- 'app.php/gallery/image/1/source'
- ),
- 'none' => array(
- 'none',
- false,
- false
- ),
- 'image_page' => array(
- 'image_page',
- true,
- 'app.php/gallery/image/1'
- ),
- );
- }
- // START BASIC GALLERY SETTINGS TESTS
- /**
- * @dataProvider pagination_data
- */
- public function test_items_per_page_paginate($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[items_per_page]' => $option,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- if ($option == 1)
- {
- $this->assertEquals(1, $crawler->filter('div.polaroid')->count());
- }
- else
- {
- $this->assertEquals(4, $crawler->filter('div.polaroid')->count());
- }
-
- $this->logout();
- $this->logout();
- }
-
- /**
- * @dataProvider yes_no_data
- */
- public function test_allow_comment_option($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => $option,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- if ($option == 1)
- {
- $this->assertContains($this->lang('POST_COMMENT'), $crawler->text());
- }
- else
- {
- $this->assertNotContains($this->lang('POST_COMMENT'), $crawler->text());
- }
-
- $this->logout();
- $this->logout();
- }
- /**
- * @dataProvider yes_no_data
- */
- public function test_comment_user_control_option($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[comment_user_control]' => $option,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-settings_module&mode=manage&sid' . $this->sid);
- if ($option == 1)
- {
- $this->assertContains($this->lang('USER_ALLOW_COMMENTS'), $crawler->text());
- }
- else
- {
- $this->assertNotContains($this->lang('USER_ALLOW_COMMENTS'), $crawler->text());
- }
- $this->logout();
- $this->logout();
- }
- public function test_anon_comment()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- $this->assertContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
-
- $crawler = self::request('GET', 'app.php/gallery/comment/1/add/0');
- $this->assertContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
- }
- public function test_comment_user()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang('common');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $form = $crawler->selectButton('submit')->form();
- $form['message'] = 'Test comment that should be seen';
-
- $crawler = self::submit($form);
-
- $this->assertContainsLang('COMMENT_STORED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- $this->assertContains('Test comment that should be seen', $crawler->text());
-
- $this->logout();
- }
- public function test_quote_comment()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang('common');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $url = $crawler->filter('a:contains("Quote comment")')->attr('href');
-
- $crawler = self::request('GET', substr($url, 1));
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
-
- $crawler = self::submit($form);
-
- $this->assertContainsLang('COMMENT_STORED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $this->assertEquals(2, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
- $this->assertEquals(1, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
- $this->logout();
- }
- public function test_no_comment()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- $this->assertEquals(0, $crawler->filter('a:contains("Edit comment")')->count());
- $this->assertEquals(0, $crawler->filter('a:contains("Delete comment")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/comment/1/edit/1');
- $this->assertContainsLang('USERNAME', $crawler->filter('html')->text());
-
- $crawler = self::request('GET', 'app.php/gallery/comment/1/delete/1');
- $this->assertContainsLang('USERNAME', $crawler->filter('html')->text());
- }
- public function test_edit_comment()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $url = $crawler->filter('a:contains("Edit comment")')->eq(1)->attr('href');
-
- $crawler = self::request('GET', substr($url, 1));
-
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['message'] = 'Test comment that should be edited';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('COMMENT_STORED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
- $this->assertEquals(0, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
- $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be edited")')->count());
- $this->logout();
- }
- /*public function test_delete_comment()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $url = $crawler->filter('a:contains("Delete comment")')->eq(1)->attr('href');
-
- $crawler = self::request('GET', substr($url, 1));
-
- $form = $crawler->selectButton('confirm')->form();
-
- $crawler = self::submit($form);
-
- $this->assertContainsLang('DELETED_COMMENT', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
- $this->assertEquals(0, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
- $this->assertEquals(0, $crawler->filter('div.content:contains("Test comment that should be edited")')->count());
- $this->logout();
- }*/
- public function test_comment_to_many_symbols_user()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_comments]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
-
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[comment_length]' => 1,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- // Test
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $form = $crawler->selectButton('submit')->form();
- $form['message'] = 'Test comment that should be seen';
-
- $crawler = self::submit($form);
-
- $this->assertContainsLang('COMMENT_TOO_LONG', $crawler->text());
-
- $this->logout();
-
- // Reset
- $this->login();
- $this->admin_login();
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[comment_length]' => 2000,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- }
- /**
- * @dataProvider yes_no_data
- */
- public function test_allow_rates($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_rates]' => $option,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // test
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- if ($option == 1)
- {
- $this->assertContains($this->lang('RATING'), $crawler->text());
- }
- else
- {
- $this->assertNotContains($this->lang('RATING'), $crawler->text());
- }
- $this->logout();
- }
- public function test_max_rating()
- {
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $this->assertEquals(11, $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->filter('option')->count());
- $this->logout();
-
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_rating]' => 20,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // test
- $this->logout();
- $this->logout();
-
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $this->assertEquals(21, $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->filter('option')->count());
- $this->logout();
-
- $this->login();
- $this->admin_login();
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_rating]' => 10,
- ));
-
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // test
- $this->logout();
- $this->logout();
- }
- public function test_rate()
- {
- $this->login('testuser1');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $crawler = self::request('GET', 'app.php/gallery/image/1');
-
- $form = $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->parents()->parents()->parents()->form();
- $form['rating'] = 5;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('RATING_SUCCESSFUL', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
- $this->assertContains('rating, your rating:', $crawler->text());
- $this->logout();
- }
- // END BASIC GALLERY SETTINGS TESTS
-
- // START ALBUM SETTINGS TESTS
- public function image_polaroid_info_data()
- {
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
- return array(
- 'none' => array(
- array(0),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_album' => array(
- array(1),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_comments' => array(
- array(2),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_name' => array(
- array(4),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_date' => array(
- array(8),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_views' => array(
- array(16),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_user' => array(
- array(32),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => false,
- $this->lang('IP') => false,
- ),
- ),
- 'only_rating' => array(
- array(64),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => false,
- ),
- ),
- 'only_ip' => array(
- array(128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'album_and_ip' => array(
- array(1, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_and_ip' => array(
- array(2, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'name_and_ip' => array(
- array(4, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'date_and_iip' => array(
- array(8, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'image_views_and_ip' => array(
- array(16, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'user_and_ip' => array(
- array(32, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => false,
- $this->lang('IP') => true,
- ),
- ),
- 'rating_and_ip' => array(
- array(64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_rating_and_ip' => array(
- array(1, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_rating_and_ip' => array(
- array(2, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'name_rating_and_ip' => array(
- array(4, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'date_rating_and_ip' => array(
- array(8, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'image_views_rating_and_ip' => array(
- array(16, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => false,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'user_rating_and_ip' => array(
- array(32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_user_rating_and_ip' => array(
- array(1, 32, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_user_rating_and_ip' => array(
- array(2, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'name_user_rating_and_ip' => array(
- array(4, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'date_user_rating_and_ip' => array(
- array(8, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => false,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'image_vews_user_rating_and_ip' => array(
- array(16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_image_vews_user_rating_and_ip' => array(
- array(1, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_image_vews_user_rating_and_ip' => array(
- array(2, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'name_image_vews_user_rating_and_ip' => array(
- array(4, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => false,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'date_image_vews_user_rating_and_ip' => array(
- array(8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_date_image_vews_user_rating_and_ip' => array(
- array(1, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_date_image_vews_user_rating_and_ip' => array(
- array(2, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => false,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'name_date_image_vews_user_rating_and_ip' => array(
- array(4, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_name_date_image_vews_user_rating_and_ip' => array(
- array(1, 4, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => false,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'comments_name_date_image_vews_user_rating_and_ip' => array(
- array(2, 4, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'album_comments_name_date_image_vews_user_rating_and_ip' => array(
- array(1, 2, 4, 8, 16, 32, 64, 128),
- array(
- $this->lang('ALBUM') => true,
- $this->lang('COMMENT') => true,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- 'reset' => array(
- array(2,4,8,16,32,64,128),
- array(
- $this->lang('ALBUM') => false,
- $this->lang('COMMENT') => true,
- 'Valid' => true,
- $this->lang('UPLOADED_ON_DATE') => true,
- $this->lang('IMAGE_VIEWS') => true,
- $this->lang('UPLOADED_BY_USER') => true,
- $this->lang('RATING') => true,
- $this->lang('IP') => true,
- ),
- ),
- );
- }
- /**
- * @dataProvider image_polaroid_info_data
- */
- public function test_album_display($options, $tests)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'album_display' => $options,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $object = $crawler->filter('div.polaroid')->eq(2);
-
- foreach ($tests as $test => $state)
- {
- if ($state)
- {
- $this->assertContains($test, $object->text());
- }
- else
- {
- $this->assertNotContains($test, $object->text());
- }
- }
-
- $this->logout();
- $this->logout();
- }
-
- public function sort_key_data()
- {
- return array(
- 'time_desc' => array(
- 't',
- 'd',
- 'Image in sublabum to move',
- 'Valid but needs delete',
- 'Valid',
- ),
- 'time_asc' => array(
- 't',
- 'a',
- 'Valid',
- 'Valid but needs approve',
- 'Valid but needs delete',
- ),
- 'name_desc' => array(
- 'n',
- 'd',
- 'Valid but needs delete',
- 'Valid',
- 'Valid',
- ),
- 'name_asc' => array(
- 'n',
- 'a',
- 'Image in sublabum to move',
- 'Valid',
- 'Valid but needs approve',
- ),
- 'view_count_desc' => array(
- 'vc',
- 'd',
- 'Valid',
- 'Valid but needs approve',
- 'Valid but needs delete',
- ),
- 'view_count_asc' => array(
- 'vc',
- 'a',
- 'Image in sublabum to move',
- 'Valid but needs delete',
- 'Valid',
- ),
- 'username_desc' => array(
- 'u',
- 'd',
- 'Valid but needs delete',
- 'Valid but needs approve',
- 'Image in sublabum to move',
- ),
- 'username_asc' => array(
- 'u',
- 'a',
- 'Valid',
- 'Image in sublabum to move',
- 'Valid but needs approve',
- ),
- /*'rating_asc' => array(
- 'ra',
- 'a',
- 'Image sublabum to move',
- 'Valid but needs delete',
- 'Valid',
- ),*/
- 'rating_desc' => array(
- 'ra',
- 'd',
- 'Valid',
- 'Valid but needs approve',
- 'Valid but needs delete',
- ),
- /*'rating_count_asc' => array(
- 'r',
- 'a',
- 'Image in sublabum to move',
- 'Image in sublabum to move',
- 'Valid',
- ),*/
- 'rating_count_desc' => array(
- 'r',
- 'd',
- 'Valid',
- 'Valid but needs approve',
- 'Valid but needs delete',
- ),
- /*'comment_asc' => array(
- 'c',
- 'a',
- 'Valid but needs approve',
- 'Image in sublabum to move',
- 'Valid',
- ),
- 'comment_desc' => array(
- 'c',
- 'd',
- 'Valid',
- 'Image in sublabum to move',
- 'Valid but needs approve',
- ),
- 'last_comment_asc' => array(
- 'lc',
- 'a',
- 'Valid but needs approve',
- 'Image in sublabum to move',
- 'Valid',
- ),
- 'last_comment_desc' => array(
- 'lc',
- 'd',
- 'Valid',
- 'Image in sublabum to move',
- 'Valid but needs approve',
- ),*/
- 'reset' => array(
- 't',
- 'd',
- 'Image in sublabum to move',
- 'Valid but needs delete',
- 'Valid',
- ),
- );
- }
- /**
- * @dataProvider sort_key_data
- */
- public function test_default_sort_key($sort_key, $sort_dir, $first, $second, $third)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[default_sort_key]' => $sort_key,
- 'config[default_sort_dir]' => $sort_dir,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $this->assertContains($first, $crawler->filter('div.polaroid')->eq(0)->text());
- $this->assertContains($second, $crawler->filter('div.polaroid')->eq(1)->text());
- $this->assertContains($third, $crawler->filter('div.polaroid')->eq(2)->text());
-
- $url = $crawler->filter('div.polaroid')->eq(1)->filter('p')->filter('a')->attr('href');
- $crawler = self::request('GET', substr($url,1));
-
- $this->assertContains($first, $crawler->filter('div.image_prev_image')->text());
- $this->assertContains($third, $crawler->filter('div.image_next_image')->text());
-
- $this->logout();
- $this->logout();
-
- }
- /*public function test_album_images()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[album_images]' => 3,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
-
- $this->assertContains('This album has reached the quota of images. You cannot upload images anymore.', $crawler->text());
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[album_images]' => 2500,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- }*/
- /**
- * @dataProvider yes_no_data
- */
- public function test_mini_thumbnail_disp($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[mini_thumbnail_disp]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery');
- $this->assertEquals($option, $crawler->filter('div.polaroid')->eq(0)->filter('img')->count());
- $this->logout();
- $this->logout();
-
- }
- // END ALBUM SETTINGS TESTS
-
- // START SEARCH SETTINGS
- /**
- * @dataProvider image_polaroid_info_data
- */
- public function test_search_display($options, $tests)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'search_display' => $options,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/search');
- $form = $crawler->selectButton('submit')->form();
- $form['keywords'] = 'valid';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('SEARCH', $crawler->text());
-
- $object = $crawler->filter('div.polaroid')->eq(0);
- foreach ($tests as $test => $state)
- {
- if ($state)
- {
- $this->assertContains($test, $object->text());
- }
- else
- {
- $this->assertNotContains($test, $object->text());
- }
- }
-
- $this->logout();
- $this->logout();
- }
- // END SEARCH SETTINGS
-
- // START IMAGE SETTINGS
- public function test_num_uploads()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[num_uploads]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
-
- $this->assertEquals(1, $crawler->filter('input#files')->count());
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[num_uploads]' => 10,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $this->assertEquals(1, $crawler->filter('input#files')->count());
- $this->logout();
- $this->logout();
- }
- public function test_max_filesize()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_filesize]' => 100,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $this->assertContains($this->lang('BAD_UPLOAD_FILE_SIZE'), $crawler->filter('p.error')->text());
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_filesize]' => 512000,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
- }
- public function test_max_size_allow_resize()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_width]' => 150,
- 'config[max_height]' => 150,
- 'config[allow_resize]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'This should be resized',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('app.php/gallery/album/1', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
- $url = $crawler->filter('a:contains("This should be resized")')->attr('href');
- $image_array = getimagesize('http://localhost' . $url . '/source');
-
- $this->assertEquals(150, $image_array[0]);
- $this->assertEquals(100, $image_array[1]);
-
- $this->logout();
- $this->logout();
- }
- /*public function test_max_size_dont_allow_resize()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_width]' => 100,
- 'config[max_height]' => 100,
- 'config[allow_resize]' => 0,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $this->assertContains($this->lang('UPLOAD_IMAGE_SIZE_TOO_BIG'), $crawler->filter('p.error')->text());
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[max_width]' => 4096,
- 'config[max_height]' => 2048,
- 'config[allow_resize]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_rotate($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_rotate]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
-
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Rotate test',
- );
- if ($option == 1)
- {
- $form['rotate'] = array(
- 0 => '270',
- );
- }
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('app.php/gallery/album/1', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
- $url = $crawler->filter('a:contains("Rotate test")')->eq(0)->attr('href');
- $image_array = getimagesize('http://localhost' . $url . '/source');
- if ($option == 1)
- {
- $this->assertEquals(300, $image_array[0]);
- $this->assertEquals(450, $image_array[1]);
- }
- else
- {
- $this->assertEquals(450, $image_array[0]);
- $this->assertEquals(300, $image_array[1]);
- }
-
- $this->logout();
- $this->logout();
- }
-
- public function test_medium_size()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[medium_width]' => 150,
- 'config[medium_height]' => 150,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'medium',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('app.php/gallery/album/1', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
- $url = $crawler->filter('a:contains("medium")')->attr('href');
- $crawler = self::request('GET', substr($url, 1));
- //$this->assertContains('zazaza', $crawler->text());
- // TODO - Reanable resize test
- //$image_array = getimagesize('http://localhost' . $url . '/medium');
-
- //$this->assertEquals(150, $image_array[0]);
- //$this->assertEquals(100, $image_array[1]);
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[medium_width]' => 600,
- 'config[medium_height]' => 800,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_gif($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_gif]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.gif');
- $crawler = self::submit($form);
- if ($option == 1)
- {
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Test Gif image',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- }
- else
- {
- $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
- }
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_jpg($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_jpg]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- if ($option == 1)
- {
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Test jpg image',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- }
- else
- {
- $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
- }
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_png($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_png]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.png');
- $crawler = self::submit($form);
- if ($option == 1)
- {
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Test png image',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- }
- else
- {
- $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
- }
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_webp($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_webp]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.webp');
- $crawler = self::submit($form);
- if ($option == 1)
- {
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Test webp image',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- }
- else
- {
- $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
- }
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_allow_zip($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[allow_zip]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.zip');
- $crawler = self::submit($form);
- if ($option == 1)
- {
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Test zip image',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
- }
- else
- {
- $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
- }
- $this->logout();
- $this->logout();
- }*/
- /*public function test_description_length()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[description_length]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['message'] = array(
- 0 => 'medium',
- );
- $crawler = self::submit($form);
-
- $this->assertContains($this->lang('DESC_TOO_LONG'), $crawler->text());
-
- $crawler = self::request('GET', 'app.php/gallery/image/1/edit');
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['message'] = array(
- 0 => 'medium',
- );
- $crawler = self::submit($form);
-
- $this->assertContains($this->lang('DESC_TOO_LONG'), $crawler->text());
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[description_length]' => 2000,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['message'] = array(
- 0 => 'medium',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- public function test_disp_nextprev_thumbnail($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[disp_nextprev_thumbnail]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/image/2');
-
- if ($option == 1)
- {
- $this->assertEquals(1, $crawler->filter('div.image_prev_image')->filter('img')->count());
- $this->assertEquals(1, $crawler->filter('div.image_prev_image')->filter('img')->count());
- }
- else
- {
- $this->assertEquals(0, $crawler->filter('div.image_prev_image')->filter('img')->count());
- $this->assertEquals(0, $crawler->filter('div.image_prev_image')->filter('img')->count());
- }
- $this->logout();
- $this->logout();
- }
- /**
- * @dataProvider yes_no_data
- */
- public function test_disp_image_url($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[disp_image_url]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/image/2');
-
- if ($option == 1)
- {
- $this->assertContains($this->lang('IMAGE_URL'), $crawler->text());
- }
- else
- {
- $this->assertNotContains($this->lang('IMAGE_URL'), $crawler->text());
- }
-
- $this->logout();
- $this->logout();
- }
- // END IMAGE SETTINGS
-
- // BEGIN THUMBNAIL SETTINGS
- /*public function test_thumbnail_size()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[thumbnail_width]' => 15,
- 'config[thumbnail_height]' => 15,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'mini',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- //$this->assertContains('app.php/gallery/album/1', $meta);
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- //$this->assertContains('zazazazaza', $crawler->text());
- $url = $crawler->filter('div.polaroid')->eq(0)->filter('a')->eq(0)->attr('href');
-
- // TODO - Reanable resize tests
-
- //$image_array = getimagesize('http://localhost' . $url . '/mini');
-
- //$this->assertEquals(15, $image_array[0]);
- //$this->assertEquals(10, $image_array[1]);
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[thumbnail_width]' => 240,
- 'config[thumbnail_height]' => 160,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }*/
- // END THUMBNAIL SETTINGS
-
- // START IMAGE SETTINGS
- /**
- * @dataProvider image_on_image_page_data
- */
- public function test_image_on_image_page($option, $has_link, $search)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[link_imagepage]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test image
- $crawler = self::request('GET', 'app.php/gallery/image/2');
- if ($has_link)
- {
- $link = $crawler->filter('div#image')->filter('a')->attr('href');
- $this->assertContains($search, $link);
- }
- else
- {
- $this->assertEquals(0, $crawler->filter('div#image')->filter('a')->count());
- $this->assertEquals(1, $crawler->filter('div#image')->filter('img')->count());
- }
- $this->logout();
- }
- // END LINK SETTINGS
-
- // START RRC GINDEX TESTS
- public function rrc_gidex_data()
- {
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang('common');
- return array(
- 'none' => array(
- array(0),
- array(
- $this->lang('RANDOM_IMAGES') => false,
- $this->lang('RECENT_IMAGES') => false,
- $this->lang('SEARCH_RECENT_COMMENTS') => false,
- ),
- ),
- 'recent' => array(
- array(1),
- array(
- $this->lang('RECENT_IMAGES') => true,
- $this->lang('RANDOM_IMAGES') => false,
- $this->lang('SEARCH_RECENT_COMMENTS') => false,
- ),
- ),
- 'random' => array(
- array(2),
- array(
- $this->lang('RECENT_IMAGES') => false,
- $this->lang('RANDOM_IMAGES') => true,
- $this->lang('SEARCH_RECENT_COMMENTS') => false,
- ),
- ),
- 'comments' => array(
- array(4),
- array(
- $this->lang('RECENT_IMAGES') => false,
- $this->lang('RANDOM_IMAGES') => false,
- $this->lang('SEARCH_RECENT_COMMENTS') => true,
- ),
- ),
- 'random_comments' => array(
- array(1, 4),
- array(
- $this->lang('RECENT_IMAGES') => true,
- $this->lang('RANDOM_IMAGES') => false,
- $this->lang('SEARCH_RECENT_COMMENTS') => true,
- ),
- ),
- 'recent_comments' => array(
- array(2, 4),
- array(
- $this->lang('RECENT_IMAGES') => false,
- $this->lang('RANDOM_IMAGES') => true,
- $this->lang('SEARCH_RECENT_COMMENTS') => true,
- ),
- ),
- 'random_recent' => array(
- array(1, 2),
- array(
- $this->lang('RECENT_IMAGES') => true,
- $this->lang('RANDOM_IMAGES') => true,
- $this->lang('SEARCH_RECENT_COMMENTS') => false,
- ),
- ),
- 'all' => array(
- array(1, 2, 4),
- array(
- $this->lang('RECENT_IMAGES') => true,
- $this->lang('RANDOM_IMAGES') => true,
- $this->lang('SEARCH_RECENT_COMMENTS') => true,
- ),
- ),
- );
- }
- /**
- * @dataProvider rrc_gidex_data
- */
- public function test_rrc_gindex_mode($options, $tests)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'rrc_gindex_mode' => $options,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery');
- foreach($tests as $test => $response)
- {
- if ($response)
- {
- $this->assertContains($test, $crawler->text());
- }
- else
- {
- $this->assertNotContains($test, $crawler->text());
- }
- }
- $this->logout();
- $this->logout();
- }
- /**
- * @dataProvider yes_no_data
- */
-/* public function test_rrc_gindex_comments($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[rrc_gindex_comments]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
- $crawler = self::request('GET', 'app.php/gallery');
- if ($option == 1)
- {
- $this->assertNotContains('display: none;', $crawler->filter('div#recent-comments')->attr('style'));
- }
- else
- {
- $this->assertContains('display: none;', $crawler->filter('div#recent-comments')->attr('style'));
- }
- }*/
- /*public function test_prepare_rrc_gindex_pegas()
- {
- $this->login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('ucp');
-
- $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
-
- $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
-
- $crawler = self::request('GET', $upload_url);
- $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
- $form['files'] = array(__DIR__ . '/images/valid.jpg');
- $crawler = self::submit($form);
- $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
- $form['image_name'] = array(
- 0 => 'Image in Personal album',
- );
- $crawler = self::submit($form);
-
- $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
-
- //$crawler = self::request('GET', 'app.php/gallery/album/1');
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 1));
-
- $this->assertContains('Image in Personal album', $crawler->text());
-
- $this->logout();
- $this->logout();
- }*/
- /**
- * @dataProvider yes_no_data
- */
- /*public function test_rrc_gindex_pegas($option)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[rrc_gindex_pegas]' => $option,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- //Test
-
- if ($option == 1)
- {
- $crawler = self::request('GET', 'app.php/gallery/search/recent');
- $this->assertContains('Image in Personal album', $crawler->text());
- $crawler = self::request('GET', 'app.php/gallery/search/random');
- $this->assertContains('Image in Personal album', $crawler->text());
- }
- else
- {
- $crawler = self::request('GET', 'app.php/gallery/search/recent');
- $this->assertNotContains('Image in Personal album', $crawler->text());
- $crawler = self::request('GET', 'app.php/gallery/search/random');
- $this->assertNotContains('Image in Personal album', $crawler->text());
- }
- $this->logout();
- $this->logout();
- }
- // END RRC GINDEX TESTS*/
-
- // START PHPBB INTEGRATION
- // profile_pega test is in charlie
- public function test_rrc_profile_items()
- {
- $this->login();
- $this->admin_login();
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang('common');
-
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[rrc_profile_items]' => 1,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- // Test
-
- $crawler = self::request('GET', 'memberlist.php?mode=viewprofile&u=2&sid=' . $this->sid);
-
- $this->assertEquals(2, $crawler->filter('div.polaroid')->count());
-
- // Revert
- // Change option
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'config[rrc_profile_items]' => 4,
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
- // END PHPBB INTEGRATION
+ array(
+ 1
+ ),
+ 'reset' => array(
+ 15
+ ),
+ );
+ }
+
+ public function yes_no_data()
+ {
+ return array(
+ 'no' => array(
+ 0
+ ),
+ 'reset' => array(
+ 1
+ ),
+ );
+ }
+ public function image_on_image_page_data()
+ {
+ return array(
+ 'image' => array(
+ 'image',
+ true,
+ 'app.php/gallery/image/2/source'
+ ),
+ 'none' => array(
+ 'none',
+ false,
+ false
+ ),
+ 'next' => array(
+ 'next',
+ true,
+ 'app.php/gallery/image/1'
+ ),
+ );
+ }
+ public function thumbnail_link_data()
+ {
+ return array(
+ 'image' => array(
+ 'image',
+ true,
+ 'app.php/gallery/image/1/source'
+ ),
+ 'none' => array(
+ 'none',
+ false,
+ false
+ ),
+ 'image_page' => array(
+ 'image_page',
+ true,
+ 'app.php/gallery/image/1'
+ ),
+ );
+ }
+ // START BASIC GALLERY SETTINGS TESTS
+ /**
+ * @dataProvider pagination_data
+ */
+ public function test_items_per_page_paginate($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[items_per_page]' => $option,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ if ($option == 1)
+ {
+ $this->assertEquals(1, $crawler->filter('div.polaroid')->count());
+ }
+ else
+ {
+ $this->assertEquals(4, $crawler->filter('div.polaroid')->count());
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_allow_comment_option($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => $option,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ if ($option == 1)
+ {
+ $this->assertContains($this->lang('POST_COMMENT'), $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContains($this->lang('POST_COMMENT'), $crawler->text());
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_comment_user_control_option($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[comment_user_control]' => $option,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-settings_module&mode=manage&sid' . $this->sid);
+ if ($option == 1)
+ {
+ $this->assertContains($this->lang('USER_ALLOW_COMMENTS'), $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContains($this->lang('USER_ALLOW_COMMENTS'), $crawler->text());
+ }
+ $this->logout();
+ $this->logout();
+ }
+ public function test_anon_comment()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ $this->assertContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/comment/1/add/0');
+ $this->assertContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
+ }
+ public function test_comment_user()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang('common');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $form = $crawler->selectButton('submit')->form();
+ $form['message'] = 'Test comment that should be seen';
+
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('COMMENT_STORED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ $this->assertContains('Test comment that should be seen', $crawler->text());
+
+ $this->logout();
+ }
+ public function test_quote_comment()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang('common');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $url = $crawler->filter('a:contains("Quote comment")')->attr('href');
+
+ $crawler = self::request('GET', substr($url, 1));
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('COMMENT_STORED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $this->assertEquals(2, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
+ $this->assertEquals(1, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
+ $this->logout();
+ }
+ public function test_no_comment()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ $this->assertEquals(0, $crawler->filter('a:contains("Edit comment")')->count());
+ $this->assertEquals(0, $crawler->filter('a:contains("Delete comment")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/comment/1/edit/1');
+ $this->assertContainsLang('USERNAME', $crawler->filter('html')->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/comment/1/delete/1');
+ $this->assertContainsLang('USERNAME', $crawler->filter('html')->text());
+ }
+ public function test_edit_comment()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $url = $crawler->filter('a:contains("Edit comment")')->eq(1)->attr('href');
+
+ $crawler = self::request('GET', substr($url, 1));
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['message'] = 'Test comment that should be edited';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('COMMENT_STORED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
+ $this->assertEquals(0, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
+ $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be edited")')->count());
+ $this->logout();
+ }
+ /*public function test_delete_comment()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $url = $crawler->filter('a:contains("Delete comment")')->eq(1)->attr('href');
+
+ $crawler = self::request('GET', substr($url, 1));
+
+ $form = $crawler->selectButton('confirm')->form();
+
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('DELETED_COMMENT', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $this->assertEquals(1, $crawler->filter('div.content:contains("Test comment that should be seen")')->count());
+ $this->assertEquals(0, $crawler->filter('div.content:contains("testuser1 wrote:")')->count());
+ $this->assertEquals(0, $crawler->filter('div.content:contains("Test comment that should be edited")')->count());
+ $this->logout();
+ }*/
+ public function test_comment_to_many_symbols_user()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_comments]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[comment_length]' => 1,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ // Test
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $form = $crawler->selectButton('submit')->form();
+ $form['message'] = 'Test comment that should be seen';
+
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('COMMENT_TOO_LONG', $crawler->text());
+
+ $this->logout();
+
+ // Reset
+ $this->login();
+ $this->admin_login();
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[comment_length]' => 2000,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ }
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_allow_rates($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_rates]' => $option,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // test
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ if ($option == 1)
+ {
+ $this->assertContains($this->lang('RATING'), $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContains($this->lang('RATING'), $crawler->text());
+ }
+ $this->logout();
+ }
+ public function test_max_rating()
+ {
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $this->assertEquals(11, $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->filter('option')->count());
+ $this->logout();
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_rating]' => 20,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // test
+ $this->logout();
+ $this->logout();
+
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $this->assertEquals(21, $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->filter('option')->count());
+ $this->logout();
+
+ $this->login();
+ $this->admin_login();
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_rating]' => 10,
+ ));
+
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // test
+ $this->logout();
+ $this->logout();
+ }
+ public function test_rate()
+ {
+ $this->login('testuser1');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+
+ $form = $crawler->filter('select:contains("'.$this->lang('DONT_RATE_IMAGE').'")')->parents()->parents()->parents()->form();
+ $form['rating'] = 5;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('RATING_SUCCESSFUL', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+ $this->assertContains('rating, your rating:', $crawler->text());
+ $this->logout();
+ }
+ // END BASIC GALLERY SETTINGS TESTS
+
+ // START ALBUM SETTINGS TESTS
+ public function image_polaroid_info_data()
+ {
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+ return array(
+ 'none' => array(
+ array(0),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_album' => array(
+ array(1),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_comments' => array(
+ array(2),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_name' => array(
+ array(4),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_date' => array(
+ array(8),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_views' => array(
+ array(16),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_user' => array(
+ array(32),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_rating' => array(
+ array(64),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => false,
+ ),
+ ),
+ 'only_ip' => array(
+ array(128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_and_ip' => array(
+ array(1, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_and_ip' => array(
+ array(2, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'name_and_ip' => array(
+ array(4, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'date_and_iip' => array(
+ array(8, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'image_views_and_ip' => array(
+ array(16, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'user_and_ip' => array(
+ array(32, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => false,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'rating_and_ip' => array(
+ array(64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_rating_and_ip' => array(
+ array(1, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_rating_and_ip' => array(
+ array(2, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'name_rating_and_ip' => array(
+ array(4, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'date_rating_and_ip' => array(
+ array(8, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'image_views_rating_and_ip' => array(
+ array(16, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => false,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'user_rating_and_ip' => array(
+ array(32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_user_rating_and_ip' => array(
+ array(1, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_user_rating_and_ip' => array(
+ array(2, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'name_user_rating_and_ip' => array(
+ array(4, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'date_user_rating_and_ip' => array(
+ array(8, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => false,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'image_vews_user_rating_and_ip' => array(
+ array(16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_image_vews_user_rating_and_ip' => array(
+ array(1, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_image_vews_user_rating_and_ip' => array(
+ array(2, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'name_image_vews_user_rating_and_ip' => array(
+ array(4, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => false,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'date_image_vews_user_rating_and_ip' => array(
+ array(8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_date_image_vews_user_rating_and_ip' => array(
+ array(1, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_date_image_vews_user_rating_and_ip' => array(
+ array(2, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => false,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'name_date_image_vews_user_rating_and_ip' => array(
+ array(4, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_name_date_image_vews_user_rating_and_ip' => array(
+ array(1, 4, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => false,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'comments_name_date_image_vews_user_rating_and_ip' => array(
+ array(2, 4, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'album_comments_name_date_image_vews_user_rating_and_ip' => array(
+ array(1, 2, 4, 8, 16, 32, 64, 128),
+ array(
+ $this->lang('ALBUM') => true,
+ $this->lang('COMMENT') => true,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ 'reset' => array(
+ array(2,4,8,16,32,64,128),
+ array(
+ $this->lang('ALBUM') => false,
+ $this->lang('COMMENT') => true,
+ 'Valid' => true,
+ $this->lang('UPLOADED_ON_DATE') => true,
+ $this->lang('IMAGE_VIEWS') => true,
+ $this->lang('UPLOADED_BY_USER') => true,
+ $this->lang('RATING') => true,
+ $this->lang('IP') => true,
+ ),
+ ),
+ );
+ }
+ /**
+ * @dataProvider image_polaroid_info_data
+ */
+ public function test_album_display($options, $tests)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'album_display' => $options,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $object = $crawler->filter('div.polaroid')->eq(2);
+
+ foreach ($tests as $test => $state)
+ {
+ if ($state)
+ {
+ $this->assertContains($test, $object->text());
+ }
+ else
+ {
+ $this->assertNotContains($test, $object->text());
+ }
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+
+ public function sort_key_data()
+ {
+ return array(
+ 'time_desc' => array(
+ 't',
+ 'd',
+ 'Image in sublabum to move',
+ 'Valid but needs delete',
+ 'Valid',
+ ),
+ 'time_asc' => array(
+ 't',
+ 'a',
+ 'Valid',
+ 'Valid but needs approve',
+ 'Valid but needs delete',
+ ),
+ 'name_desc' => array(
+ 'n',
+ 'd',
+ 'Valid but needs delete',
+ 'Valid',
+ 'Valid',
+ ),
+ 'name_asc' => array(
+ 'n',
+ 'a',
+ 'Image in sublabum to move',
+ 'Valid',
+ 'Valid but needs approve',
+ ),
+ 'view_count_desc' => array(
+ 'vc',
+ 'd',
+ 'Valid',
+ 'Valid but needs approve',
+ 'Valid but needs delete',
+ ),
+ 'view_count_asc' => array(
+ 'vc',
+ 'a',
+ 'Image in sublabum to move',
+ 'Valid but needs delete',
+ 'Valid',
+ ),
+ 'username_desc' => array(
+ 'u',
+ 'd',
+ 'Valid but needs delete',
+ 'Valid but needs approve',
+ 'Image in sublabum to move',
+ ),
+ 'username_asc' => array(
+ 'u',
+ 'a',
+ 'Valid',
+ 'Image in sublabum to move',
+ 'Valid but needs approve',
+ ),
+ /*'rating_asc' => array(
+ 'ra',
+ 'a',
+ 'Image sublabum to move',
+ 'Valid but needs delete',
+ 'Valid',
+ ),*/
+ 'rating_desc' => array(
+ 'ra',
+ 'd',
+ 'Valid',
+ 'Valid but needs approve',
+ 'Valid but needs delete',
+ ),
+ /*'rating_count_asc' => array(
+ 'r',
+ 'a',
+ 'Image in sublabum to move',
+ 'Image in sublabum to move',
+ 'Valid',
+ ),*/
+ 'rating_count_desc' => array(
+ 'r',
+ 'd',
+ 'Valid',
+ 'Valid but needs approve',
+ 'Valid but needs delete',
+ ),
+ /*'comment_asc' => array(
+ 'c',
+ 'a',
+ 'Valid but needs approve',
+ 'Image in sublabum to move',
+ 'Valid',
+ ),
+ 'comment_desc' => array(
+ 'c',
+ 'd',
+ 'Valid',
+ 'Image in sublabum to move',
+ 'Valid but needs approve',
+ ),
+ 'last_comment_asc' => array(
+ 'lc',
+ 'a',
+ 'Valid but needs approve',
+ 'Image in sublabum to move',
+ 'Valid',
+ ),
+ 'last_comment_desc' => array(
+ 'lc',
+ 'd',
+ 'Valid',
+ 'Image in sublabum to move',
+ 'Valid but needs approve',
+ ),*/
+ 'reset' => array(
+ 't',
+ 'd',
+ 'Image in sublabum to move',
+ 'Valid but needs delete',
+ 'Valid',
+ ),
+ );
+ }
+ /**
+ * @dataProvider sort_key_data
+ */
+ public function test_default_sort_key($sort_key, $sort_dir, $first, $second, $third)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[default_sort_key]' => $sort_key,
+ 'config[default_sort_dir]' => $sort_dir,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $this->assertContains($first, $crawler->filter('div.polaroid')->eq(0)->text());
+ $this->assertContains($second, $crawler->filter('div.polaroid')->eq(1)->text());
+ $this->assertContains($third, $crawler->filter('div.polaroid')->eq(2)->text());
+
+ $url = $crawler->filter('div.polaroid')->eq(1)->filter('p')->filter('a')->attr('href');
+ $crawler = self::request('GET', substr($url,1));
+
+ $this->assertContains($first, $crawler->filter('div.image_prev_image')->text());
+ $this->assertContains($third, $crawler->filter('div.image_next_image')->text());
+
+ $this->logout();
+ $this->logout();
+
+ }
+ /*public function test_album_images()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[album_images]' => 3,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertContains('This album has reached the quota of images. You cannot upload images anymore.', $crawler->text());
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[album_images]' => 2500,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_mini_thumbnail_disp($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[mini_thumbnail_disp]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery');
+ $this->assertEquals($option, $crawler->filter('div.polaroid')->eq(0)->filter('img')->count());
+ $this->logout();
+ $this->logout();
+
+ }
+ // END ALBUM SETTINGS TESTS
+
+ // START SEARCH SETTINGS
+ /**
+ * @dataProvider image_polaroid_info_data
+ */
+ public function test_search_display($options, $tests)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'search_display' => $options,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/search');
+ $form = $crawler->selectButton('submit')->form();
+ $form['keywords'] = 'valid';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('SEARCH', $crawler->text());
+
+ $object = $crawler->filter('div.polaroid')->eq(0);
+ foreach ($tests as $test => $state)
+ {
+ if ($state)
+ {
+ $this->assertContains($test, $object->text());
+ }
+ else
+ {
+ $this->assertNotContains($test, $object->text());
+ }
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+ // END SEARCH SETTINGS
+
+ // START IMAGE SETTINGS
+ public function test_num_uploads()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[num_uploads]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+
+ $this->assertEquals(1, $crawler->filter('input#files')->count());
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[num_uploads]' => 10,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $this->assertEquals(1, $crawler->filter('input#files')->count());
+ $this->logout();
+ $this->logout();
+ }
+ public function test_max_filesize()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_filesize]' => 100,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $this->assertContains($this->lang('BAD_UPLOAD_FILE_SIZE'), $crawler->filter('p.error')->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_filesize]' => 512000,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+ }
+ public function test_max_size_allow_resize()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_width]' => 150,
+ 'config[max_height]' => 150,
+ 'config[allow_resize]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'This should be resized',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('app.php/gallery/album/1', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+ $url = $crawler->filter('a:contains("This should be resized")')->attr('href');
+ $image_array = getimagesize('http://localhost' . $url . '/source');
+
+ $this->assertEquals(150, $image_array[0]);
+ $this->assertEquals(100, $image_array[1]);
+
+ $this->logout();
+ $this->logout();
+ }
+ /*public function test_max_size_dont_allow_resize()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_width]' => 100,
+ 'config[max_height]' => 100,
+ 'config[allow_resize]' => 0,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('UPLOAD_IMAGE_SIZE_TOO_BIG'), $crawler->filter('p.error')->text());
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[max_width]' => 4096,
+ 'config[max_height]' => 2048,
+ 'config[allow_resize]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_rotate($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_rotate]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Rotate test',
+ );
+ if ($option == 1)
+ {
+ $form['rotate'] = array(
+ 0 => '270',
+ );
+ }
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('app.php/gallery/album/1', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+ $url = $crawler->filter('a:contains("Rotate test")')->eq(0)->attr('href');
+ $image_array = getimagesize('http://localhost' . $url . '/source');
+ if ($option == 1)
+ {
+ $this->assertEquals(300, $image_array[0]);
+ $this->assertEquals(450, $image_array[1]);
+ }
+ else
+ {
+ $this->assertEquals(450, $image_array[0]);
+ $this->assertEquals(300, $image_array[1]);
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+
+ public function test_medium_size()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[medium_width]' => 150,
+ 'config[medium_height]' => 150,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'medium',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('app.php/gallery/album/1', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+ $url = $crawler->filter('a:contains("medium")')->attr('href');
+ $crawler = self::request('GET', substr($url, 1));
+ //$this->assertContains('zazaza', $crawler->text());
+ // TODO - Reanable resize test
+ //$image_array = getimagesize('http://localhost' . $url . '/medium');
+
+ //$this->assertEquals(150, $image_array[0]);
+ //$this->assertEquals(100, $image_array[1]);
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[medium_width]' => 600,
+ 'config[medium_height]' => 800,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_gif($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_gif]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.gif');
+ $crawler = self::submit($form);
+ if ($option == 1)
+ {
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Test Gif image',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ }
+ else
+ {
+ $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
+ }
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_jpg($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_jpg]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ if ($option == 1)
+ {
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Test jpg image',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ }
+ else
+ {
+ $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
+ }
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_png($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_png]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.png');
+ $crawler = self::submit($form);
+ if ($option == 1)
+ {
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Test png image',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ }
+ else
+ {
+ $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
+ }
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_webp($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_webp]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.webp');
+ $crawler = self::submit($form);
+ if ($option == 1)
+ {
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Test webp image',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ }
+ else
+ {
+ $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
+ }
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_allow_zip($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[allow_zip]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.zip');
+ $crawler = self::submit($form);
+ if ($option == 1)
+ {
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Test zip image',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+ }
+ else
+ {
+ $this->assertContains($this->lang('DISALLOWED_EXTENSION'), $crawler->filter('p.error')->text());
+ }
+ $this->logout();
+ $this->logout();
+ }*/
+ /*public function test_description_length()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[description_length]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['message'] = array(
+ 0 => 'medium',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContains($this->lang('DESC_TOO_LONG'), $crawler->text());
+
+ $crawler = self::request('GET', 'app.php/gallery/image/1/edit');
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['message'] = array(
+ 0 => 'medium',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContains($this->lang('DESC_TOO_LONG'), $crawler->text());
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[description_length]' => 2000,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['message'] = array(
+ 0 => 'medium',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_disp_nextprev_thumbnail($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[disp_nextprev_thumbnail]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/image/2');
+
+ if ($option == 1)
+ {
+ $this->assertEquals(1, $crawler->filter('div.image_prev_image')->filter('img')->count());
+ $this->assertEquals(1, $crawler->filter('div.image_prev_image')->filter('img')->count());
+ }
+ else
+ {
+ $this->assertEquals(0, $crawler->filter('div.image_prev_image')->filter('img')->count());
+ $this->assertEquals(0, $crawler->filter('div.image_prev_image')->filter('img')->count());
+ }
+ $this->logout();
+ $this->logout();
+ }
+ /**
+ * @dataProvider yes_no_data
+ */
+ public function test_disp_image_url($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[disp_image_url]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/image/2');
+
+ if ($option == 1)
+ {
+ $this->assertContains($this->lang('IMAGE_URL'), $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContains($this->lang('IMAGE_URL'), $crawler->text());
+ }
+
+ $this->logout();
+ $this->logout();
+ }
+ // END IMAGE SETTINGS
+
+ // BEGIN THUMBNAIL SETTINGS
+ /*public function test_thumbnail_size()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[thumbnail_width]' => 15,
+ 'config[thumbnail_height]' => 15,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'mini',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ //$this->assertContains('app.php/gallery/album/1', $meta);
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ //$this->assertContains('zazazazaza', $crawler->text());
+ $url = $crawler->filter('div.polaroid')->eq(0)->filter('a')->eq(0)->attr('href');
+
+ // TODO - Reanable resize tests
+
+ //$image_array = getimagesize('http://localhost' . $url . '/mini');
+
+ //$this->assertEquals(15, $image_array[0]);
+ //$this->assertEquals(10, $image_array[1]);
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[thumbnail_width]' => 240,
+ 'config[thumbnail_height]' => 160,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }*/
+ // END THUMBNAIL SETTINGS
+
+ // START IMAGE SETTINGS
+ /**
+ * @dataProvider image_on_image_page_data
+ */
+ public function test_image_on_image_page($option, $has_link, $search)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[link_imagepage]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test image
+ $crawler = self::request('GET', 'app.php/gallery/image/2');
+ if ($has_link)
+ {
+ $link = $crawler->filter('div#image')->filter('a')->attr('href');
+ $this->assertContains($search, $link);
+ }
+ else
+ {
+ $this->assertEquals(0, $crawler->filter('div#image')->filter('a')->count());
+ $this->assertEquals(1, $crawler->filter('div#image')->filter('img')->count());
+ }
+ $this->logout();
+ }
+ // END LINK SETTINGS
+
+ // START RRC GINDEX TESTS
+ public function rrc_gidex_data()
+ {
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang('common');
+ return array(
+ 'none' => array(
+ array(0),
+ array(
+ $this->lang('RANDOM_IMAGES') => false,
+ $this->lang('RECENT_IMAGES') => false,
+ $this->lang('SEARCH_RECENT_COMMENTS') => false,
+ ),
+ ),
+ 'recent' => array(
+ array(1),
+ array(
+ $this->lang('RECENT_IMAGES') => true,
+ $this->lang('RANDOM_IMAGES') => false,
+ $this->lang('SEARCH_RECENT_COMMENTS') => false,
+ ),
+ ),
+ 'random' => array(
+ array(2),
+ array(
+ $this->lang('RECENT_IMAGES') => false,
+ $this->lang('RANDOM_IMAGES') => true,
+ $this->lang('SEARCH_RECENT_COMMENTS') => false,
+ ),
+ ),
+ 'comments' => array(
+ array(4),
+ array(
+ $this->lang('RECENT_IMAGES') => false,
+ $this->lang('RANDOM_IMAGES') => false,
+ $this->lang('SEARCH_RECENT_COMMENTS') => true,
+ ),
+ ),
+ 'random_comments' => array(
+ array(1, 4),
+ array(
+ $this->lang('RECENT_IMAGES') => true,
+ $this->lang('RANDOM_IMAGES') => false,
+ $this->lang('SEARCH_RECENT_COMMENTS') => true,
+ ),
+ ),
+ 'recent_comments' => array(
+ array(2, 4),
+ array(
+ $this->lang('RECENT_IMAGES') => false,
+ $this->lang('RANDOM_IMAGES') => true,
+ $this->lang('SEARCH_RECENT_COMMENTS') => true,
+ ),
+ ),
+ 'random_recent' => array(
+ array(1, 2),
+ array(
+ $this->lang('RECENT_IMAGES') => true,
+ $this->lang('RANDOM_IMAGES') => true,
+ $this->lang('SEARCH_RECENT_COMMENTS') => false,
+ ),
+ ),
+ 'all' => array(
+ array(1, 2, 4),
+ array(
+ $this->lang('RECENT_IMAGES') => true,
+ $this->lang('RANDOM_IMAGES') => true,
+ $this->lang('SEARCH_RECENT_COMMENTS') => true,
+ ),
+ ),
+ );
+ }
+ /**
+ * @dataProvider rrc_gidex_data
+ */
+ public function test_rrc_gindex_mode($options, $tests)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'rrc_gindex_mode' => $options,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery');
+ foreach($tests as $test => $response)
+ {
+ if ($response)
+ {
+ $this->assertContains($test, $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContains($test, $crawler->text());
+ }
+ }
+ $this->logout();
+ $this->logout();
+ }
+ /**
+ * @dataProvider yes_no_data
+ */
+/* public function test_rrc_gindex_comments($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[rrc_gindex_comments]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+ $crawler = self::request('GET', 'app.php/gallery');
+ if ($option == 1)
+ {
+ $this->assertNotContains('display: none;', $crawler->filter('div#recent-comments')->attr('style'));
+ }
+ else
+ {
+ $this->assertContains('display: none;', $crawler->filter('div#recent-comments')->attr('style'));
+ }
+ }*/
+ /*public function test_prepare_rrc_gindex_pegas()
+ {
+ $this->login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('ucp');
+
+ $crawler = self::request('GET', 'ucp.php?i=-phpbbgallery-core-ucp-main_module&mode=manage_albums&sid=' . $this->sid);
+
+ $upload_url = substr($crawler->filter('a:contains("' . $this->lang('UPLOAD_IMAGE') . '")')->attr('href'), 1);
+
+ $crawler = self::request('GET', $upload_url);
+ $form = $crawler->selectButton($this->lang('CONTINUE'))->form();
+ $form['files'] = array(__DIR__ . '/images/valid.jpg');
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton($this->lang['SUBMIT'])->form();
+ $form['image_name'] = array(
+ 0 => 'Image in Personal album',
+ );
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ALBUM_UPLOAD_SUCCESSFUL', $crawler->text());
+
+ //$crawler = self::request('GET', 'app.php/gallery/album/1');
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 1));
+
+ $this->assertContains('Image in Personal album', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }*/
+ /**
+ * @dataProvider yes_no_data
+ */
+ /*public function test_rrc_gindex_pegas($option)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[rrc_gindex_pegas]' => $option,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ //Test
+
+ if ($option == 1)
+ {
+ $crawler = self::request('GET', 'app.php/gallery/search/recent');
+ $this->assertContains('Image in Personal album', $crawler->text());
+ $crawler = self::request('GET', 'app.php/gallery/search/random');
+ $this->assertContains('Image in Personal album', $crawler->text());
+ }
+ else
+ {
+ $crawler = self::request('GET', 'app.php/gallery/search/recent');
+ $this->assertNotContains('Image in Personal album', $crawler->text());
+ $crawler = self::request('GET', 'app.php/gallery/search/random');
+ $this->assertNotContains('Image in Personal album', $crawler->text());
+ }
+ $this->logout();
+ $this->logout();
+ }
+ // END RRC GINDEX TESTS*/
+
+ // START PHPBB INTEGRATION
+ // profile_pega test is in charlie
+ public function test_rrc_profile_items()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang('common');
+
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[rrc_profile_items]' => 1,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ // Test
+
+ $crawler = self::request('GET', 'memberlist.php?mode=viewprofile&u=2&sid=' . $this->sid);
+
+ $this->assertEquals(2, $crawler->filter('div.polaroid')->count());
+
+ // Revert
+ // Change option
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'config[rrc_profile_items]' => 4,
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('GALLERY_CONFIG_UPDATED', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ // END PHPBB INTEGRATION
}
\ No newline at end of file
diff --git a/tests/functional/phpbbgallery_charlie_test.php b/ext/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
similarity index 96%
rename from tests/functional/phpbbgallery_charlie_test.php
rename to ext/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
index d993ba73..c003551d 100644
--- a/tests/functional/phpbbgallery_charlie_test.php
+++ b/ext/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
@@ -1,46 +1,46 @@
-add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
- $this->add_lang('ucp');
-
- $this->login();
- $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'pf_phpbb_location' => 'test',
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('PROFILE_UPDATED', $crawler->text());
- $this->logout();
-
- //testuser1
- $this->login('testuser1');
- $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
- $form = $crawler->selectButton('submit')->form();
- $form->setValues(array(
- 'pf_phpbb_location' => 'test',
- ));
- $crawler = self::submit($form);
- // Should be updated
- $this->assertContainsLang('PROFILE_UPDATED', $crawler->text());
- $this->logout();
- }
+add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_ucp');
+ $this->add_lang('ucp');
+
+ $this->login();
+ $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'pf_phpbb_location' => 'test',
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('PROFILE_UPDATED', $crawler->text());
+ $this->logout();
+
+ //testuser1
+ $this->login('testuser1');
+ $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info&sid=' . $this->sid);
+ $form = $crawler->selectButton('submit')->form();
+ $form->setValues(array(
+ 'pf_phpbb_location' => 'test',
+ ));
+ $crawler = self::submit($form);
+ // Should be updated
+ $this->assertContainsLang('PROFILE_UPDATED', $crawler->text());
+ $this->logout();
+ }
}
\ No newline at end of file
diff --git a/tests/functional/phpbbgallery_delta_test.php b/ext/phpbbgallery/tests/functional/phpbbgallery_delta_test.php
similarity index 97%
rename from tests/functional/phpbbgallery_delta_test.php
rename to ext/phpbbgallery/tests/functional/phpbbgallery_delta_test.php
index 9eb19af6..0668955b 100644
--- a/tests/functional/phpbbgallery_delta_test.php
+++ b/ext/phpbbgallery/tests/functional/phpbbgallery_delta_test.php
@@ -1,286 +1,286 @@
-assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_no_change.jpg'));
- $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_change_uploader.jpg'));
- $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_change_image_name.jpg'));
- $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_personal_existing.jpg'));
- $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_personal_non_existing.jpg'));
- }
-/* public function test_acp_import_no_change()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
- $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['images'] = array('copy_to_public_no_change.jpg');
- $form['album_id'] = $album_id;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('adm', $meta);
-
- $url = $this->get_url_from_meta($meta);
- var_dump(substr($url, 17));
- $crawler = self::request('GET', substr($url, 17));
-
- $this->assertContains('images successful imported', $crawler->text());
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
-
- $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_no_change.jpg")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $this->assertContains('copy to public no change', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- }
- public function test_acp_import_change_uploader()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
- $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['images'] = array('copy_to_public_change_uploader.jpg');
- $form['album_id'] = $album_id;
- $form['username'] = 'testuser1';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('adm', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 17));
-
- $this->assertContains('images successful imported', $crawler->text());
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
-
- $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_change_uploader.jpg")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
- $this->assertContains('copy to public change uploader', $crawler->text());
- $this->assertContains('testuser1', $crawler->filter('div:contains("copy to public change uploader")')->text());
-
- $this->logout();
- $this->logout();
- }
- public function test_acp_import_change_image_name()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
- $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['images'] = array('copy_to_public_change_image_name.jpg');
- $form['album_id'] = $album_id;
- $form['image_name'] = 'Test image change';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('adm', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 17));
-
- $this->assertContains('images successful imported', $crawler->text());
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
-
- $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_change_image_name.jpg")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/album/1');
-
- $this->assertContains('Test image change', $crawler->text());
-
- $this->logout();
- $this->logout();
-
- }
- public function test_acp_import_add_to_user_gallery_existing()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
- //$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['images'] = array('copy_to_personal_existing.jpg');
- $form['users_pega'] = 1;
- $crawler = self::submit($form);
-
- $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('adm', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 17));
-
- $this->assertContains('images successful imported', $crawler->text());
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
-
- $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_personal_existing.jpg")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/users');
- $url = $crawler->filter('div.polaroid')->filter('a:contains("admin")')->attr('href');
- $crawler = self::request('GET', substr($url, 1));
- $this->assertContains('copy to personal existing', $crawler->text());
-
- $this->logout();
- $this->logout();
- }
- public function test_acp_import_add_to_user_gallery_not_existing()
- {
- $this->login();
- $this->admin_login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
- //$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
- $form = $crawler->selectButton('submit')->form();
- $form['images'] = array('copy_to_personal_non_existing.jpg');
- $form['users_pega'] = 1;
- $form['username'] = 'testuser1';
- $crawler = self::submit($form);
-
- $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
-
- $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
- $this->assertContains('adm', $meta);
-
- $url = $this->get_url_from_meta($meta);
- $crawler = self::request('GET', substr($url, 17));
-
- $this->assertContains('images successful imported', $crawler->text());
-
-
- $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
-
- $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_personal_non_existing.jpg")')->count());
-
- $crawler = self::request('GET', 'app.php/gallery/users');
- $url = $crawler->filter('div.polaroid')->filter('a:contains("testuser1")')->attr('href');
- $crawler = self::request('GET', substr($url, 1));
- $this->assertContains('copy to personal non existing', $crawler->text());
-
- $this->logout();
- $this->logout();
- }*/
- public function exif_data()
- {
- return array(
- 'upload_yes' => array(
- 'first',
- 1
- ),
- 'upload_no' => array(
- 'first',
- 0
- ),
- /*'import_yes' => array(
- 'last',
- 1
- ),
- 'import_no' => array(
- 'last',
- 0
- ),*/
- 'reset' => array(
- 'first',
- 1
- ),
- );
- }
- /**
- * @dataProvider exif_data
- */
- public function test_exif($image, $state)
- {
- $this->login();
-
- $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
- $this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/exif', 'exif');
-
- $this->set_option('disp_exifdata', $state);
- if ($image == 'first')
- {
- $crawler = self::request('GET', 'app.php/gallery/image/1');
- }
- else
- {
- $crawler = self::request('GET', 'app.php/gallery/users');
- $url = $crawler->filter('div.polaroid')->filter('a:contains("testuser1")')->attr('href');
- $crawler = self::request('GET', substr($url, 1));
- $url = $crawler->filter('a:contains("copy to personal non existing")')->attr('href');
- $crawler = self::request('GET', substr($url, 1));
- }
-
- if ($state == 1)
- {
- $this->assertContainsLang('EXIF_DATA', $crawler->text());
- $this->assertContainsLang('EXIF_CAM_MODEL', $crawler->text());
- }
- else
- {
- $this->assertNotContainsLang('EXIF_DATA', $crawler->text());
- $this->assertNotContainsLang('EXIF_CAM_MODEL', $crawler->text());
- }
- }
+assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_no_change.jpg'));
+ $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_change_uploader.jpg'));
+ $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_public_change_image_name.jpg'));
+ $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_personal_existing.jpg'));
+ $this->assertEquals(1, copy(__DIR__ . '/images/valid.jpg', __DIR__ . '/../../../../files/phpbbgallery/import/copy_to_personal_non_existing.jpg'));
+ }
+/* public function test_acp_import_no_change()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+ $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['images'] = array('copy_to_public_no_change.jpg');
+ $form['album_id'] = $album_id;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('adm', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ var_dump(substr($url, 17));
+ $crawler = self::request('GET', substr($url, 17));
+
+ $this->assertContains('images successful imported', $crawler->text());
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+
+ $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_no_change.jpg")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $this->assertContains('copy to public no change', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ }
+ public function test_acp_import_change_uploader()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+ $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['images'] = array('copy_to_public_change_uploader.jpg');
+ $form['album_id'] = $album_id;
+ $form['username'] = 'testuser1';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('adm', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 17));
+
+ $this->assertContains('images successful imported', $crawler->text());
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+
+ $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_change_uploader.jpg")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+ $this->assertContains('copy to public change uploader', $crawler->text());
+ $this->assertContains('testuser1', $crawler->filter('div:contains("copy to public change uploader")')->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_acp_import_change_image_name()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+ $album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['images'] = array('copy_to_public_change_image_name.jpg');
+ $form['album_id'] = $album_id;
+ $form['image_name'] = 'Test image change';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('adm', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 17));
+
+ $this->assertContains('images successful imported', $crawler->text());
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+
+ $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_public_change_image_name.jpg")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/album/1');
+
+ $this->assertContains('Test image change', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+
+ }
+ public function test_acp_import_add_to_user_gallery_existing()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+ //$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['images'] = array('copy_to_personal_existing.jpg');
+ $form['users_pega'] = 1;
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('adm', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 17));
+
+ $this->assertContains('images successful imported', $crawler->text());
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+
+ $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_personal_existing.jpg")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/users');
+ $url = $crawler->filter('div.polaroid')->filter('a:contains("admin")')->attr('href');
+ $crawler = self::request('GET', substr($url, 1));
+ $this->assertContains('copy to personal existing', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }
+ public function test_acp_import_add_to_user_gallery_not_existing()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+ //$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
+ $form = $crawler->selectButton('submit')->form();
+ $form['images'] = array('copy_to_personal_non_existing.jpg');
+ $form['users_pega'] = 1;
+ $form['username'] = 'testuser1';
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('IMPORT_SCHEMA_CREATED', $crawler->text());
+
+ $meta = $crawler->filter('meta[http-equiv="refresh"]')->attr('content');
+ $this->assertContains('adm', $meta);
+
+ $url = $this->get_url_from_meta($meta);
+ $crawler = self::request('GET', substr($url, 17));
+
+ $this->assertContains('images successful imported', $crawler->text());
+
+
+ $crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
+
+ $this->assertEquals(0, $album_id = $crawler->filter('option:contains("copy_to_personal_non_existing.jpg")')->count());
+
+ $crawler = self::request('GET', 'app.php/gallery/users');
+ $url = $crawler->filter('div.polaroid')->filter('a:contains("testuser1")')->attr('href');
+ $crawler = self::request('GET', substr($url, 1));
+ $this->assertContains('copy to personal non existing', $crawler->text());
+
+ $this->logout();
+ $this->logout();
+ }*/
+ public function exif_data()
+ {
+ return array(
+ 'upload_yes' => array(
+ 'first',
+ 1
+ ),
+ 'upload_no' => array(
+ 'first',
+ 0
+ ),
+ /*'import_yes' => array(
+ 'last',
+ 1
+ ),
+ 'import_no' => array(
+ 'last',
+ 0
+ ),*/
+ 'reset' => array(
+ 'first',
+ 1
+ ),
+ );
+ }
+ /**
+ * @dataProvider exif_data
+ */
+ public function test_exif($image, $state)
+ {
+ $this->login();
+
+ $this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
+ $this->add_lang_ext('phpbbgallery/core', 'gallery');
+ $this->add_lang_ext('phpbbgallery/exif', 'exif');
+
+ $this->set_option('disp_exifdata', $state);
+ if ($image == 'first')
+ {
+ $crawler = self::request('GET', 'app.php/gallery/image/1');
+ }
+ else
+ {
+ $crawler = self::request('GET', 'app.php/gallery/users');
+ $url = $crawler->filter('div.polaroid')->filter('a:contains("testuser1")')->attr('href');
+ $crawler = self::request('GET', substr($url, 1));
+ $url = $crawler->filter('a:contains("copy to personal non existing")')->attr('href');
+ $crawler = self::request('GET', substr($url, 1));
+ }
+
+ if ($state == 1)
+ {
+ $this->assertContainsLang('EXIF_DATA', $crawler->text());
+ $this->assertContainsLang('EXIF_CAM_MODEL', $crawler->text());
+ }
+ else
+ {
+ $this->assertNotContainsLang('EXIF_DATA', $crawler->text());
+ $this->assertNotContainsLang('EXIF_CAM_MODEL', $crawler->text());
+ }
+ }
}
\ No newline at end of file
From 730e484285a19a6953b8818edf81820450b233a9 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:17:49 +0100
Subject: [PATCH 030/138] Fix typos
---
.github/workflows/tests.yml | 2 +-
.travis.yml | 2 +-
travis/{prepare-covarage.sh => prepare-coverage.sh} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename travis/{prepare-covarage.sh => prepare-coverage.sh} (100%)
mode change 100755 => 100644
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 603a3bfa..8dc7134e 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -256,7 +256,7 @@ jobs:
if: matrix.php == '7.3'
env:
DB: ${{steps.database-type.outputs.db}}
- run: sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/core\/language\/<\/directory>\n\t\t\t\t..\/core\/migrations\/<\/directory>\n\t\t\t\t..\/acpcleanup\/migrations\/<\/directory>\n\t\t\t\t..\/acpcleanup\/language\/<\/directory>\n\t\t\t\t..\/acpimport\/migrations\/<\/directory>\n\t\t\t\t..\/acpimport\/language\/<\/directory>\n\t\t\t\t..\/exif\/migrations\/<\/directory>\n\t\t\t\t..\/exif\/language\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml &> phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak; cp phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml
+ run: sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/core\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/core\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpcleanup\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpcleanup\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpimport\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpimport\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/exif\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/exif\/language\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml &> phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak; cp phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml
working-directory: ./phpBB3
- name: Run unit tests for 7.3 with clover
diff --git a/.travis.yml b/.travis.yml
index aa95c49b..d19082f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,7 +58,7 @@ install:
- sh -c "if [ '$COVER' != '0' ]; then sed -i '/phpenv/d' travis/setup-php-extensions.sh; fi"
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
- - sh -c "if [ '$COVERAGE' != '0' ] && [ '$COVER' != '0' ]; then phpBB/ext/$EXTNAME/travis/prepare-covarage.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi"
+ - sh -c "if [ '$COVERAGE' != '0' ] && [ '$COVER' != '0' ]; then phpBB/ext/$EXTNAME/travis/prepare-coverage.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi"
- ../$EXTNAME/travis/prepare-epv.sh $EPV $NOTESTS
before_script:
diff --git a/travis/prepare-covarage.sh b/travis/prepare-coverage.sh
old mode 100755
new mode 100644
similarity index 100%
rename from travis/prepare-covarage.sh
rename to travis/prepare-coverage.sh
From 1be6921351f08be9aff14b11cf738f5c56bcd03e Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:23:57 +0100
Subject: [PATCH 031/138] Fix travis
---
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index d19082f1..1cd8e773 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,9 +50,9 @@ services:
install:
- - cd core
+ - cd ext/phpbbgallery/core
- composer install --dev --no-interaction --prefer-source
- - cd ..
+ - cd ../../..
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../phpBB3
- sh -c "if [ '$COVER' != '0' ]; then sed -i '/phpenv/d' travis/setup-php-extensions.sh; fi"
From 90a9ad39793732902bafd20afcade038faeb6175 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:25:04 +0100
Subject: [PATCH 032/138] Fix tests path
---
phpunit.xml.dist | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index a9176d8c..e0546cea 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -13,11 +13,11 @@
>
- ./tests
- ./tests/functional
+ ./ext/phpbbgallery/tests
+ ./ext/phpbbgallery/tests/functional
- ./tests/functional/
+ ./ext/phpbbgallery/tests/functional/
@@ -33,7 +33,7 @@
./ext/phpbbgallery/exif/migrations/
./ext/phpbbgallery/core/language/
./ext/phpbbgallery/core/migrations/
- ./tests/
+ ./ext/phpbbgallery/tests/
From 9c1c202521e06bd0517821c20ef9b52d566ad61b Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:31:21 +0100
Subject: [PATCH 033/138] Fix path
---
phpunit.xml.dist | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index e0546cea..eb90b2b4 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -23,7 +23,7 @@
- ./
+ ./ext/phpbbgallery
./ext/phpbbgallery/acpcleanup/language/
./ext/phpbbgallery/acpcleanup/migrations/
From b69638ee67c3cd240cdd51a2b4289320bd1d48fb Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:33:39 +0100
Subject: [PATCH 034/138] rollback for further tests
---
.travis.yml | 4 +--
.../acp/main_info.php | 0
.../acp/main_module.php | 0
.../adm/style/gallery_cleanup.html | 0
.../adm/style/index.htm | 0
.../acpcleanup => acpcleanup}/cleanup.php | 0
.../acpcleanup => acpcleanup}/composer.json | 0
.../config/services.yml | 0
.../acpcleanup => acpcleanup}/ext.php | 0
.../language/bg/info_acp_gallery_cleanup.php | 0
.../language/de/info_acp_gallery_cleanup.php | 0
.../language/en/info_acp_gallery_cleanup.php | 0
.../language/fr/info_acp_gallery_cleanup.php | 0
.../language/it/info_acp_gallery_cleanup.php | 0
.../language/ru/info_acp_gallery_cleanup.php | 0
.../acpcleanup => acpcleanup}/license.txt | 0
.../migrations/m1_init.php | 0
.../acpimport => acpimport}/acp/main_info.php | 0
.../acp/main_module.php | 0
.../adm/style/gallery_acpimport.html | 0
.../acpimport => acpimport}/composer.json | 0
.../acpimport => acpimport}/ext.php | 0
.../bg/info_acp_gallery_acpimport.php | 0
.../de/info_acp_gallery_acpimport.php | 0
.../en/info_acp_gallery_acpimport.php | 0
.../fr/info_acp_gallery_acpimport.php | 0
.../it/info_acp_gallery_acpimport.php | 0
.../ru/info_acp_gallery_acpimport.php | 0
.../acpimport => acpimport}/license.txt | 0
.../migrations/m1_init.php | 0
.../core => core}/acp/albums_info.php | 0
.../core => core}/acp/albums_module.php | 0
.../core => core}/acp/config_info.php | 0
.../core => core}/acp/config_module.php | 0
.../core => core}/acp/gallery_logs_info.php | 0
.../core => core}/acp/gallery_logs_module.php | 0
.../core => core}/acp/main_info.php | 0
.../core => core}/acp/main_module.php | 0
.../core => core}/acp/permissions_info.php | 0
.../core => core}/acp/permissions_module.php | 0
{ext/phpbbgallery/core => core}/adm/index.htm | 0
.../adm/style/gallery_albums.html | 0
.../core => core}/adm/style/gallery_logs.html | 0
.../core => core}/adm/style/gallery_main.html | 0
.../adm/style/gallery_permissions.html | 0
.../core => core}/adm/style/index.htm | 0
.../core => core}/album/album.php | 0
.../core => core}/album/display.php | 0
.../core => core}/album/loader.php | 0
.../core => core}/album/manage.php | 0
{ext/phpbbgallery/core => core}/auth/auth.php | 0
.../phpbbgallery/core => core}/auth/level.php | 0
{ext/phpbbgallery/core => core}/auth/set.php | 0
{ext/phpbbgallery/core => core}/block.bkp | 0
{ext/phpbbgallery/core => core}/block.php | 0
{ext/phpbbgallery/core => core}/cache.php | 0
{ext/phpbbgallery/core => core}/comment.php | 0
{ext/phpbbgallery/core => core}/composer.json | 0
{ext/phpbbgallery/core => core}/config.php | 0
.../core => core}/config/routing.yml | 0
.../core => core}/config/services.yml | 0
.../config/services_controller.yml | 0
.../core => core}/config/services_files.yml | 0
.../config/services_notification_types.yml | 0
.../core => core}/config/tables.yml | 0
{ext/phpbbgallery/core => core}/constants.php | 0
{ext/phpbbgallery/core => core}/contest.php | 0
.../core => core}/controller/album.php | 0
.../core => core}/controller/comment.php | 0
.../core => core}/controller/file.php | 0
.../core => core}/controller/image.php | 0
.../core => core}/controller/index.php | 0
.../core => core}/controller/moderate.php | 0
.../core => core}/controller/search.php | 0
.../core => core}/controller/upload.php | 0
.../core => core}/cron/cron_cleaner.php | 0
.../phpbbgallery/core => core}/docs/tables.md | 0
.../core => core}/event/main_listener.php | 0
{ext/phpbbgallery/core => core}/ext.php | 0
{ext/phpbbgallery/core => core}/file/file.php | 0
.../core => core}/file/types/multiform.php | 0
.../core => core}/image/image.php | 0
.../core => core}/images/icon_delete.gif | Bin
.../images/icon_delete_disabled.gif | Bin
.../core => core}/images/icon_down.gif | Bin
.../images/icon_down_disabled.gif | Bin
.../core => core}/images/icon_edit.gif | Bin
.../images/icon_edit_disabled.gif | Bin
.../core => core}/images/icon_up.gif | Bin
.../core => core}/images/icon_up_disabled.gif | Bin
.../core => core}/images/legacy/watermark.png | Bin
.../images/upload/image_not_exist.jpg | Bin
.../core => core}/images/upload/index.htm | 0
.../images/upload/no_hotlinking.jpg | Bin
.../images/upload/not_authorised.jpg | Bin
.../core => core}/images/watermark.png | Bin
.../language/bg/email/newcomment_notify.txt | 0
.../language/bg/email/newimage_notify.txt | 0
.../core => core}/language/bg/gallery.php | 0
.../core => core}/language/bg/gallery_acp.php | 0
.../core => core}/language/bg/gallery_mcp.php | 0
.../language/bg/gallery_notifications.php | 0
.../core => core}/language/bg/gallery_ucp.php | 0
.../language/bg/info_acp_gallery.php | 0
.../language/bg/info_acp_gallery_logs.php | 0
.../language/bg/info_ucp_gallery.php | 0
.../language/bg/install_gallery.php | 0
.../language/bg/permissions_gallery.php | 0
.../language/de/email/newcomment_notify.txt | 0
.../language/de/email/newimage_notify.txt | 0
.../core => core}/language/de/gallery.php | 0
.../core => core}/language/de/gallery_acp.php | 0
.../core => core}/language/de/gallery_mcp.php | 0
.../language/de/gallery_notifications.php | 0
.../core => core}/language/de/gallery_ucp.php | 0
.../core => core}/language/de/index.htm | 0
.../language/de/info_acp_gallery.php | 0
.../language/de/info_acp_gallery_logs.php | 0
.../language/de/info_ucp_gallery.php | 0
.../language/de/install_gallery.php | 0
.../language/de/permissions_gallery.php | 0
.../language/en/email/newcomment_notify.txt | 0
.../language/en/email/newimage_notify.txt | 0
.../core => core}/language/en/gallery.php | 0
.../core => core}/language/en/gallery_acp.php | 0
.../core => core}/language/en/gallery_mcp.php | 0
.../language/en/gallery_notifications.php | 0
.../core => core}/language/en/gallery_ucp.php | 0
.../language/en/info_acp_gallery.php | 0
.../language/en/info_acp_gallery_logs.php | 0
.../language/en/info_ucp_gallery.php | 0
.../language/en/install_gallery.php | 0
.../language/en/permissions_gallery.php | 0
.../language/es/email/newcomment_notify.txt | 0
.../language/es/email/newimage_notify.txt | 0
.../core => core}/language/es/gallery.php | 0
.../core => core}/language/es/gallery_acp.php | 0
.../core => core}/language/es/gallery_mcp.php | 0
.../language/es/gallery_notifications.php | 0
.../core => core}/language/es/gallery_ucp.php | 0
.../language/es/info_acp_gallery.php | 0
.../language/es/info_acp_gallery_logs.php | 0
.../language/es/info_ucp_gallery.php | 0
.../language/es/install_gallery.php | 0
.../language/es/permissions_gallery.php | 0
.../language/fr/email/newcomment_notify.txt | 0
.../language/fr/email/newimage_notify.txt | 0
.../core => core}/language/fr/gallery.php | 0
.../core => core}/language/fr/gallery_acp.php | 0
.../core => core}/language/fr/gallery_mcp.php | 0
.../language/fr/gallery_notifications.php | 0
.../core => core}/language/fr/gallery_ucp.php | 0
.../language/fr/info_acp_gallery.php | 0
.../language/fr/info_acp_gallery_logs.php | 0
.../language/fr/info_ucp_gallery.php | 0
.../language/fr/install_gallery.php | 0
.../language/fr/permissions_gallery.php | 0
.../language/it/email/newcomment_notify.txt | 0
.../language/it/email/newimage_notify.txt | 0
.../core => core}/language/it/gallery.php | 0
.../core => core}/language/it/gallery_acp.php | 0
.../core => core}/language/it/gallery_mcp.php | 0
.../language/it/gallery_notifications.php | 0
.../core => core}/language/it/gallery_ucp.php | 0
.../language/it/info_acp_gallery.php | 0
.../language/it/info_acp_gallery_logs.php | 0
.../language/it/info_ucp_gallery.php | 0
.../language/it/install_gallery.php | 0
.../language/it/permissions_gallery.php | 0
.../language/nl/email/newcomment_notify.txt | 0
.../language/nl/email/newimage_notify.txt | 0
.../core => core}/language/nl/gallery.php | 0
.../core => core}/language/nl/gallery_acp.php | 0
.../core => core}/language/nl/gallery_mcp.php | 0
.../language/nl/gallery_notifications.php | 0
.../core => core}/language/nl/gallery_ucp.php | 0
.../language/nl/info_acp_gallery.php | 0
.../language/nl/info_acp_gallery_logs.php | 0
.../language/nl/info_ucp_gallery.php | 0
.../language/nl/install_gallery.php | 0
.../language/nl/permissions_gallery.php | 0
.../language/ru/email/newcomment_notify.txt | 0
.../language/ru/email/newimage_notify.txt | 0
.../core => core}/language/ru/gallery.php | 0
.../core => core}/language/ru/gallery_acp.php | 0
.../core => core}/language/ru/gallery_mcp.php | 0
.../language/ru/gallery_notifications.php | 0
.../core => core}/language/ru/gallery_ucp.php | 0
.../language/ru/info_acp_gallery.php | 0
.../language/ru/info_acp_gallery_logs.php | 0
.../language/ru/info_ucp_gallery.php | 0
.../language/ru/install_gallery.php | 0
.../language/ru/permissions_gallery.php | 0
{ext/phpbbgallery/core => core}/license.txt | 0
{ext/phpbbgallery/core => core}/log.php | 0
.../migrations/release_1_2_0.php | 0
.../migrations/release_1_2_0_add_bbcode.php | 0
.../release_1_2_0_create_filesystem.php | 0
.../migrations/release_1_2_0_db_create.php | 0
.../migrations/release_3_2_1_0.php | 0
.../migrations/release_3_2_1_1.php | 0
.../migrations/release_3_3_0.php | 0
.../migrations/split_ucp_module_settings.php | 0
{ext/phpbbgallery/core => core}/misc.php | 0
{ext/phpbbgallery/core => core}/moderate.php | 0
.../core => core}/notification.php | 0
.../events/phpbbgallery_image_approved.php | 0
.../phpbbgallery_image_for_approval.php | 0
.../phpbbgallery_image_not_approved.php | 0
.../events/phpbbgallery_new_comment.php | 0
.../events/phpbbgallery_new_image.php | 0
.../events/phpbbgallery_new_report.php | 0
.../core => core}/notification/helper.php | 0
{ext/phpbbgallery/core => core}/rating.php | 0
{ext/phpbbgallery/core => core}/report.php | 0
{ext/phpbbgallery/core => core}/search.php | 0
.../template/event/overall_footer_after.html | 0
.../event/overall_header_head_append.html | 0
.../styles/all/template/js/jquery-ui.min.js | 0
.../template/js/jquery.fileupload-angular.js | 0
.../template/js/jquery.fileupload-audio.js | 0
.../template/js/jquery.fileupload-image.js | 0
.../js/jquery.fileupload-jquery-ui.js | 0
.../template/js/jquery.fileupload-process.js | 0
.../all/template/js/jquery.fileupload-ui.js | 0
.../template/js/jquery.fileupload-validate.js | 0
.../template/js/jquery.fileupload-video.js | 0
.../all/template/js/jquery.fileupload.js | 0
.../template/js/jquery.iframe-transport.js | 0
.../all/template/js/jquery.ui.widget.js | 0
.../all/template/js/load-image.all.min.js | 0
.../all/template/js/load-image.all.min.js.map | 0
.../styles/all/theme/default.css | 0
.../all/theme/images/icon_contact_gallery.png | Bin
.../event/index_body_block_stats_append.html | 0
.../event/memberlist_view_content_append.html | 0
...memberlist_view_user_statistics_after.html | 0
.../navbar_header_user_profile_prepend.html | 0
.../event/overall_header_head_append.html | 0
.../overall_header_navigation_prepend.html | 0
.../template/gallery/album_body.html | 0
.../template/gallery/albumlist_body.html | 0
.../template/gallery/albumlist_polaroid.html | 0
.../template/gallery/comment_body.html | 0
.../prosilver/template/gallery/gallery.js | 0
.../template/gallery/gallery_footer.html | 0
.../template/gallery/gallery_header.html | 0
.../template/gallery/image_edit_body.html | 0
.../template/gallery/imageblock_body.html | 0
.../template/gallery/imageblock_polaroid.html | 0
.../template/gallery/imageblock_popup.html | 0
.../template/gallery/index_body.html | 0
.../template/gallery/mcp_approve.html | 0
.../prosilver/template/gallery/mcp_body.html | 0
.../prosilver/template/gallery/message.html | 0
.../template/gallery/moderate_actions.html | 0
.../gallery/moderate_actions_queue.html | 0
.../gallery/moderate_album_overview.html | 0
.../template/gallery/moderate_approve.html | 0
.../gallery/moderate_approve_queue.html | 0
.../gallery/moderate_image_overview.html | 0
.../template/gallery/moderate_overview.html | 0
.../gallery/moderate_report_queue.html | 0
.../template/gallery/moderate_reports.html | 0
.../template/gallery/plugins_header.html | 0
.../template/gallery/posting_body.html | 0
.../template/gallery/posting_javascript.html | 0
.../template/gallery/recent_body.html | 0
.../template/gallery/search_body.html | 0
.../template/gallery/search_random.html | 0
.../template/gallery/search_recent.html | 0
.../template/gallery/search_results.html | 0
.../template/gallery/ucp_gallery.html | 0
.../template/gallery/viewimage_body.html | 0
.../prosilver/template/message_body.html | 0
.../styles/prosilver/theme/gallery-color.css | 0
.../styles/prosilver/theme/gallery.css | 0
.../theme/images/icon_contact_gallery.gif | Bin
.../theme/images/icon_gallery_locked.gif | Bin
.../theme/images/icon_gallery_reported.gif | Bin
.../theme/images/icon_gallery_unapproved.gif | Bin
.../theme/images/icon_topic_unapproved.png | Bin
.../styles/prosilver/theme/images/lock.png | Bin
.../core => core}/ucp/main_info.php | 0
.../core => core}/ucp/main_module.php | 0
.../core => core}/ucp/settings_info.php | 0
.../core => core}/ucp/settings_module.php | 0
{ext/phpbbgallery/core => core}/upload.php | 0
{ext/phpbbgallery/core => core}/url.php | 0
{ext/phpbbgallery/core => core}/user.php | 0
{ext/phpbbgallery/exif => exif}/composer.json | 0
.../exif => exif}/config/services.yml | 0
.../exif => exif}/event/exif_listener.php | 0
{ext/phpbbgallery/exif => exif}/exif.php | 0
{ext/phpbbgallery/exif => exif}/ext.php | 0
.../exif => exif}/language/bg/exif.php | 0
.../exif => exif}/language/bg/index.htm | 0
.../exif => exif}/language/de/exif.php | 0
.../exif => exif}/language/en/exif.php | 0
.../exif => exif}/language/en/index.htm | 0
.../exif => exif}/language/fr/exif.php | 0
.../exif => exif}/language/it/exif.php | 0
.../exif => exif}/language/it/index.htm | 0
.../exif => exif}/language/ru/exif.php | 0
{ext/phpbbgallery/exif => exif}/license.txt | 0
.../exif => exif}/migrations/m1_init.php | 0
.../event/gallery_ucp_settings_fieldset.html | 0
.../event/gallery_viewimage_details.bkp | 0
.../event/gallery_viewimage_details.html | 0
phpunit.xml.dist | 26 +++++++++---------
.../controller/controller_base.php | 0
.../controller/fixtures/fixture.xml | 0
.../controller/gallery_album_test.php | 0
.../controller/gallery_comment_test.php | 0
.../controller/gallery_index_test.php | 0
.../controller/gallery_moderate_test.php | 0
.../core/album/core_album_test.php | 0
.../core/album/core_display_test.php | 0
.../tests => tests}/core/core_auth_test.php | 0
.../tests => tests}/core/core_base.php | 0
.../tests => tests}/core/core_block_test.php | 0
.../tests => tests}/core/core_cache_test.php | 0
.../core/core_comment_test.php | 0
.../tests => tests}/core/core_config_test.php | 0
.../core/core_contest_test.php | 0
.../tests => tests}/core/core_image_test.php | 0
.../core/core_notification_test.php | 0
.../tests => tests}/core/core_rating_test.php | 0
.../tests => tests}/core/core_report_test.php | 0
.../tests => tests}/core/core_search_test.php | 0
.../tests => tests}/core/core_url_test.php | 0
.../tests => tests}/core/core_user_test.php | 0
.../tests => tests}/core/fixtures/fixture.xml | 0
.../event/fixtures/fixture.xml | 0
.../tests => tests}/event/main_event_test.php | 0
.../functional/images/valid.gif | Bin
.../functional/images/valid.jpg | Bin
.../functional/images/valid.png | Bin
.../functional/images/valid.webp | Bin
.../functional/images/valid.zip | Bin
.../functional/phpbbgallery_alpha_test.php | 0
.../functional/phpbbgallery_base.php | 0
.../functional/phpbbgallery_beta_test.php | 0
.../functional/phpbbgallery_charlie_test.php | 0
.../functional/phpbbgallery_delta_test.php | 0
345 files changed, 15 insertions(+), 15 deletions(-)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/acp/main_info.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/acp/main_module.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/adm/style/gallery_cleanup.html (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/adm/style/index.htm (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/composer.json (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/config/services.yml (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/ext.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/bg/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/de/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/en/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/fr/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/it/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/language/ru/info_acp_gallery_cleanup.php (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/license.txt (100%)
rename {ext/phpbbgallery/acpcleanup => acpcleanup}/migrations/m1_init.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/acp/main_info.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/acp/main_module.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/adm/style/gallery_acpimport.html (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/composer.json (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/ext.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/bg/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/de/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/en/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/fr/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/it/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/language/ru/info_acp_gallery_acpimport.php (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/license.txt (100%)
rename {ext/phpbbgallery/acpimport => acpimport}/migrations/m1_init.php (100%)
rename {ext/phpbbgallery/core => core}/acp/albums_info.php (100%)
rename {ext/phpbbgallery/core => core}/acp/albums_module.php (100%)
rename {ext/phpbbgallery/core => core}/acp/config_info.php (100%)
rename {ext/phpbbgallery/core => core}/acp/config_module.php (100%)
rename {ext/phpbbgallery/core => core}/acp/gallery_logs_info.php (100%)
rename {ext/phpbbgallery/core => core}/acp/gallery_logs_module.php (100%)
rename {ext/phpbbgallery/core => core}/acp/main_info.php (100%)
rename {ext/phpbbgallery/core => core}/acp/main_module.php (100%)
rename {ext/phpbbgallery/core => core}/acp/permissions_info.php (100%)
rename {ext/phpbbgallery/core => core}/acp/permissions_module.php (100%)
rename {ext/phpbbgallery/core => core}/adm/index.htm (100%)
rename {ext/phpbbgallery/core => core}/adm/style/gallery_albums.html (100%)
rename {ext/phpbbgallery/core => core}/adm/style/gallery_logs.html (100%)
rename {ext/phpbbgallery/core => core}/adm/style/gallery_main.html (100%)
rename {ext/phpbbgallery/core => core}/adm/style/gallery_permissions.html (100%)
rename {ext/phpbbgallery/core => core}/adm/style/index.htm (100%)
rename {ext/phpbbgallery/core => core}/album/album.php (100%)
rename {ext/phpbbgallery/core => core}/album/display.php (100%)
rename {ext/phpbbgallery/core => core}/album/loader.php (100%)
rename {ext/phpbbgallery/core => core}/album/manage.php (100%)
rename {ext/phpbbgallery/core => core}/auth/auth.php (100%)
rename {ext/phpbbgallery/core => core}/auth/level.php (100%)
rename {ext/phpbbgallery/core => core}/auth/set.php (100%)
rename {ext/phpbbgallery/core => core}/block.bkp (100%)
rename {ext/phpbbgallery/core => core}/block.php (100%)
rename {ext/phpbbgallery/core => core}/cache.php (100%)
rename {ext/phpbbgallery/core => core}/comment.php (100%)
rename {ext/phpbbgallery/core => core}/composer.json (100%)
rename {ext/phpbbgallery/core => core}/config.php (100%)
rename {ext/phpbbgallery/core => core}/config/routing.yml (100%)
rename {ext/phpbbgallery/core => core}/config/services.yml (100%)
rename {ext/phpbbgallery/core => core}/config/services_controller.yml (100%)
rename {ext/phpbbgallery/core => core}/config/services_files.yml (100%)
rename {ext/phpbbgallery/core => core}/config/services_notification_types.yml (100%)
rename {ext/phpbbgallery/core => core}/config/tables.yml (100%)
rename {ext/phpbbgallery/core => core}/constants.php (100%)
rename {ext/phpbbgallery/core => core}/contest.php (100%)
rename {ext/phpbbgallery/core => core}/controller/album.php (100%)
rename {ext/phpbbgallery/core => core}/controller/comment.php (100%)
rename {ext/phpbbgallery/core => core}/controller/file.php (100%)
rename {ext/phpbbgallery/core => core}/controller/image.php (100%)
rename {ext/phpbbgallery/core => core}/controller/index.php (100%)
rename {ext/phpbbgallery/core => core}/controller/moderate.php (100%)
rename {ext/phpbbgallery/core => core}/controller/search.php (100%)
rename {ext/phpbbgallery/core => core}/controller/upload.php (100%)
rename {ext/phpbbgallery/core => core}/cron/cron_cleaner.php (100%)
rename {ext/phpbbgallery/core => core}/docs/tables.md (100%)
rename {ext/phpbbgallery/core => core}/event/main_listener.php (100%)
rename {ext/phpbbgallery/core => core}/ext.php (100%)
rename {ext/phpbbgallery/core => core}/file/file.php (100%)
rename {ext/phpbbgallery/core => core}/file/types/multiform.php (100%)
rename {ext/phpbbgallery/core => core}/image/image.php (100%)
rename {ext/phpbbgallery/core => core}/images/icon_delete.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_delete_disabled.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_down.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_down_disabled.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_edit.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_edit_disabled.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_up.gif (100%)
rename {ext/phpbbgallery/core => core}/images/icon_up_disabled.gif (100%)
rename {ext/phpbbgallery/core => core}/images/legacy/watermark.png (100%)
rename {ext/phpbbgallery/core => core}/images/upload/image_not_exist.jpg (100%)
rename {ext/phpbbgallery/core => core}/images/upload/index.htm (100%)
rename {ext/phpbbgallery/core => core}/images/upload/no_hotlinking.jpg (100%)
rename {ext/phpbbgallery/core => core}/images/upload/not_authorised.jpg (100%)
rename {ext/phpbbgallery/core => core}/images/watermark.png (100%)
rename {ext/phpbbgallery/core => core}/language/bg/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/bg/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/bg/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/bg/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/de/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/de/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/index.htm (100%)
rename {ext/phpbbgallery/core => core}/language/de/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/de/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/en/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/en/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/en/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/es/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/es/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/es/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/fr/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/fr/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/fr/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/it/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/it/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/it/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/nl/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/nl/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/nl/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/email/newcomment_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/ru/email/newimage_notify.txt (100%)
rename {ext/phpbbgallery/core => core}/language/ru/gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/gallery_acp.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/gallery_mcp.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/gallery_notifications.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/gallery_ucp.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/info_acp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/info_acp_gallery_logs.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/info_ucp_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/install_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/language/ru/permissions_gallery.php (100%)
rename {ext/phpbbgallery/core => core}/license.txt (100%)
rename {ext/phpbbgallery/core => core}/log.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_1_2_0.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_1_2_0_add_bbcode.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_1_2_0_create_filesystem.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_1_2_0_db_create.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_3_2_1_0.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_3_2_1_1.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/release_3_3_0.php (100%)
rename {ext/phpbbgallery/core => core}/migrations/split_ucp_module_settings.php (100%)
rename {ext/phpbbgallery/core => core}/misc.php (100%)
rename {ext/phpbbgallery/core => core}/moderate.php (100%)
rename {ext/phpbbgallery/core => core}/notification.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_image_approved.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_image_for_approval.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_image_not_approved.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_new_comment.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_new_image.php (100%)
rename {ext/phpbbgallery/core => core}/notification/events/phpbbgallery_new_report.php (100%)
rename {ext/phpbbgallery/core => core}/notification/helper.php (100%)
rename {ext/phpbbgallery/core => core}/rating.php (100%)
rename {ext/phpbbgallery/core => core}/report.php (100%)
rename {ext/phpbbgallery/core => core}/search.php (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/event/overall_footer_after.html (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/event/overall_header_head_append.html (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery-ui.min.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-angular.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-audio.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-image.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-jquery-ui.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-process.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-ui.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-validate.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-video.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.iframe-transport.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/jquery.ui.widget.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/load-image.all.min.js (100%)
rename {ext/phpbbgallery/core => core}/styles/all/template/js/load-image.all.min.js.map (100%)
rename {ext/phpbbgallery/core => core}/styles/all/theme/default.css (100%)
rename {ext/phpbbgallery/core => core}/styles/all/theme/images/icon_contact_gallery.png (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/index_body_block_stats_append.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/memberlist_view_content_append.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/memberlist_view_user_statistics_after.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/navbar_header_user_profile_prepend.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/overall_header_head_append.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/event/overall_header_navigation_prepend.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/album_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/albumlist_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/albumlist_polaroid.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/comment_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery.js (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery_footer.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery_header.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/image_edit_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_polaroid.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_popup.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/index_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/mcp_approve.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/mcp_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/message.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_actions.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_actions_queue.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_album_overview.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_approve.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_approve_queue.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_image_overview.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_overview.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_report_queue.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_reports.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/plugins_header.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/posting_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/posting_javascript.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/recent_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/search_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/search_random.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/search_recent.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/search_results.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/ucp_gallery.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/gallery/viewimage_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/template/message_body.html (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/gallery-color.css (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/gallery.css (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/icon_contact_gallery.gif (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_locked.gif (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_reported.gif (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_unapproved.gif (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/icon_topic_unapproved.png (100%)
rename {ext/phpbbgallery/core => core}/styles/prosilver/theme/images/lock.png (100%)
rename {ext/phpbbgallery/core => core}/ucp/main_info.php (100%)
rename {ext/phpbbgallery/core => core}/ucp/main_module.php (100%)
rename {ext/phpbbgallery/core => core}/ucp/settings_info.php (100%)
rename {ext/phpbbgallery/core => core}/ucp/settings_module.php (100%)
rename {ext/phpbbgallery/core => core}/upload.php (100%)
rename {ext/phpbbgallery/core => core}/url.php (100%)
rename {ext/phpbbgallery/core => core}/user.php (100%)
rename {ext/phpbbgallery/exif => exif}/composer.json (100%)
rename {ext/phpbbgallery/exif => exif}/config/services.yml (100%)
rename {ext/phpbbgallery/exif => exif}/event/exif_listener.php (100%)
rename {ext/phpbbgallery/exif => exif}/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/ext.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/bg/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/bg/index.htm (100%)
rename {ext/phpbbgallery/exif => exif}/language/de/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/en/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/en/index.htm (100%)
rename {ext/phpbbgallery/exif => exif}/language/fr/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/it/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/language/it/index.htm (100%)
rename {ext/phpbbgallery/exif => exif}/language/ru/exif.php (100%)
rename {ext/phpbbgallery/exif => exif}/license.txt (100%)
rename {ext/phpbbgallery/exif => exif}/migrations/m1_init.php (100%)
rename {ext/phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html (100%)
rename {ext/phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_viewimage_details.bkp (100%)
rename {ext/phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_viewimage_details.html (100%)
rename {ext/phpbbgallery/tests => tests}/controller/controller_base.php (100%)
rename {ext/phpbbgallery/tests => tests}/controller/fixtures/fixture.xml (100%)
rename {ext/phpbbgallery/tests => tests}/controller/gallery_album_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/controller/gallery_comment_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/controller/gallery_index_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/controller/gallery_moderate_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/album/core_album_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/album/core_display_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_auth_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_base.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_block_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_cache_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_comment_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_config_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_contest_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_image_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_notification_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_rating_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_report_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_search_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_url_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/core_user_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/core/fixtures/fixture.xml (100%)
rename {ext/phpbbgallery/tests => tests}/event/fixtures/fixture.xml (100%)
rename {ext/phpbbgallery/tests => tests}/event/main_event_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/functional/images/valid.gif (100%)
rename {ext/phpbbgallery/tests => tests}/functional/images/valid.jpg (100%)
rename {ext/phpbbgallery/tests => tests}/functional/images/valid.png (100%)
rename {ext/phpbbgallery/tests => tests}/functional/images/valid.webp (100%)
rename {ext/phpbbgallery/tests => tests}/functional/images/valid.zip (100%)
rename {ext/phpbbgallery/tests => tests}/functional/phpbbgallery_alpha_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/functional/phpbbgallery_base.php (100%)
rename {ext/phpbbgallery/tests => tests}/functional/phpbbgallery_beta_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/functional/phpbbgallery_charlie_test.php (100%)
rename {ext/phpbbgallery/tests => tests}/functional/phpbbgallery_delta_test.php (100%)
diff --git a/.travis.yml b/.travis.yml
index 1cd8e773..d19082f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,9 +50,9 @@ services:
install:
- - cd ext/phpbbgallery/core
+ - cd core
- composer install --dev --no-interaction --prefer-source
- - cd ../../..
+ - cd ..
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../phpBB3
- sh -c "if [ '$COVER' != '0' ]; then sed -i '/phpenv/d' travis/setup-php-extensions.sh; fi"
diff --git a/ext/phpbbgallery/acpcleanup/acp/main_info.php b/acpcleanup/acp/main_info.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/acp/main_info.php
rename to acpcleanup/acp/main_info.php
diff --git a/ext/phpbbgallery/acpcleanup/acp/main_module.php b/acpcleanup/acp/main_module.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/acp/main_module.php
rename to acpcleanup/acp/main_module.php
diff --git a/ext/phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html b/acpcleanup/adm/style/gallery_cleanup.html
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html
rename to acpcleanup/adm/style/gallery_cleanup.html
diff --git a/ext/phpbbgallery/acpcleanup/adm/style/index.htm b/acpcleanup/adm/style/index.htm
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/adm/style/index.htm
rename to acpcleanup/adm/style/index.htm
diff --git a/ext/phpbbgallery/acpcleanup/cleanup.php b/acpcleanup/cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/cleanup.php
rename to acpcleanup/cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/composer.json b/acpcleanup/composer.json
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/composer.json
rename to acpcleanup/composer.json
diff --git a/ext/phpbbgallery/acpcleanup/config/services.yml b/acpcleanup/config/services.yml
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/config/services.yml
rename to acpcleanup/config/services.yml
diff --git a/ext/phpbbgallery/acpcleanup/ext.php b/acpcleanup/ext.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/ext.php
rename to acpcleanup/ext.php
diff --git a/ext/phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php
rename to acpcleanup/language/bg/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php
rename to acpcleanup/language/de/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php b/acpcleanup/language/en/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php
rename to acpcleanup/language/en/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php
rename to acpcleanup/language/fr/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php
rename to acpcleanup/language/it/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php
rename to acpcleanup/language/ru/info_acp_gallery_cleanup.php
diff --git a/ext/phpbbgallery/acpcleanup/license.txt b/acpcleanup/license.txt
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/license.txt
rename to acpcleanup/license.txt
diff --git a/ext/phpbbgallery/acpcleanup/migrations/m1_init.php b/acpcleanup/migrations/m1_init.php
similarity index 100%
rename from ext/phpbbgallery/acpcleanup/migrations/m1_init.php
rename to acpcleanup/migrations/m1_init.php
diff --git a/ext/phpbbgallery/acpimport/acp/main_info.php b/acpimport/acp/main_info.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/acp/main_info.php
rename to acpimport/acp/main_info.php
diff --git a/ext/phpbbgallery/acpimport/acp/main_module.php b/acpimport/acp/main_module.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/acp/main_module.php
rename to acpimport/acp/main_module.php
diff --git a/ext/phpbbgallery/acpimport/adm/style/gallery_acpimport.html b/acpimport/adm/style/gallery_acpimport.html
similarity index 100%
rename from ext/phpbbgallery/acpimport/adm/style/gallery_acpimport.html
rename to acpimport/adm/style/gallery_acpimport.html
diff --git a/ext/phpbbgallery/acpimport/composer.json b/acpimport/composer.json
similarity index 100%
rename from ext/phpbbgallery/acpimport/composer.json
rename to acpimport/composer.json
diff --git a/ext/phpbbgallery/acpimport/ext.php b/acpimport/ext.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/ext.php
rename to acpimport/ext.php
diff --git a/ext/phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php b/acpimport/language/bg/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php
rename to acpimport/language/bg/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php b/acpimport/language/de/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php
rename to acpimport/language/de/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php b/acpimport/language/en/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php
rename to acpimport/language/en/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php b/acpimport/language/fr/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php
rename to acpimport/language/fr/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php b/acpimport/language/it/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php
rename to acpimport/language/it/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php b/acpimport/language/ru/info_acp_gallery_acpimport.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php
rename to acpimport/language/ru/info_acp_gallery_acpimport.php
diff --git a/ext/phpbbgallery/acpimport/license.txt b/acpimport/license.txt
similarity index 100%
rename from ext/phpbbgallery/acpimport/license.txt
rename to acpimport/license.txt
diff --git a/ext/phpbbgallery/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
similarity index 100%
rename from ext/phpbbgallery/acpimport/migrations/m1_init.php
rename to acpimport/migrations/m1_init.php
diff --git a/ext/phpbbgallery/core/acp/albums_info.php b/core/acp/albums_info.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/albums_info.php
rename to core/acp/albums_info.php
diff --git a/ext/phpbbgallery/core/acp/albums_module.php b/core/acp/albums_module.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/albums_module.php
rename to core/acp/albums_module.php
diff --git a/ext/phpbbgallery/core/acp/config_info.php b/core/acp/config_info.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/config_info.php
rename to core/acp/config_info.php
diff --git a/ext/phpbbgallery/core/acp/config_module.php b/core/acp/config_module.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/config_module.php
rename to core/acp/config_module.php
diff --git a/ext/phpbbgallery/core/acp/gallery_logs_info.php b/core/acp/gallery_logs_info.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/gallery_logs_info.php
rename to core/acp/gallery_logs_info.php
diff --git a/ext/phpbbgallery/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/gallery_logs_module.php
rename to core/acp/gallery_logs_module.php
diff --git a/ext/phpbbgallery/core/acp/main_info.php b/core/acp/main_info.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/main_info.php
rename to core/acp/main_info.php
diff --git a/ext/phpbbgallery/core/acp/main_module.php b/core/acp/main_module.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/main_module.php
rename to core/acp/main_module.php
diff --git a/ext/phpbbgallery/core/acp/permissions_info.php b/core/acp/permissions_info.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/permissions_info.php
rename to core/acp/permissions_info.php
diff --git a/ext/phpbbgallery/core/acp/permissions_module.php b/core/acp/permissions_module.php
similarity index 100%
rename from ext/phpbbgallery/core/acp/permissions_module.php
rename to core/acp/permissions_module.php
diff --git a/ext/phpbbgallery/core/adm/index.htm b/core/adm/index.htm
similarity index 100%
rename from ext/phpbbgallery/core/adm/index.htm
rename to core/adm/index.htm
diff --git a/ext/phpbbgallery/core/adm/style/gallery_albums.html b/core/adm/style/gallery_albums.html
similarity index 100%
rename from ext/phpbbgallery/core/adm/style/gallery_albums.html
rename to core/adm/style/gallery_albums.html
diff --git a/ext/phpbbgallery/core/adm/style/gallery_logs.html b/core/adm/style/gallery_logs.html
similarity index 100%
rename from ext/phpbbgallery/core/adm/style/gallery_logs.html
rename to core/adm/style/gallery_logs.html
diff --git a/ext/phpbbgallery/core/adm/style/gallery_main.html b/core/adm/style/gallery_main.html
similarity index 100%
rename from ext/phpbbgallery/core/adm/style/gallery_main.html
rename to core/adm/style/gallery_main.html
diff --git a/ext/phpbbgallery/core/adm/style/gallery_permissions.html b/core/adm/style/gallery_permissions.html
similarity index 100%
rename from ext/phpbbgallery/core/adm/style/gallery_permissions.html
rename to core/adm/style/gallery_permissions.html
diff --git a/ext/phpbbgallery/core/adm/style/index.htm b/core/adm/style/index.htm
similarity index 100%
rename from ext/phpbbgallery/core/adm/style/index.htm
rename to core/adm/style/index.htm
diff --git a/ext/phpbbgallery/core/album/album.php b/core/album/album.php
similarity index 100%
rename from ext/phpbbgallery/core/album/album.php
rename to core/album/album.php
diff --git a/ext/phpbbgallery/core/album/display.php b/core/album/display.php
similarity index 100%
rename from ext/phpbbgallery/core/album/display.php
rename to core/album/display.php
diff --git a/ext/phpbbgallery/core/album/loader.php b/core/album/loader.php
similarity index 100%
rename from ext/phpbbgallery/core/album/loader.php
rename to core/album/loader.php
diff --git a/ext/phpbbgallery/core/album/manage.php b/core/album/manage.php
similarity index 100%
rename from ext/phpbbgallery/core/album/manage.php
rename to core/album/manage.php
diff --git a/ext/phpbbgallery/core/auth/auth.php b/core/auth/auth.php
similarity index 100%
rename from ext/phpbbgallery/core/auth/auth.php
rename to core/auth/auth.php
diff --git a/ext/phpbbgallery/core/auth/level.php b/core/auth/level.php
similarity index 100%
rename from ext/phpbbgallery/core/auth/level.php
rename to core/auth/level.php
diff --git a/ext/phpbbgallery/core/auth/set.php b/core/auth/set.php
similarity index 100%
rename from ext/phpbbgallery/core/auth/set.php
rename to core/auth/set.php
diff --git a/ext/phpbbgallery/core/block.bkp b/core/block.bkp
similarity index 100%
rename from ext/phpbbgallery/core/block.bkp
rename to core/block.bkp
diff --git a/ext/phpbbgallery/core/block.php b/core/block.php
similarity index 100%
rename from ext/phpbbgallery/core/block.php
rename to core/block.php
diff --git a/ext/phpbbgallery/core/cache.php b/core/cache.php
similarity index 100%
rename from ext/phpbbgallery/core/cache.php
rename to core/cache.php
diff --git a/ext/phpbbgallery/core/comment.php b/core/comment.php
similarity index 100%
rename from ext/phpbbgallery/core/comment.php
rename to core/comment.php
diff --git a/ext/phpbbgallery/core/composer.json b/core/composer.json
similarity index 100%
rename from ext/phpbbgallery/core/composer.json
rename to core/composer.json
diff --git a/ext/phpbbgallery/core/config.php b/core/config.php
similarity index 100%
rename from ext/phpbbgallery/core/config.php
rename to core/config.php
diff --git a/ext/phpbbgallery/core/config/routing.yml b/core/config/routing.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/routing.yml
rename to core/config/routing.yml
diff --git a/ext/phpbbgallery/core/config/services.yml b/core/config/services.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/services.yml
rename to core/config/services.yml
diff --git a/ext/phpbbgallery/core/config/services_controller.yml b/core/config/services_controller.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/services_controller.yml
rename to core/config/services_controller.yml
diff --git a/ext/phpbbgallery/core/config/services_files.yml b/core/config/services_files.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/services_files.yml
rename to core/config/services_files.yml
diff --git a/ext/phpbbgallery/core/config/services_notification_types.yml b/core/config/services_notification_types.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/services_notification_types.yml
rename to core/config/services_notification_types.yml
diff --git a/ext/phpbbgallery/core/config/tables.yml b/core/config/tables.yml
similarity index 100%
rename from ext/phpbbgallery/core/config/tables.yml
rename to core/config/tables.yml
diff --git a/ext/phpbbgallery/core/constants.php b/core/constants.php
similarity index 100%
rename from ext/phpbbgallery/core/constants.php
rename to core/constants.php
diff --git a/ext/phpbbgallery/core/contest.php b/core/contest.php
similarity index 100%
rename from ext/phpbbgallery/core/contest.php
rename to core/contest.php
diff --git a/ext/phpbbgallery/core/controller/album.php b/core/controller/album.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/album.php
rename to core/controller/album.php
diff --git a/ext/phpbbgallery/core/controller/comment.php b/core/controller/comment.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/comment.php
rename to core/controller/comment.php
diff --git a/ext/phpbbgallery/core/controller/file.php b/core/controller/file.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/file.php
rename to core/controller/file.php
diff --git a/ext/phpbbgallery/core/controller/image.php b/core/controller/image.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/image.php
rename to core/controller/image.php
diff --git a/ext/phpbbgallery/core/controller/index.php b/core/controller/index.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/index.php
rename to core/controller/index.php
diff --git a/ext/phpbbgallery/core/controller/moderate.php b/core/controller/moderate.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/moderate.php
rename to core/controller/moderate.php
diff --git a/ext/phpbbgallery/core/controller/search.php b/core/controller/search.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/search.php
rename to core/controller/search.php
diff --git a/ext/phpbbgallery/core/controller/upload.php b/core/controller/upload.php
similarity index 100%
rename from ext/phpbbgallery/core/controller/upload.php
rename to core/controller/upload.php
diff --git a/ext/phpbbgallery/core/cron/cron_cleaner.php b/core/cron/cron_cleaner.php
similarity index 100%
rename from ext/phpbbgallery/core/cron/cron_cleaner.php
rename to core/cron/cron_cleaner.php
diff --git a/ext/phpbbgallery/core/docs/tables.md b/core/docs/tables.md
similarity index 100%
rename from ext/phpbbgallery/core/docs/tables.md
rename to core/docs/tables.md
diff --git a/ext/phpbbgallery/core/event/main_listener.php b/core/event/main_listener.php
similarity index 100%
rename from ext/phpbbgallery/core/event/main_listener.php
rename to core/event/main_listener.php
diff --git a/ext/phpbbgallery/core/ext.php b/core/ext.php
similarity index 100%
rename from ext/phpbbgallery/core/ext.php
rename to core/ext.php
diff --git a/ext/phpbbgallery/core/file/file.php b/core/file/file.php
similarity index 100%
rename from ext/phpbbgallery/core/file/file.php
rename to core/file/file.php
diff --git a/ext/phpbbgallery/core/file/types/multiform.php b/core/file/types/multiform.php
similarity index 100%
rename from ext/phpbbgallery/core/file/types/multiform.php
rename to core/file/types/multiform.php
diff --git a/ext/phpbbgallery/core/image/image.php b/core/image/image.php
similarity index 100%
rename from ext/phpbbgallery/core/image/image.php
rename to core/image/image.php
diff --git a/ext/phpbbgallery/core/images/icon_delete.gif b/core/images/icon_delete.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_delete.gif
rename to core/images/icon_delete.gif
diff --git a/ext/phpbbgallery/core/images/icon_delete_disabled.gif b/core/images/icon_delete_disabled.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_delete_disabled.gif
rename to core/images/icon_delete_disabled.gif
diff --git a/ext/phpbbgallery/core/images/icon_down.gif b/core/images/icon_down.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_down.gif
rename to core/images/icon_down.gif
diff --git a/ext/phpbbgallery/core/images/icon_down_disabled.gif b/core/images/icon_down_disabled.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_down_disabled.gif
rename to core/images/icon_down_disabled.gif
diff --git a/ext/phpbbgallery/core/images/icon_edit.gif b/core/images/icon_edit.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_edit.gif
rename to core/images/icon_edit.gif
diff --git a/ext/phpbbgallery/core/images/icon_edit_disabled.gif b/core/images/icon_edit_disabled.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_edit_disabled.gif
rename to core/images/icon_edit_disabled.gif
diff --git a/ext/phpbbgallery/core/images/icon_up.gif b/core/images/icon_up.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_up.gif
rename to core/images/icon_up.gif
diff --git a/ext/phpbbgallery/core/images/icon_up_disabled.gif b/core/images/icon_up_disabled.gif
similarity index 100%
rename from ext/phpbbgallery/core/images/icon_up_disabled.gif
rename to core/images/icon_up_disabled.gif
diff --git a/ext/phpbbgallery/core/images/legacy/watermark.png b/core/images/legacy/watermark.png
similarity index 100%
rename from ext/phpbbgallery/core/images/legacy/watermark.png
rename to core/images/legacy/watermark.png
diff --git a/ext/phpbbgallery/core/images/upload/image_not_exist.jpg b/core/images/upload/image_not_exist.jpg
similarity index 100%
rename from ext/phpbbgallery/core/images/upload/image_not_exist.jpg
rename to core/images/upload/image_not_exist.jpg
diff --git a/ext/phpbbgallery/core/images/upload/index.htm b/core/images/upload/index.htm
similarity index 100%
rename from ext/phpbbgallery/core/images/upload/index.htm
rename to core/images/upload/index.htm
diff --git a/ext/phpbbgallery/core/images/upload/no_hotlinking.jpg b/core/images/upload/no_hotlinking.jpg
similarity index 100%
rename from ext/phpbbgallery/core/images/upload/no_hotlinking.jpg
rename to core/images/upload/no_hotlinking.jpg
diff --git a/ext/phpbbgallery/core/images/upload/not_authorised.jpg b/core/images/upload/not_authorised.jpg
similarity index 100%
rename from ext/phpbbgallery/core/images/upload/not_authorised.jpg
rename to core/images/upload/not_authorised.jpg
diff --git a/ext/phpbbgallery/core/images/watermark.png b/core/images/watermark.png
similarity index 100%
rename from ext/phpbbgallery/core/images/watermark.png
rename to core/images/watermark.png
diff --git a/ext/phpbbgallery/core/language/bg/email/newcomment_notify.txt b/core/language/bg/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/email/newcomment_notify.txt
rename to core/language/bg/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/bg/email/newimage_notify.txt b/core/language/bg/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/email/newimage_notify.txt
rename to core/language/bg/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/bg/gallery.php b/core/language/bg/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/gallery.php
rename to core/language/bg/gallery.php
diff --git a/ext/phpbbgallery/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/gallery_acp.php
rename to core/language/bg/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/gallery_mcp.php
rename to core/language/bg/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/bg/gallery_notifications.php b/core/language/bg/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/gallery_notifications.php
rename to core/language/bg/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/bg/gallery_ucp.php b/core/language/bg/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/gallery_ucp.php
rename to core/language/bg/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/bg/info_acp_gallery.php b/core/language/bg/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/info_acp_gallery.php
rename to core/language/bg/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/bg/info_acp_gallery_logs.php b/core/language/bg/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/info_acp_gallery_logs.php
rename to core/language/bg/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/bg/info_ucp_gallery.php b/core/language/bg/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/info_ucp_gallery.php
rename to core/language/bg/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/install_gallery.php
rename to core/language/bg/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/bg/permissions_gallery.php b/core/language/bg/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/bg/permissions_gallery.php
rename to core/language/bg/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/de/email/newcomment_notify.txt b/core/language/de/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/de/email/newcomment_notify.txt
rename to core/language/de/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/de/email/newimage_notify.txt b/core/language/de/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/de/email/newimage_notify.txt
rename to core/language/de/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/de/gallery.php b/core/language/de/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/gallery.php
rename to core/language/de/gallery.php
diff --git a/ext/phpbbgallery/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/gallery_acp.php
rename to core/language/de/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/gallery_mcp.php
rename to core/language/de/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/de/gallery_notifications.php b/core/language/de/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/gallery_notifications.php
rename to core/language/de/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/de/gallery_ucp.php b/core/language/de/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/gallery_ucp.php
rename to core/language/de/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/de/index.htm b/core/language/de/index.htm
similarity index 100%
rename from ext/phpbbgallery/core/language/de/index.htm
rename to core/language/de/index.htm
diff --git a/ext/phpbbgallery/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/info_acp_gallery.php
rename to core/language/de/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/de/info_acp_gallery_logs.php b/core/language/de/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/info_acp_gallery_logs.php
rename to core/language/de/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/de/info_ucp_gallery.php b/core/language/de/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/info_ucp_gallery.php
rename to core/language/de/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/install_gallery.php
rename to core/language/de/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/de/permissions_gallery.php b/core/language/de/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/de/permissions_gallery.php
rename to core/language/de/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/en/email/newcomment_notify.txt b/core/language/en/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/en/email/newcomment_notify.txt
rename to core/language/en/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/en/email/newimage_notify.txt b/core/language/en/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/en/email/newimage_notify.txt
rename to core/language/en/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/en/gallery.php b/core/language/en/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/gallery.php
rename to core/language/en/gallery.php
diff --git a/ext/phpbbgallery/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/gallery_acp.php
rename to core/language/en/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/gallery_mcp.php
rename to core/language/en/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/en/gallery_notifications.php b/core/language/en/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/gallery_notifications.php
rename to core/language/en/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/en/gallery_ucp.php b/core/language/en/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/gallery_ucp.php
rename to core/language/en/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/en/info_acp_gallery.php b/core/language/en/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/info_acp_gallery.php
rename to core/language/en/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/en/info_acp_gallery_logs.php b/core/language/en/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/info_acp_gallery_logs.php
rename to core/language/en/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/en/info_ucp_gallery.php b/core/language/en/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/info_ucp_gallery.php
rename to core/language/en/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/install_gallery.php
rename to core/language/en/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/en/permissions_gallery.php b/core/language/en/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/en/permissions_gallery.php
rename to core/language/en/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/es/email/newcomment_notify.txt b/core/language/es/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/es/email/newcomment_notify.txt
rename to core/language/es/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/es/email/newimage_notify.txt b/core/language/es/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/es/email/newimage_notify.txt
rename to core/language/es/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/es/gallery.php b/core/language/es/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/gallery.php
rename to core/language/es/gallery.php
diff --git a/ext/phpbbgallery/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/gallery_acp.php
rename to core/language/es/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/gallery_mcp.php
rename to core/language/es/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/es/gallery_notifications.php b/core/language/es/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/gallery_notifications.php
rename to core/language/es/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/es/gallery_ucp.php b/core/language/es/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/gallery_ucp.php
rename to core/language/es/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/es/info_acp_gallery.php b/core/language/es/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/info_acp_gallery.php
rename to core/language/es/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/es/info_acp_gallery_logs.php b/core/language/es/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/info_acp_gallery_logs.php
rename to core/language/es/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/es/info_ucp_gallery.php b/core/language/es/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/info_ucp_gallery.php
rename to core/language/es/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/install_gallery.php
rename to core/language/es/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/es/permissions_gallery.php b/core/language/es/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/es/permissions_gallery.php
rename to core/language/es/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/fr/email/newcomment_notify.txt b/core/language/fr/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/email/newcomment_notify.txt
rename to core/language/fr/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/fr/email/newimage_notify.txt b/core/language/fr/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/email/newimage_notify.txt
rename to core/language/fr/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/fr/gallery.php b/core/language/fr/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/gallery.php
rename to core/language/fr/gallery.php
diff --git a/ext/phpbbgallery/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/gallery_acp.php
rename to core/language/fr/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/gallery_mcp.php
rename to core/language/fr/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/fr/gallery_notifications.php b/core/language/fr/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/gallery_notifications.php
rename to core/language/fr/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/fr/gallery_ucp.php b/core/language/fr/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/gallery_ucp.php
rename to core/language/fr/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/fr/info_acp_gallery.php b/core/language/fr/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/info_acp_gallery.php
rename to core/language/fr/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/fr/info_acp_gallery_logs.php b/core/language/fr/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/info_acp_gallery_logs.php
rename to core/language/fr/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/fr/info_ucp_gallery.php b/core/language/fr/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/info_ucp_gallery.php
rename to core/language/fr/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/install_gallery.php
rename to core/language/fr/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/fr/permissions_gallery.php b/core/language/fr/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/fr/permissions_gallery.php
rename to core/language/fr/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/it/email/newcomment_notify.txt b/core/language/it/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/it/email/newcomment_notify.txt
rename to core/language/it/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/it/email/newimage_notify.txt b/core/language/it/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/it/email/newimage_notify.txt
rename to core/language/it/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/it/gallery.php b/core/language/it/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/gallery.php
rename to core/language/it/gallery.php
diff --git a/ext/phpbbgallery/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/gallery_acp.php
rename to core/language/it/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/gallery_mcp.php
rename to core/language/it/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/it/gallery_notifications.php b/core/language/it/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/gallery_notifications.php
rename to core/language/it/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/gallery_ucp.php
rename to core/language/it/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/it/info_acp_gallery.php b/core/language/it/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/info_acp_gallery.php
rename to core/language/it/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/it/info_acp_gallery_logs.php b/core/language/it/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/info_acp_gallery_logs.php
rename to core/language/it/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/it/info_ucp_gallery.php b/core/language/it/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/info_ucp_gallery.php
rename to core/language/it/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/install_gallery.php
rename to core/language/it/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/it/permissions_gallery.php b/core/language/it/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/it/permissions_gallery.php
rename to core/language/it/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/nl/email/newcomment_notify.txt b/core/language/nl/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/email/newcomment_notify.txt
rename to core/language/nl/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/nl/email/newimage_notify.txt b/core/language/nl/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/email/newimage_notify.txt
rename to core/language/nl/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/nl/gallery.php b/core/language/nl/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/gallery.php
rename to core/language/nl/gallery.php
diff --git a/ext/phpbbgallery/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/gallery_acp.php
rename to core/language/nl/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/gallery_mcp.php
rename to core/language/nl/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/nl/gallery_notifications.php b/core/language/nl/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/gallery_notifications.php
rename to core/language/nl/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/nl/gallery_ucp.php b/core/language/nl/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/gallery_ucp.php
rename to core/language/nl/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/nl/info_acp_gallery.php b/core/language/nl/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/info_acp_gallery.php
rename to core/language/nl/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/nl/info_acp_gallery_logs.php b/core/language/nl/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/info_acp_gallery_logs.php
rename to core/language/nl/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/nl/info_ucp_gallery.php b/core/language/nl/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/info_ucp_gallery.php
rename to core/language/nl/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/install_gallery.php
rename to core/language/nl/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/nl/permissions_gallery.php b/core/language/nl/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/nl/permissions_gallery.php
rename to core/language/nl/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/language/ru/email/newcomment_notify.txt b/core/language/ru/email/newcomment_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/email/newcomment_notify.txt
rename to core/language/ru/email/newcomment_notify.txt
diff --git a/ext/phpbbgallery/core/language/ru/email/newimage_notify.txt b/core/language/ru/email/newimage_notify.txt
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/email/newimage_notify.txt
rename to core/language/ru/email/newimage_notify.txt
diff --git a/ext/phpbbgallery/core/language/ru/gallery.php b/core/language/ru/gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/gallery.php
rename to core/language/ru/gallery.php
diff --git a/ext/phpbbgallery/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/gallery_acp.php
rename to core/language/ru/gallery_acp.php
diff --git a/ext/phpbbgallery/core/language/ru/gallery_mcp.php b/core/language/ru/gallery_mcp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/gallery_mcp.php
rename to core/language/ru/gallery_mcp.php
diff --git a/ext/phpbbgallery/core/language/ru/gallery_notifications.php b/core/language/ru/gallery_notifications.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/gallery_notifications.php
rename to core/language/ru/gallery_notifications.php
diff --git a/ext/phpbbgallery/core/language/ru/gallery_ucp.php b/core/language/ru/gallery_ucp.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/gallery_ucp.php
rename to core/language/ru/gallery_ucp.php
diff --git a/ext/phpbbgallery/core/language/ru/info_acp_gallery.php b/core/language/ru/info_acp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/info_acp_gallery.php
rename to core/language/ru/info_acp_gallery.php
diff --git a/ext/phpbbgallery/core/language/ru/info_acp_gallery_logs.php b/core/language/ru/info_acp_gallery_logs.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/info_acp_gallery_logs.php
rename to core/language/ru/info_acp_gallery_logs.php
diff --git a/ext/phpbbgallery/core/language/ru/info_ucp_gallery.php b/core/language/ru/info_ucp_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/info_ucp_gallery.php
rename to core/language/ru/info_ucp_gallery.php
diff --git a/ext/phpbbgallery/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/install_gallery.php
rename to core/language/ru/install_gallery.php
diff --git a/ext/phpbbgallery/core/language/ru/permissions_gallery.php b/core/language/ru/permissions_gallery.php
similarity index 100%
rename from ext/phpbbgallery/core/language/ru/permissions_gallery.php
rename to core/language/ru/permissions_gallery.php
diff --git a/ext/phpbbgallery/core/license.txt b/core/license.txt
similarity index 100%
rename from ext/phpbbgallery/core/license.txt
rename to core/license.txt
diff --git a/ext/phpbbgallery/core/log.php b/core/log.php
similarity index 100%
rename from ext/phpbbgallery/core/log.php
rename to core/log.php
diff --git a/ext/phpbbgallery/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_1_2_0.php
rename to core/migrations/release_1_2_0.php
diff --git a/ext/phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php b/core/migrations/release_1_2_0_add_bbcode.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php
rename to core/migrations/release_1_2_0_add_bbcode.php
diff --git a/ext/phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php b/core/migrations/release_1_2_0_create_filesystem.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php
rename to core/migrations/release_1_2_0_create_filesystem.php
diff --git a/ext/phpbbgallery/core/migrations/release_1_2_0_db_create.php b/core/migrations/release_1_2_0_db_create.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_1_2_0_db_create.php
rename to core/migrations/release_1_2_0_db_create.php
diff --git a/ext/phpbbgallery/core/migrations/release_3_2_1_0.php b/core/migrations/release_3_2_1_0.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_3_2_1_0.php
rename to core/migrations/release_3_2_1_0.php
diff --git a/ext/phpbbgallery/core/migrations/release_3_2_1_1.php b/core/migrations/release_3_2_1_1.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_3_2_1_1.php
rename to core/migrations/release_3_2_1_1.php
diff --git a/ext/phpbbgallery/core/migrations/release_3_3_0.php b/core/migrations/release_3_3_0.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/release_3_3_0.php
rename to core/migrations/release_3_3_0.php
diff --git a/ext/phpbbgallery/core/migrations/split_ucp_module_settings.php b/core/migrations/split_ucp_module_settings.php
similarity index 100%
rename from ext/phpbbgallery/core/migrations/split_ucp_module_settings.php
rename to core/migrations/split_ucp_module_settings.php
diff --git a/ext/phpbbgallery/core/misc.php b/core/misc.php
similarity index 100%
rename from ext/phpbbgallery/core/misc.php
rename to core/misc.php
diff --git a/ext/phpbbgallery/core/moderate.php b/core/moderate.php
similarity index 100%
rename from ext/phpbbgallery/core/moderate.php
rename to core/moderate.php
diff --git a/ext/phpbbgallery/core/notification.php b/core/notification.php
similarity index 100%
rename from ext/phpbbgallery/core/notification.php
rename to core/notification.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_image_approved.php b/core/notification/events/phpbbgallery_image_approved.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_image_approved.php
rename to core/notification/events/phpbbgallery_image_approved.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php b/core/notification/events/phpbbgallery_image_for_approval.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php
rename to core/notification/events/phpbbgallery_image_for_approval.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php b/core/notification/events/phpbbgallery_image_not_approved.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php
rename to core/notification/events/phpbbgallery_image_not_approved.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_new_comment.php b/core/notification/events/phpbbgallery_new_comment.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_new_comment.php
rename to core/notification/events/phpbbgallery_new_comment.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_new_image.php b/core/notification/events/phpbbgallery_new_image.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_new_image.php
rename to core/notification/events/phpbbgallery_new_image.php
diff --git a/ext/phpbbgallery/core/notification/events/phpbbgallery_new_report.php b/core/notification/events/phpbbgallery_new_report.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/events/phpbbgallery_new_report.php
rename to core/notification/events/phpbbgallery_new_report.php
diff --git a/ext/phpbbgallery/core/notification/helper.php b/core/notification/helper.php
similarity index 100%
rename from ext/phpbbgallery/core/notification/helper.php
rename to core/notification/helper.php
diff --git a/ext/phpbbgallery/core/rating.php b/core/rating.php
similarity index 100%
rename from ext/phpbbgallery/core/rating.php
rename to core/rating.php
diff --git a/ext/phpbbgallery/core/report.php b/core/report.php
similarity index 100%
rename from ext/phpbbgallery/core/report.php
rename to core/report.php
diff --git a/ext/phpbbgallery/core/search.php b/core/search.php
similarity index 100%
rename from ext/phpbbgallery/core/search.php
rename to core/search.php
diff --git a/ext/phpbbgallery/core/styles/all/template/event/overall_footer_after.html b/core/styles/all/template/event/overall_footer_after.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/event/overall_footer_after.html
rename to core/styles/all/template/event/overall_footer_after.html
diff --git a/ext/phpbbgallery/core/styles/all/template/event/overall_header_head_append.html b/core/styles/all/template/event/overall_header_head_append.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/event/overall_header_head_append.html
rename to core/styles/all/template/event/overall_header_head_append.html
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery-ui.min.js b/core/styles/all/template/js/jquery-ui.min.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery-ui.min.js
rename to core/styles/all/template/js/jquery-ui.min.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js b/core/styles/all/template/js/jquery.fileupload-angular.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js
rename to core/styles/all/template/js/jquery.fileupload-angular.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js b/core/styles/all/template/js/jquery.fileupload-audio.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js
rename to core/styles/all/template/js/jquery.fileupload-audio.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js b/core/styles/all/template/js/jquery.fileupload-image.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js
rename to core/styles/all/template/js/jquery.fileupload-image.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js b/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
rename to core/styles/all/template/js/jquery.fileupload-jquery-ui.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js b/core/styles/all/template/js/jquery.fileupload-process.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js
rename to core/styles/all/template/js/jquery.fileupload-process.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js b/core/styles/all/template/js/jquery.fileupload-ui.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js
rename to core/styles/all/template/js/jquery.fileupload-ui.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js b/core/styles/all/template/js/jquery.fileupload-validate.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js
rename to core/styles/all/template/js/jquery.fileupload-validate.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js b/core/styles/all/template/js/jquery.fileupload-video.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js
rename to core/styles/all/template/js/jquery.fileupload-video.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload.js b/core/styles/all/template/js/jquery.fileupload.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.fileupload.js
rename to core/styles/all/template/js/jquery.fileupload.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js b/core/styles/all/template/js/jquery.iframe-transport.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js
rename to core/styles/all/template/js/jquery.iframe-transport.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js b/core/styles/all/template/js/jquery.ui.widget.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js
rename to core/styles/all/template/js/jquery.ui.widget.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/load-image.all.min.js b/core/styles/all/template/js/load-image.all.min.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/load-image.all.min.js
rename to core/styles/all/template/js/load-image.all.min.js
diff --git a/ext/phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map b/core/styles/all/template/js/load-image.all.min.js.map
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map
rename to core/styles/all/template/js/load-image.all.min.js.map
diff --git a/ext/phpbbgallery/core/styles/all/theme/default.css b/core/styles/all/theme/default.css
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/theme/default.css
rename to core/styles/all/theme/default.css
diff --git a/ext/phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png b/core/styles/all/theme/images/icon_contact_gallery.png
similarity index 100%
rename from ext/phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png
rename to core/styles/all/theme/images/icon_contact_gallery.png
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html b/core/styles/prosilver/template/event/index_body_block_stats_append.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html
rename to core/styles/prosilver/template/event/index_body_block_stats_append.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html b/core/styles/prosilver/template/event/memberlist_view_content_append.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html
rename to core/styles/prosilver/template/event/memberlist_view_content_append.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html b/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
rename to core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html b/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
rename to core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html b/core/styles/prosilver/template/event/overall_header_head_append.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html
rename to core/styles/prosilver/template/event/overall_header_head_append.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html b/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
rename to core/styles/prosilver/template/event/overall_header_navigation_prepend.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/album_body.html b/core/styles/prosilver/template/gallery/album_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/album_body.html
rename to core/styles/prosilver/template/gallery/album_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html b/core/styles/prosilver/template/gallery/albumlist_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html
rename to core/styles/prosilver/template/gallery/albumlist_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html b/core/styles/prosilver/template/gallery/albumlist_polaroid.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html
rename to core/styles/prosilver/template/gallery/albumlist_polaroid.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html b/core/styles/prosilver/template/gallery/comment_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html
rename to core/styles/prosilver/template/gallery/comment_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery.js b/core/styles/prosilver/template/gallery/gallery.js
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery.js
rename to core/styles/prosilver/template/gallery/gallery.js
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html b/core/styles/prosilver/template/gallery/gallery_footer.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html
rename to core/styles/prosilver/template/gallery/gallery_footer.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html b/core/styles/prosilver/template/gallery/gallery_header.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html
rename to core/styles/prosilver/template/gallery/gallery_header.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html b/core/styles/prosilver/template/gallery/image_edit_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html
rename to core/styles/prosilver/template/gallery/image_edit_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html b/core/styles/prosilver/template/gallery/imageblock_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html
rename to core/styles/prosilver/template/gallery/imageblock_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html
rename to core/styles/prosilver/template/gallery/imageblock_polaroid.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html b/core/styles/prosilver/template/gallery/imageblock_popup.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html
rename to core/styles/prosilver/template/gallery/imageblock_popup.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/index_body.html b/core/styles/prosilver/template/gallery/index_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/index_body.html
rename to core/styles/prosilver/template/gallery/index_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html b/core/styles/prosilver/template/gallery/mcp_approve.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html
rename to core/styles/prosilver/template/gallery/mcp_approve.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html b/core/styles/prosilver/template/gallery/mcp_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html
rename to core/styles/prosilver/template/gallery/mcp_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/message.html b/core/styles/prosilver/template/gallery/message.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/message.html
rename to core/styles/prosilver/template/gallery/message.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html b/core/styles/prosilver/template/gallery/moderate_actions.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html
rename to core/styles/prosilver/template/gallery/moderate_actions.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html b/core/styles/prosilver/template/gallery/moderate_actions_queue.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html
rename to core/styles/prosilver/template/gallery/moderate_actions_queue.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html b/core/styles/prosilver/template/gallery/moderate_album_overview.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html
rename to core/styles/prosilver/template/gallery/moderate_album_overview.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html b/core/styles/prosilver/template/gallery/moderate_approve.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html
rename to core/styles/prosilver/template/gallery/moderate_approve.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html b/core/styles/prosilver/template/gallery/moderate_approve_queue.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html
rename to core/styles/prosilver/template/gallery/moderate_approve_queue.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html b/core/styles/prosilver/template/gallery/moderate_image_overview.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html
rename to core/styles/prosilver/template/gallery/moderate_image_overview.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html b/core/styles/prosilver/template/gallery/moderate_overview.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html
rename to core/styles/prosilver/template/gallery/moderate_overview.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html b/core/styles/prosilver/template/gallery/moderate_report_queue.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html
rename to core/styles/prosilver/template/gallery/moderate_report_queue.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html b/core/styles/prosilver/template/gallery/moderate_reports.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html
rename to core/styles/prosilver/template/gallery/moderate_reports.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html b/core/styles/prosilver/template/gallery/plugins_header.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html
rename to core/styles/prosilver/template/gallery/plugins_header.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html b/core/styles/prosilver/template/gallery/posting_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html
rename to core/styles/prosilver/template/gallery/posting_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html b/core/styles/prosilver/template/gallery/posting_javascript.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html
rename to core/styles/prosilver/template/gallery/posting_javascript.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html b/core/styles/prosilver/template/gallery/recent_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html
rename to core/styles/prosilver/template/gallery/recent_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/search_body.html b/core/styles/prosilver/template/gallery/search_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/search_body.html
rename to core/styles/prosilver/template/gallery/search_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/search_random.html b/core/styles/prosilver/template/gallery/search_random.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/search_random.html
rename to core/styles/prosilver/template/gallery/search_random.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html b/core/styles/prosilver/template/gallery/search_recent.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html
rename to core/styles/prosilver/template/gallery/search_recent.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/search_results.html b/core/styles/prosilver/template/gallery/search_results.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/search_results.html
rename to core/styles/prosilver/template/gallery/search_results.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html b/core/styles/prosilver/template/gallery/ucp_gallery.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html
rename to core/styles/prosilver/template/gallery/ucp_gallery.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html
rename to core/styles/prosilver/template/gallery/viewimage_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/template/message_body.html b/core/styles/prosilver/template/message_body.html
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/template/message_body.html
rename to core/styles/prosilver/template/message_body.html
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/gallery-color.css b/core/styles/prosilver/theme/gallery-color.css
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/gallery-color.css
rename to core/styles/prosilver/theme/gallery-color.css
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/gallery.css b/core/styles/prosilver/theme/gallery.css
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/gallery.css
rename to core/styles/prosilver/theme/gallery.css
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif b/core/styles/prosilver/theme/images/icon_contact_gallery.gif
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif
rename to core/styles/prosilver/theme/images/icon_contact_gallery.gif
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif b/core/styles/prosilver/theme/images/icon_gallery_locked.gif
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif
rename to core/styles/prosilver/theme/images/icon_gallery_locked.gif
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif b/core/styles/prosilver/theme/images/icon_gallery_reported.gif
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif
rename to core/styles/prosilver/theme/images/icon_gallery_reported.gif
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif b/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
rename to core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png b/core/styles/prosilver/theme/images/icon_topic_unapproved.png
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png
rename to core/styles/prosilver/theme/images/icon_topic_unapproved.png
diff --git a/ext/phpbbgallery/core/styles/prosilver/theme/images/lock.png b/core/styles/prosilver/theme/images/lock.png
similarity index 100%
rename from ext/phpbbgallery/core/styles/prosilver/theme/images/lock.png
rename to core/styles/prosilver/theme/images/lock.png
diff --git a/ext/phpbbgallery/core/ucp/main_info.php b/core/ucp/main_info.php
similarity index 100%
rename from ext/phpbbgallery/core/ucp/main_info.php
rename to core/ucp/main_info.php
diff --git a/ext/phpbbgallery/core/ucp/main_module.php b/core/ucp/main_module.php
similarity index 100%
rename from ext/phpbbgallery/core/ucp/main_module.php
rename to core/ucp/main_module.php
diff --git a/ext/phpbbgallery/core/ucp/settings_info.php b/core/ucp/settings_info.php
similarity index 100%
rename from ext/phpbbgallery/core/ucp/settings_info.php
rename to core/ucp/settings_info.php
diff --git a/ext/phpbbgallery/core/ucp/settings_module.php b/core/ucp/settings_module.php
similarity index 100%
rename from ext/phpbbgallery/core/ucp/settings_module.php
rename to core/ucp/settings_module.php
diff --git a/ext/phpbbgallery/core/upload.php b/core/upload.php
similarity index 100%
rename from ext/phpbbgallery/core/upload.php
rename to core/upload.php
diff --git a/ext/phpbbgallery/core/url.php b/core/url.php
similarity index 100%
rename from ext/phpbbgallery/core/url.php
rename to core/url.php
diff --git a/ext/phpbbgallery/core/user.php b/core/user.php
similarity index 100%
rename from ext/phpbbgallery/core/user.php
rename to core/user.php
diff --git a/ext/phpbbgallery/exif/composer.json b/exif/composer.json
similarity index 100%
rename from ext/phpbbgallery/exif/composer.json
rename to exif/composer.json
diff --git a/ext/phpbbgallery/exif/config/services.yml b/exif/config/services.yml
similarity index 100%
rename from ext/phpbbgallery/exif/config/services.yml
rename to exif/config/services.yml
diff --git a/ext/phpbbgallery/exif/event/exif_listener.php b/exif/event/exif_listener.php
similarity index 100%
rename from ext/phpbbgallery/exif/event/exif_listener.php
rename to exif/event/exif_listener.php
diff --git a/ext/phpbbgallery/exif/exif.php b/exif/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/exif.php
rename to exif/exif.php
diff --git a/ext/phpbbgallery/exif/ext.php b/exif/ext.php
similarity index 100%
rename from ext/phpbbgallery/exif/ext.php
rename to exif/ext.php
diff --git a/ext/phpbbgallery/exif/language/bg/exif.php b/exif/language/bg/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/bg/exif.php
rename to exif/language/bg/exif.php
diff --git a/ext/phpbbgallery/exif/language/bg/index.htm b/exif/language/bg/index.htm
similarity index 100%
rename from ext/phpbbgallery/exif/language/bg/index.htm
rename to exif/language/bg/index.htm
diff --git a/ext/phpbbgallery/exif/language/de/exif.php b/exif/language/de/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/de/exif.php
rename to exif/language/de/exif.php
diff --git a/ext/phpbbgallery/exif/language/en/exif.php b/exif/language/en/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/en/exif.php
rename to exif/language/en/exif.php
diff --git a/ext/phpbbgallery/exif/language/en/index.htm b/exif/language/en/index.htm
similarity index 100%
rename from ext/phpbbgallery/exif/language/en/index.htm
rename to exif/language/en/index.htm
diff --git a/ext/phpbbgallery/exif/language/fr/exif.php b/exif/language/fr/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/fr/exif.php
rename to exif/language/fr/exif.php
diff --git a/ext/phpbbgallery/exif/language/it/exif.php b/exif/language/it/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/it/exif.php
rename to exif/language/it/exif.php
diff --git a/ext/phpbbgallery/exif/language/it/index.htm b/exif/language/it/index.htm
similarity index 100%
rename from ext/phpbbgallery/exif/language/it/index.htm
rename to exif/language/it/index.htm
diff --git a/ext/phpbbgallery/exif/language/ru/exif.php b/exif/language/ru/exif.php
similarity index 100%
rename from ext/phpbbgallery/exif/language/ru/exif.php
rename to exif/language/ru/exif.php
diff --git a/ext/phpbbgallery/exif/license.txt b/exif/license.txt
similarity index 100%
rename from ext/phpbbgallery/exif/license.txt
rename to exif/license.txt
diff --git a/ext/phpbbgallery/exif/migrations/m1_init.php b/exif/migrations/m1_init.php
similarity index 100%
rename from ext/phpbbgallery/exif/migrations/m1_init.php
rename to exif/migrations/m1_init.php
diff --git a/ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html b/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
similarity index 100%
rename from ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
rename to exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
diff --git a/ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp b/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
similarity index 100%
rename from ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
rename to exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
diff --git a/ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html b/exif/styles/prosilver/template/event/gallery_viewimage_details.html
similarity index 100%
rename from ext/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html
rename to exif/styles/prosilver/template/event/gallery_viewimage_details.html
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index eb90b2b4..5d44af98 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -13,27 +13,27 @@
>
- ./ext/phpbbgallery/tests
- ./ext/phpbbgallery/tests/functional
+ ./tests
+ ./tests/functional
- ./ext/phpbbgallery/tests/functional/
+ ./tests/functional/
- ./ext/phpbbgallery
+ ./
- ./ext/phpbbgallery/acpcleanup/language/
- ./ext/phpbbgallery/acpcleanup/migrations/
- ./ext/phpbbgallery/acpimport/language/
- ./ext/phpbbgallery/acpimport/migrations/
- ./ext/phpbbgallery/exif/language/
- ./ext/phpbbgallery/exif/migrations/
- ./ext/phpbbgallery/core/language/
- ./ext/phpbbgallery/core/migrations/
- ./ext/phpbbgallery/tests/
+ ./acpcleanup/language/
+ ./acpcleanup/migrations/
+ ./acpimport/language/
+ ./acpimport/migrations/
+ ./exif/language/
+ ./exif/migrations/
+ ./core/language/
+ ./core/migrations/
+ ./tests/
diff --git a/ext/phpbbgallery/tests/controller/controller_base.php b/tests/controller/controller_base.php
similarity index 100%
rename from ext/phpbbgallery/tests/controller/controller_base.php
rename to tests/controller/controller_base.php
diff --git a/ext/phpbbgallery/tests/controller/fixtures/fixture.xml b/tests/controller/fixtures/fixture.xml
similarity index 100%
rename from ext/phpbbgallery/tests/controller/fixtures/fixture.xml
rename to tests/controller/fixtures/fixture.xml
diff --git a/ext/phpbbgallery/tests/controller/gallery_album_test.php b/tests/controller/gallery_album_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/controller/gallery_album_test.php
rename to tests/controller/gallery_album_test.php
diff --git a/ext/phpbbgallery/tests/controller/gallery_comment_test.php b/tests/controller/gallery_comment_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/controller/gallery_comment_test.php
rename to tests/controller/gallery_comment_test.php
diff --git a/ext/phpbbgallery/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/controller/gallery_index_test.php
rename to tests/controller/gallery_index_test.php
diff --git a/ext/phpbbgallery/tests/controller/gallery_moderate_test.php b/tests/controller/gallery_moderate_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/controller/gallery_moderate_test.php
rename to tests/controller/gallery_moderate_test.php
diff --git a/ext/phpbbgallery/tests/core/album/core_album_test.php b/tests/core/album/core_album_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/album/core_album_test.php
rename to tests/core/album/core_album_test.php
diff --git a/ext/phpbbgallery/tests/core/album/core_display_test.php b/tests/core/album/core_display_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/album/core_display_test.php
rename to tests/core/album/core_display_test.php
diff --git a/ext/phpbbgallery/tests/core/core_auth_test.php b/tests/core/core_auth_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_auth_test.php
rename to tests/core/core_auth_test.php
diff --git a/ext/phpbbgallery/tests/core/core_base.php b/tests/core/core_base.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_base.php
rename to tests/core/core_base.php
diff --git a/ext/phpbbgallery/tests/core/core_block_test.php b/tests/core/core_block_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_block_test.php
rename to tests/core/core_block_test.php
diff --git a/ext/phpbbgallery/tests/core/core_cache_test.php b/tests/core/core_cache_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_cache_test.php
rename to tests/core/core_cache_test.php
diff --git a/ext/phpbbgallery/tests/core/core_comment_test.php b/tests/core/core_comment_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_comment_test.php
rename to tests/core/core_comment_test.php
diff --git a/ext/phpbbgallery/tests/core/core_config_test.php b/tests/core/core_config_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_config_test.php
rename to tests/core/core_config_test.php
diff --git a/ext/phpbbgallery/tests/core/core_contest_test.php b/tests/core/core_contest_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_contest_test.php
rename to tests/core/core_contest_test.php
diff --git a/ext/phpbbgallery/tests/core/core_image_test.php b/tests/core/core_image_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_image_test.php
rename to tests/core/core_image_test.php
diff --git a/ext/phpbbgallery/tests/core/core_notification_test.php b/tests/core/core_notification_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_notification_test.php
rename to tests/core/core_notification_test.php
diff --git a/ext/phpbbgallery/tests/core/core_rating_test.php b/tests/core/core_rating_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_rating_test.php
rename to tests/core/core_rating_test.php
diff --git a/ext/phpbbgallery/tests/core/core_report_test.php b/tests/core/core_report_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_report_test.php
rename to tests/core/core_report_test.php
diff --git a/ext/phpbbgallery/tests/core/core_search_test.php b/tests/core/core_search_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_search_test.php
rename to tests/core/core_search_test.php
diff --git a/ext/phpbbgallery/tests/core/core_url_test.php b/tests/core/core_url_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_url_test.php
rename to tests/core/core_url_test.php
diff --git a/ext/phpbbgallery/tests/core/core_user_test.php b/tests/core/core_user_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/core/core_user_test.php
rename to tests/core/core_user_test.php
diff --git a/ext/phpbbgallery/tests/core/fixtures/fixture.xml b/tests/core/fixtures/fixture.xml
similarity index 100%
rename from ext/phpbbgallery/tests/core/fixtures/fixture.xml
rename to tests/core/fixtures/fixture.xml
diff --git a/ext/phpbbgallery/tests/event/fixtures/fixture.xml b/tests/event/fixtures/fixture.xml
similarity index 100%
rename from ext/phpbbgallery/tests/event/fixtures/fixture.xml
rename to tests/event/fixtures/fixture.xml
diff --git a/ext/phpbbgallery/tests/event/main_event_test.php b/tests/event/main_event_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/event/main_event_test.php
rename to tests/event/main_event_test.php
diff --git a/ext/phpbbgallery/tests/functional/images/valid.gif b/tests/functional/images/valid.gif
similarity index 100%
rename from ext/phpbbgallery/tests/functional/images/valid.gif
rename to tests/functional/images/valid.gif
diff --git a/ext/phpbbgallery/tests/functional/images/valid.jpg b/tests/functional/images/valid.jpg
similarity index 100%
rename from ext/phpbbgallery/tests/functional/images/valid.jpg
rename to tests/functional/images/valid.jpg
diff --git a/ext/phpbbgallery/tests/functional/images/valid.png b/tests/functional/images/valid.png
similarity index 100%
rename from ext/phpbbgallery/tests/functional/images/valid.png
rename to tests/functional/images/valid.png
diff --git a/ext/phpbbgallery/tests/functional/images/valid.webp b/tests/functional/images/valid.webp
similarity index 100%
rename from ext/phpbbgallery/tests/functional/images/valid.webp
rename to tests/functional/images/valid.webp
diff --git a/ext/phpbbgallery/tests/functional/images/valid.zip b/tests/functional/images/valid.zip
similarity index 100%
rename from ext/phpbbgallery/tests/functional/images/valid.zip
rename to tests/functional/images/valid.zip
diff --git a/ext/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
rename to tests/functional/phpbbgallery_alpha_test.php
diff --git a/ext/phpbbgallery/tests/functional/phpbbgallery_base.php b/tests/functional/phpbbgallery_base.php
similarity index 100%
rename from ext/phpbbgallery/tests/functional/phpbbgallery_base.php
rename to tests/functional/phpbbgallery_base.php
diff --git a/ext/phpbbgallery/tests/functional/phpbbgallery_beta_test.php b/tests/functional/phpbbgallery_beta_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/functional/phpbbgallery_beta_test.php
rename to tests/functional/phpbbgallery_beta_test.php
diff --git a/ext/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php b/tests/functional/phpbbgallery_charlie_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
rename to tests/functional/phpbbgallery_charlie_test.php
diff --git a/ext/phpbbgallery/tests/functional/phpbbgallery_delta_test.php b/tests/functional/phpbbgallery_delta_test.php
similarity index 100%
rename from ext/phpbbgallery/tests/functional/phpbbgallery_delta_test.php
rename to tests/functional/phpbbgallery_delta_test.php
From 3bc4497a042e393fb8d878788fbb9cc4a452ca31 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:37:58 +0100
Subject: [PATCH 035/138] Change placeholders logic for mariaDB compatible code
---
core/search.php | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/core/search.php b/core/search.php
index c4505af3..132b9e50 100644
--- a/core/search.php
+++ b/core/search.php
@@ -269,20 +269,34 @@ public function recent_count()
$view_album_ids = array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums);
$mod_album_ids = array_diff($this->gallery_auth->acl_album_ids('m_status'), $exclude_albums);
- // Start SQL with placeholder for image_status <> STATUS_ORPHAN
+ if (empty($view_album_ids) && empty($mod_album_ids))
+ {
+ return 0;
+ }
+
$sql = 'SELECT COUNT(image_id) AS count
FROM ' . $this->images_table . '
- WHERE image_status <> ?';
+ WHERE image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN;
- $params = [\phpbbgallery\core\block::STATUS_ORPHAN];
+ $conditions = [];
+
+ if (!empty($view_album_ids))
+ {
+ $conditions[] = '(' . $this->db->sql_in_set('image_album_id', $view_album_ids) . '
+ AND image_status <> ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ')';
+ }
- // Add the complex WHERE condition with placeholders for STATUS_UNAPPROVED
- $sql .= ' AND ((' . $this->db->sql_in_set('image_album_id', $view_album_ids, false, true) . ' AND image_status <> ?) OR ' . $this->db->sql_in_set('image_album_id', $mod_album_ids, false, true) . ')';
+ if (!empty($mod_album_ids))
+ {
+ $conditions[] = $this->db->sql_in_set('image_album_id', $mod_album_ids);
+ }
- $params[] = \phpbbgallery\core\block::STATUS_UNAPPROVED;
+ if (!empty($conditions))
+ {
+ $sql .= ' AND (' . implode(' OR ', $conditions) . ')';
+ }
- // Execute query with parameters bound safely
- $result = $this->db->sql_query($sql, $params);
+ $result = $this->db->sql_query($sql);
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
@@ -290,6 +304,7 @@ public function recent_count()
}
+
/**
* recent comments
* @param (int) $limit How many imagese to query
From f8bc8d3dbd143eed4a69c4d89612325366c56218 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 17:55:28 +0100
Subject: [PATCH 036/138] Fix sql injection warnings
---
.github/workflows/tests.yml | 2 +-
acpcleanup/cleanup.php | 12 ++++++------
acpimport/acp/main_module.php | 4 ++--
core/album/display.php | 22 +++++++++++-----------
core/search.php | 8 ++++++--
5 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 8dc7134e..daf6104f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -109,7 +109,7 @@ jobs:
run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/phpbbgallery/core/"
working-directory: ./phpBB3
- - name: Run EPV on ACP ECIF
+ - name: Run EPV on ACP EXIF
if: ${{ env.EPV != 0 }}
run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/phpbbgallery/exif/"
working-directory: ./phpBB3
diff --git a/acpcleanup/cleanup.php b/acpcleanup/cleanup.php
index f6826d6f..9f062d70 100644
--- a/acpcleanup/cleanup.php
+++ b/acpcleanup/cleanup.php
@@ -144,16 +144,16 @@ public function delete_author_comments($comment_ids)
}
/**
- * Delete unwanted and obsolent personal galleries.
+ * Delete unwanted and obsolete personal galleries.
*
* @param array $unwanted_pegas User IDs we want to delete the pegas.
- * @param array $obsolent_pegas User IDs we want to delete the pegas.
+ * @param array $obsolete_pegas User IDs we want to delete the pegas.
* @return array Language keys for the success messages.
*/
- public function delete_pegas($unwanted_pegas, $obsolent_pegas)
+ public function delete_pegas($unwanted_pegas, $obsolete_pegas)
{
- $delete_pegas = array_merge($unwanted_pegas, $obsolent_pegas);
+ $delete_pegas = array_merge($unwanted_pegas, $obsolete_pegas);
$delete_images = $delete_albums = $user_image_count = array();
$num_pegas = 0;
@@ -226,7 +226,7 @@ public function delete_pegas($unwanted_pegas, $obsolent_pegas)
),
),
- 'WHERE' => 'a.album_user_id <> ' . $this->album->get_public() . ' AND a.parent_id = 0',
+ 'WHERE' => 'a.album_user_id <> ' . (int) $this->album->get_public() . ' AND a.parent_id = 0',
'ORDER_BY' => 'a.album_id DESC',
);
$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -267,7 +267,7 @@ public function delete_pegas($unwanted_pegas, $obsolent_pegas)
\phpbbgallery\core\user::update_users($delete_pegas, array('personal_album_id' => 0));
*/
$return = array();
- if ($obsolent_pegas)
+ if ($obsolete_pegas)
{
$return[] = 'CLEAN_PERSONALS_DONE';
}
diff --git a/acpimport/acp/main_module.php b/acpimport/acp/main_module.php
index 8ed40442..0798646e 100644
--- a/acpimport/acp/main_module.php
+++ b/acpimport/acp/main_module.php
@@ -302,7 +302,7 @@ function import()
$sql = 'SELECT username, user_colour, user_id
FROM ' . USERS_TABLE . '
- WHERE user_id = ' . $user_id;
+ WHERE user_id = ' . (int) $user_id;
$result = $db->sql_query($sql);
$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -339,7 +339,7 @@ function import()
// Where do we put them to?
$sql = 'SELECT album_id, album_name
FROM ' . $table_prefix . 'gallery_albums
- WHERE album_id = ' . $album_id;
+ WHERE album_id = ' . (int) $album_id;
$result = $db->sql_query($sql);
$album_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
diff --git a/core/album/display.php b/core/album/display.php
index 1065bd54..73536ce3 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -137,7 +137,7 @@ public function generate_navigation($album_data)
$album_parents = $this->get_parents($album_data);
// Display username for personal albums
- if ($album_data['album_user_id'] > \phpbbgallery\core\block::PUBLIC_ALBUM)
+ if ($album_data['album_user_id'] > (int) \phpbbgallery\core\block::PUBLIC_ALBUM)
{
$sql = 'SELECT user_id, username, user_colour
FROM ' . USERS_TABLE . '
@@ -179,9 +179,9 @@ public function generate_navigation($album_data)
'ALBUM_ID' => $album_data['album_id'],
'ALBUM_NAME' => $album_data['album_name'],
'ALBUM_DESC' => generate_text_for_display($album_data['album_desc'], $album_data['album_desc_uid'], $album_data['album_desc_bitfield'], $album_data['album_desc_options']),
- 'ALBUM_CONTEST_START' => ($album_data['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '',
- 'ALBUM_CONTEST_RATING' => ($album_data['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '',
- 'ALBUM_CONTEST_END' => ($album_data['album_type'] == \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '',
+ 'ALBUM_CONTEST_START' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '',
+ 'ALBUM_CONTEST_RATING' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '',
+ 'ALBUM_CONTEST_END' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '',
'U_VIEW_ALBUM' => $this->helper->route('phpbbgallery_core_album', array('album_id' => (int) $album_data['album_id'])),
));
@@ -347,8 +347,8 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
{
$mark_read = 'all';
}
- $root_data = array('album_id' => \phpbbgallery\core\block::PUBLIC_ALBUM);
- $sql_where = 'a.album_user_id = ' . \phpbbgallery\core\block::PUBLIC_ALBUM;
+ $root_data = array('album_id' => (int) \phpbbgallery\core\block::PUBLIC_ALBUM);
+ $sql_where = 'a.album_user_id = ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM;
}
else if ($root_data == 'personal')
{
@@ -357,7 +357,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
$mark_read = 'all';
}
$root_data = array('album_id' => 0);
- $sql_where = 'a.album_user_id > ' . \phpbbgallery\core\block::PUBLIC_ALBUM;
+ $sql_where = 'a.album_user_id > ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM;
$num_pegas = $this->config['phpbb_gallery_num_pegas'];
$first_char = strtolower($this->request->variable('first_char', ''));
if (!preg_match('/^[a-z]$/', $first_char) && $first_char !== 'other')
@@ -609,7 +609,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
foreach ($album_rows as $row)
{
// Empty category
- if (($row['parent_id'] == $root_data['album_id']) && ($row['album_type'] == \phpbbgallery\core\block::TYPE_CAT))
+ if (($row['parent_id'] == $root_data['album_id']) && ($row['album_type'] == (int) \phpbbgallery\core\block::TYPE_CAT))
{
$this->template->assign_block_vars('albumrow', array(
'S_IS_CAT' => true,
@@ -684,7 +684,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
$folder_alt = ($album_unread) ? 'NEW_IMAGES' : 'NO_NEW_IMAGES';
$folder_image = ($album_unread) ? 'forum_unread' : 'forum_read';
}
- if ($row['album_status'] == \phpbbgallery\core\block::ALBUM_LOCKED)
+ if ($row['album_status'] == (int) \phpbbgallery\core\block::ALBUM_LOCKED)
{
$folder_image = ($album_unread) ? 'forum_unread_locked' : 'forum_read_locked';
$folder_alt = 'ALBUM_LOCKED';
@@ -729,12 +729,12 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
$s_subalbums_list = (string) implode(', ', $s_subalbums_list);
$catless = ($row['parent_id'] == $root_data['album_id']) ? true : false;
- $s_username_hidden = ($lastimage_album_type == \phpbbgallery\core\block::TYPE_CONTEST) && $lastimage_contest_marked && !$this->gallery_auth->acl_check('m_status', $album_id, $row['album_user_id']) && ($this->user->data['user_id'] != $row['album_last_user_id'] || $row['album_last_user_id'] == ANONYMOUS);
+ $s_username_hidden = ($lastimage_album_type == (int) \phpbbgallery\core\block::TYPE_CONTEST) && $lastimage_contest_marked && !$this->gallery_auth->acl_check('m_status', $album_id, $row['album_user_id']) && ($this->user->data['user_id'] != $row['album_last_user_id'] || $row['album_last_user_id'] == ANONYMOUS);
$this->template->assign_block_vars('albumrow', array(
'S_IS_CAT' => false,
'S_NO_CAT' => $catless && !$last_catless,
- 'S_LOCKED_ALBUM' => ($row['album_status'] == \phpbbgallery\core\block::ALBUM_LOCKED) ? true : false,
+ 'S_LOCKED_ALBUM' => ($row['album_status'] == (int) \phpbbgallery\core\block::ALBUM_LOCKED) ? true : false,
'S_UNREAD_ALBUM' => ($album_unread) ? true : false,
'S_LIST_SUBALBUMS' => ($row['display_subalbum_list']) ? true : false,
'S_SUBALBUMS' => (sizeof($subalbums_list)) ? true : false,
diff --git a/core/search.php b/core/search.php
index 132b9e50..4beea131 100644
--- a/core/search.php
+++ b/core/search.php
@@ -209,6 +209,8 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
return;
}
+ $id_ary = array_map('intval', $id_ary);
+
$sql_where = $this->db->sql_in_set('i.image_id', $id_ary);
$sql_array = array(
@@ -222,7 +224,7 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
),
),
- 'WHERE' => 'i.image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
+ 'WHERE' => 'i.image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
'GROUP_BY' => 'i.image_id, a.album_name, a.album_status, a.album_user_id, a.album_id',
'ORDER_BY' => $sql_order,
);
@@ -530,6 +532,8 @@ public function recent($limit, $start = 0, $user = 0, $fields = 'rrc_gindex_disp
return;
}
+ $id_ary = array_map('intval', $id_ary);
+
$sql_where = $this->db->sql_in_set('i.image_id', $id_ary);
$sql_array = array(
@@ -543,7 +547,7 @@ public function recent($limit, $start = 0, $user = 0, $fields = 'rrc_gindex_disp
),
),
- 'WHERE' => 'i.image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
+ 'WHERE' => 'i.image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
'ORDER_BY' => $sql_order,
);
$sql = $this->db->sql_build_query('SELECT', $sql_array);
From b3c5a0ec8c9fbe12b52480b941f1c8c6978ec619 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 18:07:50 +0100
Subject: [PATCH 037/138] More improves
---
exif/exif.php | 2 +-
tests/controller/gallery_index_test.php | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/exif/exif.php b/exif/exif.php
index ce86734a..00a253d0 100644
--- a/exif/exif.php
+++ b/exif/exif.php
@@ -315,7 +315,7 @@ public function set_status()
$update_data = ($this->status == self::DBSAVED) ? ", image_exif_data = '" . $db->sql_escape($this->serialized) . "'" : '';
$sql = 'UPDATE ' . $table_prefix . 'gallery_images
SET image_has_exif = ' . $this->status . $update_data . '
- WHERE image_id = ' . $this->image_id;
+ WHERE image_id = ' . (int) $this->image_id;
$db->sql_query($sql);
}
diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
index e4fad1de..49a47a45 100644
--- a/tests/controller/gallery_index_test.php
+++ b/tests/controller/gallery_index_test.php
@@ -171,7 +171,8 @@ public function test_controller_base_case_1()
'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
- 'U_UPLOADER' => false
+ 'U_UPLOADER' => false,
+ 'ALPHABET_NAVIGATION' => false,
)
),
array(
@@ -461,7 +462,8 @@ public function test_controller_base_case_3()
'U_IMAGE_ACTION' => false,
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
- 'U_UPLOADER' => false
+ 'U_UPLOADER' => false,
+ 'ALPHABET_NAVIGATION' => false,
)
),
array(
@@ -633,7 +635,8 @@ public function test_controller_base_case_4()
'U_IMAGE_ACTION' => 'phpbbgallery_core_image',
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
- 'U_UPLOADER' => false
+ 'U_UPLOADER' => false,
+ 'ALPHABET_NAVIGATION' => false,
)
),
array(
From 817cddae1b526bf666e3cbe9a6b171cfa7ff2dc8 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 18:25:29 +0100
Subject: [PATCH 038/138] Refactor structure again to test EPV again
---
.gitattributes | 16 ++++++------
.travis.yml | 4 +--
.../acpcleanup}/acp/main_info.php | 0
.../acpcleanup}/acp/main_module.php | 0
.../adm/style/gallery_cleanup.html | 0
.../acpcleanup}/adm/style/index.htm | 0
.../acpcleanup}/cleanup.php | 0
.../acpcleanup}/composer.json | 0
.../acpcleanup}/config/services.yml | 0
.../acpcleanup}/ext.php | 0
.../language/bg/info_acp_gallery_cleanup.php | 0
.../language/de/info_acp_gallery_cleanup.php | 0
.../language/en/info_acp_gallery_cleanup.php | 0
.../language/fr/info_acp_gallery_cleanup.php | 0
.../language/it/info_acp_gallery_cleanup.php | 0
.../language/ru/info_acp_gallery_cleanup.php | 0
.../acpcleanup}/license.txt | 0
.../acpcleanup}/migrations/m1_init.php | 0
.../acpimport}/acp/main_info.php | 0
.../acpimport}/acp/main_module.php | 0
.../adm/style/gallery_acpimport.html | 0
.../acpimport}/composer.json | 0
{acpimport => phpbbgallery/acpimport}/ext.php | 0
.../bg/info_acp_gallery_acpimport.php | 0
.../de/info_acp_gallery_acpimport.php | 0
.../en/info_acp_gallery_acpimport.php | 0
.../fr/info_acp_gallery_acpimport.php | 0
.../it/info_acp_gallery_acpimport.php | 0
.../ru/info_acp_gallery_acpimport.php | 0
.../acpimport}/license.txt | 0
.../acpimport}/migrations/m1_init.php | 0
.../core}/acp/albums_info.php | 0
.../core}/acp/albums_module.php | 0
.../core}/acp/config_info.php | 0
.../core}/acp/config_module.php | 0
.../core}/acp/gallery_logs_info.php | 0
.../core}/acp/gallery_logs_module.php | 0
{core => phpbbgallery/core}/acp/main_info.php | 0
.../core}/acp/main_module.php | 0
.../core}/acp/permissions_info.php | 0
.../core}/acp/permissions_module.php | 0
{core => phpbbgallery/core}/adm/index.htm | 0
.../core}/adm/style/gallery_albums.html | 0
.../core}/adm/style/gallery_logs.html | 0
.../core}/adm/style/gallery_main.html | 0
.../core}/adm/style/gallery_permissions.html | 0
.../core}/adm/style/index.htm | 0
{core => phpbbgallery/core}/album/album.php | 0
{core => phpbbgallery/core}/album/display.php | 2 ++
{core => phpbbgallery/core}/album/loader.php | 0
{core => phpbbgallery/core}/album/manage.php | 0
{core => phpbbgallery/core}/auth/auth.php | 0
{core => phpbbgallery/core}/auth/level.php | 0
{core => phpbbgallery/core}/auth/set.php | 0
{core => phpbbgallery/core}/block.bkp | 0
{core => phpbbgallery/core}/block.php | 0
{core => phpbbgallery/core}/cache.php | 0
{core => phpbbgallery/core}/comment.php | 0
{core => phpbbgallery/core}/composer.json | 0
{core => phpbbgallery/core}/config.php | 0
.../core}/config/routing.yml | 0
.../core}/config/services.yml | 0
.../core}/config/services_controller.yml | 0
.../core}/config/services_files.yml | 0
.../config/services_notification_types.yml | 0
{core => phpbbgallery/core}/config/tables.yml | 0
{core => phpbbgallery/core}/constants.php | 0
{core => phpbbgallery/core}/contest.php | 0
.../core}/controller/album.php | 0
.../core}/controller/comment.php | 0
.../core}/controller/file.php | 0
.../core}/controller/image.php | 0
.../core}/controller/index.php | 0
.../core}/controller/moderate.php | 0
.../core}/controller/search.php | 0
.../core}/controller/upload.php | 0
.../core}/cron/cron_cleaner.php | 0
{core => phpbbgallery/core}/docs/tables.md | 0
.../core}/event/main_listener.php | 0
{core => phpbbgallery/core}/ext.php | 0
{core => phpbbgallery/core}/file/file.php | 0
.../core}/file/types/multiform.php | 0
{core => phpbbgallery/core}/image/image.php | 0
.../core}/images/icon_delete.gif | Bin
.../core}/images/icon_delete_disabled.gif | Bin
.../core}/images/icon_down.gif | Bin
.../core}/images/icon_down_disabled.gif | Bin
.../core}/images/icon_edit.gif | Bin
.../core}/images/icon_edit_disabled.gif | Bin
.../core}/images/icon_up.gif | Bin
.../core}/images/icon_up_disabled.gif | Bin
.../core}/images/legacy/watermark.png | Bin
.../core}/images/upload/image_not_exist.jpg | Bin
.../core}/images/upload/index.htm | 0
.../core}/images/upload/no_hotlinking.jpg | Bin
.../core}/images/upload/not_authorised.jpg | Bin
.../core}/images/watermark.png | Bin
.../language/bg/email/newcomment_notify.txt | 0
.../language/bg/email/newimage_notify.txt | 0
.../core}/language/bg/gallery.php | 0
.../core}/language/bg/gallery_acp.php | 0
.../core}/language/bg/gallery_mcp.php | 0
.../language/bg/gallery_notifications.php | 0
.../core}/language/bg/gallery_ucp.php | 0
.../core}/language/bg/info_acp_gallery.php | 0
.../language/bg/info_acp_gallery_logs.php | 0
.../core}/language/bg/info_ucp_gallery.php | 0
.../core}/language/bg/install_gallery.php | 0
.../core}/language/bg/permissions_gallery.php | 0
.../language/de/email/newcomment_notify.txt | 0
.../language/de/email/newimage_notify.txt | 0
.../core}/language/de/gallery.php | 0
.../core}/language/de/gallery_acp.php | 0
.../core}/language/de/gallery_mcp.php | 0
.../language/de/gallery_notifications.php | 0
.../core}/language/de/gallery_ucp.php | 0
.../core}/language/de/index.htm | 0
.../core}/language/de/info_acp_gallery.php | 0
.../language/de/info_acp_gallery_logs.php | 0
.../core}/language/de/info_ucp_gallery.php | 0
.../core}/language/de/install_gallery.php | 0
.../core}/language/de/permissions_gallery.php | 0
.../language/en/email/newcomment_notify.txt | 0
.../language/en/email/newimage_notify.txt | 0
.../core}/language/en/gallery.php | 0
.../core}/language/en/gallery_acp.php | 0
.../core}/language/en/gallery_mcp.php | 0
.../language/en/gallery_notifications.php | 0
.../core}/language/en/gallery_ucp.php | 0
.../core}/language/en/info_acp_gallery.php | 0
.../language/en/info_acp_gallery_logs.php | 0
.../core}/language/en/info_ucp_gallery.php | 0
.../core}/language/en/install_gallery.php | 0
.../core}/language/en/permissions_gallery.php | 0
.../language/es/email/newcomment_notify.txt | 0
.../language/es/email/newimage_notify.txt | 0
.../core}/language/es/gallery.php | 0
.../core}/language/es/gallery_acp.php | 0
.../core}/language/es/gallery_mcp.php | 0
.../language/es/gallery_notifications.php | 0
.../core}/language/es/gallery_ucp.php | 0
.../core}/language/es/info_acp_gallery.php | 0
.../language/es/info_acp_gallery_logs.php | 0
.../core}/language/es/info_ucp_gallery.php | 0
.../core}/language/es/install_gallery.php | 0
.../core}/language/es/permissions_gallery.php | 0
.../language/fr/email/newcomment_notify.txt | 0
.../language/fr/email/newimage_notify.txt | 0
.../core}/language/fr/gallery.php | 0
.../core}/language/fr/gallery_acp.php | 0
.../core}/language/fr/gallery_mcp.php | 0
.../language/fr/gallery_notifications.php | 0
.../core}/language/fr/gallery_ucp.php | 0
.../core}/language/fr/info_acp_gallery.php | 0
.../language/fr/info_acp_gallery_logs.php | 0
.../core}/language/fr/info_ucp_gallery.php | 0
.../core}/language/fr/install_gallery.php | 0
.../core}/language/fr/permissions_gallery.php | 0
.../language/it/email/newcomment_notify.txt | 0
.../language/it/email/newimage_notify.txt | 0
.../core}/language/it/gallery.php | 0
.../core}/language/it/gallery_acp.php | 0
.../core}/language/it/gallery_mcp.php | 0
.../language/it/gallery_notifications.php | 0
.../core}/language/it/gallery_ucp.php | 0
.../core}/language/it/info_acp_gallery.php | 0
.../language/it/info_acp_gallery_logs.php | 0
.../core}/language/it/info_ucp_gallery.php | 0
.../core}/language/it/install_gallery.php | 0
.../core}/language/it/permissions_gallery.php | 0
.../language/nl/email/newcomment_notify.txt | 0
.../language/nl/email/newimage_notify.txt | 0
.../core}/language/nl/gallery.php | 0
.../core}/language/nl/gallery_acp.php | 0
.../core}/language/nl/gallery_mcp.php | 0
.../language/nl/gallery_notifications.php | 0
.../core}/language/nl/gallery_ucp.php | 0
.../core}/language/nl/info_acp_gallery.php | 0
.../language/nl/info_acp_gallery_logs.php | 0
.../core}/language/nl/info_ucp_gallery.php | 0
.../core}/language/nl/install_gallery.php | 0
.../core}/language/nl/permissions_gallery.php | 0
.../language/ru/email/newcomment_notify.txt | 0
.../language/ru/email/newimage_notify.txt | 0
.../core}/language/ru/gallery.php | 0
.../core}/language/ru/gallery_acp.php | 0
.../core}/language/ru/gallery_mcp.php | 0
.../language/ru/gallery_notifications.php | 0
.../core}/language/ru/gallery_ucp.php | 0
.../core}/language/ru/info_acp_gallery.php | 0
.../language/ru/info_acp_gallery_logs.php | 0
.../core}/language/ru/info_ucp_gallery.php | 0
.../core}/language/ru/install_gallery.php | 0
.../core}/language/ru/permissions_gallery.php | 0
{core => phpbbgallery/core}/license.txt | 0
{core => phpbbgallery/core}/log.php | 0
.../core}/migrations/release_1_2_0.php | 0
.../migrations/release_1_2_0_add_bbcode.php | 0
.../release_1_2_0_create_filesystem.php | 0
.../migrations/release_1_2_0_db_create.php | 0
.../core}/migrations/release_3_2_1_0.php | 0
.../core}/migrations/release_3_2_1_1.php | 0
.../core}/migrations/release_3_3_0.php | 0
.../migrations/split_ucp_module_settings.php | 0
{core => phpbbgallery/core}/misc.php | 0
{core => phpbbgallery/core}/moderate.php | 0
{core => phpbbgallery/core}/notification.php | 0
.../events/phpbbgallery_image_approved.php | 0
.../phpbbgallery_image_for_approval.php | 0
.../phpbbgallery_image_not_approved.php | 0
.../events/phpbbgallery_new_comment.php | 0
.../events/phpbbgallery_new_image.php | 0
.../events/phpbbgallery_new_report.php | 0
.../core}/notification/helper.php | 0
{core => phpbbgallery/core}/rating.php | 0
{core => phpbbgallery/core}/report.php | 0
{core => phpbbgallery/core}/search.php | 2 ++
.../template/event/overall_footer_after.html | 0
.../event/overall_header_head_append.html | 0
.../styles/all/template/js/jquery-ui.min.js | 0
.../template/js/jquery.fileupload-angular.js | 0
.../template/js/jquery.fileupload-audio.js | 0
.../template/js/jquery.fileupload-image.js | 0
.../js/jquery.fileupload-jquery-ui.js | 0
.../template/js/jquery.fileupload-process.js | 0
.../all/template/js/jquery.fileupload-ui.js | 0
.../template/js/jquery.fileupload-validate.js | 0
.../template/js/jquery.fileupload-video.js | 0
.../all/template/js/jquery.fileupload.js | 0
.../template/js/jquery.iframe-transport.js | 0
.../all/template/js/jquery.ui.widget.js | 0
.../all/template/js/load-image.all.min.js | 0
.../all/template/js/load-image.all.min.js.map | 0
.../core}/styles/all/theme/default.css | 0
.../all/theme/images/icon_contact_gallery.png | Bin
.../event/index_body_block_stats_append.html | 0
.../event/memberlist_view_content_append.html | 0
...memberlist_view_user_statistics_after.html | 0
.../navbar_header_user_profile_prepend.html | 0
.../event/overall_header_head_append.html | 0
.../overall_header_navigation_prepend.html | 0
.../template/gallery/album_body.html | 0
.../template/gallery/albumlist_body.html | 0
.../template/gallery/albumlist_polaroid.html | 0
.../template/gallery/comment_body.html | 0
.../prosilver/template/gallery/gallery.js | 0
.../template/gallery/gallery_footer.html | 0
.../template/gallery/gallery_header.html | 0
.../template/gallery/image_edit_body.html | 0
.../template/gallery/imageblock_body.html | 0
.../template/gallery/imageblock_polaroid.html | 0
.../template/gallery/imageblock_popup.html | 0
.../template/gallery/index_body.html | 0
.../template/gallery/mcp_approve.html | 0
.../prosilver/template/gallery/mcp_body.html | 0
.../prosilver/template/gallery/message.html | 0
.../template/gallery/moderate_actions.html | 0
.../gallery/moderate_actions_queue.html | 0
.../gallery/moderate_album_overview.html | 0
.../template/gallery/moderate_approve.html | 0
.../gallery/moderate_approve_queue.html | 0
.../gallery/moderate_image_overview.html | 0
.../template/gallery/moderate_overview.html | 0
.../gallery/moderate_report_queue.html | 0
.../template/gallery/moderate_reports.html | 0
.../template/gallery/plugins_header.html | 0
.../template/gallery/posting_body.html | 0
.../template/gallery/posting_javascript.html | 0
.../template/gallery/recent_body.html | 0
.../template/gallery/search_body.html | 0
.../template/gallery/search_random.html | 0
.../template/gallery/search_recent.html | 0
.../template/gallery/search_results.html | 0
.../template/gallery/ucp_gallery.html | 0
.../template/gallery/viewimage_body.html | 0
.../prosilver/template/message_body.html | 0
.../styles/prosilver/theme/gallery-color.css | 0
.../core}/styles/prosilver/theme/gallery.css | 0
.../theme/images/icon_contact_gallery.gif | Bin
.../theme/images/icon_gallery_locked.gif | Bin
.../theme/images/icon_gallery_reported.gif | Bin
.../theme/images/icon_gallery_unapproved.gif | Bin
.../theme/images/icon_topic_unapproved.png | Bin
.../styles/prosilver/theme/images/lock.png | Bin
{core => phpbbgallery/core}/ucp/main_info.php | 0
.../core}/ucp/main_module.php | 0
.../core}/ucp/settings_info.php | 0
.../core}/ucp/settings_module.php | 0
{core => phpbbgallery/core}/upload.php | 0
{core => phpbbgallery/core}/url.php | 0
{core => phpbbgallery/core}/user.php | 0
{exif => phpbbgallery/exif}/composer.json | 0
.../exif}/config/services.yml | 0
.../exif}/event/exif_listener.php | 0
{exif => phpbbgallery/exif}/exif.php | 1 +
{exif => phpbbgallery/exif}/ext.php | 0
.../exif}/language/bg/exif.php | 0
.../exif}/language/bg/index.htm | 0
.../exif}/language/de/exif.php | 0
.../exif}/language/en/exif.php | 0
.../exif}/language/en/index.htm | 0
.../exif}/language/fr/exif.php | 0
.../exif}/language/it/exif.php | 0
.../exif}/language/it/index.htm | 0
.../exif}/language/ru/exif.php | 0
{exif => phpbbgallery/exif}/license.txt | 0
.../exif}/migrations/m1_init.php | 0
.../event/gallery_ucp_settings_fieldset.html | 0
.../event/gallery_viewimage_details.bkp | 0
.../event/gallery_viewimage_details.html | 0
.../tests}/controller/controller_base.php | 0
.../tests}/controller/fixtures/fixture.xml | 0
.../tests}/controller/gallery_album_test.php | 0
.../controller/gallery_comment_test.php | 0
.../tests}/controller/gallery_index_test.php | 0
.../controller/gallery_moderate_test.php | 0
.../tests}/core/album/core_album_test.php | 0
.../tests}/core/album/core_display_test.php | 0
.../tests}/core/core_auth_test.php | 0
.../tests}/core/core_base.php | 0
.../tests}/core/core_block_test.php | 0
.../tests}/core/core_cache_test.php | 0
.../tests}/core/core_comment_test.php | 0
.../tests}/core/core_config_test.php | 0
.../tests}/core/core_contest_test.php | 0
.../tests}/core/core_image_test.php | 0
.../tests}/core/core_notification_test.php | 0
.../tests}/core/core_rating_test.php | 0
.../tests}/core/core_report_test.php | 0
.../tests}/core/core_search_test.php | 0
.../tests}/core/core_url_test.php | 0
.../tests}/core/core_user_test.php | 0
.../tests}/core/fixtures/fixture.xml | 0
.../tests}/event/fixtures/fixture.xml | 0
.../tests}/event/main_event_test.php | 0
.../tests}/functional/images/valid.gif | Bin
.../tests}/functional/images/valid.jpg | Bin
.../tests}/functional/images/valid.png | Bin
.../tests}/functional/images/valid.webp | Bin
.../tests}/functional/images/valid.zip | Bin
.../functional/phpbbgallery_alpha_test.php | 0
.../tests}/functional/phpbbgallery_base.php | 0
.../functional/phpbbgallery_beta_test.php | 0
.../functional/phpbbgallery_charlie_test.php | 0
.../functional/phpbbgallery_delta_test.php | 0
phpunit.xml.dist | 24 +++++++++---------
346 files changed, 27 insertions(+), 22 deletions(-)
rename {acpcleanup => phpbbgallery/acpcleanup}/acp/main_info.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/acp/main_module.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/adm/style/gallery_cleanup.html (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/adm/style/index.htm (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/composer.json (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/config/services.yml (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/ext.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/bg/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/de/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/en/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/fr/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/it/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/language/ru/info_acp_gallery_cleanup.php (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/license.txt (100%)
rename {acpcleanup => phpbbgallery/acpcleanup}/migrations/m1_init.php (100%)
rename {acpimport => phpbbgallery/acpimport}/acp/main_info.php (100%)
rename {acpimport => phpbbgallery/acpimport}/acp/main_module.php (100%)
rename {acpimport => phpbbgallery/acpimport}/adm/style/gallery_acpimport.html (100%)
rename {acpimport => phpbbgallery/acpimport}/composer.json (100%)
rename {acpimport => phpbbgallery/acpimport}/ext.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/bg/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/de/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/en/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/fr/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/it/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/language/ru/info_acp_gallery_acpimport.php (100%)
rename {acpimport => phpbbgallery/acpimport}/license.txt (100%)
rename {acpimport => phpbbgallery/acpimport}/migrations/m1_init.php (100%)
rename {core => phpbbgallery/core}/acp/albums_info.php (100%)
rename {core => phpbbgallery/core}/acp/albums_module.php (100%)
rename {core => phpbbgallery/core}/acp/config_info.php (100%)
rename {core => phpbbgallery/core}/acp/config_module.php (100%)
rename {core => phpbbgallery/core}/acp/gallery_logs_info.php (100%)
rename {core => phpbbgallery/core}/acp/gallery_logs_module.php (100%)
rename {core => phpbbgallery/core}/acp/main_info.php (100%)
rename {core => phpbbgallery/core}/acp/main_module.php (100%)
rename {core => phpbbgallery/core}/acp/permissions_info.php (100%)
rename {core => phpbbgallery/core}/acp/permissions_module.php (100%)
rename {core => phpbbgallery/core}/adm/index.htm (100%)
rename {core => phpbbgallery/core}/adm/style/gallery_albums.html (100%)
rename {core => phpbbgallery/core}/adm/style/gallery_logs.html (100%)
rename {core => phpbbgallery/core}/adm/style/gallery_main.html (100%)
rename {core => phpbbgallery/core}/adm/style/gallery_permissions.html (100%)
rename {core => phpbbgallery/core}/adm/style/index.htm (100%)
rename {core => phpbbgallery/core}/album/album.php (100%)
rename {core => phpbbgallery/core}/album/display.php (99%)
rename {core => phpbbgallery/core}/album/loader.php (100%)
rename {core => phpbbgallery/core}/album/manage.php (100%)
rename {core => phpbbgallery/core}/auth/auth.php (100%)
rename {core => phpbbgallery/core}/auth/level.php (100%)
rename {core => phpbbgallery/core}/auth/set.php (100%)
rename {core => phpbbgallery/core}/block.bkp (100%)
rename {core => phpbbgallery/core}/block.php (100%)
rename {core => phpbbgallery/core}/cache.php (100%)
rename {core => phpbbgallery/core}/comment.php (100%)
rename {core => phpbbgallery/core}/composer.json (100%)
rename {core => phpbbgallery/core}/config.php (100%)
rename {core => phpbbgallery/core}/config/routing.yml (100%)
rename {core => phpbbgallery/core}/config/services.yml (100%)
rename {core => phpbbgallery/core}/config/services_controller.yml (100%)
rename {core => phpbbgallery/core}/config/services_files.yml (100%)
rename {core => phpbbgallery/core}/config/services_notification_types.yml (100%)
rename {core => phpbbgallery/core}/config/tables.yml (100%)
rename {core => phpbbgallery/core}/constants.php (100%)
rename {core => phpbbgallery/core}/contest.php (100%)
rename {core => phpbbgallery/core}/controller/album.php (100%)
rename {core => phpbbgallery/core}/controller/comment.php (100%)
rename {core => phpbbgallery/core}/controller/file.php (100%)
rename {core => phpbbgallery/core}/controller/image.php (100%)
rename {core => phpbbgallery/core}/controller/index.php (100%)
rename {core => phpbbgallery/core}/controller/moderate.php (100%)
rename {core => phpbbgallery/core}/controller/search.php (100%)
rename {core => phpbbgallery/core}/controller/upload.php (100%)
rename {core => phpbbgallery/core}/cron/cron_cleaner.php (100%)
rename {core => phpbbgallery/core}/docs/tables.md (100%)
rename {core => phpbbgallery/core}/event/main_listener.php (100%)
rename {core => phpbbgallery/core}/ext.php (100%)
rename {core => phpbbgallery/core}/file/file.php (100%)
rename {core => phpbbgallery/core}/file/types/multiform.php (100%)
rename {core => phpbbgallery/core}/image/image.php (100%)
rename {core => phpbbgallery/core}/images/icon_delete.gif (100%)
rename {core => phpbbgallery/core}/images/icon_delete_disabled.gif (100%)
rename {core => phpbbgallery/core}/images/icon_down.gif (100%)
rename {core => phpbbgallery/core}/images/icon_down_disabled.gif (100%)
rename {core => phpbbgallery/core}/images/icon_edit.gif (100%)
rename {core => phpbbgallery/core}/images/icon_edit_disabled.gif (100%)
rename {core => phpbbgallery/core}/images/icon_up.gif (100%)
rename {core => phpbbgallery/core}/images/icon_up_disabled.gif (100%)
rename {core => phpbbgallery/core}/images/legacy/watermark.png (100%)
rename {core => phpbbgallery/core}/images/upload/image_not_exist.jpg (100%)
rename {core => phpbbgallery/core}/images/upload/index.htm (100%)
rename {core => phpbbgallery/core}/images/upload/no_hotlinking.jpg (100%)
rename {core => phpbbgallery/core}/images/upload/not_authorised.jpg (100%)
rename {core => phpbbgallery/core}/images/watermark.png (100%)
rename {core => phpbbgallery/core}/language/bg/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/bg/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/bg/gallery.php (100%)
rename {core => phpbbgallery/core}/language/bg/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/bg/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/bg/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/bg/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/bg/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/bg/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/bg/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/bg/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/bg/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/de/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/de/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/de/gallery.php (100%)
rename {core => phpbbgallery/core}/language/de/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/de/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/de/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/de/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/de/index.htm (100%)
rename {core => phpbbgallery/core}/language/de/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/de/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/de/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/de/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/de/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/en/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/en/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/en/gallery.php (100%)
rename {core => phpbbgallery/core}/language/en/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/en/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/en/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/en/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/en/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/en/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/en/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/en/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/en/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/es/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/es/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/es/gallery.php (100%)
rename {core => phpbbgallery/core}/language/es/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/es/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/es/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/es/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/es/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/es/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/es/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/es/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/es/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/fr/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/fr/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/fr/gallery.php (100%)
rename {core => phpbbgallery/core}/language/fr/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/fr/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/fr/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/fr/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/fr/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/fr/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/fr/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/fr/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/fr/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/it/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/it/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/it/gallery.php (100%)
rename {core => phpbbgallery/core}/language/it/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/it/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/it/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/it/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/it/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/it/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/it/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/it/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/it/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/nl/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/nl/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/nl/gallery.php (100%)
rename {core => phpbbgallery/core}/language/nl/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/nl/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/nl/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/nl/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/nl/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/nl/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/nl/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/nl/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/nl/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/language/ru/email/newcomment_notify.txt (100%)
rename {core => phpbbgallery/core}/language/ru/email/newimage_notify.txt (100%)
rename {core => phpbbgallery/core}/language/ru/gallery.php (100%)
rename {core => phpbbgallery/core}/language/ru/gallery_acp.php (100%)
rename {core => phpbbgallery/core}/language/ru/gallery_mcp.php (100%)
rename {core => phpbbgallery/core}/language/ru/gallery_notifications.php (100%)
rename {core => phpbbgallery/core}/language/ru/gallery_ucp.php (100%)
rename {core => phpbbgallery/core}/language/ru/info_acp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/ru/info_acp_gallery_logs.php (100%)
rename {core => phpbbgallery/core}/language/ru/info_ucp_gallery.php (100%)
rename {core => phpbbgallery/core}/language/ru/install_gallery.php (100%)
rename {core => phpbbgallery/core}/language/ru/permissions_gallery.php (100%)
rename {core => phpbbgallery/core}/license.txt (100%)
rename {core => phpbbgallery/core}/log.php (100%)
rename {core => phpbbgallery/core}/migrations/release_1_2_0.php (100%)
rename {core => phpbbgallery/core}/migrations/release_1_2_0_add_bbcode.php (100%)
rename {core => phpbbgallery/core}/migrations/release_1_2_0_create_filesystem.php (100%)
rename {core => phpbbgallery/core}/migrations/release_1_2_0_db_create.php (100%)
rename {core => phpbbgallery/core}/migrations/release_3_2_1_0.php (100%)
rename {core => phpbbgallery/core}/migrations/release_3_2_1_1.php (100%)
rename {core => phpbbgallery/core}/migrations/release_3_3_0.php (100%)
rename {core => phpbbgallery/core}/migrations/split_ucp_module_settings.php (100%)
rename {core => phpbbgallery/core}/misc.php (100%)
rename {core => phpbbgallery/core}/moderate.php (100%)
rename {core => phpbbgallery/core}/notification.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_image_approved.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_image_for_approval.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_image_not_approved.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_new_comment.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_new_image.php (100%)
rename {core => phpbbgallery/core}/notification/events/phpbbgallery_new_report.php (100%)
rename {core => phpbbgallery/core}/notification/helper.php (100%)
rename {core => phpbbgallery/core}/rating.php (100%)
rename {core => phpbbgallery/core}/report.php (100%)
rename {core => phpbbgallery/core}/search.php (99%)
rename {core => phpbbgallery/core}/styles/all/template/event/overall_footer_after.html (100%)
rename {core => phpbbgallery/core}/styles/all/template/event/overall_header_head_append.html (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery-ui.min.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-angular.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-audio.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-image.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-jquery-ui.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-process.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-ui.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-validate.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload-video.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.fileupload.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.iframe-transport.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/jquery.ui.widget.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/load-image.all.min.js (100%)
rename {core => phpbbgallery/core}/styles/all/template/js/load-image.all.min.js.map (100%)
rename {core => phpbbgallery/core}/styles/all/theme/default.css (100%)
rename {core => phpbbgallery/core}/styles/all/theme/images/icon_contact_gallery.png (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/index_body_block_stats_append.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/memberlist_view_content_append.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/memberlist_view_user_statistics_after.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/navbar_header_user_profile_prepend.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/overall_header_head_append.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/event/overall_header_navigation_prepend.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/album_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/albumlist_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/albumlist_polaroid.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/comment_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/gallery.js (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/gallery_footer.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/gallery_header.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/image_edit_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_polaroid.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/imageblock_popup.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/index_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/mcp_approve.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/mcp_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/message.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_actions.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_actions_queue.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_album_overview.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_approve.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_approve_queue.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_image_overview.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_overview.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_report_queue.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/moderate_reports.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/plugins_header.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/posting_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/posting_javascript.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/recent_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/search_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/search_random.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/search_recent.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/search_results.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/ucp_gallery.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/gallery/viewimage_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/template/message_body.html (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/gallery-color.css (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/gallery.css (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/icon_contact_gallery.gif (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_locked.gif (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_reported.gif (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/icon_gallery_unapproved.gif (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/icon_topic_unapproved.png (100%)
rename {core => phpbbgallery/core}/styles/prosilver/theme/images/lock.png (100%)
rename {core => phpbbgallery/core}/ucp/main_info.php (100%)
rename {core => phpbbgallery/core}/ucp/main_module.php (100%)
rename {core => phpbbgallery/core}/ucp/settings_info.php (100%)
rename {core => phpbbgallery/core}/ucp/settings_module.php (100%)
rename {core => phpbbgallery/core}/upload.php (100%)
rename {core => phpbbgallery/core}/url.php (100%)
rename {core => phpbbgallery/core}/user.php (100%)
rename {exif => phpbbgallery/exif}/composer.json (100%)
rename {exif => phpbbgallery/exif}/config/services.yml (100%)
rename {exif => phpbbgallery/exif}/event/exif_listener.php (100%)
rename {exif => phpbbgallery/exif}/exif.php (99%)
rename {exif => phpbbgallery/exif}/ext.php (100%)
rename {exif => phpbbgallery/exif}/language/bg/exif.php (100%)
rename {exif => phpbbgallery/exif}/language/bg/index.htm (100%)
rename {exif => phpbbgallery/exif}/language/de/exif.php (100%)
rename {exif => phpbbgallery/exif}/language/en/exif.php (100%)
rename {exif => phpbbgallery/exif}/language/en/index.htm (100%)
rename {exif => phpbbgallery/exif}/language/fr/exif.php (100%)
rename {exif => phpbbgallery/exif}/language/it/exif.php (100%)
rename {exif => phpbbgallery/exif}/language/it/index.htm (100%)
rename {exif => phpbbgallery/exif}/language/ru/exif.php (100%)
rename {exif => phpbbgallery/exif}/license.txt (100%)
rename {exif => phpbbgallery/exif}/migrations/m1_init.php (100%)
rename {exif => phpbbgallery/exif}/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html (100%)
rename {exif => phpbbgallery/exif}/styles/prosilver/template/event/gallery_viewimage_details.bkp (100%)
rename {exif => phpbbgallery/exif}/styles/prosilver/template/event/gallery_viewimage_details.html (100%)
rename {tests => phpbbgallery/tests}/controller/controller_base.php (100%)
rename {tests => phpbbgallery/tests}/controller/fixtures/fixture.xml (100%)
rename {tests => phpbbgallery/tests}/controller/gallery_album_test.php (100%)
rename {tests => phpbbgallery/tests}/controller/gallery_comment_test.php (100%)
rename {tests => phpbbgallery/tests}/controller/gallery_index_test.php (100%)
rename {tests => phpbbgallery/tests}/controller/gallery_moderate_test.php (100%)
rename {tests => phpbbgallery/tests}/core/album/core_album_test.php (100%)
rename {tests => phpbbgallery/tests}/core/album/core_display_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_auth_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_base.php (100%)
rename {tests => phpbbgallery/tests}/core/core_block_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_cache_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_comment_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_config_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_contest_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_image_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_notification_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_rating_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_report_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_search_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_url_test.php (100%)
rename {tests => phpbbgallery/tests}/core/core_user_test.php (100%)
rename {tests => phpbbgallery/tests}/core/fixtures/fixture.xml (100%)
rename {tests => phpbbgallery/tests}/event/fixtures/fixture.xml (100%)
rename {tests => phpbbgallery/tests}/event/main_event_test.php (100%)
rename {tests => phpbbgallery/tests}/functional/images/valid.gif (100%)
rename {tests => phpbbgallery/tests}/functional/images/valid.jpg (100%)
rename {tests => phpbbgallery/tests}/functional/images/valid.png (100%)
rename {tests => phpbbgallery/tests}/functional/images/valid.webp (100%)
rename {tests => phpbbgallery/tests}/functional/images/valid.zip (100%)
rename {tests => phpbbgallery/tests}/functional/phpbbgallery_alpha_test.php (100%)
rename {tests => phpbbgallery/tests}/functional/phpbbgallery_base.php (100%)
rename {tests => phpbbgallery/tests}/functional/phpbbgallery_beta_test.php (100%)
rename {tests => phpbbgallery/tests}/functional/phpbbgallery_charlie_test.php (100%)
rename {tests => phpbbgallery/tests}/functional/phpbbgallery_delta_test.php (100%)
diff --git a/.gitattributes b/.gitattributes
index 44bff05e..edb2c482 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,9 +1,9 @@
-.gitattributes export-ignore
-.idea export-ignore
-phpunit.xml.dist export-ignore
-.vscode export-ignore
-.codegpt export-ignore
-gallery-core.json export-ignore
+.gitattributes export-ignore
+.idea export-ignore
+phpunit.xml.dist export-ignore
+.vscode export-ignore
+.codegpt export-ignore
+gallery-core.json export-ignore
gallery-cleanup.json export-ignore
-gallery-exif.json export-ignore
-gallery-import.json export-ignore
\ No newline at end of file
+gallery-exif.json export-ignore
+gallery-import.json export-ignore
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index d19082f1..eb0e457b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,9 +50,9 @@ services:
install:
- - cd core
+ - cd phpbbgallery/core
- composer install --dev --no-interaction --prefer-source
- - cd ..
+ - cd ../..
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../phpBB3
- sh -c "if [ '$COVER' != '0' ]; then sed -i '/phpenv/d' travis/setup-php-extensions.sh; fi"
diff --git a/acpcleanup/acp/main_info.php b/phpbbgallery/acpcleanup/acp/main_info.php
similarity index 100%
rename from acpcleanup/acp/main_info.php
rename to phpbbgallery/acpcleanup/acp/main_info.php
diff --git a/acpcleanup/acp/main_module.php b/phpbbgallery/acpcleanup/acp/main_module.php
similarity index 100%
rename from acpcleanup/acp/main_module.php
rename to phpbbgallery/acpcleanup/acp/main_module.php
diff --git a/acpcleanup/adm/style/gallery_cleanup.html b/phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html
similarity index 100%
rename from acpcleanup/adm/style/gallery_cleanup.html
rename to phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html
diff --git a/acpcleanup/adm/style/index.htm b/phpbbgallery/acpcleanup/adm/style/index.htm
similarity index 100%
rename from acpcleanup/adm/style/index.htm
rename to phpbbgallery/acpcleanup/adm/style/index.htm
diff --git a/acpcleanup/cleanup.php b/phpbbgallery/acpcleanup/cleanup.php
similarity index 100%
rename from acpcleanup/cleanup.php
rename to phpbbgallery/acpcleanup/cleanup.php
diff --git a/acpcleanup/composer.json b/phpbbgallery/acpcleanup/composer.json
similarity index 100%
rename from acpcleanup/composer.json
rename to phpbbgallery/acpcleanup/composer.json
diff --git a/acpcleanup/config/services.yml b/phpbbgallery/acpcleanup/config/services.yml
similarity index 100%
rename from acpcleanup/config/services.yml
rename to phpbbgallery/acpcleanup/config/services.yml
diff --git a/acpcleanup/ext.php b/phpbbgallery/acpcleanup/ext.php
similarity index 100%
rename from acpcleanup/ext.php
rename to phpbbgallery/acpcleanup/ext.php
diff --git a/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/bg/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/language/de/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/de/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/language/en/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/en/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/language/fr/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/fr/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/it/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php
similarity index 100%
rename from acpcleanup/language/ru/info_acp_gallery_cleanup.php
rename to phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php
diff --git a/acpcleanup/license.txt b/phpbbgallery/acpcleanup/license.txt
similarity index 100%
rename from acpcleanup/license.txt
rename to phpbbgallery/acpcleanup/license.txt
diff --git a/acpcleanup/migrations/m1_init.php b/phpbbgallery/acpcleanup/migrations/m1_init.php
similarity index 100%
rename from acpcleanup/migrations/m1_init.php
rename to phpbbgallery/acpcleanup/migrations/m1_init.php
diff --git a/acpimport/acp/main_info.php b/phpbbgallery/acpimport/acp/main_info.php
similarity index 100%
rename from acpimport/acp/main_info.php
rename to phpbbgallery/acpimport/acp/main_info.php
diff --git a/acpimport/acp/main_module.php b/phpbbgallery/acpimport/acp/main_module.php
similarity index 100%
rename from acpimport/acp/main_module.php
rename to phpbbgallery/acpimport/acp/main_module.php
diff --git a/acpimport/adm/style/gallery_acpimport.html b/phpbbgallery/acpimport/adm/style/gallery_acpimport.html
similarity index 100%
rename from acpimport/adm/style/gallery_acpimport.html
rename to phpbbgallery/acpimport/adm/style/gallery_acpimport.html
diff --git a/acpimport/composer.json b/phpbbgallery/acpimport/composer.json
similarity index 100%
rename from acpimport/composer.json
rename to phpbbgallery/acpimport/composer.json
diff --git a/acpimport/ext.php b/phpbbgallery/acpimport/ext.php
similarity index 100%
rename from acpimport/ext.php
rename to phpbbgallery/acpimport/ext.php
diff --git a/acpimport/language/bg/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/bg/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php
diff --git a/acpimport/language/de/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/de/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php
diff --git a/acpimport/language/en/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/en/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php
diff --git a/acpimport/language/fr/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/fr/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php
diff --git a/acpimport/language/it/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/it/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php
diff --git a/acpimport/language/ru/info_acp_gallery_acpimport.php b/phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php
similarity index 100%
rename from acpimport/language/ru/info_acp_gallery_acpimport.php
rename to phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php
diff --git a/acpimport/license.txt b/phpbbgallery/acpimport/license.txt
similarity index 100%
rename from acpimport/license.txt
rename to phpbbgallery/acpimport/license.txt
diff --git a/acpimport/migrations/m1_init.php b/phpbbgallery/acpimport/migrations/m1_init.php
similarity index 100%
rename from acpimport/migrations/m1_init.php
rename to phpbbgallery/acpimport/migrations/m1_init.php
diff --git a/core/acp/albums_info.php b/phpbbgallery/core/acp/albums_info.php
similarity index 100%
rename from core/acp/albums_info.php
rename to phpbbgallery/core/acp/albums_info.php
diff --git a/core/acp/albums_module.php b/phpbbgallery/core/acp/albums_module.php
similarity index 100%
rename from core/acp/albums_module.php
rename to phpbbgallery/core/acp/albums_module.php
diff --git a/core/acp/config_info.php b/phpbbgallery/core/acp/config_info.php
similarity index 100%
rename from core/acp/config_info.php
rename to phpbbgallery/core/acp/config_info.php
diff --git a/core/acp/config_module.php b/phpbbgallery/core/acp/config_module.php
similarity index 100%
rename from core/acp/config_module.php
rename to phpbbgallery/core/acp/config_module.php
diff --git a/core/acp/gallery_logs_info.php b/phpbbgallery/core/acp/gallery_logs_info.php
similarity index 100%
rename from core/acp/gallery_logs_info.php
rename to phpbbgallery/core/acp/gallery_logs_info.php
diff --git a/core/acp/gallery_logs_module.php b/phpbbgallery/core/acp/gallery_logs_module.php
similarity index 100%
rename from core/acp/gallery_logs_module.php
rename to phpbbgallery/core/acp/gallery_logs_module.php
diff --git a/core/acp/main_info.php b/phpbbgallery/core/acp/main_info.php
similarity index 100%
rename from core/acp/main_info.php
rename to phpbbgallery/core/acp/main_info.php
diff --git a/core/acp/main_module.php b/phpbbgallery/core/acp/main_module.php
similarity index 100%
rename from core/acp/main_module.php
rename to phpbbgallery/core/acp/main_module.php
diff --git a/core/acp/permissions_info.php b/phpbbgallery/core/acp/permissions_info.php
similarity index 100%
rename from core/acp/permissions_info.php
rename to phpbbgallery/core/acp/permissions_info.php
diff --git a/core/acp/permissions_module.php b/phpbbgallery/core/acp/permissions_module.php
similarity index 100%
rename from core/acp/permissions_module.php
rename to phpbbgallery/core/acp/permissions_module.php
diff --git a/core/adm/index.htm b/phpbbgallery/core/adm/index.htm
similarity index 100%
rename from core/adm/index.htm
rename to phpbbgallery/core/adm/index.htm
diff --git a/core/adm/style/gallery_albums.html b/phpbbgallery/core/adm/style/gallery_albums.html
similarity index 100%
rename from core/adm/style/gallery_albums.html
rename to phpbbgallery/core/adm/style/gallery_albums.html
diff --git a/core/adm/style/gallery_logs.html b/phpbbgallery/core/adm/style/gallery_logs.html
similarity index 100%
rename from core/adm/style/gallery_logs.html
rename to phpbbgallery/core/adm/style/gallery_logs.html
diff --git a/core/adm/style/gallery_main.html b/phpbbgallery/core/adm/style/gallery_main.html
similarity index 100%
rename from core/adm/style/gallery_main.html
rename to phpbbgallery/core/adm/style/gallery_main.html
diff --git a/core/adm/style/gallery_permissions.html b/phpbbgallery/core/adm/style/gallery_permissions.html
similarity index 100%
rename from core/adm/style/gallery_permissions.html
rename to phpbbgallery/core/adm/style/gallery_permissions.html
diff --git a/core/adm/style/index.htm b/phpbbgallery/core/adm/style/index.htm
similarity index 100%
rename from core/adm/style/index.htm
rename to phpbbgallery/core/adm/style/index.htm
diff --git a/core/album/album.php b/phpbbgallery/core/album/album.php
similarity index 100%
rename from core/album/album.php
rename to phpbbgallery/core/album/album.php
diff --git a/core/album/display.php b/phpbbgallery/core/album/display.php
similarity index 99%
rename from core/album/display.php
rename to phpbbgallery/core/album/display.php
index 73536ce3..5a490bc9 100644
--- a/core/album/display.php
+++ b/phpbbgallery/core/album/display.php
@@ -392,6 +392,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
),
),
+ // @EPV-IGNORE SQL INJECTION WARNING: validated SQL_WHERE clause
'WHERE' => 'a.parent_id = 0 AND ' . $sql_where,
);
$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -801,6 +802,7 @@ protected function safe_unserialize($data)
{
if (is_string($data))
{
+ // @EPV-IGNORE unserialize usage is safe here
$result = @unserialize($data);
if ($result === false && $data !== 'b:0;')
diff --git a/core/album/loader.php b/phpbbgallery/core/album/loader.php
similarity index 100%
rename from core/album/loader.php
rename to phpbbgallery/core/album/loader.php
diff --git a/core/album/manage.php b/phpbbgallery/core/album/manage.php
similarity index 100%
rename from core/album/manage.php
rename to phpbbgallery/core/album/manage.php
diff --git a/core/auth/auth.php b/phpbbgallery/core/auth/auth.php
similarity index 100%
rename from core/auth/auth.php
rename to phpbbgallery/core/auth/auth.php
diff --git a/core/auth/level.php b/phpbbgallery/core/auth/level.php
similarity index 100%
rename from core/auth/level.php
rename to phpbbgallery/core/auth/level.php
diff --git a/core/auth/set.php b/phpbbgallery/core/auth/set.php
similarity index 100%
rename from core/auth/set.php
rename to phpbbgallery/core/auth/set.php
diff --git a/core/block.bkp b/phpbbgallery/core/block.bkp
similarity index 100%
rename from core/block.bkp
rename to phpbbgallery/core/block.bkp
diff --git a/core/block.php b/phpbbgallery/core/block.php
similarity index 100%
rename from core/block.php
rename to phpbbgallery/core/block.php
diff --git a/core/cache.php b/phpbbgallery/core/cache.php
similarity index 100%
rename from core/cache.php
rename to phpbbgallery/core/cache.php
diff --git a/core/comment.php b/phpbbgallery/core/comment.php
similarity index 100%
rename from core/comment.php
rename to phpbbgallery/core/comment.php
diff --git a/core/composer.json b/phpbbgallery/core/composer.json
similarity index 100%
rename from core/composer.json
rename to phpbbgallery/core/composer.json
diff --git a/core/config.php b/phpbbgallery/core/config.php
similarity index 100%
rename from core/config.php
rename to phpbbgallery/core/config.php
diff --git a/core/config/routing.yml b/phpbbgallery/core/config/routing.yml
similarity index 100%
rename from core/config/routing.yml
rename to phpbbgallery/core/config/routing.yml
diff --git a/core/config/services.yml b/phpbbgallery/core/config/services.yml
similarity index 100%
rename from core/config/services.yml
rename to phpbbgallery/core/config/services.yml
diff --git a/core/config/services_controller.yml b/phpbbgallery/core/config/services_controller.yml
similarity index 100%
rename from core/config/services_controller.yml
rename to phpbbgallery/core/config/services_controller.yml
diff --git a/core/config/services_files.yml b/phpbbgallery/core/config/services_files.yml
similarity index 100%
rename from core/config/services_files.yml
rename to phpbbgallery/core/config/services_files.yml
diff --git a/core/config/services_notification_types.yml b/phpbbgallery/core/config/services_notification_types.yml
similarity index 100%
rename from core/config/services_notification_types.yml
rename to phpbbgallery/core/config/services_notification_types.yml
diff --git a/core/config/tables.yml b/phpbbgallery/core/config/tables.yml
similarity index 100%
rename from core/config/tables.yml
rename to phpbbgallery/core/config/tables.yml
diff --git a/core/constants.php b/phpbbgallery/core/constants.php
similarity index 100%
rename from core/constants.php
rename to phpbbgallery/core/constants.php
diff --git a/core/contest.php b/phpbbgallery/core/contest.php
similarity index 100%
rename from core/contest.php
rename to phpbbgallery/core/contest.php
diff --git a/core/controller/album.php b/phpbbgallery/core/controller/album.php
similarity index 100%
rename from core/controller/album.php
rename to phpbbgallery/core/controller/album.php
diff --git a/core/controller/comment.php b/phpbbgallery/core/controller/comment.php
similarity index 100%
rename from core/controller/comment.php
rename to phpbbgallery/core/controller/comment.php
diff --git a/core/controller/file.php b/phpbbgallery/core/controller/file.php
similarity index 100%
rename from core/controller/file.php
rename to phpbbgallery/core/controller/file.php
diff --git a/core/controller/image.php b/phpbbgallery/core/controller/image.php
similarity index 100%
rename from core/controller/image.php
rename to phpbbgallery/core/controller/image.php
diff --git a/core/controller/index.php b/phpbbgallery/core/controller/index.php
similarity index 100%
rename from core/controller/index.php
rename to phpbbgallery/core/controller/index.php
diff --git a/core/controller/moderate.php b/phpbbgallery/core/controller/moderate.php
similarity index 100%
rename from core/controller/moderate.php
rename to phpbbgallery/core/controller/moderate.php
diff --git a/core/controller/search.php b/phpbbgallery/core/controller/search.php
similarity index 100%
rename from core/controller/search.php
rename to phpbbgallery/core/controller/search.php
diff --git a/core/controller/upload.php b/phpbbgallery/core/controller/upload.php
similarity index 100%
rename from core/controller/upload.php
rename to phpbbgallery/core/controller/upload.php
diff --git a/core/cron/cron_cleaner.php b/phpbbgallery/core/cron/cron_cleaner.php
similarity index 100%
rename from core/cron/cron_cleaner.php
rename to phpbbgallery/core/cron/cron_cleaner.php
diff --git a/core/docs/tables.md b/phpbbgallery/core/docs/tables.md
similarity index 100%
rename from core/docs/tables.md
rename to phpbbgallery/core/docs/tables.md
diff --git a/core/event/main_listener.php b/phpbbgallery/core/event/main_listener.php
similarity index 100%
rename from core/event/main_listener.php
rename to phpbbgallery/core/event/main_listener.php
diff --git a/core/ext.php b/phpbbgallery/core/ext.php
similarity index 100%
rename from core/ext.php
rename to phpbbgallery/core/ext.php
diff --git a/core/file/file.php b/phpbbgallery/core/file/file.php
similarity index 100%
rename from core/file/file.php
rename to phpbbgallery/core/file/file.php
diff --git a/core/file/types/multiform.php b/phpbbgallery/core/file/types/multiform.php
similarity index 100%
rename from core/file/types/multiform.php
rename to phpbbgallery/core/file/types/multiform.php
diff --git a/core/image/image.php b/phpbbgallery/core/image/image.php
similarity index 100%
rename from core/image/image.php
rename to phpbbgallery/core/image/image.php
diff --git a/core/images/icon_delete.gif b/phpbbgallery/core/images/icon_delete.gif
similarity index 100%
rename from core/images/icon_delete.gif
rename to phpbbgallery/core/images/icon_delete.gif
diff --git a/core/images/icon_delete_disabled.gif b/phpbbgallery/core/images/icon_delete_disabled.gif
similarity index 100%
rename from core/images/icon_delete_disabled.gif
rename to phpbbgallery/core/images/icon_delete_disabled.gif
diff --git a/core/images/icon_down.gif b/phpbbgallery/core/images/icon_down.gif
similarity index 100%
rename from core/images/icon_down.gif
rename to phpbbgallery/core/images/icon_down.gif
diff --git a/core/images/icon_down_disabled.gif b/phpbbgallery/core/images/icon_down_disabled.gif
similarity index 100%
rename from core/images/icon_down_disabled.gif
rename to phpbbgallery/core/images/icon_down_disabled.gif
diff --git a/core/images/icon_edit.gif b/phpbbgallery/core/images/icon_edit.gif
similarity index 100%
rename from core/images/icon_edit.gif
rename to phpbbgallery/core/images/icon_edit.gif
diff --git a/core/images/icon_edit_disabled.gif b/phpbbgallery/core/images/icon_edit_disabled.gif
similarity index 100%
rename from core/images/icon_edit_disabled.gif
rename to phpbbgallery/core/images/icon_edit_disabled.gif
diff --git a/core/images/icon_up.gif b/phpbbgallery/core/images/icon_up.gif
similarity index 100%
rename from core/images/icon_up.gif
rename to phpbbgallery/core/images/icon_up.gif
diff --git a/core/images/icon_up_disabled.gif b/phpbbgallery/core/images/icon_up_disabled.gif
similarity index 100%
rename from core/images/icon_up_disabled.gif
rename to phpbbgallery/core/images/icon_up_disabled.gif
diff --git a/core/images/legacy/watermark.png b/phpbbgallery/core/images/legacy/watermark.png
similarity index 100%
rename from core/images/legacy/watermark.png
rename to phpbbgallery/core/images/legacy/watermark.png
diff --git a/core/images/upload/image_not_exist.jpg b/phpbbgallery/core/images/upload/image_not_exist.jpg
similarity index 100%
rename from core/images/upload/image_not_exist.jpg
rename to phpbbgallery/core/images/upload/image_not_exist.jpg
diff --git a/core/images/upload/index.htm b/phpbbgallery/core/images/upload/index.htm
similarity index 100%
rename from core/images/upload/index.htm
rename to phpbbgallery/core/images/upload/index.htm
diff --git a/core/images/upload/no_hotlinking.jpg b/phpbbgallery/core/images/upload/no_hotlinking.jpg
similarity index 100%
rename from core/images/upload/no_hotlinking.jpg
rename to phpbbgallery/core/images/upload/no_hotlinking.jpg
diff --git a/core/images/upload/not_authorised.jpg b/phpbbgallery/core/images/upload/not_authorised.jpg
similarity index 100%
rename from core/images/upload/not_authorised.jpg
rename to phpbbgallery/core/images/upload/not_authorised.jpg
diff --git a/core/images/watermark.png b/phpbbgallery/core/images/watermark.png
similarity index 100%
rename from core/images/watermark.png
rename to phpbbgallery/core/images/watermark.png
diff --git a/core/language/bg/email/newcomment_notify.txt b/phpbbgallery/core/language/bg/email/newcomment_notify.txt
similarity index 100%
rename from core/language/bg/email/newcomment_notify.txt
rename to phpbbgallery/core/language/bg/email/newcomment_notify.txt
diff --git a/core/language/bg/email/newimage_notify.txt b/phpbbgallery/core/language/bg/email/newimage_notify.txt
similarity index 100%
rename from core/language/bg/email/newimage_notify.txt
rename to phpbbgallery/core/language/bg/email/newimage_notify.txt
diff --git a/core/language/bg/gallery.php b/phpbbgallery/core/language/bg/gallery.php
similarity index 100%
rename from core/language/bg/gallery.php
rename to phpbbgallery/core/language/bg/gallery.php
diff --git a/core/language/bg/gallery_acp.php b/phpbbgallery/core/language/bg/gallery_acp.php
similarity index 100%
rename from core/language/bg/gallery_acp.php
rename to phpbbgallery/core/language/bg/gallery_acp.php
diff --git a/core/language/bg/gallery_mcp.php b/phpbbgallery/core/language/bg/gallery_mcp.php
similarity index 100%
rename from core/language/bg/gallery_mcp.php
rename to phpbbgallery/core/language/bg/gallery_mcp.php
diff --git a/core/language/bg/gallery_notifications.php b/phpbbgallery/core/language/bg/gallery_notifications.php
similarity index 100%
rename from core/language/bg/gallery_notifications.php
rename to phpbbgallery/core/language/bg/gallery_notifications.php
diff --git a/core/language/bg/gallery_ucp.php b/phpbbgallery/core/language/bg/gallery_ucp.php
similarity index 100%
rename from core/language/bg/gallery_ucp.php
rename to phpbbgallery/core/language/bg/gallery_ucp.php
diff --git a/core/language/bg/info_acp_gallery.php b/phpbbgallery/core/language/bg/info_acp_gallery.php
similarity index 100%
rename from core/language/bg/info_acp_gallery.php
rename to phpbbgallery/core/language/bg/info_acp_gallery.php
diff --git a/core/language/bg/info_acp_gallery_logs.php b/phpbbgallery/core/language/bg/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/bg/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/bg/info_acp_gallery_logs.php
diff --git a/core/language/bg/info_ucp_gallery.php b/phpbbgallery/core/language/bg/info_ucp_gallery.php
similarity index 100%
rename from core/language/bg/info_ucp_gallery.php
rename to phpbbgallery/core/language/bg/info_ucp_gallery.php
diff --git a/core/language/bg/install_gallery.php b/phpbbgallery/core/language/bg/install_gallery.php
similarity index 100%
rename from core/language/bg/install_gallery.php
rename to phpbbgallery/core/language/bg/install_gallery.php
diff --git a/core/language/bg/permissions_gallery.php b/phpbbgallery/core/language/bg/permissions_gallery.php
similarity index 100%
rename from core/language/bg/permissions_gallery.php
rename to phpbbgallery/core/language/bg/permissions_gallery.php
diff --git a/core/language/de/email/newcomment_notify.txt b/phpbbgallery/core/language/de/email/newcomment_notify.txt
similarity index 100%
rename from core/language/de/email/newcomment_notify.txt
rename to phpbbgallery/core/language/de/email/newcomment_notify.txt
diff --git a/core/language/de/email/newimage_notify.txt b/phpbbgallery/core/language/de/email/newimage_notify.txt
similarity index 100%
rename from core/language/de/email/newimage_notify.txt
rename to phpbbgallery/core/language/de/email/newimage_notify.txt
diff --git a/core/language/de/gallery.php b/phpbbgallery/core/language/de/gallery.php
similarity index 100%
rename from core/language/de/gallery.php
rename to phpbbgallery/core/language/de/gallery.php
diff --git a/core/language/de/gallery_acp.php b/phpbbgallery/core/language/de/gallery_acp.php
similarity index 100%
rename from core/language/de/gallery_acp.php
rename to phpbbgallery/core/language/de/gallery_acp.php
diff --git a/core/language/de/gallery_mcp.php b/phpbbgallery/core/language/de/gallery_mcp.php
similarity index 100%
rename from core/language/de/gallery_mcp.php
rename to phpbbgallery/core/language/de/gallery_mcp.php
diff --git a/core/language/de/gallery_notifications.php b/phpbbgallery/core/language/de/gallery_notifications.php
similarity index 100%
rename from core/language/de/gallery_notifications.php
rename to phpbbgallery/core/language/de/gallery_notifications.php
diff --git a/core/language/de/gallery_ucp.php b/phpbbgallery/core/language/de/gallery_ucp.php
similarity index 100%
rename from core/language/de/gallery_ucp.php
rename to phpbbgallery/core/language/de/gallery_ucp.php
diff --git a/core/language/de/index.htm b/phpbbgallery/core/language/de/index.htm
similarity index 100%
rename from core/language/de/index.htm
rename to phpbbgallery/core/language/de/index.htm
diff --git a/core/language/de/info_acp_gallery.php b/phpbbgallery/core/language/de/info_acp_gallery.php
similarity index 100%
rename from core/language/de/info_acp_gallery.php
rename to phpbbgallery/core/language/de/info_acp_gallery.php
diff --git a/core/language/de/info_acp_gallery_logs.php b/phpbbgallery/core/language/de/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/de/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/de/info_acp_gallery_logs.php
diff --git a/core/language/de/info_ucp_gallery.php b/phpbbgallery/core/language/de/info_ucp_gallery.php
similarity index 100%
rename from core/language/de/info_ucp_gallery.php
rename to phpbbgallery/core/language/de/info_ucp_gallery.php
diff --git a/core/language/de/install_gallery.php b/phpbbgallery/core/language/de/install_gallery.php
similarity index 100%
rename from core/language/de/install_gallery.php
rename to phpbbgallery/core/language/de/install_gallery.php
diff --git a/core/language/de/permissions_gallery.php b/phpbbgallery/core/language/de/permissions_gallery.php
similarity index 100%
rename from core/language/de/permissions_gallery.php
rename to phpbbgallery/core/language/de/permissions_gallery.php
diff --git a/core/language/en/email/newcomment_notify.txt b/phpbbgallery/core/language/en/email/newcomment_notify.txt
similarity index 100%
rename from core/language/en/email/newcomment_notify.txt
rename to phpbbgallery/core/language/en/email/newcomment_notify.txt
diff --git a/core/language/en/email/newimage_notify.txt b/phpbbgallery/core/language/en/email/newimage_notify.txt
similarity index 100%
rename from core/language/en/email/newimage_notify.txt
rename to phpbbgallery/core/language/en/email/newimage_notify.txt
diff --git a/core/language/en/gallery.php b/phpbbgallery/core/language/en/gallery.php
similarity index 100%
rename from core/language/en/gallery.php
rename to phpbbgallery/core/language/en/gallery.php
diff --git a/core/language/en/gallery_acp.php b/phpbbgallery/core/language/en/gallery_acp.php
similarity index 100%
rename from core/language/en/gallery_acp.php
rename to phpbbgallery/core/language/en/gallery_acp.php
diff --git a/core/language/en/gallery_mcp.php b/phpbbgallery/core/language/en/gallery_mcp.php
similarity index 100%
rename from core/language/en/gallery_mcp.php
rename to phpbbgallery/core/language/en/gallery_mcp.php
diff --git a/core/language/en/gallery_notifications.php b/phpbbgallery/core/language/en/gallery_notifications.php
similarity index 100%
rename from core/language/en/gallery_notifications.php
rename to phpbbgallery/core/language/en/gallery_notifications.php
diff --git a/core/language/en/gallery_ucp.php b/phpbbgallery/core/language/en/gallery_ucp.php
similarity index 100%
rename from core/language/en/gallery_ucp.php
rename to phpbbgallery/core/language/en/gallery_ucp.php
diff --git a/core/language/en/info_acp_gallery.php b/phpbbgallery/core/language/en/info_acp_gallery.php
similarity index 100%
rename from core/language/en/info_acp_gallery.php
rename to phpbbgallery/core/language/en/info_acp_gallery.php
diff --git a/core/language/en/info_acp_gallery_logs.php b/phpbbgallery/core/language/en/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/en/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/en/info_acp_gallery_logs.php
diff --git a/core/language/en/info_ucp_gallery.php b/phpbbgallery/core/language/en/info_ucp_gallery.php
similarity index 100%
rename from core/language/en/info_ucp_gallery.php
rename to phpbbgallery/core/language/en/info_ucp_gallery.php
diff --git a/core/language/en/install_gallery.php b/phpbbgallery/core/language/en/install_gallery.php
similarity index 100%
rename from core/language/en/install_gallery.php
rename to phpbbgallery/core/language/en/install_gallery.php
diff --git a/core/language/en/permissions_gallery.php b/phpbbgallery/core/language/en/permissions_gallery.php
similarity index 100%
rename from core/language/en/permissions_gallery.php
rename to phpbbgallery/core/language/en/permissions_gallery.php
diff --git a/core/language/es/email/newcomment_notify.txt b/phpbbgallery/core/language/es/email/newcomment_notify.txt
similarity index 100%
rename from core/language/es/email/newcomment_notify.txt
rename to phpbbgallery/core/language/es/email/newcomment_notify.txt
diff --git a/core/language/es/email/newimage_notify.txt b/phpbbgallery/core/language/es/email/newimage_notify.txt
similarity index 100%
rename from core/language/es/email/newimage_notify.txt
rename to phpbbgallery/core/language/es/email/newimage_notify.txt
diff --git a/core/language/es/gallery.php b/phpbbgallery/core/language/es/gallery.php
similarity index 100%
rename from core/language/es/gallery.php
rename to phpbbgallery/core/language/es/gallery.php
diff --git a/core/language/es/gallery_acp.php b/phpbbgallery/core/language/es/gallery_acp.php
similarity index 100%
rename from core/language/es/gallery_acp.php
rename to phpbbgallery/core/language/es/gallery_acp.php
diff --git a/core/language/es/gallery_mcp.php b/phpbbgallery/core/language/es/gallery_mcp.php
similarity index 100%
rename from core/language/es/gallery_mcp.php
rename to phpbbgallery/core/language/es/gallery_mcp.php
diff --git a/core/language/es/gallery_notifications.php b/phpbbgallery/core/language/es/gallery_notifications.php
similarity index 100%
rename from core/language/es/gallery_notifications.php
rename to phpbbgallery/core/language/es/gallery_notifications.php
diff --git a/core/language/es/gallery_ucp.php b/phpbbgallery/core/language/es/gallery_ucp.php
similarity index 100%
rename from core/language/es/gallery_ucp.php
rename to phpbbgallery/core/language/es/gallery_ucp.php
diff --git a/core/language/es/info_acp_gallery.php b/phpbbgallery/core/language/es/info_acp_gallery.php
similarity index 100%
rename from core/language/es/info_acp_gallery.php
rename to phpbbgallery/core/language/es/info_acp_gallery.php
diff --git a/core/language/es/info_acp_gallery_logs.php b/phpbbgallery/core/language/es/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/es/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/es/info_acp_gallery_logs.php
diff --git a/core/language/es/info_ucp_gallery.php b/phpbbgallery/core/language/es/info_ucp_gallery.php
similarity index 100%
rename from core/language/es/info_ucp_gallery.php
rename to phpbbgallery/core/language/es/info_ucp_gallery.php
diff --git a/core/language/es/install_gallery.php b/phpbbgallery/core/language/es/install_gallery.php
similarity index 100%
rename from core/language/es/install_gallery.php
rename to phpbbgallery/core/language/es/install_gallery.php
diff --git a/core/language/es/permissions_gallery.php b/phpbbgallery/core/language/es/permissions_gallery.php
similarity index 100%
rename from core/language/es/permissions_gallery.php
rename to phpbbgallery/core/language/es/permissions_gallery.php
diff --git a/core/language/fr/email/newcomment_notify.txt b/phpbbgallery/core/language/fr/email/newcomment_notify.txt
similarity index 100%
rename from core/language/fr/email/newcomment_notify.txt
rename to phpbbgallery/core/language/fr/email/newcomment_notify.txt
diff --git a/core/language/fr/email/newimage_notify.txt b/phpbbgallery/core/language/fr/email/newimage_notify.txt
similarity index 100%
rename from core/language/fr/email/newimage_notify.txt
rename to phpbbgallery/core/language/fr/email/newimage_notify.txt
diff --git a/core/language/fr/gallery.php b/phpbbgallery/core/language/fr/gallery.php
similarity index 100%
rename from core/language/fr/gallery.php
rename to phpbbgallery/core/language/fr/gallery.php
diff --git a/core/language/fr/gallery_acp.php b/phpbbgallery/core/language/fr/gallery_acp.php
similarity index 100%
rename from core/language/fr/gallery_acp.php
rename to phpbbgallery/core/language/fr/gallery_acp.php
diff --git a/core/language/fr/gallery_mcp.php b/phpbbgallery/core/language/fr/gallery_mcp.php
similarity index 100%
rename from core/language/fr/gallery_mcp.php
rename to phpbbgallery/core/language/fr/gallery_mcp.php
diff --git a/core/language/fr/gallery_notifications.php b/phpbbgallery/core/language/fr/gallery_notifications.php
similarity index 100%
rename from core/language/fr/gallery_notifications.php
rename to phpbbgallery/core/language/fr/gallery_notifications.php
diff --git a/core/language/fr/gallery_ucp.php b/phpbbgallery/core/language/fr/gallery_ucp.php
similarity index 100%
rename from core/language/fr/gallery_ucp.php
rename to phpbbgallery/core/language/fr/gallery_ucp.php
diff --git a/core/language/fr/info_acp_gallery.php b/phpbbgallery/core/language/fr/info_acp_gallery.php
similarity index 100%
rename from core/language/fr/info_acp_gallery.php
rename to phpbbgallery/core/language/fr/info_acp_gallery.php
diff --git a/core/language/fr/info_acp_gallery_logs.php b/phpbbgallery/core/language/fr/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/fr/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/fr/info_acp_gallery_logs.php
diff --git a/core/language/fr/info_ucp_gallery.php b/phpbbgallery/core/language/fr/info_ucp_gallery.php
similarity index 100%
rename from core/language/fr/info_ucp_gallery.php
rename to phpbbgallery/core/language/fr/info_ucp_gallery.php
diff --git a/core/language/fr/install_gallery.php b/phpbbgallery/core/language/fr/install_gallery.php
similarity index 100%
rename from core/language/fr/install_gallery.php
rename to phpbbgallery/core/language/fr/install_gallery.php
diff --git a/core/language/fr/permissions_gallery.php b/phpbbgallery/core/language/fr/permissions_gallery.php
similarity index 100%
rename from core/language/fr/permissions_gallery.php
rename to phpbbgallery/core/language/fr/permissions_gallery.php
diff --git a/core/language/it/email/newcomment_notify.txt b/phpbbgallery/core/language/it/email/newcomment_notify.txt
similarity index 100%
rename from core/language/it/email/newcomment_notify.txt
rename to phpbbgallery/core/language/it/email/newcomment_notify.txt
diff --git a/core/language/it/email/newimage_notify.txt b/phpbbgallery/core/language/it/email/newimage_notify.txt
similarity index 100%
rename from core/language/it/email/newimage_notify.txt
rename to phpbbgallery/core/language/it/email/newimage_notify.txt
diff --git a/core/language/it/gallery.php b/phpbbgallery/core/language/it/gallery.php
similarity index 100%
rename from core/language/it/gallery.php
rename to phpbbgallery/core/language/it/gallery.php
diff --git a/core/language/it/gallery_acp.php b/phpbbgallery/core/language/it/gallery_acp.php
similarity index 100%
rename from core/language/it/gallery_acp.php
rename to phpbbgallery/core/language/it/gallery_acp.php
diff --git a/core/language/it/gallery_mcp.php b/phpbbgallery/core/language/it/gallery_mcp.php
similarity index 100%
rename from core/language/it/gallery_mcp.php
rename to phpbbgallery/core/language/it/gallery_mcp.php
diff --git a/core/language/it/gallery_notifications.php b/phpbbgallery/core/language/it/gallery_notifications.php
similarity index 100%
rename from core/language/it/gallery_notifications.php
rename to phpbbgallery/core/language/it/gallery_notifications.php
diff --git a/core/language/it/gallery_ucp.php b/phpbbgallery/core/language/it/gallery_ucp.php
similarity index 100%
rename from core/language/it/gallery_ucp.php
rename to phpbbgallery/core/language/it/gallery_ucp.php
diff --git a/core/language/it/info_acp_gallery.php b/phpbbgallery/core/language/it/info_acp_gallery.php
similarity index 100%
rename from core/language/it/info_acp_gallery.php
rename to phpbbgallery/core/language/it/info_acp_gallery.php
diff --git a/core/language/it/info_acp_gallery_logs.php b/phpbbgallery/core/language/it/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/it/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/it/info_acp_gallery_logs.php
diff --git a/core/language/it/info_ucp_gallery.php b/phpbbgallery/core/language/it/info_ucp_gallery.php
similarity index 100%
rename from core/language/it/info_ucp_gallery.php
rename to phpbbgallery/core/language/it/info_ucp_gallery.php
diff --git a/core/language/it/install_gallery.php b/phpbbgallery/core/language/it/install_gallery.php
similarity index 100%
rename from core/language/it/install_gallery.php
rename to phpbbgallery/core/language/it/install_gallery.php
diff --git a/core/language/it/permissions_gallery.php b/phpbbgallery/core/language/it/permissions_gallery.php
similarity index 100%
rename from core/language/it/permissions_gallery.php
rename to phpbbgallery/core/language/it/permissions_gallery.php
diff --git a/core/language/nl/email/newcomment_notify.txt b/phpbbgallery/core/language/nl/email/newcomment_notify.txt
similarity index 100%
rename from core/language/nl/email/newcomment_notify.txt
rename to phpbbgallery/core/language/nl/email/newcomment_notify.txt
diff --git a/core/language/nl/email/newimage_notify.txt b/phpbbgallery/core/language/nl/email/newimage_notify.txt
similarity index 100%
rename from core/language/nl/email/newimage_notify.txt
rename to phpbbgallery/core/language/nl/email/newimage_notify.txt
diff --git a/core/language/nl/gallery.php b/phpbbgallery/core/language/nl/gallery.php
similarity index 100%
rename from core/language/nl/gallery.php
rename to phpbbgallery/core/language/nl/gallery.php
diff --git a/core/language/nl/gallery_acp.php b/phpbbgallery/core/language/nl/gallery_acp.php
similarity index 100%
rename from core/language/nl/gallery_acp.php
rename to phpbbgallery/core/language/nl/gallery_acp.php
diff --git a/core/language/nl/gallery_mcp.php b/phpbbgallery/core/language/nl/gallery_mcp.php
similarity index 100%
rename from core/language/nl/gallery_mcp.php
rename to phpbbgallery/core/language/nl/gallery_mcp.php
diff --git a/core/language/nl/gallery_notifications.php b/phpbbgallery/core/language/nl/gallery_notifications.php
similarity index 100%
rename from core/language/nl/gallery_notifications.php
rename to phpbbgallery/core/language/nl/gallery_notifications.php
diff --git a/core/language/nl/gallery_ucp.php b/phpbbgallery/core/language/nl/gallery_ucp.php
similarity index 100%
rename from core/language/nl/gallery_ucp.php
rename to phpbbgallery/core/language/nl/gallery_ucp.php
diff --git a/core/language/nl/info_acp_gallery.php b/phpbbgallery/core/language/nl/info_acp_gallery.php
similarity index 100%
rename from core/language/nl/info_acp_gallery.php
rename to phpbbgallery/core/language/nl/info_acp_gallery.php
diff --git a/core/language/nl/info_acp_gallery_logs.php b/phpbbgallery/core/language/nl/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/nl/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/nl/info_acp_gallery_logs.php
diff --git a/core/language/nl/info_ucp_gallery.php b/phpbbgallery/core/language/nl/info_ucp_gallery.php
similarity index 100%
rename from core/language/nl/info_ucp_gallery.php
rename to phpbbgallery/core/language/nl/info_ucp_gallery.php
diff --git a/core/language/nl/install_gallery.php b/phpbbgallery/core/language/nl/install_gallery.php
similarity index 100%
rename from core/language/nl/install_gallery.php
rename to phpbbgallery/core/language/nl/install_gallery.php
diff --git a/core/language/nl/permissions_gallery.php b/phpbbgallery/core/language/nl/permissions_gallery.php
similarity index 100%
rename from core/language/nl/permissions_gallery.php
rename to phpbbgallery/core/language/nl/permissions_gallery.php
diff --git a/core/language/ru/email/newcomment_notify.txt b/phpbbgallery/core/language/ru/email/newcomment_notify.txt
similarity index 100%
rename from core/language/ru/email/newcomment_notify.txt
rename to phpbbgallery/core/language/ru/email/newcomment_notify.txt
diff --git a/core/language/ru/email/newimage_notify.txt b/phpbbgallery/core/language/ru/email/newimage_notify.txt
similarity index 100%
rename from core/language/ru/email/newimage_notify.txt
rename to phpbbgallery/core/language/ru/email/newimage_notify.txt
diff --git a/core/language/ru/gallery.php b/phpbbgallery/core/language/ru/gallery.php
similarity index 100%
rename from core/language/ru/gallery.php
rename to phpbbgallery/core/language/ru/gallery.php
diff --git a/core/language/ru/gallery_acp.php b/phpbbgallery/core/language/ru/gallery_acp.php
similarity index 100%
rename from core/language/ru/gallery_acp.php
rename to phpbbgallery/core/language/ru/gallery_acp.php
diff --git a/core/language/ru/gallery_mcp.php b/phpbbgallery/core/language/ru/gallery_mcp.php
similarity index 100%
rename from core/language/ru/gallery_mcp.php
rename to phpbbgallery/core/language/ru/gallery_mcp.php
diff --git a/core/language/ru/gallery_notifications.php b/phpbbgallery/core/language/ru/gallery_notifications.php
similarity index 100%
rename from core/language/ru/gallery_notifications.php
rename to phpbbgallery/core/language/ru/gallery_notifications.php
diff --git a/core/language/ru/gallery_ucp.php b/phpbbgallery/core/language/ru/gallery_ucp.php
similarity index 100%
rename from core/language/ru/gallery_ucp.php
rename to phpbbgallery/core/language/ru/gallery_ucp.php
diff --git a/core/language/ru/info_acp_gallery.php b/phpbbgallery/core/language/ru/info_acp_gallery.php
similarity index 100%
rename from core/language/ru/info_acp_gallery.php
rename to phpbbgallery/core/language/ru/info_acp_gallery.php
diff --git a/core/language/ru/info_acp_gallery_logs.php b/phpbbgallery/core/language/ru/info_acp_gallery_logs.php
similarity index 100%
rename from core/language/ru/info_acp_gallery_logs.php
rename to phpbbgallery/core/language/ru/info_acp_gallery_logs.php
diff --git a/core/language/ru/info_ucp_gallery.php b/phpbbgallery/core/language/ru/info_ucp_gallery.php
similarity index 100%
rename from core/language/ru/info_ucp_gallery.php
rename to phpbbgallery/core/language/ru/info_ucp_gallery.php
diff --git a/core/language/ru/install_gallery.php b/phpbbgallery/core/language/ru/install_gallery.php
similarity index 100%
rename from core/language/ru/install_gallery.php
rename to phpbbgallery/core/language/ru/install_gallery.php
diff --git a/core/language/ru/permissions_gallery.php b/phpbbgallery/core/language/ru/permissions_gallery.php
similarity index 100%
rename from core/language/ru/permissions_gallery.php
rename to phpbbgallery/core/language/ru/permissions_gallery.php
diff --git a/core/license.txt b/phpbbgallery/core/license.txt
similarity index 100%
rename from core/license.txt
rename to phpbbgallery/core/license.txt
diff --git a/core/log.php b/phpbbgallery/core/log.php
similarity index 100%
rename from core/log.php
rename to phpbbgallery/core/log.php
diff --git a/core/migrations/release_1_2_0.php b/phpbbgallery/core/migrations/release_1_2_0.php
similarity index 100%
rename from core/migrations/release_1_2_0.php
rename to phpbbgallery/core/migrations/release_1_2_0.php
diff --git a/core/migrations/release_1_2_0_add_bbcode.php b/phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php
similarity index 100%
rename from core/migrations/release_1_2_0_add_bbcode.php
rename to phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php
diff --git a/core/migrations/release_1_2_0_create_filesystem.php b/phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php
similarity index 100%
rename from core/migrations/release_1_2_0_create_filesystem.php
rename to phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php
diff --git a/core/migrations/release_1_2_0_db_create.php b/phpbbgallery/core/migrations/release_1_2_0_db_create.php
similarity index 100%
rename from core/migrations/release_1_2_0_db_create.php
rename to phpbbgallery/core/migrations/release_1_2_0_db_create.php
diff --git a/core/migrations/release_3_2_1_0.php b/phpbbgallery/core/migrations/release_3_2_1_0.php
similarity index 100%
rename from core/migrations/release_3_2_1_0.php
rename to phpbbgallery/core/migrations/release_3_2_1_0.php
diff --git a/core/migrations/release_3_2_1_1.php b/phpbbgallery/core/migrations/release_3_2_1_1.php
similarity index 100%
rename from core/migrations/release_3_2_1_1.php
rename to phpbbgallery/core/migrations/release_3_2_1_1.php
diff --git a/core/migrations/release_3_3_0.php b/phpbbgallery/core/migrations/release_3_3_0.php
similarity index 100%
rename from core/migrations/release_3_3_0.php
rename to phpbbgallery/core/migrations/release_3_3_0.php
diff --git a/core/migrations/split_ucp_module_settings.php b/phpbbgallery/core/migrations/split_ucp_module_settings.php
similarity index 100%
rename from core/migrations/split_ucp_module_settings.php
rename to phpbbgallery/core/migrations/split_ucp_module_settings.php
diff --git a/core/misc.php b/phpbbgallery/core/misc.php
similarity index 100%
rename from core/misc.php
rename to phpbbgallery/core/misc.php
diff --git a/core/moderate.php b/phpbbgallery/core/moderate.php
similarity index 100%
rename from core/moderate.php
rename to phpbbgallery/core/moderate.php
diff --git a/core/notification.php b/phpbbgallery/core/notification.php
similarity index 100%
rename from core/notification.php
rename to phpbbgallery/core/notification.php
diff --git a/core/notification/events/phpbbgallery_image_approved.php b/phpbbgallery/core/notification/events/phpbbgallery_image_approved.php
similarity index 100%
rename from core/notification/events/phpbbgallery_image_approved.php
rename to phpbbgallery/core/notification/events/phpbbgallery_image_approved.php
diff --git a/core/notification/events/phpbbgallery_image_for_approval.php b/phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php
similarity index 100%
rename from core/notification/events/phpbbgallery_image_for_approval.php
rename to phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php
diff --git a/core/notification/events/phpbbgallery_image_not_approved.php b/phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php
similarity index 100%
rename from core/notification/events/phpbbgallery_image_not_approved.php
rename to phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php
diff --git a/core/notification/events/phpbbgallery_new_comment.php b/phpbbgallery/core/notification/events/phpbbgallery_new_comment.php
similarity index 100%
rename from core/notification/events/phpbbgallery_new_comment.php
rename to phpbbgallery/core/notification/events/phpbbgallery_new_comment.php
diff --git a/core/notification/events/phpbbgallery_new_image.php b/phpbbgallery/core/notification/events/phpbbgallery_new_image.php
similarity index 100%
rename from core/notification/events/phpbbgallery_new_image.php
rename to phpbbgallery/core/notification/events/phpbbgallery_new_image.php
diff --git a/core/notification/events/phpbbgallery_new_report.php b/phpbbgallery/core/notification/events/phpbbgallery_new_report.php
similarity index 100%
rename from core/notification/events/phpbbgallery_new_report.php
rename to phpbbgallery/core/notification/events/phpbbgallery_new_report.php
diff --git a/core/notification/helper.php b/phpbbgallery/core/notification/helper.php
similarity index 100%
rename from core/notification/helper.php
rename to phpbbgallery/core/notification/helper.php
diff --git a/core/rating.php b/phpbbgallery/core/rating.php
similarity index 100%
rename from core/rating.php
rename to phpbbgallery/core/rating.php
diff --git a/core/report.php b/phpbbgallery/core/report.php
similarity index 100%
rename from core/report.php
rename to phpbbgallery/core/report.php
diff --git a/core/search.php b/phpbbgallery/core/search.php
similarity index 99%
rename from core/search.php
rename to phpbbgallery/core/search.php
index 4beea131..c91a33a3 100644
--- a/core/search.php
+++ b/phpbbgallery/core/search.php
@@ -224,6 +224,7 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
),
),
+ // @EPV-IGNORE SQL INJECTION WARNING: safe constant and validated SQL_WHERE clause
'WHERE' => 'i.image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
'GROUP_BY' => 'i.image_id, a.album_name, a.album_status, a.album_user_id, a.album_id',
'ORDER_BY' => $sql_order,
@@ -547,6 +548,7 @@ public function recent($limit, $start = 0, $user = 0, $fields = 'rrc_gindex_disp
),
),
+ // @EPV-IGNORE SQL INJECTION WARNING: safe constant and validated SQL_WHERE clause
'WHERE' => 'i.image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' AND ' . $sql_where,
'ORDER_BY' => $sql_order,
);
diff --git a/core/styles/all/template/event/overall_footer_after.html b/phpbbgallery/core/styles/all/template/event/overall_footer_after.html
similarity index 100%
rename from core/styles/all/template/event/overall_footer_after.html
rename to phpbbgallery/core/styles/all/template/event/overall_footer_after.html
diff --git a/core/styles/all/template/event/overall_header_head_append.html b/phpbbgallery/core/styles/all/template/event/overall_header_head_append.html
similarity index 100%
rename from core/styles/all/template/event/overall_header_head_append.html
rename to phpbbgallery/core/styles/all/template/event/overall_header_head_append.html
diff --git a/core/styles/all/template/js/jquery-ui.min.js b/phpbbgallery/core/styles/all/template/js/jquery-ui.min.js
similarity index 100%
rename from core/styles/all/template/js/jquery-ui.min.js
rename to phpbbgallery/core/styles/all/template/js/jquery-ui.min.js
diff --git a/core/styles/all/template/js/jquery.fileupload-angular.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-angular.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js
diff --git a/core/styles/all/template/js/jquery.fileupload-audio.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-audio.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js
diff --git a/core/styles/all/template/js/jquery.fileupload-image.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-image.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js
diff --git a/core/styles/all/template/js/jquery.fileupload-jquery-ui.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-jquery-ui.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
diff --git a/core/styles/all/template/js/jquery.fileupload-process.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-process.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js
diff --git a/core/styles/all/template/js/jquery.fileupload-ui.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-ui.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js
diff --git a/core/styles/all/template/js/jquery.fileupload-validate.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-validate.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js
diff --git a/core/styles/all/template/js/jquery.fileupload-video.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload-video.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js
diff --git a/core/styles/all/template/js/jquery.fileupload.js b/phpbbgallery/core/styles/all/template/js/jquery.fileupload.js
similarity index 100%
rename from core/styles/all/template/js/jquery.fileupload.js
rename to phpbbgallery/core/styles/all/template/js/jquery.fileupload.js
diff --git a/core/styles/all/template/js/jquery.iframe-transport.js b/phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js
similarity index 100%
rename from core/styles/all/template/js/jquery.iframe-transport.js
rename to phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js
diff --git a/core/styles/all/template/js/jquery.ui.widget.js b/phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js
similarity index 100%
rename from core/styles/all/template/js/jquery.ui.widget.js
rename to phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js
diff --git a/core/styles/all/template/js/load-image.all.min.js b/phpbbgallery/core/styles/all/template/js/load-image.all.min.js
similarity index 100%
rename from core/styles/all/template/js/load-image.all.min.js
rename to phpbbgallery/core/styles/all/template/js/load-image.all.min.js
diff --git a/core/styles/all/template/js/load-image.all.min.js.map b/phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map
similarity index 100%
rename from core/styles/all/template/js/load-image.all.min.js.map
rename to phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map
diff --git a/core/styles/all/theme/default.css b/phpbbgallery/core/styles/all/theme/default.css
similarity index 100%
rename from core/styles/all/theme/default.css
rename to phpbbgallery/core/styles/all/theme/default.css
diff --git a/core/styles/all/theme/images/icon_contact_gallery.png b/phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png
similarity index 100%
rename from core/styles/all/theme/images/icon_contact_gallery.png
rename to phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png
diff --git a/core/styles/prosilver/template/event/index_body_block_stats_append.html b/phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html
similarity index 100%
rename from core/styles/prosilver/template/event/index_body_block_stats_append.html
rename to phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html
diff --git a/core/styles/prosilver/template/event/memberlist_view_content_append.html b/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html
similarity index 100%
rename from core/styles/prosilver/template/event/memberlist_view_content_append.html
rename to phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html
diff --git a/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html b/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
similarity index 100%
rename from core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
rename to phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
diff --git a/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html b/phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
similarity index 100%
rename from core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
rename to phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
diff --git a/core/styles/prosilver/template/event/overall_header_head_append.html b/phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html
similarity index 100%
rename from core/styles/prosilver/template/event/overall_header_head_append.html
rename to phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html
diff --git a/core/styles/prosilver/template/event/overall_header_navigation_prepend.html b/phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
similarity index 100%
rename from core/styles/prosilver/template/event/overall_header_navigation_prepend.html
rename to phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
diff --git a/core/styles/prosilver/template/gallery/album_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/album_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/album_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/album_body.html
diff --git a/core/styles/prosilver/template/gallery/albumlist_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/albumlist_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html
diff --git a/core/styles/prosilver/template/gallery/albumlist_polaroid.html b/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/albumlist_polaroid.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html
diff --git a/core/styles/prosilver/template/gallery/comment_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/comment_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html
diff --git a/core/styles/prosilver/template/gallery/gallery.js b/phpbbgallery/core/styles/prosilver/template/gallery/gallery.js
similarity index 100%
rename from core/styles/prosilver/template/gallery/gallery.js
rename to phpbbgallery/core/styles/prosilver/template/gallery/gallery.js
diff --git a/core/styles/prosilver/template/gallery/gallery_footer.html b/phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/gallery_footer.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html
diff --git a/core/styles/prosilver/template/gallery/gallery_header.html b/phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/gallery_header.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html
diff --git a/core/styles/prosilver/template/gallery/image_edit_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/image_edit_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html
diff --git a/core/styles/prosilver/template/gallery/imageblock_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/imageblock_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html
diff --git a/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/imageblock_polaroid.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html
diff --git a/core/styles/prosilver/template/gallery/imageblock_popup.html b/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/imageblock_popup.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html
diff --git a/core/styles/prosilver/template/gallery/index_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/index_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/index_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/index_body.html
diff --git a/core/styles/prosilver/template/gallery/mcp_approve.html b/phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/mcp_approve.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html
diff --git a/core/styles/prosilver/template/gallery/mcp_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/mcp_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html
diff --git a/core/styles/prosilver/template/gallery/message.html b/phpbbgallery/core/styles/prosilver/template/gallery/message.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/message.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/message.html
diff --git a/core/styles/prosilver/template/gallery/moderate_actions.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_actions.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html
diff --git a/core/styles/prosilver/template/gallery/moderate_actions_queue.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_actions_queue.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html
diff --git a/core/styles/prosilver/template/gallery/moderate_album_overview.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_album_overview.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html
diff --git a/core/styles/prosilver/template/gallery/moderate_approve.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_approve.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html
diff --git a/core/styles/prosilver/template/gallery/moderate_approve_queue.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_approve_queue.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html
diff --git a/core/styles/prosilver/template/gallery/moderate_image_overview.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_image_overview.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html
diff --git a/core/styles/prosilver/template/gallery/moderate_overview.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_overview.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html
diff --git a/core/styles/prosilver/template/gallery/moderate_report_queue.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_report_queue.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html
diff --git a/core/styles/prosilver/template/gallery/moderate_reports.html b/phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/moderate_reports.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html
diff --git a/core/styles/prosilver/template/gallery/plugins_header.html b/phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/plugins_header.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html
diff --git a/core/styles/prosilver/template/gallery/posting_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/posting_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html
diff --git a/core/styles/prosilver/template/gallery/posting_javascript.html b/phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/posting_javascript.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html
diff --git a/core/styles/prosilver/template/gallery/recent_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/recent_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html
diff --git a/core/styles/prosilver/template/gallery/search_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/search_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/search_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/search_body.html
diff --git a/core/styles/prosilver/template/gallery/search_random.html b/phpbbgallery/core/styles/prosilver/template/gallery/search_random.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/search_random.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/search_random.html
diff --git a/core/styles/prosilver/template/gallery/search_recent.html b/phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/search_recent.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html
diff --git a/core/styles/prosilver/template/gallery/search_results.html b/phpbbgallery/core/styles/prosilver/template/gallery/search_results.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/search_results.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/search_results.html
diff --git a/core/styles/prosilver/template/gallery/ucp_gallery.html b/phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/ucp_gallery.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html
diff --git a/core/styles/prosilver/template/gallery/viewimage_body.html b/phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html
similarity index 100%
rename from core/styles/prosilver/template/gallery/viewimage_body.html
rename to phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html
diff --git a/core/styles/prosilver/template/message_body.html b/phpbbgallery/core/styles/prosilver/template/message_body.html
similarity index 100%
rename from core/styles/prosilver/template/message_body.html
rename to phpbbgallery/core/styles/prosilver/template/message_body.html
diff --git a/core/styles/prosilver/theme/gallery-color.css b/phpbbgallery/core/styles/prosilver/theme/gallery-color.css
similarity index 100%
rename from core/styles/prosilver/theme/gallery-color.css
rename to phpbbgallery/core/styles/prosilver/theme/gallery-color.css
diff --git a/core/styles/prosilver/theme/gallery.css b/phpbbgallery/core/styles/prosilver/theme/gallery.css
similarity index 100%
rename from core/styles/prosilver/theme/gallery.css
rename to phpbbgallery/core/styles/prosilver/theme/gallery.css
diff --git a/core/styles/prosilver/theme/images/icon_contact_gallery.gif b/phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif
similarity index 100%
rename from core/styles/prosilver/theme/images/icon_contact_gallery.gif
rename to phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif
diff --git a/core/styles/prosilver/theme/images/icon_gallery_locked.gif b/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif
similarity index 100%
rename from core/styles/prosilver/theme/images/icon_gallery_locked.gif
rename to phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif
diff --git a/core/styles/prosilver/theme/images/icon_gallery_reported.gif b/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif
similarity index 100%
rename from core/styles/prosilver/theme/images/icon_gallery_reported.gif
rename to phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif
diff --git a/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif b/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
similarity index 100%
rename from core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
rename to phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
diff --git a/core/styles/prosilver/theme/images/icon_topic_unapproved.png b/phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png
similarity index 100%
rename from core/styles/prosilver/theme/images/icon_topic_unapproved.png
rename to phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png
diff --git a/core/styles/prosilver/theme/images/lock.png b/phpbbgallery/core/styles/prosilver/theme/images/lock.png
similarity index 100%
rename from core/styles/prosilver/theme/images/lock.png
rename to phpbbgallery/core/styles/prosilver/theme/images/lock.png
diff --git a/core/ucp/main_info.php b/phpbbgallery/core/ucp/main_info.php
similarity index 100%
rename from core/ucp/main_info.php
rename to phpbbgallery/core/ucp/main_info.php
diff --git a/core/ucp/main_module.php b/phpbbgallery/core/ucp/main_module.php
similarity index 100%
rename from core/ucp/main_module.php
rename to phpbbgallery/core/ucp/main_module.php
diff --git a/core/ucp/settings_info.php b/phpbbgallery/core/ucp/settings_info.php
similarity index 100%
rename from core/ucp/settings_info.php
rename to phpbbgallery/core/ucp/settings_info.php
diff --git a/core/ucp/settings_module.php b/phpbbgallery/core/ucp/settings_module.php
similarity index 100%
rename from core/ucp/settings_module.php
rename to phpbbgallery/core/ucp/settings_module.php
diff --git a/core/upload.php b/phpbbgallery/core/upload.php
similarity index 100%
rename from core/upload.php
rename to phpbbgallery/core/upload.php
diff --git a/core/url.php b/phpbbgallery/core/url.php
similarity index 100%
rename from core/url.php
rename to phpbbgallery/core/url.php
diff --git a/core/user.php b/phpbbgallery/core/user.php
similarity index 100%
rename from core/user.php
rename to phpbbgallery/core/user.php
diff --git a/exif/composer.json b/phpbbgallery/exif/composer.json
similarity index 100%
rename from exif/composer.json
rename to phpbbgallery/exif/composer.json
diff --git a/exif/config/services.yml b/phpbbgallery/exif/config/services.yml
similarity index 100%
rename from exif/config/services.yml
rename to phpbbgallery/exif/config/services.yml
diff --git a/exif/event/exif_listener.php b/phpbbgallery/exif/event/exif_listener.php
similarity index 100%
rename from exif/event/exif_listener.php
rename to phpbbgallery/exif/event/exif_listener.php
diff --git a/exif/exif.php b/phpbbgallery/exif/exif.php
similarity index 99%
rename from exif/exif.php
rename to phpbbgallery/exif/exif.php
index 00a253d0..30ab0446 100644
--- a/exif/exif.php
+++ b/phpbbgallery/exif/exif.php
@@ -323,6 +323,7 @@ protected function safe_unserialize($data)
{
if (is_string($data))
{
+ // @EPV-IGNORE unserialize usage is safe here
$result = @unserialize($data);
if ($result === false && $data !== 'b:0;')
diff --git a/exif/ext.php b/phpbbgallery/exif/ext.php
similarity index 100%
rename from exif/ext.php
rename to phpbbgallery/exif/ext.php
diff --git a/exif/language/bg/exif.php b/phpbbgallery/exif/language/bg/exif.php
similarity index 100%
rename from exif/language/bg/exif.php
rename to phpbbgallery/exif/language/bg/exif.php
diff --git a/exif/language/bg/index.htm b/phpbbgallery/exif/language/bg/index.htm
similarity index 100%
rename from exif/language/bg/index.htm
rename to phpbbgallery/exif/language/bg/index.htm
diff --git a/exif/language/de/exif.php b/phpbbgallery/exif/language/de/exif.php
similarity index 100%
rename from exif/language/de/exif.php
rename to phpbbgallery/exif/language/de/exif.php
diff --git a/exif/language/en/exif.php b/phpbbgallery/exif/language/en/exif.php
similarity index 100%
rename from exif/language/en/exif.php
rename to phpbbgallery/exif/language/en/exif.php
diff --git a/exif/language/en/index.htm b/phpbbgallery/exif/language/en/index.htm
similarity index 100%
rename from exif/language/en/index.htm
rename to phpbbgallery/exif/language/en/index.htm
diff --git a/exif/language/fr/exif.php b/phpbbgallery/exif/language/fr/exif.php
similarity index 100%
rename from exif/language/fr/exif.php
rename to phpbbgallery/exif/language/fr/exif.php
diff --git a/exif/language/it/exif.php b/phpbbgallery/exif/language/it/exif.php
similarity index 100%
rename from exif/language/it/exif.php
rename to phpbbgallery/exif/language/it/exif.php
diff --git a/exif/language/it/index.htm b/phpbbgallery/exif/language/it/index.htm
similarity index 100%
rename from exif/language/it/index.htm
rename to phpbbgallery/exif/language/it/index.htm
diff --git a/exif/language/ru/exif.php b/phpbbgallery/exif/language/ru/exif.php
similarity index 100%
rename from exif/language/ru/exif.php
rename to phpbbgallery/exif/language/ru/exif.php
diff --git a/exif/license.txt b/phpbbgallery/exif/license.txt
similarity index 100%
rename from exif/license.txt
rename to phpbbgallery/exif/license.txt
diff --git a/exif/migrations/m1_init.php b/phpbbgallery/exif/migrations/m1_init.php
similarity index 100%
rename from exif/migrations/m1_init.php
rename to phpbbgallery/exif/migrations/m1_init.php
diff --git a/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html b/phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
similarity index 100%
rename from exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
rename to phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp b/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
similarity index 100%
rename from exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
rename to phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.html b/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html
similarity index 100%
rename from exif/styles/prosilver/template/event/gallery_viewimage_details.html
rename to phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html
diff --git a/tests/controller/controller_base.php b/phpbbgallery/tests/controller/controller_base.php
similarity index 100%
rename from tests/controller/controller_base.php
rename to phpbbgallery/tests/controller/controller_base.php
diff --git a/tests/controller/fixtures/fixture.xml b/phpbbgallery/tests/controller/fixtures/fixture.xml
similarity index 100%
rename from tests/controller/fixtures/fixture.xml
rename to phpbbgallery/tests/controller/fixtures/fixture.xml
diff --git a/tests/controller/gallery_album_test.php b/phpbbgallery/tests/controller/gallery_album_test.php
similarity index 100%
rename from tests/controller/gallery_album_test.php
rename to phpbbgallery/tests/controller/gallery_album_test.php
diff --git a/tests/controller/gallery_comment_test.php b/phpbbgallery/tests/controller/gallery_comment_test.php
similarity index 100%
rename from tests/controller/gallery_comment_test.php
rename to phpbbgallery/tests/controller/gallery_comment_test.php
diff --git a/tests/controller/gallery_index_test.php b/phpbbgallery/tests/controller/gallery_index_test.php
similarity index 100%
rename from tests/controller/gallery_index_test.php
rename to phpbbgallery/tests/controller/gallery_index_test.php
diff --git a/tests/controller/gallery_moderate_test.php b/phpbbgallery/tests/controller/gallery_moderate_test.php
similarity index 100%
rename from tests/controller/gallery_moderate_test.php
rename to phpbbgallery/tests/controller/gallery_moderate_test.php
diff --git a/tests/core/album/core_album_test.php b/phpbbgallery/tests/core/album/core_album_test.php
similarity index 100%
rename from tests/core/album/core_album_test.php
rename to phpbbgallery/tests/core/album/core_album_test.php
diff --git a/tests/core/album/core_display_test.php b/phpbbgallery/tests/core/album/core_display_test.php
similarity index 100%
rename from tests/core/album/core_display_test.php
rename to phpbbgallery/tests/core/album/core_display_test.php
diff --git a/tests/core/core_auth_test.php b/phpbbgallery/tests/core/core_auth_test.php
similarity index 100%
rename from tests/core/core_auth_test.php
rename to phpbbgallery/tests/core/core_auth_test.php
diff --git a/tests/core/core_base.php b/phpbbgallery/tests/core/core_base.php
similarity index 100%
rename from tests/core/core_base.php
rename to phpbbgallery/tests/core/core_base.php
diff --git a/tests/core/core_block_test.php b/phpbbgallery/tests/core/core_block_test.php
similarity index 100%
rename from tests/core/core_block_test.php
rename to phpbbgallery/tests/core/core_block_test.php
diff --git a/tests/core/core_cache_test.php b/phpbbgallery/tests/core/core_cache_test.php
similarity index 100%
rename from tests/core/core_cache_test.php
rename to phpbbgallery/tests/core/core_cache_test.php
diff --git a/tests/core/core_comment_test.php b/phpbbgallery/tests/core/core_comment_test.php
similarity index 100%
rename from tests/core/core_comment_test.php
rename to phpbbgallery/tests/core/core_comment_test.php
diff --git a/tests/core/core_config_test.php b/phpbbgallery/tests/core/core_config_test.php
similarity index 100%
rename from tests/core/core_config_test.php
rename to phpbbgallery/tests/core/core_config_test.php
diff --git a/tests/core/core_contest_test.php b/phpbbgallery/tests/core/core_contest_test.php
similarity index 100%
rename from tests/core/core_contest_test.php
rename to phpbbgallery/tests/core/core_contest_test.php
diff --git a/tests/core/core_image_test.php b/phpbbgallery/tests/core/core_image_test.php
similarity index 100%
rename from tests/core/core_image_test.php
rename to phpbbgallery/tests/core/core_image_test.php
diff --git a/tests/core/core_notification_test.php b/phpbbgallery/tests/core/core_notification_test.php
similarity index 100%
rename from tests/core/core_notification_test.php
rename to phpbbgallery/tests/core/core_notification_test.php
diff --git a/tests/core/core_rating_test.php b/phpbbgallery/tests/core/core_rating_test.php
similarity index 100%
rename from tests/core/core_rating_test.php
rename to phpbbgallery/tests/core/core_rating_test.php
diff --git a/tests/core/core_report_test.php b/phpbbgallery/tests/core/core_report_test.php
similarity index 100%
rename from tests/core/core_report_test.php
rename to phpbbgallery/tests/core/core_report_test.php
diff --git a/tests/core/core_search_test.php b/phpbbgallery/tests/core/core_search_test.php
similarity index 100%
rename from tests/core/core_search_test.php
rename to phpbbgallery/tests/core/core_search_test.php
diff --git a/tests/core/core_url_test.php b/phpbbgallery/tests/core/core_url_test.php
similarity index 100%
rename from tests/core/core_url_test.php
rename to phpbbgallery/tests/core/core_url_test.php
diff --git a/tests/core/core_user_test.php b/phpbbgallery/tests/core/core_user_test.php
similarity index 100%
rename from tests/core/core_user_test.php
rename to phpbbgallery/tests/core/core_user_test.php
diff --git a/tests/core/fixtures/fixture.xml b/phpbbgallery/tests/core/fixtures/fixture.xml
similarity index 100%
rename from tests/core/fixtures/fixture.xml
rename to phpbbgallery/tests/core/fixtures/fixture.xml
diff --git a/tests/event/fixtures/fixture.xml b/phpbbgallery/tests/event/fixtures/fixture.xml
similarity index 100%
rename from tests/event/fixtures/fixture.xml
rename to phpbbgallery/tests/event/fixtures/fixture.xml
diff --git a/tests/event/main_event_test.php b/phpbbgallery/tests/event/main_event_test.php
similarity index 100%
rename from tests/event/main_event_test.php
rename to phpbbgallery/tests/event/main_event_test.php
diff --git a/tests/functional/images/valid.gif b/phpbbgallery/tests/functional/images/valid.gif
similarity index 100%
rename from tests/functional/images/valid.gif
rename to phpbbgallery/tests/functional/images/valid.gif
diff --git a/tests/functional/images/valid.jpg b/phpbbgallery/tests/functional/images/valid.jpg
similarity index 100%
rename from tests/functional/images/valid.jpg
rename to phpbbgallery/tests/functional/images/valid.jpg
diff --git a/tests/functional/images/valid.png b/phpbbgallery/tests/functional/images/valid.png
similarity index 100%
rename from tests/functional/images/valid.png
rename to phpbbgallery/tests/functional/images/valid.png
diff --git a/tests/functional/images/valid.webp b/phpbbgallery/tests/functional/images/valid.webp
similarity index 100%
rename from tests/functional/images/valid.webp
rename to phpbbgallery/tests/functional/images/valid.webp
diff --git a/tests/functional/images/valid.zip b/phpbbgallery/tests/functional/images/valid.zip
similarity index 100%
rename from tests/functional/images/valid.zip
rename to phpbbgallery/tests/functional/images/valid.zip
diff --git a/tests/functional/phpbbgallery_alpha_test.php b/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
similarity index 100%
rename from tests/functional/phpbbgallery_alpha_test.php
rename to phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
diff --git a/tests/functional/phpbbgallery_base.php b/phpbbgallery/tests/functional/phpbbgallery_base.php
similarity index 100%
rename from tests/functional/phpbbgallery_base.php
rename to phpbbgallery/tests/functional/phpbbgallery_base.php
diff --git a/tests/functional/phpbbgallery_beta_test.php b/phpbbgallery/tests/functional/phpbbgallery_beta_test.php
similarity index 100%
rename from tests/functional/phpbbgallery_beta_test.php
rename to phpbbgallery/tests/functional/phpbbgallery_beta_test.php
diff --git a/tests/functional/phpbbgallery_charlie_test.php b/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
similarity index 100%
rename from tests/functional/phpbbgallery_charlie_test.php
rename to phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
diff --git a/tests/functional/phpbbgallery_delta_test.php b/phpbbgallery/tests/functional/phpbbgallery_delta_test.php
similarity index 100%
rename from tests/functional/phpbbgallery_delta_test.php
rename to phpbbgallery/tests/functional/phpbbgallery_delta_test.php
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 5d44af98..b4f0648e 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -13,11 +13,11 @@
>
- ./tests
- ./tests/functional
+ ./phpbbgallery/tests
+ ./phpbbgallery/tests/functional
- ./tests/functional/
+ ./phpbbgallery/tests/functional/
@@ -25,15 +25,15 @@
./
- ./acpcleanup/language/
- ./acpcleanup/migrations/
- ./acpimport/language/
- ./acpimport/migrations/
- ./exif/language/
- ./exif/migrations/
- ./core/language/
- ./core/migrations/
- ./tests/
+ ./phpbbgallery/acpcleanup/language/
+ ./phpbbgallery/acpcleanup/migrations/
+ ./phpbbgallery/acpimport/language/
+ ./phpbbgallery/acpimport/migrations/
+ ./phpbbgallery/exif/language/
+ ./phpbbgallery/exif/migrations/
+ ./phpbbgallery/core/language/
+ ./phpbbgallery/core/migrations/
+ ./phpbbgallery/tests/
From 0f631bfc965cdd448e5571e7b8d76c4828d5c8b0 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 19:18:02 +0100
Subject: [PATCH 039/138] Fix pagination on index
---
phpbbgallery/core/controller/index.php | 2 +-
phpbbgallery/core/search.php | 22 +++++++++++++---------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/phpbbgallery/core/controller/index.php b/phpbbgallery/core/controller/index.php
index cf3c3466..f502459f 100644
--- a/phpbbgallery/core/controller/index.php
+++ b/phpbbgallery/core/controller/index.php
@@ -225,7 +225,7 @@ public function base()
'S_RECENT_COMMENTS' => $this->helper->route('phpbbgallery_core_search_commented'),
'COMMENTS_EXPAND' => $this->gallery_config->get('rrc_gindex_comments') ? true : false,
));
- $this->gallery_search->recent_comments($this->gallery_config->get('items_per_page'), 0);
+ $this->gallery_search->recent_comments($this->gallery_config->get('items_per_page'), 0, false);
}
}
$this->display_legend();
diff --git a/phpbbgallery/core/search.php b/phpbbgallery/core/search.php
index c91a33a3..54840644 100644
--- a/phpbbgallery/core/search.php
+++ b/phpbbgallery/core/search.php
@@ -310,10 +310,10 @@ public function recent_count()
/**
* recent comments
- * @param (int) $limit How many imagese to query
+ * @param (int) $limit How many images to query
* @param int $start
*/
- public function recent_comments($limit, $start = 0)
+ public function recent_comments($limit, $start = 0, $pagination = true)
{
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
$sql_limit = $limit;
@@ -337,7 +337,7 @@ public function recent_comments($limit, $start = 0)
'WHERE' => 'i.image_id = c.comment_image_id and ' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('c_read'), false, true),
'ORDER_BY' => 'comment_time DESC'
);
- $sql_array['WHERE'] .= ' AND ((' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums), false, true) . ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
+ $sql_array['WHERE'] .= ' AND ((' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums), false, true) . ' AND image_status <> ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
OR ' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('m_status'), $exclude_albums), false, true) . ')';
$sql_array['SELECT'] = 'COUNT(c.comment_id) as count';
@@ -396,12 +396,16 @@ public function recent_comments($limit, $start = 0)
'SEARCH_MATCHES' => $this->language->lang('TOTAL_COMMENTS_SPRINTF', $count),
'SEARCH_TITLE' => $this->language->lang('RECENT_COMMENTS'),
));
- $this->pagination->generate_template_pagination(array(
- 'routes' => array(
- 'phpbbgallery_core_search_commented',
- 'phpbbgallery_core_search_commented_page',),
- 'params' => array()), 'pagination', 'page', $count, $limit, $start
- );
+ if($pagination)
+ {
+ $this->pagination->generate_template_pagination(array(
+ 'routes' => array(
+ 'phpbbgallery_core_search_commented',
+ 'phpbbgallery_core_search_commented_page',),
+ 'params' => array()), 'pagination', 'page', $count, $limit, $start
+ );
+ }
+
}
/**
From df9168e400bb81dc3854842f108639237c72a8c0 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 19:28:13 +0100
Subject: [PATCH 040/138] test epv
---
.travis.yml | 4 +--
.../acp/main_info.php | 0
.../acp/main_module.php | 0
.../adm/style/gallery_cleanup.html | 0
.../adm/style/index.htm | 0
.../acpcleanup => acpcleanup}/cleanup.php | 0
.../acpcleanup => acpcleanup}/composer.json | 0
.../config/services.yml | 0
.../acpcleanup => acpcleanup}/ext.php | 0
.../language/bg/info_acp_gallery_cleanup.php | 0
.../language/de/info_acp_gallery_cleanup.php | 0
.../language/en/info_acp_gallery_cleanup.php | 0
.../language/fr/info_acp_gallery_cleanup.php | 0
.../language/it/info_acp_gallery_cleanup.php | 0
.../language/ru/info_acp_gallery_cleanup.php | 0
.../acpcleanup => acpcleanup}/license.txt | 0
.../migrations/m1_init.php | 0
.../acpimport => acpimport}/acp/main_info.php | 0
.../acp/main_module.php | 0
.../adm/style/gallery_acpimport.html | 0
.../acpimport => acpimport}/composer.json | 0
{phpbbgallery/acpimport => acpimport}/ext.php | 0
.../bg/info_acp_gallery_acpimport.php | 0
.../de/info_acp_gallery_acpimport.php | 0
.../en/info_acp_gallery_acpimport.php | 0
.../fr/info_acp_gallery_acpimport.php | 0
.../it/info_acp_gallery_acpimport.php | 0
.../ru/info_acp_gallery_acpimport.php | 0
.../acpimport => acpimport}/license.txt | 0
.../migrations/m1_init.php | 0
.../core => core}/acp/albums_info.php | 0
.../core => core}/acp/albums_module.php | 0
.../core => core}/acp/config_info.php | 0
.../core => core}/acp/config_module.php | 0
.../core => core}/acp/gallery_logs_info.php | 0
.../core => core}/acp/gallery_logs_module.php | 0
{phpbbgallery/core => core}/acp/main_info.php | 0
.../core => core}/acp/main_module.php | 0
.../core => core}/acp/permissions_info.php | 0
.../core => core}/acp/permissions_module.php | 0
{phpbbgallery/core => core}/adm/index.htm | 0
.../adm/style/gallery_albums.html | 0
.../core => core}/adm/style/gallery_logs.html | 0
.../core => core}/adm/style/gallery_main.html | 0
.../adm/style/gallery_permissions.html | 0
.../core => core}/adm/style/index.htm | 0
{phpbbgallery/core => core}/album/album.php | 0
{phpbbgallery/core => core}/album/display.php | 0
{phpbbgallery/core => core}/album/loader.php | 0
{phpbbgallery/core => core}/album/manage.php | 0
{phpbbgallery/core => core}/auth/auth.php | 0
{phpbbgallery/core => core}/auth/level.php | 0
{phpbbgallery/core => core}/auth/set.php | 0
{phpbbgallery/core => core}/block.bkp | 0
{phpbbgallery/core => core}/block.php | 0
{phpbbgallery/core => core}/cache.php | 0
{phpbbgallery/core => core}/comment.php | 0
{phpbbgallery/core => core}/composer.json | 0
{phpbbgallery/core => core}/config.php | 0
.../core => core}/config/routing.yml | 0
.../core => core}/config/services.yml | 0
.../config/services_controller.yml | 0
.../core => core}/config/services_files.yml | 0
.../config/services_notification_types.yml | 0
{phpbbgallery/core => core}/config/tables.yml | 0
{phpbbgallery/core => core}/constants.php | 0
{phpbbgallery/core => core}/contest.php | 0
.../core => core}/controller/album.php | 0
.../core => core}/controller/comment.php | 0
.../core => core}/controller/file.php | 0
.../core => core}/controller/image.php | 0
.../core => core}/controller/index.php | 0
.../core => core}/controller/moderate.php | 0
.../core => core}/controller/search.php | 0
.../core => core}/controller/upload.php | 0
.../core => core}/cron/cron_cleaner.php | 0
{phpbbgallery/core => core}/docs/tables.md | 0
.../core => core}/event/main_listener.php | 0
{phpbbgallery/core => core}/ext.php | 0
{phpbbgallery/core => core}/file/file.php | 0
.../core => core}/file/types/multiform.php | 0
{phpbbgallery/core => core}/image/image.php | 0
.../core => core}/images/icon_delete.gif | Bin
.../images/icon_delete_disabled.gif | Bin
.../core => core}/images/icon_down.gif | Bin
.../images/icon_down_disabled.gif | Bin
.../core => core}/images/icon_edit.gif | Bin
.../images/icon_edit_disabled.gif | Bin
.../core => core}/images/icon_up.gif | Bin
.../core => core}/images/icon_up_disabled.gif | Bin
.../core => core}/images/legacy/watermark.png | Bin
.../images/upload/image_not_exist.jpg | Bin
.../core => core}/images/upload/index.htm | 0
.../images/upload/no_hotlinking.jpg | Bin
.../images/upload/not_authorised.jpg | Bin
.../core => core}/images/watermark.png | Bin
.../language/bg/email/newcomment_notify.txt | 0
.../language/bg/email/newimage_notify.txt | 0
.../core => core}/language/bg/gallery.php | 0
.../core => core}/language/bg/gallery_acp.php | 0
.../core => core}/language/bg/gallery_mcp.php | 0
.../language/bg/gallery_notifications.php | 0
.../core => core}/language/bg/gallery_ucp.php | 0
.../language/bg/info_acp_gallery.php | 0
.../language/bg/info_acp_gallery_logs.php | 0
.../language/bg/info_ucp_gallery.php | 0
.../language/bg/install_gallery.php | 0
.../language/bg/permissions_gallery.php | 0
.../language/de/email/newcomment_notify.txt | 0
.../language/de/email/newimage_notify.txt | 0
.../core => core}/language/de/gallery.php | 0
.../core => core}/language/de/gallery_acp.php | 0
.../core => core}/language/de/gallery_mcp.php | 0
.../language/de/gallery_notifications.php | 0
.../core => core}/language/de/gallery_ucp.php | 0
.../core => core}/language/de/index.htm | 0
.../language/de/info_acp_gallery.php | 0
.../language/de/info_acp_gallery_logs.php | 0
.../language/de/info_ucp_gallery.php | 0
.../language/de/install_gallery.php | 0
.../language/de/permissions_gallery.php | 0
.../language/en/email/newcomment_notify.txt | 0
.../language/en/email/newimage_notify.txt | 0
.../core => core}/language/en/gallery.php | 0
.../core => core}/language/en/gallery_acp.php | 0
.../core => core}/language/en/gallery_mcp.php | 0
.../language/en/gallery_notifications.php | 0
.../core => core}/language/en/gallery_ucp.php | 0
.../language/en/info_acp_gallery.php | 0
.../language/en/info_acp_gallery_logs.php | 0
.../language/en/info_ucp_gallery.php | 0
.../language/en/install_gallery.php | 0
.../language/en/permissions_gallery.php | 0
.../language/es/email/newcomment_notify.txt | 0
.../language/es/email/newimage_notify.txt | 0
.../core => core}/language/es/gallery.php | 0
.../core => core}/language/es/gallery_acp.php | 0
.../core => core}/language/es/gallery_mcp.php | 0
.../language/es/gallery_notifications.php | 0
.../core => core}/language/es/gallery_ucp.php | 0
.../language/es/info_acp_gallery.php | 0
.../language/es/info_acp_gallery_logs.php | 0
.../language/es/info_ucp_gallery.php | 0
.../language/es/install_gallery.php | 0
.../language/es/permissions_gallery.php | 0
.../language/fr/email/newcomment_notify.txt | 0
.../language/fr/email/newimage_notify.txt | 0
.../core => core}/language/fr/gallery.php | 0
.../core => core}/language/fr/gallery_acp.php | 0
.../core => core}/language/fr/gallery_mcp.php | 0
.../language/fr/gallery_notifications.php | 0
.../core => core}/language/fr/gallery_ucp.php | 0
.../language/fr/info_acp_gallery.php | 0
.../language/fr/info_acp_gallery_logs.php | 0
.../language/fr/info_ucp_gallery.php | 0
.../language/fr/install_gallery.php | 0
.../language/fr/permissions_gallery.php | 0
.../language/it/email/newcomment_notify.txt | 0
.../language/it/email/newimage_notify.txt | 0
.../core => core}/language/it/gallery.php | 0
.../core => core}/language/it/gallery_acp.php | 0
.../core => core}/language/it/gallery_mcp.php | 0
.../language/it/gallery_notifications.php | 0
.../core => core}/language/it/gallery_ucp.php | 0
.../language/it/info_acp_gallery.php | 0
.../language/it/info_acp_gallery_logs.php | 0
.../language/it/info_ucp_gallery.php | 0
.../language/it/install_gallery.php | 0
.../language/it/permissions_gallery.php | 0
.../language/nl/email/newcomment_notify.txt | 0
.../language/nl/email/newimage_notify.txt | 0
.../core => core}/language/nl/gallery.php | 0
.../core => core}/language/nl/gallery_acp.php | 0
.../core => core}/language/nl/gallery_mcp.php | 0
.../language/nl/gallery_notifications.php | 0
.../core => core}/language/nl/gallery_ucp.php | 0
.../language/nl/info_acp_gallery.php | 0
.../language/nl/info_acp_gallery_logs.php | 0
.../language/nl/info_ucp_gallery.php | 0
.../language/nl/install_gallery.php | 0
.../language/nl/permissions_gallery.php | 0
.../language/ru/email/newcomment_notify.txt | 0
.../language/ru/email/newimage_notify.txt | 0
.../core => core}/language/ru/gallery.php | 0
.../core => core}/language/ru/gallery_acp.php | 0
.../core => core}/language/ru/gallery_mcp.php | 0
.../language/ru/gallery_notifications.php | 0
.../core => core}/language/ru/gallery_ucp.php | 0
.../language/ru/info_acp_gallery.php | 0
.../language/ru/info_acp_gallery_logs.php | 0
.../language/ru/info_ucp_gallery.php | 0
.../language/ru/install_gallery.php | 0
.../language/ru/permissions_gallery.php | 0
{phpbbgallery/core => core}/license.txt | 0
{phpbbgallery/core => core}/log.php | 0
.../migrations/release_1_2_0.php | 0
.../migrations/release_1_2_0_add_bbcode.php | 0
.../release_1_2_0_create_filesystem.php | 0
.../migrations/release_1_2_0_db_create.php | 0
.../migrations/release_3_2_1_0.php | 0
.../migrations/release_3_2_1_1.php | 0
.../migrations/release_3_3_0.php | 0
.../migrations/split_ucp_module_settings.php | 0
{phpbbgallery/core => core}/misc.php | 0
{phpbbgallery/core => core}/moderate.php | 0
{phpbbgallery/core => core}/notification.php | 0
.../events/phpbbgallery_image_approved.php | 0
.../phpbbgallery_image_for_approval.php | 0
.../phpbbgallery_image_not_approved.php | 0
.../events/phpbbgallery_new_comment.php | 0
.../events/phpbbgallery_new_image.php | 0
.../events/phpbbgallery_new_report.php | 0
.../core => core}/notification/helper.php | 0
{phpbbgallery/core => core}/rating.php | 0
{phpbbgallery/core => core}/report.php | 0
{phpbbgallery/core => core}/search.php | 0
.../template/event/overall_footer_after.html | 0
.../event/overall_header_head_append.html | 0
.../styles/all/template/js/jquery-ui.min.js | 0
.../template/js/jquery.fileupload-angular.js | 0
.../template/js/jquery.fileupload-audio.js | 0
.../template/js/jquery.fileupload-image.js | 0
.../js/jquery.fileupload-jquery-ui.js | 0
.../template/js/jquery.fileupload-process.js | 0
.../all/template/js/jquery.fileupload-ui.js | 0
.../template/js/jquery.fileupload-validate.js | 0
.../template/js/jquery.fileupload-video.js | 0
.../all/template/js/jquery.fileupload.js | 0
.../template/js/jquery.iframe-transport.js | 0
.../all/template/js/jquery.ui.widget.js | 0
.../all/template/js/load-image.all.min.js | 0
.../all/template/js/load-image.all.min.js.map | 0
.../styles/all/theme/default.css | 0
.../all/theme/images/icon_contact_gallery.png | Bin
.../event/index_body_block_stats_append.html | 0
.../event/memberlist_view_content_append.html | 0
...memberlist_view_user_statistics_after.html | 0
.../navbar_header_user_profile_prepend.html | 0
.../event/overall_header_head_append.html | 0
.../overall_header_navigation_prepend.html | 0
.../template/gallery/album_body.html | 0
.../template/gallery/albumlist_body.html | 0
.../template/gallery/albumlist_polaroid.html | 0
.../template/gallery/comment_body.html | 0
.../prosilver/template/gallery/gallery.js | 0
.../template/gallery/gallery_footer.html | 0
.../template/gallery/gallery_header.html | 0
.../template/gallery/image_edit_body.html | 0
.../template/gallery/imageblock_body.html | 0
.../template/gallery/imageblock_polaroid.html | 0
.../template/gallery/imageblock_popup.html | 0
.../template/gallery/index_body.html | 0
.../template/gallery/mcp_approve.html | 0
.../prosilver/template/gallery/mcp_body.html | 0
.../prosilver/template/gallery/message.html | 0
.../template/gallery/moderate_actions.html | 0
.../gallery/moderate_actions_queue.html | 0
.../gallery/moderate_album_overview.html | 0
.../template/gallery/moderate_approve.html | 0
.../gallery/moderate_approve_queue.html | 0
.../gallery/moderate_image_overview.html | 0
.../template/gallery/moderate_overview.html | 0
.../gallery/moderate_report_queue.html | 0
.../template/gallery/moderate_reports.html | 0
.../template/gallery/plugins_header.html | 0
.../template/gallery/posting_body.html | 0
.../template/gallery/posting_javascript.html | 0
.../template/gallery/recent_body.html | 0
.../template/gallery/search_body.html | 0
.../template/gallery/search_random.html | 0
.../template/gallery/search_recent.html | 0
.../template/gallery/search_results.html | 0
.../template/gallery/ucp_gallery.html | 0
.../template/gallery/viewimage_body.html | 0
.../prosilver/template/message_body.html | 0
.../styles/prosilver/theme/gallery-color.css | 0
.../styles/prosilver/theme/gallery.css | 0
.../theme/images/icon_contact_gallery.gif | Bin
.../theme/images/icon_gallery_locked.gif | Bin
.../theme/images/icon_gallery_reported.gif | Bin
.../theme/images/icon_gallery_unapproved.gif | Bin
.../theme/images/icon_topic_unapproved.png | Bin
.../styles/prosilver/theme/images/lock.png | Bin
{phpbbgallery/core => core}/ucp/main_info.php | 0
.../core => core}/ucp/main_module.php | 0
.../core => core}/ucp/settings_info.php | 0
.../core => core}/ucp/settings_module.php | 0
{phpbbgallery/core => core}/upload.php | 0
{phpbbgallery/core => core}/url.php | 0
{phpbbgallery/core => core}/user.php | 0
{phpbbgallery/exif => exif}/composer.json | 0
.../exif => exif}/config/services.yml | 0
.../exif => exif}/event/exif_listener.php | 0
{phpbbgallery/exif => exif}/exif.php | 0
{phpbbgallery/exif => exif}/ext.php | 0
.../exif => exif}/language/bg/exif.php | 0
.../exif => exif}/language/bg/index.htm | 0
.../exif => exif}/language/de/exif.php | 0
.../exif => exif}/language/en/exif.php | 0
.../exif => exif}/language/en/index.htm | 0
.../exif => exif}/language/fr/exif.php | 0
.../exif => exif}/language/it/exif.php | 0
.../exif => exif}/language/it/index.htm | 0
.../exif => exif}/language/ru/exif.php | 0
{phpbbgallery/exif => exif}/license.txt | 0
.../exif => exif}/migrations/m1_init.php | 0
.../event/gallery_ucp_settings_fieldset.html | 0
.../event/gallery_viewimage_details.bkp | 0
.../event/gallery_viewimage_details.html | 0
phpunit.xml.dist | 24 +++++++++---------
.../controller/controller_base.php | 0
.../controller/fixtures/fixture.xml | 0
.../controller/gallery_album_test.php | 0
.../controller/gallery_comment_test.php | 0
.../controller/gallery_index_test.php | 0
.../controller/gallery_moderate_test.php | 0
.../core/album/core_album_test.php | 0
.../core/album/core_display_test.php | 0
.../tests => tests}/core/core_auth_test.php | 0
.../tests => tests}/core/core_base.php | 0
.../tests => tests}/core/core_block_test.php | 0
.../tests => tests}/core/core_cache_test.php | 0
.../core/core_comment_test.php | 0
.../tests => tests}/core/core_config_test.php | 0
.../core/core_contest_test.php | 0
.../tests => tests}/core/core_image_test.php | 0
.../core/core_notification_test.php | 0
.../tests => tests}/core/core_rating_test.php | 0
.../tests => tests}/core/core_report_test.php | 0
.../tests => tests}/core/core_search_test.php | 0
.../tests => tests}/core/core_url_test.php | 0
.../tests => tests}/core/core_user_test.php | 0
.../tests => tests}/core/fixtures/fixture.xml | 0
.../event/fixtures/fixture.xml | 0
.../tests => tests}/event/main_event_test.php | 0
.../functional/images/valid.gif | Bin
.../functional/images/valid.jpg | Bin
.../functional/images/valid.png | Bin
.../functional/images/valid.webp | Bin
.../functional/images/valid.zip | Bin
.../functional/phpbbgallery_alpha_test.php | 0
.../functional/phpbbgallery_base.php | 0
.../functional/phpbbgallery_beta_test.php | 0
.../functional/phpbbgallery_charlie_test.php | 0
.../functional/phpbbgallery_delta_test.php | 0
345 files changed, 14 insertions(+), 14 deletions(-)
rename {phpbbgallery/acpcleanup => acpcleanup}/acp/main_info.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/acp/main_module.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/adm/style/gallery_cleanup.html (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/adm/style/index.htm (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/composer.json (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/config/services.yml (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/ext.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/bg/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/de/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/en/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/fr/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/it/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/language/ru/info_acp_gallery_cleanup.php (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/license.txt (100%)
rename {phpbbgallery/acpcleanup => acpcleanup}/migrations/m1_init.php (100%)
rename {phpbbgallery/acpimport => acpimport}/acp/main_info.php (100%)
rename {phpbbgallery/acpimport => acpimport}/acp/main_module.php (100%)
rename {phpbbgallery/acpimport => acpimport}/adm/style/gallery_acpimport.html (100%)
rename {phpbbgallery/acpimport => acpimport}/composer.json (100%)
rename {phpbbgallery/acpimport => acpimport}/ext.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/bg/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/de/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/en/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/fr/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/it/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/language/ru/info_acp_gallery_acpimport.php (100%)
rename {phpbbgallery/acpimport => acpimport}/license.txt (100%)
rename {phpbbgallery/acpimport => acpimport}/migrations/m1_init.php (100%)
rename {phpbbgallery/core => core}/acp/albums_info.php (100%)
rename {phpbbgallery/core => core}/acp/albums_module.php (100%)
rename {phpbbgallery/core => core}/acp/config_info.php (100%)
rename {phpbbgallery/core => core}/acp/config_module.php (100%)
rename {phpbbgallery/core => core}/acp/gallery_logs_info.php (100%)
rename {phpbbgallery/core => core}/acp/gallery_logs_module.php (100%)
rename {phpbbgallery/core => core}/acp/main_info.php (100%)
rename {phpbbgallery/core => core}/acp/main_module.php (100%)
rename {phpbbgallery/core => core}/acp/permissions_info.php (100%)
rename {phpbbgallery/core => core}/acp/permissions_module.php (100%)
rename {phpbbgallery/core => core}/adm/index.htm (100%)
rename {phpbbgallery/core => core}/adm/style/gallery_albums.html (100%)
rename {phpbbgallery/core => core}/adm/style/gallery_logs.html (100%)
rename {phpbbgallery/core => core}/adm/style/gallery_main.html (100%)
rename {phpbbgallery/core => core}/adm/style/gallery_permissions.html (100%)
rename {phpbbgallery/core => core}/adm/style/index.htm (100%)
rename {phpbbgallery/core => core}/album/album.php (100%)
rename {phpbbgallery/core => core}/album/display.php (100%)
rename {phpbbgallery/core => core}/album/loader.php (100%)
rename {phpbbgallery/core => core}/album/manage.php (100%)
rename {phpbbgallery/core => core}/auth/auth.php (100%)
rename {phpbbgallery/core => core}/auth/level.php (100%)
rename {phpbbgallery/core => core}/auth/set.php (100%)
rename {phpbbgallery/core => core}/block.bkp (100%)
rename {phpbbgallery/core => core}/block.php (100%)
rename {phpbbgallery/core => core}/cache.php (100%)
rename {phpbbgallery/core => core}/comment.php (100%)
rename {phpbbgallery/core => core}/composer.json (100%)
rename {phpbbgallery/core => core}/config.php (100%)
rename {phpbbgallery/core => core}/config/routing.yml (100%)
rename {phpbbgallery/core => core}/config/services.yml (100%)
rename {phpbbgallery/core => core}/config/services_controller.yml (100%)
rename {phpbbgallery/core => core}/config/services_files.yml (100%)
rename {phpbbgallery/core => core}/config/services_notification_types.yml (100%)
rename {phpbbgallery/core => core}/config/tables.yml (100%)
rename {phpbbgallery/core => core}/constants.php (100%)
rename {phpbbgallery/core => core}/contest.php (100%)
rename {phpbbgallery/core => core}/controller/album.php (100%)
rename {phpbbgallery/core => core}/controller/comment.php (100%)
rename {phpbbgallery/core => core}/controller/file.php (100%)
rename {phpbbgallery/core => core}/controller/image.php (100%)
rename {phpbbgallery/core => core}/controller/index.php (100%)
rename {phpbbgallery/core => core}/controller/moderate.php (100%)
rename {phpbbgallery/core => core}/controller/search.php (100%)
rename {phpbbgallery/core => core}/controller/upload.php (100%)
rename {phpbbgallery/core => core}/cron/cron_cleaner.php (100%)
rename {phpbbgallery/core => core}/docs/tables.md (100%)
rename {phpbbgallery/core => core}/event/main_listener.php (100%)
rename {phpbbgallery/core => core}/ext.php (100%)
rename {phpbbgallery/core => core}/file/file.php (100%)
rename {phpbbgallery/core => core}/file/types/multiform.php (100%)
rename {phpbbgallery/core => core}/image/image.php (100%)
rename {phpbbgallery/core => core}/images/icon_delete.gif (100%)
rename {phpbbgallery/core => core}/images/icon_delete_disabled.gif (100%)
rename {phpbbgallery/core => core}/images/icon_down.gif (100%)
rename {phpbbgallery/core => core}/images/icon_down_disabled.gif (100%)
rename {phpbbgallery/core => core}/images/icon_edit.gif (100%)
rename {phpbbgallery/core => core}/images/icon_edit_disabled.gif (100%)
rename {phpbbgallery/core => core}/images/icon_up.gif (100%)
rename {phpbbgallery/core => core}/images/icon_up_disabled.gif (100%)
rename {phpbbgallery/core => core}/images/legacy/watermark.png (100%)
rename {phpbbgallery/core => core}/images/upload/image_not_exist.jpg (100%)
rename {phpbbgallery/core => core}/images/upload/index.htm (100%)
rename {phpbbgallery/core => core}/images/upload/no_hotlinking.jpg (100%)
rename {phpbbgallery/core => core}/images/upload/not_authorised.jpg (100%)
rename {phpbbgallery/core => core}/images/watermark.png (100%)
rename {phpbbgallery/core => core}/language/bg/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/bg/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/bg/gallery.php (100%)
rename {phpbbgallery/core => core}/language/bg/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/bg/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/bg/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/bg/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/bg/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/bg/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/bg/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/bg/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/bg/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/de/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/de/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/de/gallery.php (100%)
rename {phpbbgallery/core => core}/language/de/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/de/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/de/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/de/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/de/index.htm (100%)
rename {phpbbgallery/core => core}/language/de/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/de/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/de/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/de/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/de/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/en/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/en/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/en/gallery.php (100%)
rename {phpbbgallery/core => core}/language/en/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/en/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/en/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/en/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/en/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/en/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/en/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/en/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/en/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/es/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/es/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/es/gallery.php (100%)
rename {phpbbgallery/core => core}/language/es/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/es/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/es/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/es/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/es/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/es/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/es/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/es/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/es/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/fr/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/fr/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/fr/gallery.php (100%)
rename {phpbbgallery/core => core}/language/fr/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/fr/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/fr/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/fr/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/fr/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/fr/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/fr/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/fr/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/fr/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/it/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/it/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/it/gallery.php (100%)
rename {phpbbgallery/core => core}/language/it/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/it/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/it/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/it/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/it/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/it/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/it/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/it/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/it/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/nl/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/nl/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/nl/gallery.php (100%)
rename {phpbbgallery/core => core}/language/nl/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/nl/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/nl/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/nl/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/nl/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/nl/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/nl/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/nl/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/nl/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/language/ru/email/newcomment_notify.txt (100%)
rename {phpbbgallery/core => core}/language/ru/email/newimage_notify.txt (100%)
rename {phpbbgallery/core => core}/language/ru/gallery.php (100%)
rename {phpbbgallery/core => core}/language/ru/gallery_acp.php (100%)
rename {phpbbgallery/core => core}/language/ru/gallery_mcp.php (100%)
rename {phpbbgallery/core => core}/language/ru/gallery_notifications.php (100%)
rename {phpbbgallery/core => core}/language/ru/gallery_ucp.php (100%)
rename {phpbbgallery/core => core}/language/ru/info_acp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/ru/info_acp_gallery_logs.php (100%)
rename {phpbbgallery/core => core}/language/ru/info_ucp_gallery.php (100%)
rename {phpbbgallery/core => core}/language/ru/install_gallery.php (100%)
rename {phpbbgallery/core => core}/language/ru/permissions_gallery.php (100%)
rename {phpbbgallery/core => core}/license.txt (100%)
rename {phpbbgallery/core => core}/log.php (100%)
rename {phpbbgallery/core => core}/migrations/release_1_2_0.php (100%)
rename {phpbbgallery/core => core}/migrations/release_1_2_0_add_bbcode.php (100%)
rename {phpbbgallery/core => core}/migrations/release_1_2_0_create_filesystem.php (100%)
rename {phpbbgallery/core => core}/migrations/release_1_2_0_db_create.php (100%)
rename {phpbbgallery/core => core}/migrations/release_3_2_1_0.php (100%)
rename {phpbbgallery/core => core}/migrations/release_3_2_1_1.php (100%)
rename {phpbbgallery/core => core}/migrations/release_3_3_0.php (100%)
rename {phpbbgallery/core => core}/migrations/split_ucp_module_settings.php (100%)
rename {phpbbgallery/core => core}/misc.php (100%)
rename {phpbbgallery/core => core}/moderate.php (100%)
rename {phpbbgallery/core => core}/notification.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_image_approved.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_image_for_approval.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_image_not_approved.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_new_comment.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_new_image.php (100%)
rename {phpbbgallery/core => core}/notification/events/phpbbgallery_new_report.php (100%)
rename {phpbbgallery/core => core}/notification/helper.php (100%)
rename {phpbbgallery/core => core}/rating.php (100%)
rename {phpbbgallery/core => core}/report.php (100%)
rename {phpbbgallery/core => core}/search.php (100%)
rename {phpbbgallery/core => core}/styles/all/template/event/overall_footer_after.html (100%)
rename {phpbbgallery/core => core}/styles/all/template/event/overall_header_head_append.html (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery-ui.min.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-angular.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-audio.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-image.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-jquery-ui.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-process.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-ui.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-validate.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload-video.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.fileupload.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.iframe-transport.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/jquery.ui.widget.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/load-image.all.min.js (100%)
rename {phpbbgallery/core => core}/styles/all/template/js/load-image.all.min.js.map (100%)
rename {phpbbgallery/core => core}/styles/all/theme/default.css (100%)
rename {phpbbgallery/core => core}/styles/all/theme/images/icon_contact_gallery.png (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/index_body_block_stats_append.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/memberlist_view_content_append.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/memberlist_view_user_statistics_after.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/navbar_header_user_profile_prepend.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/overall_header_head_append.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/event/overall_header_navigation_prepend.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/album_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/albumlist_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/albumlist_polaroid.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/comment_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery.js (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery_footer.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/gallery_header.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/image_edit_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_polaroid.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/imageblock_popup.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/index_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/mcp_approve.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/mcp_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/message.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_actions.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_actions_queue.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_album_overview.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_approve.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_approve_queue.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_image_overview.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_overview.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_report_queue.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/moderate_reports.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/plugins_header.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/posting_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/posting_javascript.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/recent_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/search_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/search_random.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/search_recent.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/search_results.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/ucp_gallery.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/gallery/viewimage_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/template/message_body.html (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/gallery-color.css (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/gallery.css (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/icon_contact_gallery.gif (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_locked.gif (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_reported.gif (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/icon_gallery_unapproved.gif (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/icon_topic_unapproved.png (100%)
rename {phpbbgallery/core => core}/styles/prosilver/theme/images/lock.png (100%)
rename {phpbbgallery/core => core}/ucp/main_info.php (100%)
rename {phpbbgallery/core => core}/ucp/main_module.php (100%)
rename {phpbbgallery/core => core}/ucp/settings_info.php (100%)
rename {phpbbgallery/core => core}/ucp/settings_module.php (100%)
rename {phpbbgallery/core => core}/upload.php (100%)
rename {phpbbgallery/core => core}/url.php (100%)
rename {phpbbgallery/core => core}/user.php (100%)
rename {phpbbgallery/exif => exif}/composer.json (100%)
rename {phpbbgallery/exif => exif}/config/services.yml (100%)
rename {phpbbgallery/exif => exif}/event/exif_listener.php (100%)
rename {phpbbgallery/exif => exif}/exif.php (100%)
rename {phpbbgallery/exif => exif}/ext.php (100%)
rename {phpbbgallery/exif => exif}/language/bg/exif.php (100%)
rename {phpbbgallery/exif => exif}/language/bg/index.htm (100%)
rename {phpbbgallery/exif => exif}/language/de/exif.php (100%)
rename {phpbbgallery/exif => exif}/language/en/exif.php (100%)
rename {phpbbgallery/exif => exif}/language/en/index.htm (100%)
rename {phpbbgallery/exif => exif}/language/fr/exif.php (100%)
rename {phpbbgallery/exif => exif}/language/it/exif.php (100%)
rename {phpbbgallery/exif => exif}/language/it/index.htm (100%)
rename {phpbbgallery/exif => exif}/language/ru/exif.php (100%)
rename {phpbbgallery/exif => exif}/license.txt (100%)
rename {phpbbgallery/exif => exif}/migrations/m1_init.php (100%)
rename {phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html (100%)
rename {phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_viewimage_details.bkp (100%)
rename {phpbbgallery/exif => exif}/styles/prosilver/template/event/gallery_viewimage_details.html (100%)
rename {phpbbgallery/tests => tests}/controller/controller_base.php (100%)
rename {phpbbgallery/tests => tests}/controller/fixtures/fixture.xml (100%)
rename {phpbbgallery/tests => tests}/controller/gallery_album_test.php (100%)
rename {phpbbgallery/tests => tests}/controller/gallery_comment_test.php (100%)
rename {phpbbgallery/tests => tests}/controller/gallery_index_test.php (100%)
rename {phpbbgallery/tests => tests}/controller/gallery_moderate_test.php (100%)
rename {phpbbgallery/tests => tests}/core/album/core_album_test.php (100%)
rename {phpbbgallery/tests => tests}/core/album/core_display_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_auth_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_base.php (100%)
rename {phpbbgallery/tests => tests}/core/core_block_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_cache_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_comment_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_config_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_contest_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_image_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_notification_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_rating_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_report_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_search_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_url_test.php (100%)
rename {phpbbgallery/tests => tests}/core/core_user_test.php (100%)
rename {phpbbgallery/tests => tests}/core/fixtures/fixture.xml (100%)
rename {phpbbgallery/tests => tests}/event/fixtures/fixture.xml (100%)
rename {phpbbgallery/tests => tests}/event/main_event_test.php (100%)
rename {phpbbgallery/tests => tests}/functional/images/valid.gif (100%)
rename {phpbbgallery/tests => tests}/functional/images/valid.jpg (100%)
rename {phpbbgallery/tests => tests}/functional/images/valid.png (100%)
rename {phpbbgallery/tests => tests}/functional/images/valid.webp (100%)
rename {phpbbgallery/tests => tests}/functional/images/valid.zip (100%)
rename {phpbbgallery/tests => tests}/functional/phpbbgallery_alpha_test.php (100%)
rename {phpbbgallery/tests => tests}/functional/phpbbgallery_base.php (100%)
rename {phpbbgallery/tests => tests}/functional/phpbbgallery_beta_test.php (100%)
rename {phpbbgallery/tests => tests}/functional/phpbbgallery_charlie_test.php (100%)
rename {phpbbgallery/tests => tests}/functional/phpbbgallery_delta_test.php (100%)
diff --git a/.travis.yml b/.travis.yml
index eb0e457b..d19082f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,9 +50,9 @@ services:
install:
- - cd phpbbgallery/core
+ - cd core
- composer install --dev --no-interaction --prefer-source
- - cd ../..
+ - cd ..
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../phpBB3
- sh -c "if [ '$COVER' != '0' ]; then sed -i '/phpenv/d' travis/setup-php-extensions.sh; fi"
diff --git a/phpbbgallery/acpcleanup/acp/main_info.php b/acpcleanup/acp/main_info.php
similarity index 100%
rename from phpbbgallery/acpcleanup/acp/main_info.php
rename to acpcleanup/acp/main_info.php
diff --git a/phpbbgallery/acpcleanup/acp/main_module.php b/acpcleanup/acp/main_module.php
similarity index 100%
rename from phpbbgallery/acpcleanup/acp/main_module.php
rename to acpcleanup/acp/main_module.php
diff --git a/phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html b/acpcleanup/adm/style/gallery_cleanup.html
similarity index 100%
rename from phpbbgallery/acpcleanup/adm/style/gallery_cleanup.html
rename to acpcleanup/adm/style/gallery_cleanup.html
diff --git a/phpbbgallery/acpcleanup/adm/style/index.htm b/acpcleanup/adm/style/index.htm
similarity index 100%
rename from phpbbgallery/acpcleanup/adm/style/index.htm
rename to acpcleanup/adm/style/index.htm
diff --git a/phpbbgallery/acpcleanup/cleanup.php b/acpcleanup/cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/cleanup.php
rename to acpcleanup/cleanup.php
diff --git a/phpbbgallery/acpcleanup/composer.json b/acpcleanup/composer.json
similarity index 100%
rename from phpbbgallery/acpcleanup/composer.json
rename to acpcleanup/composer.json
diff --git a/phpbbgallery/acpcleanup/config/services.yml b/acpcleanup/config/services.yml
similarity index 100%
rename from phpbbgallery/acpcleanup/config/services.yml
rename to acpcleanup/config/services.yml
diff --git a/phpbbgallery/acpcleanup/ext.php b/acpcleanup/ext.php
similarity index 100%
rename from phpbbgallery/acpcleanup/ext.php
rename to acpcleanup/ext.php
diff --git a/phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/bg/info_acp_gallery_cleanup.php
rename to acpcleanup/language/bg/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/de/info_acp_gallery_cleanup.php
rename to acpcleanup/language/de/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php b/acpcleanup/language/en/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/en/info_acp_gallery_cleanup.php
rename to acpcleanup/language/en/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/fr/info_acp_gallery_cleanup.php
rename to acpcleanup/language/fr/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/it/info_acp_gallery_cleanup.php
rename to acpcleanup/language/it/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
similarity index 100%
rename from phpbbgallery/acpcleanup/language/ru/info_acp_gallery_cleanup.php
rename to acpcleanup/language/ru/info_acp_gallery_cleanup.php
diff --git a/phpbbgallery/acpcleanup/license.txt b/acpcleanup/license.txt
similarity index 100%
rename from phpbbgallery/acpcleanup/license.txt
rename to acpcleanup/license.txt
diff --git a/phpbbgallery/acpcleanup/migrations/m1_init.php b/acpcleanup/migrations/m1_init.php
similarity index 100%
rename from phpbbgallery/acpcleanup/migrations/m1_init.php
rename to acpcleanup/migrations/m1_init.php
diff --git a/phpbbgallery/acpimport/acp/main_info.php b/acpimport/acp/main_info.php
similarity index 100%
rename from phpbbgallery/acpimport/acp/main_info.php
rename to acpimport/acp/main_info.php
diff --git a/phpbbgallery/acpimport/acp/main_module.php b/acpimport/acp/main_module.php
similarity index 100%
rename from phpbbgallery/acpimport/acp/main_module.php
rename to acpimport/acp/main_module.php
diff --git a/phpbbgallery/acpimport/adm/style/gallery_acpimport.html b/acpimport/adm/style/gallery_acpimport.html
similarity index 100%
rename from phpbbgallery/acpimport/adm/style/gallery_acpimport.html
rename to acpimport/adm/style/gallery_acpimport.html
diff --git a/phpbbgallery/acpimport/composer.json b/acpimport/composer.json
similarity index 100%
rename from phpbbgallery/acpimport/composer.json
rename to acpimport/composer.json
diff --git a/phpbbgallery/acpimport/ext.php b/acpimport/ext.php
similarity index 100%
rename from phpbbgallery/acpimport/ext.php
rename to acpimport/ext.php
diff --git a/phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php b/acpimport/language/bg/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/bg/info_acp_gallery_acpimport.php
rename to acpimport/language/bg/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php b/acpimport/language/de/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/de/info_acp_gallery_acpimport.php
rename to acpimport/language/de/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php b/acpimport/language/en/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/en/info_acp_gallery_acpimport.php
rename to acpimport/language/en/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php b/acpimport/language/fr/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/fr/info_acp_gallery_acpimport.php
rename to acpimport/language/fr/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php b/acpimport/language/it/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/it/info_acp_gallery_acpimport.php
rename to acpimport/language/it/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php b/acpimport/language/ru/info_acp_gallery_acpimport.php
similarity index 100%
rename from phpbbgallery/acpimport/language/ru/info_acp_gallery_acpimport.php
rename to acpimport/language/ru/info_acp_gallery_acpimport.php
diff --git a/phpbbgallery/acpimport/license.txt b/acpimport/license.txt
similarity index 100%
rename from phpbbgallery/acpimport/license.txt
rename to acpimport/license.txt
diff --git a/phpbbgallery/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
similarity index 100%
rename from phpbbgallery/acpimport/migrations/m1_init.php
rename to acpimport/migrations/m1_init.php
diff --git a/phpbbgallery/core/acp/albums_info.php b/core/acp/albums_info.php
similarity index 100%
rename from phpbbgallery/core/acp/albums_info.php
rename to core/acp/albums_info.php
diff --git a/phpbbgallery/core/acp/albums_module.php b/core/acp/albums_module.php
similarity index 100%
rename from phpbbgallery/core/acp/albums_module.php
rename to core/acp/albums_module.php
diff --git a/phpbbgallery/core/acp/config_info.php b/core/acp/config_info.php
similarity index 100%
rename from phpbbgallery/core/acp/config_info.php
rename to core/acp/config_info.php
diff --git a/phpbbgallery/core/acp/config_module.php b/core/acp/config_module.php
similarity index 100%
rename from phpbbgallery/core/acp/config_module.php
rename to core/acp/config_module.php
diff --git a/phpbbgallery/core/acp/gallery_logs_info.php b/core/acp/gallery_logs_info.php
similarity index 100%
rename from phpbbgallery/core/acp/gallery_logs_info.php
rename to core/acp/gallery_logs_info.php
diff --git a/phpbbgallery/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
similarity index 100%
rename from phpbbgallery/core/acp/gallery_logs_module.php
rename to core/acp/gallery_logs_module.php
diff --git a/phpbbgallery/core/acp/main_info.php b/core/acp/main_info.php
similarity index 100%
rename from phpbbgallery/core/acp/main_info.php
rename to core/acp/main_info.php
diff --git a/phpbbgallery/core/acp/main_module.php b/core/acp/main_module.php
similarity index 100%
rename from phpbbgallery/core/acp/main_module.php
rename to core/acp/main_module.php
diff --git a/phpbbgallery/core/acp/permissions_info.php b/core/acp/permissions_info.php
similarity index 100%
rename from phpbbgallery/core/acp/permissions_info.php
rename to core/acp/permissions_info.php
diff --git a/phpbbgallery/core/acp/permissions_module.php b/core/acp/permissions_module.php
similarity index 100%
rename from phpbbgallery/core/acp/permissions_module.php
rename to core/acp/permissions_module.php
diff --git a/phpbbgallery/core/adm/index.htm b/core/adm/index.htm
similarity index 100%
rename from phpbbgallery/core/adm/index.htm
rename to core/adm/index.htm
diff --git a/phpbbgallery/core/adm/style/gallery_albums.html b/core/adm/style/gallery_albums.html
similarity index 100%
rename from phpbbgallery/core/adm/style/gallery_albums.html
rename to core/adm/style/gallery_albums.html
diff --git a/phpbbgallery/core/adm/style/gallery_logs.html b/core/adm/style/gallery_logs.html
similarity index 100%
rename from phpbbgallery/core/adm/style/gallery_logs.html
rename to core/adm/style/gallery_logs.html
diff --git a/phpbbgallery/core/adm/style/gallery_main.html b/core/adm/style/gallery_main.html
similarity index 100%
rename from phpbbgallery/core/adm/style/gallery_main.html
rename to core/adm/style/gallery_main.html
diff --git a/phpbbgallery/core/adm/style/gallery_permissions.html b/core/adm/style/gallery_permissions.html
similarity index 100%
rename from phpbbgallery/core/adm/style/gallery_permissions.html
rename to core/adm/style/gallery_permissions.html
diff --git a/phpbbgallery/core/adm/style/index.htm b/core/adm/style/index.htm
similarity index 100%
rename from phpbbgallery/core/adm/style/index.htm
rename to core/adm/style/index.htm
diff --git a/phpbbgallery/core/album/album.php b/core/album/album.php
similarity index 100%
rename from phpbbgallery/core/album/album.php
rename to core/album/album.php
diff --git a/phpbbgallery/core/album/display.php b/core/album/display.php
similarity index 100%
rename from phpbbgallery/core/album/display.php
rename to core/album/display.php
diff --git a/phpbbgallery/core/album/loader.php b/core/album/loader.php
similarity index 100%
rename from phpbbgallery/core/album/loader.php
rename to core/album/loader.php
diff --git a/phpbbgallery/core/album/manage.php b/core/album/manage.php
similarity index 100%
rename from phpbbgallery/core/album/manage.php
rename to core/album/manage.php
diff --git a/phpbbgallery/core/auth/auth.php b/core/auth/auth.php
similarity index 100%
rename from phpbbgallery/core/auth/auth.php
rename to core/auth/auth.php
diff --git a/phpbbgallery/core/auth/level.php b/core/auth/level.php
similarity index 100%
rename from phpbbgallery/core/auth/level.php
rename to core/auth/level.php
diff --git a/phpbbgallery/core/auth/set.php b/core/auth/set.php
similarity index 100%
rename from phpbbgallery/core/auth/set.php
rename to core/auth/set.php
diff --git a/phpbbgallery/core/block.bkp b/core/block.bkp
similarity index 100%
rename from phpbbgallery/core/block.bkp
rename to core/block.bkp
diff --git a/phpbbgallery/core/block.php b/core/block.php
similarity index 100%
rename from phpbbgallery/core/block.php
rename to core/block.php
diff --git a/phpbbgallery/core/cache.php b/core/cache.php
similarity index 100%
rename from phpbbgallery/core/cache.php
rename to core/cache.php
diff --git a/phpbbgallery/core/comment.php b/core/comment.php
similarity index 100%
rename from phpbbgallery/core/comment.php
rename to core/comment.php
diff --git a/phpbbgallery/core/composer.json b/core/composer.json
similarity index 100%
rename from phpbbgallery/core/composer.json
rename to core/composer.json
diff --git a/phpbbgallery/core/config.php b/core/config.php
similarity index 100%
rename from phpbbgallery/core/config.php
rename to core/config.php
diff --git a/phpbbgallery/core/config/routing.yml b/core/config/routing.yml
similarity index 100%
rename from phpbbgallery/core/config/routing.yml
rename to core/config/routing.yml
diff --git a/phpbbgallery/core/config/services.yml b/core/config/services.yml
similarity index 100%
rename from phpbbgallery/core/config/services.yml
rename to core/config/services.yml
diff --git a/phpbbgallery/core/config/services_controller.yml b/core/config/services_controller.yml
similarity index 100%
rename from phpbbgallery/core/config/services_controller.yml
rename to core/config/services_controller.yml
diff --git a/phpbbgallery/core/config/services_files.yml b/core/config/services_files.yml
similarity index 100%
rename from phpbbgallery/core/config/services_files.yml
rename to core/config/services_files.yml
diff --git a/phpbbgallery/core/config/services_notification_types.yml b/core/config/services_notification_types.yml
similarity index 100%
rename from phpbbgallery/core/config/services_notification_types.yml
rename to core/config/services_notification_types.yml
diff --git a/phpbbgallery/core/config/tables.yml b/core/config/tables.yml
similarity index 100%
rename from phpbbgallery/core/config/tables.yml
rename to core/config/tables.yml
diff --git a/phpbbgallery/core/constants.php b/core/constants.php
similarity index 100%
rename from phpbbgallery/core/constants.php
rename to core/constants.php
diff --git a/phpbbgallery/core/contest.php b/core/contest.php
similarity index 100%
rename from phpbbgallery/core/contest.php
rename to core/contest.php
diff --git a/phpbbgallery/core/controller/album.php b/core/controller/album.php
similarity index 100%
rename from phpbbgallery/core/controller/album.php
rename to core/controller/album.php
diff --git a/phpbbgallery/core/controller/comment.php b/core/controller/comment.php
similarity index 100%
rename from phpbbgallery/core/controller/comment.php
rename to core/controller/comment.php
diff --git a/phpbbgallery/core/controller/file.php b/core/controller/file.php
similarity index 100%
rename from phpbbgallery/core/controller/file.php
rename to core/controller/file.php
diff --git a/phpbbgallery/core/controller/image.php b/core/controller/image.php
similarity index 100%
rename from phpbbgallery/core/controller/image.php
rename to core/controller/image.php
diff --git a/phpbbgallery/core/controller/index.php b/core/controller/index.php
similarity index 100%
rename from phpbbgallery/core/controller/index.php
rename to core/controller/index.php
diff --git a/phpbbgallery/core/controller/moderate.php b/core/controller/moderate.php
similarity index 100%
rename from phpbbgallery/core/controller/moderate.php
rename to core/controller/moderate.php
diff --git a/phpbbgallery/core/controller/search.php b/core/controller/search.php
similarity index 100%
rename from phpbbgallery/core/controller/search.php
rename to core/controller/search.php
diff --git a/phpbbgallery/core/controller/upload.php b/core/controller/upload.php
similarity index 100%
rename from phpbbgallery/core/controller/upload.php
rename to core/controller/upload.php
diff --git a/phpbbgallery/core/cron/cron_cleaner.php b/core/cron/cron_cleaner.php
similarity index 100%
rename from phpbbgallery/core/cron/cron_cleaner.php
rename to core/cron/cron_cleaner.php
diff --git a/phpbbgallery/core/docs/tables.md b/core/docs/tables.md
similarity index 100%
rename from phpbbgallery/core/docs/tables.md
rename to core/docs/tables.md
diff --git a/phpbbgallery/core/event/main_listener.php b/core/event/main_listener.php
similarity index 100%
rename from phpbbgallery/core/event/main_listener.php
rename to core/event/main_listener.php
diff --git a/phpbbgallery/core/ext.php b/core/ext.php
similarity index 100%
rename from phpbbgallery/core/ext.php
rename to core/ext.php
diff --git a/phpbbgallery/core/file/file.php b/core/file/file.php
similarity index 100%
rename from phpbbgallery/core/file/file.php
rename to core/file/file.php
diff --git a/phpbbgallery/core/file/types/multiform.php b/core/file/types/multiform.php
similarity index 100%
rename from phpbbgallery/core/file/types/multiform.php
rename to core/file/types/multiform.php
diff --git a/phpbbgallery/core/image/image.php b/core/image/image.php
similarity index 100%
rename from phpbbgallery/core/image/image.php
rename to core/image/image.php
diff --git a/phpbbgallery/core/images/icon_delete.gif b/core/images/icon_delete.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_delete.gif
rename to core/images/icon_delete.gif
diff --git a/phpbbgallery/core/images/icon_delete_disabled.gif b/core/images/icon_delete_disabled.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_delete_disabled.gif
rename to core/images/icon_delete_disabled.gif
diff --git a/phpbbgallery/core/images/icon_down.gif b/core/images/icon_down.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_down.gif
rename to core/images/icon_down.gif
diff --git a/phpbbgallery/core/images/icon_down_disabled.gif b/core/images/icon_down_disabled.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_down_disabled.gif
rename to core/images/icon_down_disabled.gif
diff --git a/phpbbgallery/core/images/icon_edit.gif b/core/images/icon_edit.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_edit.gif
rename to core/images/icon_edit.gif
diff --git a/phpbbgallery/core/images/icon_edit_disabled.gif b/core/images/icon_edit_disabled.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_edit_disabled.gif
rename to core/images/icon_edit_disabled.gif
diff --git a/phpbbgallery/core/images/icon_up.gif b/core/images/icon_up.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_up.gif
rename to core/images/icon_up.gif
diff --git a/phpbbgallery/core/images/icon_up_disabled.gif b/core/images/icon_up_disabled.gif
similarity index 100%
rename from phpbbgallery/core/images/icon_up_disabled.gif
rename to core/images/icon_up_disabled.gif
diff --git a/phpbbgallery/core/images/legacy/watermark.png b/core/images/legacy/watermark.png
similarity index 100%
rename from phpbbgallery/core/images/legacy/watermark.png
rename to core/images/legacy/watermark.png
diff --git a/phpbbgallery/core/images/upload/image_not_exist.jpg b/core/images/upload/image_not_exist.jpg
similarity index 100%
rename from phpbbgallery/core/images/upload/image_not_exist.jpg
rename to core/images/upload/image_not_exist.jpg
diff --git a/phpbbgallery/core/images/upload/index.htm b/core/images/upload/index.htm
similarity index 100%
rename from phpbbgallery/core/images/upload/index.htm
rename to core/images/upload/index.htm
diff --git a/phpbbgallery/core/images/upload/no_hotlinking.jpg b/core/images/upload/no_hotlinking.jpg
similarity index 100%
rename from phpbbgallery/core/images/upload/no_hotlinking.jpg
rename to core/images/upload/no_hotlinking.jpg
diff --git a/phpbbgallery/core/images/upload/not_authorised.jpg b/core/images/upload/not_authorised.jpg
similarity index 100%
rename from phpbbgallery/core/images/upload/not_authorised.jpg
rename to core/images/upload/not_authorised.jpg
diff --git a/phpbbgallery/core/images/watermark.png b/core/images/watermark.png
similarity index 100%
rename from phpbbgallery/core/images/watermark.png
rename to core/images/watermark.png
diff --git a/phpbbgallery/core/language/bg/email/newcomment_notify.txt b/core/language/bg/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/bg/email/newcomment_notify.txt
rename to core/language/bg/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/bg/email/newimage_notify.txt b/core/language/bg/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/bg/email/newimage_notify.txt
rename to core/language/bg/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/bg/gallery.php b/core/language/bg/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/bg/gallery.php
rename to core/language/bg/gallery.php
diff --git a/phpbbgallery/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/bg/gallery_acp.php
rename to core/language/bg/gallery_acp.php
diff --git a/phpbbgallery/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/bg/gallery_mcp.php
rename to core/language/bg/gallery_mcp.php
diff --git a/phpbbgallery/core/language/bg/gallery_notifications.php b/core/language/bg/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/bg/gallery_notifications.php
rename to core/language/bg/gallery_notifications.php
diff --git a/phpbbgallery/core/language/bg/gallery_ucp.php b/core/language/bg/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/bg/gallery_ucp.php
rename to core/language/bg/gallery_ucp.php
diff --git a/phpbbgallery/core/language/bg/info_acp_gallery.php b/core/language/bg/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/bg/info_acp_gallery.php
rename to core/language/bg/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/bg/info_acp_gallery_logs.php b/core/language/bg/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/bg/info_acp_gallery_logs.php
rename to core/language/bg/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/bg/info_ucp_gallery.php b/core/language/bg/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/bg/info_ucp_gallery.php
rename to core/language/bg/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/bg/install_gallery.php
rename to core/language/bg/install_gallery.php
diff --git a/phpbbgallery/core/language/bg/permissions_gallery.php b/core/language/bg/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/bg/permissions_gallery.php
rename to core/language/bg/permissions_gallery.php
diff --git a/phpbbgallery/core/language/de/email/newcomment_notify.txt b/core/language/de/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/de/email/newcomment_notify.txt
rename to core/language/de/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/de/email/newimage_notify.txt b/core/language/de/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/de/email/newimage_notify.txt
rename to core/language/de/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/de/gallery.php b/core/language/de/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/de/gallery.php
rename to core/language/de/gallery.php
diff --git a/phpbbgallery/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/de/gallery_acp.php
rename to core/language/de/gallery_acp.php
diff --git a/phpbbgallery/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/de/gallery_mcp.php
rename to core/language/de/gallery_mcp.php
diff --git a/phpbbgallery/core/language/de/gallery_notifications.php b/core/language/de/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/de/gallery_notifications.php
rename to core/language/de/gallery_notifications.php
diff --git a/phpbbgallery/core/language/de/gallery_ucp.php b/core/language/de/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/de/gallery_ucp.php
rename to core/language/de/gallery_ucp.php
diff --git a/phpbbgallery/core/language/de/index.htm b/core/language/de/index.htm
similarity index 100%
rename from phpbbgallery/core/language/de/index.htm
rename to core/language/de/index.htm
diff --git a/phpbbgallery/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/de/info_acp_gallery.php
rename to core/language/de/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/de/info_acp_gallery_logs.php b/core/language/de/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/de/info_acp_gallery_logs.php
rename to core/language/de/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/de/info_ucp_gallery.php b/core/language/de/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/de/info_ucp_gallery.php
rename to core/language/de/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/de/install_gallery.php
rename to core/language/de/install_gallery.php
diff --git a/phpbbgallery/core/language/de/permissions_gallery.php b/core/language/de/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/de/permissions_gallery.php
rename to core/language/de/permissions_gallery.php
diff --git a/phpbbgallery/core/language/en/email/newcomment_notify.txt b/core/language/en/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/en/email/newcomment_notify.txt
rename to core/language/en/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/en/email/newimage_notify.txt b/core/language/en/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/en/email/newimage_notify.txt
rename to core/language/en/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/en/gallery.php b/core/language/en/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/en/gallery.php
rename to core/language/en/gallery.php
diff --git a/phpbbgallery/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/en/gallery_acp.php
rename to core/language/en/gallery_acp.php
diff --git a/phpbbgallery/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/en/gallery_mcp.php
rename to core/language/en/gallery_mcp.php
diff --git a/phpbbgallery/core/language/en/gallery_notifications.php b/core/language/en/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/en/gallery_notifications.php
rename to core/language/en/gallery_notifications.php
diff --git a/phpbbgallery/core/language/en/gallery_ucp.php b/core/language/en/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/en/gallery_ucp.php
rename to core/language/en/gallery_ucp.php
diff --git a/phpbbgallery/core/language/en/info_acp_gallery.php b/core/language/en/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/en/info_acp_gallery.php
rename to core/language/en/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/en/info_acp_gallery_logs.php b/core/language/en/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/en/info_acp_gallery_logs.php
rename to core/language/en/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/en/info_ucp_gallery.php b/core/language/en/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/en/info_ucp_gallery.php
rename to core/language/en/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/en/install_gallery.php
rename to core/language/en/install_gallery.php
diff --git a/phpbbgallery/core/language/en/permissions_gallery.php b/core/language/en/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/en/permissions_gallery.php
rename to core/language/en/permissions_gallery.php
diff --git a/phpbbgallery/core/language/es/email/newcomment_notify.txt b/core/language/es/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/es/email/newcomment_notify.txt
rename to core/language/es/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/es/email/newimage_notify.txt b/core/language/es/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/es/email/newimage_notify.txt
rename to core/language/es/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/es/gallery.php b/core/language/es/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/es/gallery.php
rename to core/language/es/gallery.php
diff --git a/phpbbgallery/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/es/gallery_acp.php
rename to core/language/es/gallery_acp.php
diff --git a/phpbbgallery/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/es/gallery_mcp.php
rename to core/language/es/gallery_mcp.php
diff --git a/phpbbgallery/core/language/es/gallery_notifications.php b/core/language/es/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/es/gallery_notifications.php
rename to core/language/es/gallery_notifications.php
diff --git a/phpbbgallery/core/language/es/gallery_ucp.php b/core/language/es/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/es/gallery_ucp.php
rename to core/language/es/gallery_ucp.php
diff --git a/phpbbgallery/core/language/es/info_acp_gallery.php b/core/language/es/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/es/info_acp_gallery.php
rename to core/language/es/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/es/info_acp_gallery_logs.php b/core/language/es/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/es/info_acp_gallery_logs.php
rename to core/language/es/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/es/info_ucp_gallery.php b/core/language/es/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/es/info_ucp_gallery.php
rename to core/language/es/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/es/install_gallery.php
rename to core/language/es/install_gallery.php
diff --git a/phpbbgallery/core/language/es/permissions_gallery.php b/core/language/es/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/es/permissions_gallery.php
rename to core/language/es/permissions_gallery.php
diff --git a/phpbbgallery/core/language/fr/email/newcomment_notify.txt b/core/language/fr/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/fr/email/newcomment_notify.txt
rename to core/language/fr/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/fr/email/newimage_notify.txt b/core/language/fr/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/fr/email/newimage_notify.txt
rename to core/language/fr/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/fr/gallery.php b/core/language/fr/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/fr/gallery.php
rename to core/language/fr/gallery.php
diff --git a/phpbbgallery/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/fr/gallery_acp.php
rename to core/language/fr/gallery_acp.php
diff --git a/phpbbgallery/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/fr/gallery_mcp.php
rename to core/language/fr/gallery_mcp.php
diff --git a/phpbbgallery/core/language/fr/gallery_notifications.php b/core/language/fr/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/fr/gallery_notifications.php
rename to core/language/fr/gallery_notifications.php
diff --git a/phpbbgallery/core/language/fr/gallery_ucp.php b/core/language/fr/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/fr/gallery_ucp.php
rename to core/language/fr/gallery_ucp.php
diff --git a/phpbbgallery/core/language/fr/info_acp_gallery.php b/core/language/fr/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/fr/info_acp_gallery.php
rename to core/language/fr/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/fr/info_acp_gallery_logs.php b/core/language/fr/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/fr/info_acp_gallery_logs.php
rename to core/language/fr/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/fr/info_ucp_gallery.php b/core/language/fr/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/fr/info_ucp_gallery.php
rename to core/language/fr/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/fr/install_gallery.php
rename to core/language/fr/install_gallery.php
diff --git a/phpbbgallery/core/language/fr/permissions_gallery.php b/core/language/fr/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/fr/permissions_gallery.php
rename to core/language/fr/permissions_gallery.php
diff --git a/phpbbgallery/core/language/it/email/newcomment_notify.txt b/core/language/it/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/it/email/newcomment_notify.txt
rename to core/language/it/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/it/email/newimage_notify.txt b/core/language/it/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/it/email/newimage_notify.txt
rename to core/language/it/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/it/gallery.php b/core/language/it/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/it/gallery.php
rename to core/language/it/gallery.php
diff --git a/phpbbgallery/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/it/gallery_acp.php
rename to core/language/it/gallery_acp.php
diff --git a/phpbbgallery/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/it/gallery_mcp.php
rename to core/language/it/gallery_mcp.php
diff --git a/phpbbgallery/core/language/it/gallery_notifications.php b/core/language/it/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/it/gallery_notifications.php
rename to core/language/it/gallery_notifications.php
diff --git a/phpbbgallery/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/it/gallery_ucp.php
rename to core/language/it/gallery_ucp.php
diff --git a/phpbbgallery/core/language/it/info_acp_gallery.php b/core/language/it/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/it/info_acp_gallery.php
rename to core/language/it/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/it/info_acp_gallery_logs.php b/core/language/it/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/it/info_acp_gallery_logs.php
rename to core/language/it/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/it/info_ucp_gallery.php b/core/language/it/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/it/info_ucp_gallery.php
rename to core/language/it/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/it/install_gallery.php
rename to core/language/it/install_gallery.php
diff --git a/phpbbgallery/core/language/it/permissions_gallery.php b/core/language/it/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/it/permissions_gallery.php
rename to core/language/it/permissions_gallery.php
diff --git a/phpbbgallery/core/language/nl/email/newcomment_notify.txt b/core/language/nl/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/nl/email/newcomment_notify.txt
rename to core/language/nl/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/nl/email/newimage_notify.txt b/core/language/nl/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/nl/email/newimage_notify.txt
rename to core/language/nl/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/nl/gallery.php b/core/language/nl/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/nl/gallery.php
rename to core/language/nl/gallery.php
diff --git a/phpbbgallery/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/nl/gallery_acp.php
rename to core/language/nl/gallery_acp.php
diff --git a/phpbbgallery/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/nl/gallery_mcp.php
rename to core/language/nl/gallery_mcp.php
diff --git a/phpbbgallery/core/language/nl/gallery_notifications.php b/core/language/nl/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/nl/gallery_notifications.php
rename to core/language/nl/gallery_notifications.php
diff --git a/phpbbgallery/core/language/nl/gallery_ucp.php b/core/language/nl/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/nl/gallery_ucp.php
rename to core/language/nl/gallery_ucp.php
diff --git a/phpbbgallery/core/language/nl/info_acp_gallery.php b/core/language/nl/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/nl/info_acp_gallery.php
rename to core/language/nl/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/nl/info_acp_gallery_logs.php b/core/language/nl/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/nl/info_acp_gallery_logs.php
rename to core/language/nl/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/nl/info_ucp_gallery.php b/core/language/nl/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/nl/info_ucp_gallery.php
rename to core/language/nl/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/nl/install_gallery.php
rename to core/language/nl/install_gallery.php
diff --git a/phpbbgallery/core/language/nl/permissions_gallery.php b/core/language/nl/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/nl/permissions_gallery.php
rename to core/language/nl/permissions_gallery.php
diff --git a/phpbbgallery/core/language/ru/email/newcomment_notify.txt b/core/language/ru/email/newcomment_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/ru/email/newcomment_notify.txt
rename to core/language/ru/email/newcomment_notify.txt
diff --git a/phpbbgallery/core/language/ru/email/newimage_notify.txt b/core/language/ru/email/newimage_notify.txt
similarity index 100%
rename from phpbbgallery/core/language/ru/email/newimage_notify.txt
rename to core/language/ru/email/newimage_notify.txt
diff --git a/phpbbgallery/core/language/ru/gallery.php b/core/language/ru/gallery.php
similarity index 100%
rename from phpbbgallery/core/language/ru/gallery.php
rename to core/language/ru/gallery.php
diff --git a/phpbbgallery/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
similarity index 100%
rename from phpbbgallery/core/language/ru/gallery_acp.php
rename to core/language/ru/gallery_acp.php
diff --git a/phpbbgallery/core/language/ru/gallery_mcp.php b/core/language/ru/gallery_mcp.php
similarity index 100%
rename from phpbbgallery/core/language/ru/gallery_mcp.php
rename to core/language/ru/gallery_mcp.php
diff --git a/phpbbgallery/core/language/ru/gallery_notifications.php b/core/language/ru/gallery_notifications.php
similarity index 100%
rename from phpbbgallery/core/language/ru/gallery_notifications.php
rename to core/language/ru/gallery_notifications.php
diff --git a/phpbbgallery/core/language/ru/gallery_ucp.php b/core/language/ru/gallery_ucp.php
similarity index 100%
rename from phpbbgallery/core/language/ru/gallery_ucp.php
rename to core/language/ru/gallery_ucp.php
diff --git a/phpbbgallery/core/language/ru/info_acp_gallery.php b/core/language/ru/info_acp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/ru/info_acp_gallery.php
rename to core/language/ru/info_acp_gallery.php
diff --git a/phpbbgallery/core/language/ru/info_acp_gallery_logs.php b/core/language/ru/info_acp_gallery_logs.php
similarity index 100%
rename from phpbbgallery/core/language/ru/info_acp_gallery_logs.php
rename to core/language/ru/info_acp_gallery_logs.php
diff --git a/phpbbgallery/core/language/ru/info_ucp_gallery.php b/core/language/ru/info_ucp_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/ru/info_ucp_gallery.php
rename to core/language/ru/info_ucp_gallery.php
diff --git a/phpbbgallery/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/ru/install_gallery.php
rename to core/language/ru/install_gallery.php
diff --git a/phpbbgallery/core/language/ru/permissions_gallery.php b/core/language/ru/permissions_gallery.php
similarity index 100%
rename from phpbbgallery/core/language/ru/permissions_gallery.php
rename to core/language/ru/permissions_gallery.php
diff --git a/phpbbgallery/core/license.txt b/core/license.txt
similarity index 100%
rename from phpbbgallery/core/license.txt
rename to core/license.txt
diff --git a/phpbbgallery/core/log.php b/core/log.php
similarity index 100%
rename from phpbbgallery/core/log.php
rename to core/log.php
diff --git a/phpbbgallery/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_1_2_0.php
rename to core/migrations/release_1_2_0.php
diff --git a/phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php b/core/migrations/release_1_2_0_add_bbcode.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_1_2_0_add_bbcode.php
rename to core/migrations/release_1_2_0_add_bbcode.php
diff --git a/phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php b/core/migrations/release_1_2_0_create_filesystem.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_1_2_0_create_filesystem.php
rename to core/migrations/release_1_2_0_create_filesystem.php
diff --git a/phpbbgallery/core/migrations/release_1_2_0_db_create.php b/core/migrations/release_1_2_0_db_create.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_1_2_0_db_create.php
rename to core/migrations/release_1_2_0_db_create.php
diff --git a/phpbbgallery/core/migrations/release_3_2_1_0.php b/core/migrations/release_3_2_1_0.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_3_2_1_0.php
rename to core/migrations/release_3_2_1_0.php
diff --git a/phpbbgallery/core/migrations/release_3_2_1_1.php b/core/migrations/release_3_2_1_1.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_3_2_1_1.php
rename to core/migrations/release_3_2_1_1.php
diff --git a/phpbbgallery/core/migrations/release_3_3_0.php b/core/migrations/release_3_3_0.php
similarity index 100%
rename from phpbbgallery/core/migrations/release_3_3_0.php
rename to core/migrations/release_3_3_0.php
diff --git a/phpbbgallery/core/migrations/split_ucp_module_settings.php b/core/migrations/split_ucp_module_settings.php
similarity index 100%
rename from phpbbgallery/core/migrations/split_ucp_module_settings.php
rename to core/migrations/split_ucp_module_settings.php
diff --git a/phpbbgallery/core/misc.php b/core/misc.php
similarity index 100%
rename from phpbbgallery/core/misc.php
rename to core/misc.php
diff --git a/phpbbgallery/core/moderate.php b/core/moderate.php
similarity index 100%
rename from phpbbgallery/core/moderate.php
rename to core/moderate.php
diff --git a/phpbbgallery/core/notification.php b/core/notification.php
similarity index 100%
rename from phpbbgallery/core/notification.php
rename to core/notification.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_image_approved.php b/core/notification/events/phpbbgallery_image_approved.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_image_approved.php
rename to core/notification/events/phpbbgallery_image_approved.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php b/core/notification/events/phpbbgallery_image_for_approval.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_image_for_approval.php
rename to core/notification/events/phpbbgallery_image_for_approval.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php b/core/notification/events/phpbbgallery_image_not_approved.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_image_not_approved.php
rename to core/notification/events/phpbbgallery_image_not_approved.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_new_comment.php b/core/notification/events/phpbbgallery_new_comment.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_new_comment.php
rename to core/notification/events/phpbbgallery_new_comment.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_new_image.php b/core/notification/events/phpbbgallery_new_image.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_new_image.php
rename to core/notification/events/phpbbgallery_new_image.php
diff --git a/phpbbgallery/core/notification/events/phpbbgallery_new_report.php b/core/notification/events/phpbbgallery_new_report.php
similarity index 100%
rename from phpbbgallery/core/notification/events/phpbbgallery_new_report.php
rename to core/notification/events/phpbbgallery_new_report.php
diff --git a/phpbbgallery/core/notification/helper.php b/core/notification/helper.php
similarity index 100%
rename from phpbbgallery/core/notification/helper.php
rename to core/notification/helper.php
diff --git a/phpbbgallery/core/rating.php b/core/rating.php
similarity index 100%
rename from phpbbgallery/core/rating.php
rename to core/rating.php
diff --git a/phpbbgallery/core/report.php b/core/report.php
similarity index 100%
rename from phpbbgallery/core/report.php
rename to core/report.php
diff --git a/phpbbgallery/core/search.php b/core/search.php
similarity index 100%
rename from phpbbgallery/core/search.php
rename to core/search.php
diff --git a/phpbbgallery/core/styles/all/template/event/overall_footer_after.html b/core/styles/all/template/event/overall_footer_after.html
similarity index 100%
rename from phpbbgallery/core/styles/all/template/event/overall_footer_after.html
rename to core/styles/all/template/event/overall_footer_after.html
diff --git a/phpbbgallery/core/styles/all/template/event/overall_header_head_append.html b/core/styles/all/template/event/overall_header_head_append.html
similarity index 100%
rename from phpbbgallery/core/styles/all/template/event/overall_header_head_append.html
rename to core/styles/all/template/event/overall_header_head_append.html
diff --git a/phpbbgallery/core/styles/all/template/js/jquery-ui.min.js b/core/styles/all/template/js/jquery-ui.min.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery-ui.min.js
rename to core/styles/all/template/js/jquery-ui.min.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js b/core/styles/all/template/js/jquery.fileupload-angular.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-angular.js
rename to core/styles/all/template/js/jquery.fileupload-angular.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js b/core/styles/all/template/js/jquery.fileupload-audio.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-audio.js
rename to core/styles/all/template/js/jquery.fileupload-audio.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js b/core/styles/all/template/js/jquery.fileupload-image.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-image.js
rename to core/styles/all/template/js/jquery.fileupload-image.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js b/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-jquery-ui.js
rename to core/styles/all/template/js/jquery.fileupload-jquery-ui.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js b/core/styles/all/template/js/jquery.fileupload-process.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-process.js
rename to core/styles/all/template/js/jquery.fileupload-process.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js b/core/styles/all/template/js/jquery.fileupload-ui.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-ui.js
rename to core/styles/all/template/js/jquery.fileupload-ui.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js b/core/styles/all/template/js/jquery.fileupload-validate.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-validate.js
rename to core/styles/all/template/js/jquery.fileupload-validate.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js b/core/styles/all/template/js/jquery.fileupload-video.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload-video.js
rename to core/styles/all/template/js/jquery.fileupload-video.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.fileupload.js b/core/styles/all/template/js/jquery.fileupload.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.fileupload.js
rename to core/styles/all/template/js/jquery.fileupload.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js b/core/styles/all/template/js/jquery.iframe-transport.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.iframe-transport.js
rename to core/styles/all/template/js/jquery.iframe-transport.js
diff --git a/phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js b/core/styles/all/template/js/jquery.ui.widget.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/jquery.ui.widget.js
rename to core/styles/all/template/js/jquery.ui.widget.js
diff --git a/phpbbgallery/core/styles/all/template/js/load-image.all.min.js b/core/styles/all/template/js/load-image.all.min.js
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/load-image.all.min.js
rename to core/styles/all/template/js/load-image.all.min.js
diff --git a/phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map b/core/styles/all/template/js/load-image.all.min.js.map
similarity index 100%
rename from phpbbgallery/core/styles/all/template/js/load-image.all.min.js.map
rename to core/styles/all/template/js/load-image.all.min.js.map
diff --git a/phpbbgallery/core/styles/all/theme/default.css b/core/styles/all/theme/default.css
similarity index 100%
rename from phpbbgallery/core/styles/all/theme/default.css
rename to core/styles/all/theme/default.css
diff --git a/phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png b/core/styles/all/theme/images/icon_contact_gallery.png
similarity index 100%
rename from phpbbgallery/core/styles/all/theme/images/icon_contact_gallery.png
rename to core/styles/all/theme/images/icon_contact_gallery.png
diff --git a/phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html b/core/styles/prosilver/template/event/index_body_block_stats_append.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/index_body_block_stats_append.html
rename to core/styles/prosilver/template/event/index_body_block_stats_append.html
diff --git a/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html b/core/styles/prosilver/template/event/memberlist_view_content_append.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/memberlist_view_content_append.html
rename to core/styles/prosilver/template/event/memberlist_view_content_append.html
diff --git a/phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html b/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
rename to core/styles/prosilver/template/event/memberlist_view_user_statistics_after.html
diff --git a/phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html b/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
rename to core/styles/prosilver/template/event/navbar_header_user_profile_prepend.html
diff --git a/phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html b/core/styles/prosilver/template/event/overall_header_head_append.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/overall_header_head_append.html
rename to core/styles/prosilver/template/event/overall_header_head_append.html
diff --git a/phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html b/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/event/overall_header_navigation_prepend.html
rename to core/styles/prosilver/template/event/overall_header_navigation_prepend.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/album_body.html b/core/styles/prosilver/template/gallery/album_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/album_body.html
rename to core/styles/prosilver/template/gallery/album_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html b/core/styles/prosilver/template/gallery/albumlist_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/albumlist_body.html
rename to core/styles/prosilver/template/gallery/albumlist_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html b/core/styles/prosilver/template/gallery/albumlist_polaroid.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html
rename to core/styles/prosilver/template/gallery/albumlist_polaroid.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html b/core/styles/prosilver/template/gallery/comment_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/comment_body.html
rename to core/styles/prosilver/template/gallery/comment_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/gallery.js b/core/styles/prosilver/template/gallery/gallery.js
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/gallery.js
rename to core/styles/prosilver/template/gallery/gallery.js
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html b/core/styles/prosilver/template/gallery/gallery_footer.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/gallery_footer.html
rename to core/styles/prosilver/template/gallery/gallery_footer.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html b/core/styles/prosilver/template/gallery/gallery_header.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/gallery_header.html
rename to core/styles/prosilver/template/gallery/gallery_header.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html b/core/styles/prosilver/template/gallery/image_edit_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/image_edit_body.html
rename to core/styles/prosilver/template/gallery/image_edit_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html b/core/styles/prosilver/template/gallery/imageblock_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/imageblock_body.html
rename to core/styles/prosilver/template/gallery/imageblock_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/imageblock_polaroid.html
rename to core/styles/prosilver/template/gallery/imageblock_polaroid.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html b/core/styles/prosilver/template/gallery/imageblock_popup.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/imageblock_popup.html
rename to core/styles/prosilver/template/gallery/imageblock_popup.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/index_body.html b/core/styles/prosilver/template/gallery/index_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/index_body.html
rename to core/styles/prosilver/template/gallery/index_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html b/core/styles/prosilver/template/gallery/mcp_approve.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/mcp_approve.html
rename to core/styles/prosilver/template/gallery/mcp_approve.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html b/core/styles/prosilver/template/gallery/mcp_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/mcp_body.html
rename to core/styles/prosilver/template/gallery/mcp_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/message.html b/core/styles/prosilver/template/gallery/message.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/message.html
rename to core/styles/prosilver/template/gallery/message.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html b/core/styles/prosilver/template/gallery/moderate_actions.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions.html
rename to core/styles/prosilver/template/gallery/moderate_actions.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html b/core/styles/prosilver/template/gallery/moderate_actions_queue.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_actions_queue.html
rename to core/styles/prosilver/template/gallery/moderate_actions_queue.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html b/core/styles/prosilver/template/gallery/moderate_album_overview.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_album_overview.html
rename to core/styles/prosilver/template/gallery/moderate_album_overview.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html b/core/styles/prosilver/template/gallery/moderate_approve.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve.html
rename to core/styles/prosilver/template/gallery/moderate_approve.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html b/core/styles/prosilver/template/gallery/moderate_approve_queue.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_approve_queue.html
rename to core/styles/prosilver/template/gallery/moderate_approve_queue.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html b/core/styles/prosilver/template/gallery/moderate_image_overview.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_image_overview.html
rename to core/styles/prosilver/template/gallery/moderate_image_overview.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html b/core/styles/prosilver/template/gallery/moderate_overview.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_overview.html
rename to core/styles/prosilver/template/gallery/moderate_overview.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html b/core/styles/prosilver/template/gallery/moderate_report_queue.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_report_queue.html
rename to core/styles/prosilver/template/gallery/moderate_report_queue.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html b/core/styles/prosilver/template/gallery/moderate_reports.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/moderate_reports.html
rename to core/styles/prosilver/template/gallery/moderate_reports.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html b/core/styles/prosilver/template/gallery/plugins_header.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/plugins_header.html
rename to core/styles/prosilver/template/gallery/plugins_header.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html b/core/styles/prosilver/template/gallery/posting_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/posting_body.html
rename to core/styles/prosilver/template/gallery/posting_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html b/core/styles/prosilver/template/gallery/posting_javascript.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/posting_javascript.html
rename to core/styles/prosilver/template/gallery/posting_javascript.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html b/core/styles/prosilver/template/gallery/recent_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/recent_body.html
rename to core/styles/prosilver/template/gallery/recent_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/search_body.html b/core/styles/prosilver/template/gallery/search_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/search_body.html
rename to core/styles/prosilver/template/gallery/search_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/search_random.html b/core/styles/prosilver/template/gallery/search_random.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/search_random.html
rename to core/styles/prosilver/template/gallery/search_random.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html b/core/styles/prosilver/template/gallery/search_recent.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/search_recent.html
rename to core/styles/prosilver/template/gallery/search_recent.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/search_results.html b/core/styles/prosilver/template/gallery/search_results.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/search_results.html
rename to core/styles/prosilver/template/gallery/search_results.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html b/core/styles/prosilver/template/gallery/ucp_gallery.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/ucp_gallery.html
rename to core/styles/prosilver/template/gallery/ucp_gallery.html
diff --git a/phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html
rename to core/styles/prosilver/template/gallery/viewimage_body.html
diff --git a/phpbbgallery/core/styles/prosilver/template/message_body.html b/core/styles/prosilver/template/message_body.html
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/template/message_body.html
rename to core/styles/prosilver/template/message_body.html
diff --git a/phpbbgallery/core/styles/prosilver/theme/gallery-color.css b/core/styles/prosilver/theme/gallery-color.css
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/gallery-color.css
rename to core/styles/prosilver/theme/gallery-color.css
diff --git a/phpbbgallery/core/styles/prosilver/theme/gallery.css b/core/styles/prosilver/theme/gallery.css
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/gallery.css
rename to core/styles/prosilver/theme/gallery.css
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif b/core/styles/prosilver/theme/images/icon_contact_gallery.gif
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/icon_contact_gallery.gif
rename to core/styles/prosilver/theme/images/icon_contact_gallery.gif
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif b/core/styles/prosilver/theme/images/icon_gallery_locked.gif
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_locked.gif
rename to core/styles/prosilver/theme/images/icon_gallery_locked.gif
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif b/core/styles/prosilver/theme/images/icon_gallery_reported.gif
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_reported.gif
rename to core/styles/prosilver/theme/images/icon_gallery_reported.gif
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif b/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
rename to core/styles/prosilver/theme/images/icon_gallery_unapproved.gif
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png b/core/styles/prosilver/theme/images/icon_topic_unapproved.png
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/icon_topic_unapproved.png
rename to core/styles/prosilver/theme/images/icon_topic_unapproved.png
diff --git a/phpbbgallery/core/styles/prosilver/theme/images/lock.png b/core/styles/prosilver/theme/images/lock.png
similarity index 100%
rename from phpbbgallery/core/styles/prosilver/theme/images/lock.png
rename to core/styles/prosilver/theme/images/lock.png
diff --git a/phpbbgallery/core/ucp/main_info.php b/core/ucp/main_info.php
similarity index 100%
rename from phpbbgallery/core/ucp/main_info.php
rename to core/ucp/main_info.php
diff --git a/phpbbgallery/core/ucp/main_module.php b/core/ucp/main_module.php
similarity index 100%
rename from phpbbgallery/core/ucp/main_module.php
rename to core/ucp/main_module.php
diff --git a/phpbbgallery/core/ucp/settings_info.php b/core/ucp/settings_info.php
similarity index 100%
rename from phpbbgallery/core/ucp/settings_info.php
rename to core/ucp/settings_info.php
diff --git a/phpbbgallery/core/ucp/settings_module.php b/core/ucp/settings_module.php
similarity index 100%
rename from phpbbgallery/core/ucp/settings_module.php
rename to core/ucp/settings_module.php
diff --git a/phpbbgallery/core/upload.php b/core/upload.php
similarity index 100%
rename from phpbbgallery/core/upload.php
rename to core/upload.php
diff --git a/phpbbgallery/core/url.php b/core/url.php
similarity index 100%
rename from phpbbgallery/core/url.php
rename to core/url.php
diff --git a/phpbbgallery/core/user.php b/core/user.php
similarity index 100%
rename from phpbbgallery/core/user.php
rename to core/user.php
diff --git a/phpbbgallery/exif/composer.json b/exif/composer.json
similarity index 100%
rename from phpbbgallery/exif/composer.json
rename to exif/composer.json
diff --git a/phpbbgallery/exif/config/services.yml b/exif/config/services.yml
similarity index 100%
rename from phpbbgallery/exif/config/services.yml
rename to exif/config/services.yml
diff --git a/phpbbgallery/exif/event/exif_listener.php b/exif/event/exif_listener.php
similarity index 100%
rename from phpbbgallery/exif/event/exif_listener.php
rename to exif/event/exif_listener.php
diff --git a/phpbbgallery/exif/exif.php b/exif/exif.php
similarity index 100%
rename from phpbbgallery/exif/exif.php
rename to exif/exif.php
diff --git a/phpbbgallery/exif/ext.php b/exif/ext.php
similarity index 100%
rename from phpbbgallery/exif/ext.php
rename to exif/ext.php
diff --git a/phpbbgallery/exif/language/bg/exif.php b/exif/language/bg/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/bg/exif.php
rename to exif/language/bg/exif.php
diff --git a/phpbbgallery/exif/language/bg/index.htm b/exif/language/bg/index.htm
similarity index 100%
rename from phpbbgallery/exif/language/bg/index.htm
rename to exif/language/bg/index.htm
diff --git a/phpbbgallery/exif/language/de/exif.php b/exif/language/de/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/de/exif.php
rename to exif/language/de/exif.php
diff --git a/phpbbgallery/exif/language/en/exif.php b/exif/language/en/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/en/exif.php
rename to exif/language/en/exif.php
diff --git a/phpbbgallery/exif/language/en/index.htm b/exif/language/en/index.htm
similarity index 100%
rename from phpbbgallery/exif/language/en/index.htm
rename to exif/language/en/index.htm
diff --git a/phpbbgallery/exif/language/fr/exif.php b/exif/language/fr/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/fr/exif.php
rename to exif/language/fr/exif.php
diff --git a/phpbbgallery/exif/language/it/exif.php b/exif/language/it/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/it/exif.php
rename to exif/language/it/exif.php
diff --git a/phpbbgallery/exif/language/it/index.htm b/exif/language/it/index.htm
similarity index 100%
rename from phpbbgallery/exif/language/it/index.htm
rename to exif/language/it/index.htm
diff --git a/phpbbgallery/exif/language/ru/exif.php b/exif/language/ru/exif.php
similarity index 100%
rename from phpbbgallery/exif/language/ru/exif.php
rename to exif/language/ru/exif.php
diff --git a/phpbbgallery/exif/license.txt b/exif/license.txt
similarity index 100%
rename from phpbbgallery/exif/license.txt
rename to exif/license.txt
diff --git a/phpbbgallery/exif/migrations/m1_init.php b/exif/migrations/m1_init.php
similarity index 100%
rename from phpbbgallery/exif/migrations/m1_init.php
rename to exif/migrations/m1_init.php
diff --git a/phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html b/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
similarity index 100%
rename from phpbbgallery/exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
rename to exif/styles/prosilver/template/event/gallery_ucp_settings_fieldset.html
diff --git a/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp b/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
similarity index 100%
rename from phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
rename to exif/styles/prosilver/template/event/gallery_viewimage_details.bkp
diff --git a/phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html b/exif/styles/prosilver/template/event/gallery_viewimage_details.html
similarity index 100%
rename from phpbbgallery/exif/styles/prosilver/template/event/gallery_viewimage_details.html
rename to exif/styles/prosilver/template/event/gallery_viewimage_details.html
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b4f0648e..5d44af98 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -13,11 +13,11 @@
>
- ./phpbbgallery/tests
- ./phpbbgallery/tests/functional
+ ./tests
+ ./tests/functional
- ./phpbbgallery/tests/functional/
+ ./tests/functional/
@@ -25,15 +25,15 @@
./
- ./phpbbgallery/acpcleanup/language/
- ./phpbbgallery/acpcleanup/migrations/
- ./phpbbgallery/acpimport/language/
- ./phpbbgallery/acpimport/migrations/
- ./phpbbgallery/exif/language/
- ./phpbbgallery/exif/migrations/
- ./phpbbgallery/core/language/
- ./phpbbgallery/core/migrations/
- ./phpbbgallery/tests/
+ ./acpcleanup/language/
+ ./acpcleanup/migrations/
+ ./acpimport/language/
+ ./acpimport/migrations/
+ ./exif/language/
+ ./exif/migrations/
+ ./core/language/
+ ./core/migrations/
+ ./tests/
diff --git a/phpbbgallery/tests/controller/controller_base.php b/tests/controller/controller_base.php
similarity index 100%
rename from phpbbgallery/tests/controller/controller_base.php
rename to tests/controller/controller_base.php
diff --git a/phpbbgallery/tests/controller/fixtures/fixture.xml b/tests/controller/fixtures/fixture.xml
similarity index 100%
rename from phpbbgallery/tests/controller/fixtures/fixture.xml
rename to tests/controller/fixtures/fixture.xml
diff --git a/phpbbgallery/tests/controller/gallery_album_test.php b/tests/controller/gallery_album_test.php
similarity index 100%
rename from phpbbgallery/tests/controller/gallery_album_test.php
rename to tests/controller/gallery_album_test.php
diff --git a/phpbbgallery/tests/controller/gallery_comment_test.php b/tests/controller/gallery_comment_test.php
similarity index 100%
rename from phpbbgallery/tests/controller/gallery_comment_test.php
rename to tests/controller/gallery_comment_test.php
diff --git a/phpbbgallery/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
similarity index 100%
rename from phpbbgallery/tests/controller/gallery_index_test.php
rename to tests/controller/gallery_index_test.php
diff --git a/phpbbgallery/tests/controller/gallery_moderate_test.php b/tests/controller/gallery_moderate_test.php
similarity index 100%
rename from phpbbgallery/tests/controller/gallery_moderate_test.php
rename to tests/controller/gallery_moderate_test.php
diff --git a/phpbbgallery/tests/core/album/core_album_test.php b/tests/core/album/core_album_test.php
similarity index 100%
rename from phpbbgallery/tests/core/album/core_album_test.php
rename to tests/core/album/core_album_test.php
diff --git a/phpbbgallery/tests/core/album/core_display_test.php b/tests/core/album/core_display_test.php
similarity index 100%
rename from phpbbgallery/tests/core/album/core_display_test.php
rename to tests/core/album/core_display_test.php
diff --git a/phpbbgallery/tests/core/core_auth_test.php b/tests/core/core_auth_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_auth_test.php
rename to tests/core/core_auth_test.php
diff --git a/phpbbgallery/tests/core/core_base.php b/tests/core/core_base.php
similarity index 100%
rename from phpbbgallery/tests/core/core_base.php
rename to tests/core/core_base.php
diff --git a/phpbbgallery/tests/core/core_block_test.php b/tests/core/core_block_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_block_test.php
rename to tests/core/core_block_test.php
diff --git a/phpbbgallery/tests/core/core_cache_test.php b/tests/core/core_cache_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_cache_test.php
rename to tests/core/core_cache_test.php
diff --git a/phpbbgallery/tests/core/core_comment_test.php b/tests/core/core_comment_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_comment_test.php
rename to tests/core/core_comment_test.php
diff --git a/phpbbgallery/tests/core/core_config_test.php b/tests/core/core_config_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_config_test.php
rename to tests/core/core_config_test.php
diff --git a/phpbbgallery/tests/core/core_contest_test.php b/tests/core/core_contest_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_contest_test.php
rename to tests/core/core_contest_test.php
diff --git a/phpbbgallery/tests/core/core_image_test.php b/tests/core/core_image_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_image_test.php
rename to tests/core/core_image_test.php
diff --git a/phpbbgallery/tests/core/core_notification_test.php b/tests/core/core_notification_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_notification_test.php
rename to tests/core/core_notification_test.php
diff --git a/phpbbgallery/tests/core/core_rating_test.php b/tests/core/core_rating_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_rating_test.php
rename to tests/core/core_rating_test.php
diff --git a/phpbbgallery/tests/core/core_report_test.php b/tests/core/core_report_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_report_test.php
rename to tests/core/core_report_test.php
diff --git a/phpbbgallery/tests/core/core_search_test.php b/tests/core/core_search_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_search_test.php
rename to tests/core/core_search_test.php
diff --git a/phpbbgallery/tests/core/core_url_test.php b/tests/core/core_url_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_url_test.php
rename to tests/core/core_url_test.php
diff --git a/phpbbgallery/tests/core/core_user_test.php b/tests/core/core_user_test.php
similarity index 100%
rename from phpbbgallery/tests/core/core_user_test.php
rename to tests/core/core_user_test.php
diff --git a/phpbbgallery/tests/core/fixtures/fixture.xml b/tests/core/fixtures/fixture.xml
similarity index 100%
rename from phpbbgallery/tests/core/fixtures/fixture.xml
rename to tests/core/fixtures/fixture.xml
diff --git a/phpbbgallery/tests/event/fixtures/fixture.xml b/tests/event/fixtures/fixture.xml
similarity index 100%
rename from phpbbgallery/tests/event/fixtures/fixture.xml
rename to tests/event/fixtures/fixture.xml
diff --git a/phpbbgallery/tests/event/main_event_test.php b/tests/event/main_event_test.php
similarity index 100%
rename from phpbbgallery/tests/event/main_event_test.php
rename to tests/event/main_event_test.php
diff --git a/phpbbgallery/tests/functional/images/valid.gif b/tests/functional/images/valid.gif
similarity index 100%
rename from phpbbgallery/tests/functional/images/valid.gif
rename to tests/functional/images/valid.gif
diff --git a/phpbbgallery/tests/functional/images/valid.jpg b/tests/functional/images/valid.jpg
similarity index 100%
rename from phpbbgallery/tests/functional/images/valid.jpg
rename to tests/functional/images/valid.jpg
diff --git a/phpbbgallery/tests/functional/images/valid.png b/tests/functional/images/valid.png
similarity index 100%
rename from phpbbgallery/tests/functional/images/valid.png
rename to tests/functional/images/valid.png
diff --git a/phpbbgallery/tests/functional/images/valid.webp b/tests/functional/images/valid.webp
similarity index 100%
rename from phpbbgallery/tests/functional/images/valid.webp
rename to tests/functional/images/valid.webp
diff --git a/phpbbgallery/tests/functional/images/valid.zip b/tests/functional/images/valid.zip
similarity index 100%
rename from phpbbgallery/tests/functional/images/valid.zip
rename to tests/functional/images/valid.zip
diff --git a/phpbbgallery/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php
similarity index 100%
rename from phpbbgallery/tests/functional/phpbbgallery_alpha_test.php
rename to tests/functional/phpbbgallery_alpha_test.php
diff --git a/phpbbgallery/tests/functional/phpbbgallery_base.php b/tests/functional/phpbbgallery_base.php
similarity index 100%
rename from phpbbgallery/tests/functional/phpbbgallery_base.php
rename to tests/functional/phpbbgallery_base.php
diff --git a/phpbbgallery/tests/functional/phpbbgallery_beta_test.php b/tests/functional/phpbbgallery_beta_test.php
similarity index 100%
rename from phpbbgallery/tests/functional/phpbbgallery_beta_test.php
rename to tests/functional/phpbbgallery_beta_test.php
diff --git a/phpbbgallery/tests/functional/phpbbgallery_charlie_test.php b/tests/functional/phpbbgallery_charlie_test.php
similarity index 100%
rename from phpbbgallery/tests/functional/phpbbgallery_charlie_test.php
rename to tests/functional/phpbbgallery_charlie_test.php
diff --git a/phpbbgallery/tests/functional/phpbbgallery_delta_test.php b/tests/functional/phpbbgallery_delta_test.php
similarity index 100%
rename from phpbbgallery/tests/functional/phpbbgallery_delta_test.php
rename to tests/functional/phpbbgallery_delta_test.php
From 0b552d74053aa7b0739e56ddc5eae451dd917c16 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 19:29:58 +0100
Subject: [PATCH 041/138] fix eslint
---
core/search.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/core/search.php b/core/search.php
index 54840644..ad07dd99 100644
--- a/core/search.php
+++ b/core/search.php
@@ -396,7 +396,7 @@ public function recent_comments($limit, $start = 0, $pagination = true)
'SEARCH_MATCHES' => $this->language->lang('TOTAL_COMMENTS_SPRINTF', $count),
'SEARCH_TITLE' => $this->language->lang('RECENT_COMMENTS'),
));
- if($pagination)
+ if ($pagination)
{
$this->pagination->generate_template_pagination(array(
'routes' => array(
@@ -405,12 +405,11 @@ public function recent_comments($limit, $start = 0, $pagination = true)
'params' => array()), 'pagination', 'page', $count, $limit, $start
);
}
-
}
/**
* Generate recent images and populate template
- * @param (int) $limit How many imagese to query
+ * @param (int) $limit How many images to query
* @param int $start
* @param int $user
* @param string $fields
From 675b1713ae4702192d0caa7b06f7904f482dc4bf Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 20:11:12 +0100
Subject: [PATCH 042/138] More fixes
---
core/album/display.php | 2 +-
core/log.php | 5 ++---
tests/controller/gallery_index_test.php | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/core/album/display.php b/core/album/display.php
index 5a490bc9..b4a44a53 100644
--- a/core/album/display.php
+++ b/core/album/display.php
@@ -501,7 +501,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret
unset($right_id);
}
- // if this is invizible due zebra ... make it go away
+ // if this is invisible due zebra ... make it go away
if ($this->gallery_auth->get_zebra_state($zebra_array, (int) $row['album_user_id'], (int) $row['album_id']) < (int) $row['album_auth_access'])
{
continue;
diff --git a/core/log.php b/core/log.php
index 64d06158..e8c25bac 100644
--- a/core/log.php
+++ b/core/log.php
@@ -241,7 +241,7 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
'ip' => $row['log_ip'],
'album' => $row['album'],
'image' => $row['image'],
- 'description' => json_decode($row['description'], true)
+ 'description' => json_decode(stripslashes($row['description']))
);
$users_array[$row['log_user']] = array('');
}
@@ -260,8 +260,7 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
'U_LOG_IP' => $var['ip'],
'U_ALBUM_LINK' => $var['album'] != 0 ? $this->helper->route('phpbbgallery_core_album', array('album_id' => $var['album'])) : false,
'U_IMAGE_LINK' => $var['image'] != 0 ? $this->helper->route('phpbbgallery_core_image', array('image_id' => $var['image'])) : false,
- //'U_LOG_ACTION' => $description,
- 'U_LOG_ACTION' => $this->language->lang($var['description'][0], isset($var['description'][1]) ? $var['description'][1] : false, isset($var['description'][2]) ? $var['description'][2] : false, isset($var['description'][3]) ? $var['description'][3] : false),
+ 'U_LOG_ACTION' => isset($var['description']) && is_array($var['description']) ? $this->language->lang($var['description'][0], $var['description'][1] ?? false, $var['description'][2] ?? false, $var['description'][3] ?? false) : '',
'U_TIME' => $this->user->format_date($var['time']),
));
}
diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
index 49a47a45..34cfe82d 100644
--- a/tests/controller/gallery_index_test.php
+++ b/tests/controller/gallery_index_test.php
@@ -100,7 +100,7 @@ public function get_controller($user_id, $group, $is_registered)
* Test controller index
* function base()
* As I can't pass parameters to ->withConsecutive but I want to
- * will have to make diferent test for each case
+ * will have to make different test for each case
*
*/
public function test_controller_base_case_1()
From ba1cd1cf23f5ad922f1d4350c5dc60e738a9c593 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 21:22:07 +0100
Subject: [PATCH 043/138] Fix explain translations
---
core/language/bg/gallery_acp.php | 5 +++++
core/language/de/gallery_acp.php | 5 +++++
core/language/en/gallery_acp.php | 5 +++++
core/language/es/gallery_acp.php | 5 +++++
core/language/fr/gallery_acp.php | 5 +++++
core/language/it/gallery_acp.php | 5 +++++
core/language/nl/gallery_acp.php | 5 +++++
core/language/ru/gallery_acp.php | 5 +++++
8 files changed, 40 insertions(+)
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index 2fead99a..c8bdfbbf 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -245,18 +245,23 @@
'PERMISSION_C_READ' => 'Може да чете коментари',
'PERMISSION_I' => 'Изображения',
'PERMISSION_I_APPROVE' => 'Може да качва без одобрение',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Бой на качваните изображения',
'PERMISSION_I_DELETE' => 'Може да трие собствените си изобраения',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Може да редактира собствените си изобраения',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Може да заключва изобраения',
'PERMISSION_I_RATE' => 'Може да оценява изображения',
'PERMISSION_I_RATE_EXPLAIN' => 'Гости и качилия изображението НИКОГА не могат да оценяват изображение.',
'PERMISSION_I_REPORT' => 'Може да докладва изобраения',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Може да качва не ограничен брой изобраения',
'PERMISSION_I_UPLOAD' => 'Може да качва изобраения',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Това право също се използва и за определяне дали потребителя може да мести изборажения в този албум, когато има модераторски права в други албуми.',
'PERMISSION_I_VIEW' => 'Може да вижда изобраения',
'PERMISSION_I_WATERMARK' => 'Може да вижда изобраения без воден знак',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Модерация',
'PERMISSION_MISC' => 'Разни', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Може да модерира коментари',
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index 2a99b393..b9129b90 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -246,18 +246,23 @@
'PERMISSION_C_READ' => 'Kann Kommentare lesen',
'PERMISSION_I' => 'Bilder',
'PERMISSION_I_APPROVE' => 'Kann Bilder ohne Freigabe erstellen',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Anzahl der hochladbaren Bilder',
'PERMISSION_I_DELETE' => 'Kann eigene Bilder löschen',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Kann eigene Bilder bearbeiten',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Kann Bilder sperren',
'PERMISSION_I_RATE' => 'Kann Bilder bewerten',
'PERMISSION_I_RATE_EXPLAIN' => 'Gäste und der Bild-Autor können Bilder NIE bewerten.',
'PERMISSION_I_REPORT' => 'Kann Bilder melden',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Kann unbegrenzt Bilder hochladen',
'PERMISSION_I_UPLOAD' => 'Kann Bilder hochladen',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Diese Berechtigung ist auch dafür verantwortlich, um festzustellen ob ein Benutzer Bilder in das Album verschieben darf, wenn er Moderator-Berechtigungen in einem anderem Album hat.',
'PERMISSION_I_VIEW' => 'Kann Bilder sehen',
'PERMISSION_I_WATERMARK' => 'Kann Bilder ohne Wasserzeichen sehen',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Sonstiges', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Kann Kommentare moderieren',
diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
index 212cc5ca..f6cbaf3f 100644
--- a/core/language/en/gallery_acp.php
+++ b/core/language/en/gallery_acp.php
@@ -245,18 +245,23 @@
'PERMISSION_C_READ' => 'Can read comments',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Can upload without approval',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Number of uploadable images',
'PERMISSION_I_DELETE' => 'Can delete own images',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Can edit own images',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Can lock images',
'PERMISSION_I_RATE' => 'Can rate images',
'PERMISSION_I_RATE_EXPLAIN' => 'Guests and the image-uploader can NEVER rate images.',
'PERMISSION_I_REPORT' => 'Can report images',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Can upload unlimited images',
'PERMISSION_I_UPLOAD' => 'Can upload images',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'This permission is also used, to determinate whether the user can move images to the album, when having moderator permissions in other forums.',
'PERMISSION_I_VIEW' => 'Can view images',
'PERMISSION_I_WATERMARK' => 'Can view images without watermark',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Misc', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Can moderate comments',
diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
index 022d0d68..727e3bf8 100644
--- a/core/language/es/gallery_acp.php
+++ b/core/language/es/gallery_acp.php
@@ -245,18 +245,23 @@
'PERMISSION_C_READ' => 'Puede leer comentarios',
'PERMISSION_I' => 'Imágenes',
'PERMISSION_I_APPROVE' => 'Puede cargar sin aprobación',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Número de imágenes subidas',
'PERMISSION_I_DELETE' => 'Puede borrar imágenes propias',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Puede editar sus propias imágenes',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Puede bloquear imágenes',
'PERMISSION_I_RATE' => 'Puede valorar imágenes',
'PERMISSION_I_RATE_EXPLAIN' => 'Los invitados y la persona que envía la imagen NUNCA pueden clasificar las imágenes.',
'PERMISSION_I_REPORT' => 'Puede informar imágenes',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Puede subir imágenes ilimitadas',
'PERMISSION_I_UPLOAD' => 'Puede subir imágenes',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Este permiso también se utiliza, para determinar si el usuario puede mover imágenes al álbum, al tener permisos de moderador en otros foros.',
'PERMISSION_I_VIEW' => 'Puede ver imágenes',
'PERMISSION_I_WATERMARK' => 'Puede ver imágenes sin marca de agua',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderación',
'PERMISSION_MISC' => 'Varios', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Puede moderar los comentarios',
diff --git a/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
index 1c2250cc..be4a9cbf 100644
--- a/core/language/fr/gallery_acp.php
+++ b/core/language/fr/gallery_acp.php
@@ -259,18 +259,23 @@
'PERMISSION_C_READ' => 'Peut lire les commentaires',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Peut envoyer une image sans approbation',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Nombre d’images chargeables',
'PERMISSION_I_DELETE' => 'Peut supprimer ses images',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Peut modifier ses images',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Peut verrouiller des images',
'PERMISSION_I_RATE' => 'Peut noter des images',
'PERMISSION_I_RATE_EXPLAIN' => 'Les invités et les auteurs des images ne peuvent JAMAIS noter les/leurs images.',
'PERMISSION_I_REPORT' => 'Peut rapporter des images',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Peut envoyer sans limite des images',
'PERMISSION_I_UPLOAD' => 'Peut envoyer des images',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Cette permission est également utilisée, pour déterminer si l’utilisateur peut déplacer les images d’un album, lorsqu’il a des permissions de modérateur dans d’autres forums.',
'PERMISSION_I_VIEW' => 'Peut voir les images',
'PERMISSION_I_WATERMARK' => 'Peut voir les images sans filigrane',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Modération',
'PERMISSION_MISC' => 'Autres', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Peut modérer les commentaires',
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
index e0750a7e..bfae8777 100644
--- a/core/language/it/gallery_acp.php
+++ b/core/language/it/gallery_acp.php
@@ -243,18 +243,23 @@
'PERMISSION_C_READ' => 'Può leggere i commenti',
'PERMISSION_I' => 'immagini',
'PERMISSION_I_APPROVE' => 'Può caricare immagini senza approvazione',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Numero di immagini caricate',
'PERMISSION_I_DELETE' => 'Può cancellare le sue immagini',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Può modificare le sue immagini',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Può bloccare immagini',
'PERMISSION_I_RATE' => 'Può votare immagini',
'PERMISSION_I_RATE_EXPLAIN' => 'Gli ospiti e le immagini caricate non possono mai votare le immagini.',
'PERMISSION_I_REPORT' => 'Può segnalare immagini',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Può caricare immagini illimitate',
'PERMISSION_I_UPLOAD' => 'Può caricare immagini',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Questa autorizzazione è anche usata per determinare se l’utente può spostare le immagini per l’album, quando dispone di autorizzazioni di moderatore in altri forum.',
'PERMISSION_I_VIEW' => 'Può vedere immagini',
'PERMISSION_I_WATERMARK' => 'Può vedere immagini con watermark',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderazione',
'PERMISSION_MISC' => 'Misti', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Può moderare commenti',
diff --git a/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
index c7792e1c..66fad00c 100644
--- a/core/language/nl/gallery_acp.php
+++ b/core/language/nl/gallery_acp.php
@@ -246,18 +246,23 @@
'PERMISSION_C_READ' => 'Kan reacties lezen',
'PERMISSION_I' => 'Afbeeldingen',
'PERMISSION_I_APPROVE' => 'Kan uploaden zonder goedkeuring',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Aantal te uploaden afbeeldingen',
'PERMISSION_I_DELETE' => 'Kan eigen afbeeldingen verwijderen',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Kan eigen afbeldingen wijzigen',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'kan afbeldingen sluiten',
'PERMISSION_I_RATE' => 'Kan afbeeldingen beoordelen',
'PERMISSION_I_RATE_EXPLAIN' => 'Gasten en afbeeldingsuploaders kunnen NOOIT afbeeldingen beoordelen.',
'PERMISSION_I_REPORT' => 'kan afbeldingen melden',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Kan ongelimiteerd aantal afbeeldingen uploaden',
'PERMISSION_I_UPLOAD' => 'Kan afbeeldingen uploaden',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Deze permissie wordt ook gebruikt, om vast te stellen of een gebruiker afbeeldingen kan verplaatsen naar het album, wanneer deze moderator permissies heeft in andere forums.',
'PERMISSION_I_VIEW' => 'Kan afbeeldingen bekijken',
'PERMISSION_I_WATERMARK' => 'Kan afbeelding zonder watermerk bekijken',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderatie',
'PERMISSION_MISC' => 'Misc', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Kan reacties modereren',
diff --git a/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
index ed0b1056..ceb76ca2 100644
--- a/core/language/ru/gallery_acp.php
+++ b/core/language/ru/gallery_acp.php
@@ -232,18 +232,23 @@
'PERMISSION_C_READ' => 'Может читать комментарии',
'PERMISSION_I' => 'Фотографии',
'PERMISSION_I_APPROVE' => 'Может загружать без одобрения',
+ 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Количество загружаемых фото',
'PERMISSION_I_DELETE' => 'Может удалять свои фото',
+ 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Может редактировать свои фото',
+ 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Может закрывать фото',
'PERMISSION_I_RATE' => 'Может оценивать фото',
'PERMISSION_I_RATE_EXPLAIN' => 'Гости не могут оценивать фото.',
'PERMISSION_I_REPORT' => 'Может обжаловать фото',
+ 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Может загружать неограниченное количество фото',
'PERMISSION_I_UPLOAD' => 'Может загружать фото',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Это право также используется для определения, может ли пользователь перемещать фотографии в альбом, если у него имеются модераторские права в других форумах.',
'PERMISSION_I_VIEW' => 'Может просматривать фото',
'PERMISSION_I_WATERMARK' => 'Может просматривать фото без водяных знаков',
+ 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Модерация',
'PERMISSION_MISC' => 'Прочее', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Может модерировать комментарии',
From 772f86f83c75e0cd5c6ad3f97c3807c5d43bfcf2 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 21:24:50 +0100
Subject: [PATCH 044/138] Improve german files
---
core/language/de/gallery.php | 2 +-
core/language/de/gallery_ucp.php | 2 +-
core/language/de/info_acp_gallery.php | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php
index 718ddcea..36f8e2bf 100644
--- a/core/language/de/gallery.php
+++ b/core/language/de/gallery.php
@@ -27,7 +27,7 @@
$lang = array_merge($lang, array(
'ADD_UPLOAD_FIELD' => 'Weitere Felder zum Hochladen hinzufügen',
'ALBUM' => 'Album',
- 'ALBUM_DESC' => 'Album Beschreibung',
+ 'ALBUM_DESC' => 'Albumbeschreibung',
'ALBUM_IS_CATEGORY' => 'Das Album, in welches du dich gemogelt hast, ist eine Kategorie. In Kategorien können keine Bilder hochgeladen werden.',
'ALBUM_LOCKED' => 'Gesperrt',
'ALBUM_NAME' => 'Name des Albums',
diff --git a/core/language/de/gallery_ucp.php b/core/language/de/gallery_ucp.php
index 9c2d2fce..efd82714 100644
--- a/core/language/de/gallery_ucp.php
+++ b/core/language/de/gallery_ucp.php
@@ -33,7 +33,7 @@
'ALBUMS' => 'Alben',
'ALBUM_ACCESS' => 'Zugriff erlauben für',
'ALBUM_ACCESS_EXPLAIN' => 'Du kannst deine %1$sListen der Freunde und ignorierten Mitglieder%2$s benutzen, um den Zugriff einzuschränken. Moderatoren können jedoch immer auf das Album zugreifen.',
- 'ALBUM_DESC' => 'Beschreibung',
+ 'ALBUM_DESC' => 'Albumbeschreibung',
'ALBUM_NAME' => 'Name',
'ALBUM_PARENT' => 'Übergeordnetes Album',
'ATTACHED_SUBALBUMS' => 'Verknüpfte Subalben',
diff --git a/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
index ef54dca6..ea3da467 100644
--- a/core/language/de/info_acp_gallery.php
+++ b/core/language/de/info_acp_gallery.php
@@ -44,6 +44,7 @@
'GALLERY_COPYRIGHT' => 'Powered by phpBB Gallery © 2016 Lucifer ',
// A little line where you can give yourself some credits on the translation.
+ //'GALLERY_TRANSLATION_INFO' => 'English “phpBB Gallery“-Translation by nickvergessen ',
'GALLERY_TRANSLATION_INFO' => 'Übersetzt von franki Die Ahnen ',
'IMAGES' => 'Bilder',
From 97b58a0faee66112a7ef8cd6898879ef6c3a02a2 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 21:44:27 +0100
Subject: [PATCH 045/138] Improve permissions module
---
core/acp/permissions_module.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/acp/permissions_module.php b/core/acp/permissions_module.php
index ab53356d..19c243b7 100644
--- a/core/acp/permissions_module.php
+++ b/core/acp/permissions_module.php
@@ -591,9 +591,11 @@ private function permissions_p_mask()
));
foreach ($permission_values as $permission)
{
+ $key = 'PERMISSION_' . strtoupper($permission);
+ $key_explain = $key . '_EXPLAIN';
$template->assign_block_vars('c_mask.v_mask.category.mask', array(
- 'PERMISSION' => $this->language->lang('PERMISSION_' . strtoupper($permission)),
- 'PERMISSION_EXPLAIN' => ($this->language->lang_raw('PERMISSION_' . strtoupper($permission) . '_EXPLAIN') != 'PERMISSION_' . strtoupper($permission) . '_EXPLAIN') ? $this->language->lang('PERMISSION_' . strtoupper($permission) . '_EXPLAIN') : '',
+ 'PERMISSION' => $this->language->lang($key),
+ 'PERMISSION_EXPLAIN' => ($this->language->lang_raw($key_explain) !== $key_explain) ? $this->language->lang($key_explain) : '',
'S_FIELD_NAME' => 'setting[' . $album_row['album_id'] . '][' . $victim_row['victim_id'] . '][' . $permission . ']',
'S_NO' => ((isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) ? true : false),
'S_YES' => ((isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_YES)) ? true : false),
From 9ec2796f807d0156b96c687d70fabf158d8cb961 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 21:48:00 +0100
Subject: [PATCH 046/138] Fix translations
---
core/language/bg/gallery_acp.php | 8 --------
core/language/de/gallery_acp.php | 8 --------
core/language/en/gallery_acp.php | 8 --------
core/language/es/gallery_acp.php | 8 --------
core/language/fr/gallery_acp.php | 8 --------
core/language/it/gallery_acp.php | 8 --------
core/language/nl/gallery_acp.php | 8 --------
core/language/ru/gallery_acp.php | 14 +++-----------
8 files changed, 3 insertions(+), 67 deletions(-)
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index c8bdfbbf..07ab707d 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -237,31 +237,23 @@
'PERMISSION_A_UNLIMITED' => 'Не огрничен брой лични подалбуми',
'PERMISSION_C' => 'Коментари',
'PERMISSION_C_DELETE' => 'Може да трие собствените си коментари',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Може да редактира собствените си коментари',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Може да коментира изображение',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Може да чете коментари',
'PERMISSION_I' => 'Изображения',
'PERMISSION_I_APPROVE' => 'Може да качва без одобрение',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Бой на качваните изображения',
'PERMISSION_I_DELETE' => 'Може да трие собствените си изобраения',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Може да редактира собствените си изобраения',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Може да заключва изобраения',
'PERMISSION_I_RATE' => 'Може да оценява изображения',
'PERMISSION_I_RATE_EXPLAIN' => 'Гости и качилия изображението НИКОГА не могат да оценяват изображение.',
'PERMISSION_I_REPORT' => 'Може да докладва изобраения',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Може да качва не ограничен брой изобраения',
'PERMISSION_I_UPLOAD' => 'Може да качва изобраения',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Това право също се използва и за определяне дали потребителя може да мести изборажения в този албум, когато има модераторски права в други албуми.',
'PERMISSION_I_VIEW' => 'Може да вижда изобраения',
'PERMISSION_I_WATERMARK' => 'Може да вижда изобраения без воден знак',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Модерация',
'PERMISSION_MISC' => 'Разни', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Може да модерира коментари',
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index b9129b90..958cecaa 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -238,31 +238,23 @@
'PERMISSION_A_UNLIMITED' => 'Unbegrenzte Anzahl der persönlichen Subalben',
'PERMISSION_C' => 'Kommentare',
'PERMISSION_C_DELETE' => 'Kann eigene Kommentare löschen',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Kann eigene Kommentare bearbeiten',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Kann Bilder kommentieren',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Kann Kommentare lesen',
'PERMISSION_I' => 'Bilder',
'PERMISSION_I_APPROVE' => 'Kann Bilder ohne Freigabe erstellen',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Anzahl der hochladbaren Bilder',
'PERMISSION_I_DELETE' => 'Kann eigene Bilder löschen',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Kann eigene Bilder bearbeiten',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Kann Bilder sperren',
'PERMISSION_I_RATE' => 'Kann Bilder bewerten',
'PERMISSION_I_RATE_EXPLAIN' => 'Gäste und der Bild-Autor können Bilder NIE bewerten.',
'PERMISSION_I_REPORT' => 'Kann Bilder melden',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Kann unbegrenzt Bilder hochladen',
'PERMISSION_I_UPLOAD' => 'Kann Bilder hochladen',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Diese Berechtigung ist auch dafür verantwortlich, um festzustellen ob ein Benutzer Bilder in das Album verschieben darf, wenn er Moderator-Berechtigungen in einem anderem Album hat.',
'PERMISSION_I_VIEW' => 'Kann Bilder sehen',
'PERMISSION_I_WATERMARK' => 'Kann Bilder ohne Wasserzeichen sehen',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Sonstiges', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Kann Kommentare moderieren',
diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
index f6cbaf3f..190c2b5f 100644
--- a/core/language/en/gallery_acp.php
+++ b/core/language/en/gallery_acp.php
@@ -237,31 +237,23 @@
'PERMISSION_A_UNLIMITED' => 'Unlimited number of personal subalbums',
'PERMISSION_C' => 'Comments',
'PERMISSION_C_DELETE' => 'Can delete own comments',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Can edit own comments',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Can comment on image',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Can read comments',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Can upload without approval',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Number of uploadable images',
'PERMISSION_I_DELETE' => 'Can delete own images',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Can edit own images',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Can lock images',
'PERMISSION_I_RATE' => 'Can rate images',
'PERMISSION_I_RATE_EXPLAIN' => 'Guests and the image-uploader can NEVER rate images.',
'PERMISSION_I_REPORT' => 'Can report images',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Can upload unlimited images',
'PERMISSION_I_UPLOAD' => 'Can upload images',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'This permission is also used, to determinate whether the user can move images to the album, when having moderator permissions in other forums.',
'PERMISSION_I_VIEW' => 'Can view images',
'PERMISSION_I_WATERMARK' => 'Can view images without watermark',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderation',
'PERMISSION_MISC' => 'Misc', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Can moderate comments',
diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
index 727e3bf8..f3507214 100644
--- a/core/language/es/gallery_acp.php
+++ b/core/language/es/gallery_acp.php
@@ -237,31 +237,23 @@
'PERMISSION_A_UNLIMITED' => 'Número ilimitado de subalbums personales',
'PERMISSION_C' => 'Comentarios',
'PERMISSION_C_DELETE' => 'Puede eliminar sus propios comentarios',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Puede editar sus propios comentarios',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Puede comentar sobre la imagen',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Puede leer comentarios',
'PERMISSION_I' => 'Imágenes',
'PERMISSION_I_APPROVE' => 'Puede cargar sin aprobación',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Número de imágenes subidas',
'PERMISSION_I_DELETE' => 'Puede borrar imágenes propias',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Puede editar sus propias imágenes',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Puede bloquear imágenes',
'PERMISSION_I_RATE' => 'Puede valorar imágenes',
'PERMISSION_I_RATE_EXPLAIN' => 'Los invitados y la persona que envía la imagen NUNCA pueden clasificar las imágenes.',
'PERMISSION_I_REPORT' => 'Puede informar imágenes',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Puede subir imágenes ilimitadas',
'PERMISSION_I_UPLOAD' => 'Puede subir imágenes',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Este permiso también se utiliza, para determinar si el usuario puede mover imágenes al álbum, al tener permisos de moderador en otros foros.',
'PERMISSION_I_VIEW' => 'Puede ver imágenes',
'PERMISSION_I_WATERMARK' => 'Puede ver imágenes sin marca de agua',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderación',
'PERMISSION_MISC' => 'Varios', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Puede moderar los comentarios',
diff --git a/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
index be4a9cbf..0b7efeb6 100644
--- a/core/language/fr/gallery_acp.php
+++ b/core/language/fr/gallery_acp.php
@@ -251,31 +251,23 @@
'PERMISSION_A_UNLIMITED' => 'Nombre illimité de sous-albums personnels',
'PERMISSION_C' => 'Commentaires',
'PERMISSION_C_DELETE' => 'Peut supprimer ses commentaires',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Peut modifier ses commentaires',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Peut commenter les images',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Peut lire les commentaires',
'PERMISSION_I' => 'Images',
'PERMISSION_I_APPROVE' => 'Peut envoyer une image sans approbation',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Nombre d’images chargeables',
'PERMISSION_I_DELETE' => 'Peut supprimer ses images',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Peut modifier ses images',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Peut verrouiller des images',
'PERMISSION_I_RATE' => 'Peut noter des images',
'PERMISSION_I_RATE_EXPLAIN' => 'Les invités et les auteurs des images ne peuvent JAMAIS noter les/leurs images.',
'PERMISSION_I_REPORT' => 'Peut rapporter des images',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Peut envoyer sans limite des images',
'PERMISSION_I_UPLOAD' => 'Peut envoyer des images',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Cette permission est également utilisée, pour déterminer si l’utilisateur peut déplacer les images d’un album, lorsqu’il a des permissions de modérateur dans d’autres forums.',
'PERMISSION_I_VIEW' => 'Peut voir les images',
'PERMISSION_I_WATERMARK' => 'Peut voir les images sans filigrane',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Modération',
'PERMISSION_MISC' => 'Autres', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Peut modérer les commentaires',
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
index bfae8777..adcf1e3c 100644
--- a/core/language/it/gallery_acp.php
+++ b/core/language/it/gallery_acp.php
@@ -235,31 +235,23 @@
'PERMISSION_A_UNLIMITED' => 'Numero illimitato di sotto-albums personali',
'PERMISSION_C' => 'Commenti',
'PERMISSION_C_DELETE' => 'Può cancellare i suoi commenti',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Può modificare i suoi commenti',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Può commentare le immagini',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Può leggere i commenti',
'PERMISSION_I' => 'immagini',
'PERMISSION_I_APPROVE' => 'Può caricare immagini senza approvazione',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Numero di immagini caricate',
'PERMISSION_I_DELETE' => 'Può cancellare le sue immagini',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Può modificare le sue immagini',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Può bloccare immagini',
'PERMISSION_I_RATE' => 'Può votare immagini',
'PERMISSION_I_RATE_EXPLAIN' => 'Gli ospiti e le immagini caricate non possono mai votare le immagini.',
'PERMISSION_I_REPORT' => 'Può segnalare immagini',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Può caricare immagini illimitate',
'PERMISSION_I_UPLOAD' => 'Può caricare immagini',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Questa autorizzazione è anche usata per determinare se l’utente può spostare le immagini per l’album, quando dispone di autorizzazioni di moderatore in altri forum.',
'PERMISSION_I_VIEW' => 'Può vedere immagini',
'PERMISSION_I_WATERMARK' => 'Può vedere immagini con watermark',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderazione',
'PERMISSION_MISC' => 'Misti', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Può moderare commenti',
diff --git a/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
index 66fad00c..08dbe81b 100644
--- a/core/language/nl/gallery_acp.php
+++ b/core/language/nl/gallery_acp.php
@@ -238,31 +238,23 @@
'PERMISSION_A_UNLIMITED' => 'Ongelimiteerd aantal persoonlijke albums',
'PERMISSION_C' => 'Reacties',
'PERMISSION_C_DELETE' => 'Kan eigen reacties verwijderen',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Kan eigen reacties wijzigen',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Kan op afbeelding reageren',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Kan reacties lezen',
'PERMISSION_I' => 'Afbeeldingen',
'PERMISSION_I_APPROVE' => 'Kan uploaden zonder goedkeuring',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Aantal te uploaden afbeeldingen',
'PERMISSION_I_DELETE' => 'Kan eigen afbeeldingen verwijderen',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Kan eigen afbeldingen wijzigen',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'kan afbeldingen sluiten',
'PERMISSION_I_RATE' => 'Kan afbeeldingen beoordelen',
'PERMISSION_I_RATE_EXPLAIN' => 'Gasten en afbeeldingsuploaders kunnen NOOIT afbeeldingen beoordelen.',
'PERMISSION_I_REPORT' => 'kan afbeldingen melden',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Kan ongelimiteerd aantal afbeeldingen uploaden',
'PERMISSION_I_UPLOAD' => 'Kan afbeeldingen uploaden',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Deze permissie wordt ook gebruikt, om vast te stellen of een gebruiker afbeeldingen kan verplaatsen naar het album, wanneer deze moderator permissies heeft in andere forums.',
'PERMISSION_I_VIEW' => 'Kan afbeeldingen bekijken',
'PERMISSION_I_WATERMARK' => 'Kan afbeelding zonder watermerk bekijken',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Moderatie',
'PERMISSION_MISC' => 'Misc', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Kan reacties modereren',
diff --git a/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
index ceb76ca2..31ea91db 100644
--- a/core/language/ru/gallery_acp.php
+++ b/core/language/ru/gallery_acp.php
@@ -26,7 +26,7 @@
$lang = array_merge($lang, array(
'ACP_GALLERY_OVERVIEW' => 'Обзор',
- 'ACP_GALLERY_OVERVIEW_EXPLAIN' => '',
+ 'ACP_GALLERY_OVERVIEW_EXPLAIN' => 'Here are some statistics about your gallery.',
// File dirs states
'ACP_FILES_DIR_STATE' => './files/ state',
@@ -143,7 +143,7 @@
'DONT_COPY_PERMISSIONS' => 'Не копировать права доступа',
'EDIT_ALBUM' => 'Редактировать альбом',
'FAKE_THUMB_SIZE' => 'Размер миниатюр в списке альбомов',
- 'FAKE_THUMB_SIZE_EXP' => '',
+ 'FAKE_THUMB_SIZE_EXP' => 'If you want to keep the original size, remember 16 pixels for the black-info-line',
'GALLERY_ALBUMS_TITLE' => 'Управление альбомами',
'GALLERY_CONFIG' => 'Настройка галереи',
'GALLERY_CONFIG_EXPLAIN' => 'Здесь можно изменить основные параметры галереи.',
@@ -224,31 +224,23 @@
'PERMISSION_A_UNLIMITED' => 'Неограниченное количество вложенных личных альбомов',
'PERMISSION_C' => 'Комментарии',
'PERMISSION_C_DELETE' => 'Может удалять свои комментарии',
- 'PERMISSION_C_DELETE_EXPLAIN' => ' ',
'PERMISSION_C_EDIT' => 'Может редактировать свои комментарии',
- 'PERMISSION_C_EDIT_EXPLAIN' => ' ',
'PERMISSION_C_POST' => 'Может комментировать фото',
- 'PERMISSION_C_POST_EXPLAIN' => ' ',
'PERMISSION_C_READ' => 'Может читать комментарии',
'PERMISSION_I' => 'Фотографии',
'PERMISSION_I_APPROVE' => 'Может загружать без одобрения',
- 'PERMISSION_I_APPROVE_EXPLAIN' => ' ',
'PERMISSION_I_COUNT' => 'Количество загружаемых фото',
'PERMISSION_I_DELETE' => 'Может удалять свои фото',
- 'PERMISSION_I_DELETE_EXPLAIN' => ' ',
'PERMISSION_I_EDIT' => 'Может редактировать свои фото',
- 'PERMISSION_I_EDIT_EXPLAIN' => ' ',
'PERMISSION_I_LOCK' => 'Может закрывать фото',
'PERMISSION_I_RATE' => 'Может оценивать фото',
'PERMISSION_I_RATE_EXPLAIN' => 'Гости не могут оценивать фото.',
'PERMISSION_I_REPORT' => 'Может обжаловать фото',
- 'PERMISSION_I_REPORT_EXPLAIN' => ' ',
'PERMISSION_I_UNLIMITED' => 'Может загружать неограниченное количество фото',
'PERMISSION_I_UPLOAD' => 'Может загружать фото',
'PERMISSION_I_UPLOAD_EXPLAIN' => 'Это право также используется для определения, может ли пользователь перемещать фотографии в альбом, если у него имеются модераторские права в других форумах.',
'PERMISSION_I_VIEW' => 'Может просматривать фото',
'PERMISSION_I_WATERMARK' => 'Может просматривать фото без водяных знаков',
- 'PERMISSION_I_WATERMARK_EXPLAIN' => ' ',
'PERMISSION_M' => 'Модерация',
'PERMISSION_MISC' => 'Прочее', //Miscellaneous
'PERMISSION_M_COMMENTS' => 'Может модерировать комментарии',
@@ -269,7 +261,7 @@
'PEGA_ALREADY_EXISTS' => 'У пользователя %s уже есть личный альбом.',
'PGALLERIES_PER_PAGE' => 'Количество личных альбомов на странице',
'ITEMS_PER_PAGE' => 'Количество альбомов и фото на странице',
- 'ITEMS_PER_PAGE_EXP' => '',
+ 'ITEMS_PER_PAGE_EXP' => 'How many images/albums/comments per page',
'RANDOM_ON_INDEX' => 'Включить случайные фото',
'RANDOM_ON_INDEX_EXP' => 'Отображение случайных фотографий на главной странице галереи',
'RANDOM_ON_INDEX_COUNT' => 'Количество случайных фото',
From d824c4425bbfc7184e803619f0d707550fcd4f75 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 21:54:00 +0100
Subject: [PATCH 047/138] Fix permissions module
---
core/acp/permissions_module.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/acp/permissions_module.php b/core/acp/permissions_module.php
index 19c243b7..6359c9a7 100644
--- a/core/acp/permissions_module.php
+++ b/core/acp/permissions_module.php
@@ -631,9 +631,11 @@ private function permissions_p_mask()
));
foreach ($permission_values as $permission)
{
+ $key = 'PERMISSION_' . strtoupper($permission);
+ $key_explain = $key . '_EXPLAIN';
$template->assign_block_vars('c_mask.v_mask.category.mask', array(
- 'PERMISSION' => $this->language->lang('PERMISSION_' . strtoupper($permission)),
- 'PERMISSION_EXPLAIN' => ($this->language->lang('PERMISSION_' . strtoupper($permission) . '_EXPLAIN')) ? $this->language->lang('PERMISSION_' . strtoupper($permission) . '_EXPLAIN') : '',
+ 'PERMISSION' => $this->language->lang($key),
+ 'PERMISSION_EXPLAIN' => ($this->language->lang_raw($key_explain) !== $key_explain) ? $this->language->lang($key_explain) : '',
'S_FIELD_NAME' => 'setting[' . $p_system . '][' . $victim_row['victim_id'] . '][' . $permission . ']',
'S_NO' => ((isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_NO)) ? true : false),
'S_YES' => ((isset($roles[$role_id][$permission]) && ($roles[$role_id][$permission] == $phpbb_ext_gallery_core_auth::ACL_YES)) ? true : false),
From 659c7fd73e827a56b020b7d4a34cacb71b83ed89 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 22:32:34 +0100
Subject: [PATCH 048/138] Fix test
---
tests/controller/gallery_index_test.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
index 34cfe82d..2840f68a 100644
--- a/tests/controller/gallery_index_test.php
+++ b/tests/controller/gallery_index_test.php
@@ -172,7 +172,7 @@ public function test_controller_base_case_1()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => false,
+ 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
)
),
array(
@@ -463,7 +463,7 @@ public function test_controller_base_case_3()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => false,
+ 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
)
),
array(
@@ -636,7 +636,7 @@ public function test_controller_base_case_4()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => false,
+ 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
)
),
array(
From 027c534bc6d500a1a3f4ca8667b8e57550bd8e04 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 22:49:27 +0100
Subject: [PATCH 049/138] Fix test error
---
tests/controller/gallery_index_test.php | 6 +++---
tests/core/core_comment_test.php | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
index 2840f68a..e7bc94df 100644
--- a/tests/controller/gallery_index_test.php
+++ b/tests/controller/gallery_index_test.php
@@ -172,7 +172,7 @@ public function test_controller_base_case_1()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
+ 'ALPHABET_NAVIGATION' => 'A ','ALPHABET_NAVIGATION' => 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
)
),
array(
@@ -463,7 +463,7 @@ public function test_controller_base_case_3()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
+ 'ALPHABET_NAVIGATION' => 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
)
),
array(
@@ -636,7 +636,7 @@ public function test_controller_base_case_4()
'U_IMAGENAME_ACTION' => 'phpbbgallery_core_image',
'U_TIME' => false,
'U_UPLOADER' => false,
- 'ALPHABET_NAVIGATION' => assertStringContainsString('#'),
+ 'ALPHABET_NAVIGATION' => 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # '
)
),
array(
diff --git a/tests/core/core_comment_test.php b/tests/core/core_comment_test.php
index ece327fb..82750744 100644
--- a/tests/core/core_comment_test.php
+++ b/tests/core/core_comment_test.php
@@ -30,7 +30,7 @@ public function setUp(): void
];
$this->user->ip = '127.0.0.1';
- $this->db = $this->createMock(\phpbb\db\driver\driver_interface::class);
+ $this->db = $this->getMockForAbstractClass(\phpbb\db\driver\driver_interface::class);
$this->config = $this->createMock(\phpbbgallery\core\config::class);
$this->auth = $this->createMock(\phpbbgallery\core\auth\auth::class);
$this->block = $this->createMock(\phpbbgallery\core\block::class);
From 689a2df637fd8798ecf0565e4fcc82bdbfba97f2 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Mon, 28 Jul 2025 23:57:54 +0100
Subject: [PATCH 050/138] Fix test error
---
tests/core/core_comment_test.php | 47 ++++++++++++++------------------
1 file changed, 20 insertions(+), 27 deletions(-)
diff --git a/tests/core/core_comment_test.php b/tests/core/core_comment_test.php
index 82750744..8d645e88 100644
--- a/tests/core/core_comment_test.php
+++ b/tests/core/core_comment_test.php
@@ -157,35 +157,27 @@ public function test_sync_image_comments()
['image_id', $image_ids, $sql_in_set_image],
]));
- // The SELECT query for comments
- $this->db->expects($this->at(0))
+ // The SELECT query for comments
+ $this->db->expects($this->exactly(4))
->method('sql_query')
- ->with($this->stringContains('SELECT comment_image_id'));
+ ->withConsecutive(
+ [$this->stringContains('SELECT comment_image_id')],
+ [$this->matchesRegularExpression('/UPDATE\s+phpbb_gallery_images\s*SET\s*image_last_comment\s*=\s*0/i')],
+ [$this->matchesRegularExpression('/SET\s+image_last_comment\s*=\s*10\s*,\s*image_comments\s*=\s*3/i')],
+ [$this->matchesRegularExpression('/SET\s+image_last_comment\s*=\s*20\s*,\s*image_comments\s*=\s*2/i')]
+ );
// Simulate two rows returned, then false to end loop
- $this->db->expects($this->any())
- ->method('sql_fetchrow')
+ $this->db->method('sql_fetchrow')
->will($this->onConsecutiveCalls(
['comment_image_id' => 1, 'num_comments' => 3, 'last_comment' => 10],
['comment_image_id' => 2, 'num_comments' => 2, 'last_comment' => 20],
false
));
- $this->db->expects($this->once())->method('sql_freeresult');
-
- // The first UPDATE resets all
- $this->db->expects($this->at(1))
- ->method('sql_query')
- ->with($this->stringContains('UPDATE phpbb_gallery_images'));
-
- // The next two UPDATEs set the correct values for each image
- $this->db->expects($this->at(2))
- ->method('sql_query')
- ->with($this->stringContains('SET image_last_comment = 10,'));
-
- $this->db->expects($this->at(3))
- ->method('sql_query')
- ->with($this->stringContains('SET image_last_comment = 20,'));
+ // sql_freeresult called only once
+ $this->db->expects($this->once())
+ ->method('sql_freeresult');
// Act
$this->comment->sync_image_comments($image_ids);
@@ -193,6 +185,7 @@ public function test_sync_image_comments()
// Assert: No assertion needed, as expectations above will fail the test if not met
}
+
public function test_delete_comments()
{
$this->db->expects($this->atLeastOnce())
@@ -210,7 +203,8 @@ public function test_delete_comments()
false
);
- $this->db->expects($this->once())->method('sql_freeresult');
+ $this->db->expects($this->once())
+ ->method('sql_freeresult');
$this->config->expects($this->once())
->method('dec')
@@ -243,14 +237,13 @@ public function test_delete_images_with_reset_stats()
]));
// Expect DELETE FROM comments
- $this->db->expects($this->at(0))
- ->method('sql_query')
- ->with($this->stringContains('DELETE FROM phpbb_gallery_comments'));
-
// Expect UPDATE images table to reset stats
- $this->db->expects($this->at(1))
+ $this->db->expects($this->exactly(2))
->method('sql_query')
- ->with($this->stringContains('UPDATE phpbb_gallery_images'));
+ ->withConsecutive(
+ [$this->stringContains('DELETE FROM phpbb_gallery_comments')],
+ [$this->stringContains('UPDATE phpbb_gallery_images')]
+ );
// Act
$this->comment->delete_images($image_ids, true);
From cd3512f61aaac0dc3e2d1240c40fd348d71e5e1a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 29 Jul 2025 08:41:20 +0100
Subject: [PATCH 051/138] Fix tests yml
---
.github/workflows/tests.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index daf6104f..c59decca 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -256,7 +256,7 @@ jobs:
if: matrix.php == '7.3'
env:
DB: ${{steps.database-type.outputs.db}}
- run: sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/core\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/core\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpcleanup\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpcleanup\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpimport\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/acpimport\/language\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/exif\/migrations\/<\/directory>\n\t\t\t\t..\/ext\/phpbbgallery\/exif\/language\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml &> phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak; cp phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml
+ run: sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/core\/language\/<\/directory>\n\t\t\t\t..\/core\/migrations\/<\/directory>\n\t\t\t\t..\/acpcleanup\/migrations\/<\/directory>\n\t\t\t\t..\/acpcleanup\/language\/<\/directory>\n\t\t\t\t..\/acpimport\/migrations\/<\/directory>\n\t\t\t\t..\/acpimport\/language\/<\/directory>\n\t\t\t\t..\/exif\/migrations\/<\/directory>\n\t\t\t\t..\/exif\/language\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml &> phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak; cp phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml.bak phpBB/ext/"$EXTNAME"/.github/phpunit-$DB-github.xml
working-directory: ./phpBB3
- name: Run unit tests for 7.3 with clover
From 6a39f80e72281bf7d8bd228edd87cfa01b45f412 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Wed, 30 Jul 2025 19:55:42 +0100
Subject: [PATCH 052/138] Code improvements
---
core/comment.php | 1 +
core/image/image.php | 57 +++++++++++---------------------------------
2 files changed, 15 insertions(+), 43 deletions(-)
diff --git a/core/comment.php b/core/comment.php
index 668fc09c..ad094f78 100644
--- a/core/comment.php
+++ b/core/comment.php
@@ -175,6 +175,7 @@ public function sync_image_comments($image_ids = false)
GROUP BY comment_image_id, comment_id
ORDER BY comment_id DESC';
$result = $this->db->sql_query($sql);
+
while ($row = $this->db->sql_fetchrow($result))
{
$resync[$row['comment_image_id']] = array(
diff --git a/core/image/image.php b/core/image/image.php
index 8c1f7f5b..4826226f 100644
--- a/core/image/image.php
+++ b/core/image/image.php
@@ -158,7 +158,7 @@ public function get_new_author_info($username)
}
/**
- * Delete an image completly.
+ * Delete an image completely.
*
* @param array $images Array with the image_id(s)
* @param array $filenames Array with filenames for the image_ids. If a filename is missing it's queried from the database.
@@ -613,50 +613,19 @@ public function get_last_image()
return $row;
}
- public function assign_block($image_block_name, $image_data, $display_option = 0, $thumbanil_link = 'image_page', $imagename_link = 'image_page')
+ public function assign_block($image_block_name, $image_data, $display_option = 0, $thumbnail_link = 'image_page', $imagename_link = 'image_page')
{
// Now let's get display options
- $show_ip = $show_ratings = $show_username = $show_views = $show_time = $show_imagename = $show_comments = $show_album = false;
- if ($display_option >= self::IMAGE_SHOW_IP)
- {
- $show_ip = true;
- $display_option = $display_option - self::IMAGE_SHOW_IP;
- }
- if ($display_option >= self::IMAGE_SHOW_RATINGS)
- {
- $show_ratings = true;
- $display_option = $display_option - self::IMAGE_SHOW_RATINGS;
- }
- if ($display_option >= self::IMAGE_SHOW_USERNAME)
- {
- $show_username = true;
- $display_option = $display_option - self::IMAGE_SHOW_USERNAME;
- }
- if ($display_option >= self::IMAGE_SHOW_VIEWS)
- {
- $show_views = true;
- $display_option = $display_option - self::IMAGE_SHOW_VIEWS;
- }
- if ($display_option >= self::IMAGE_SHOW_TIME)
- {
- $show_time = true;
- $display_option = $display_option - self::IMAGE_SHOW_TIME;
- }
- if ($display_option >= self::IMAGE_SHOW_IMAGENAME)
- {
- $show_imagename = true;
- $display_option = $display_option - self::IMAGE_SHOW_IMAGENAME;
- }
- if ($display_option >= self::IMAGE_SHOW_COMMENTS)
- {
- $show_comments = true;
- $display_option = $display_option - self::IMAGE_SHOW_COMMENTS;
- }
- if ($display_option == self::IMAGE_SHOW_ALBUM)
- {
- $show_album = true;
- }
- switch ($thumbanil_link)
+ $show_ip = ($display_option & self::IMAGE_SHOW_IP) !== 0;
+ $show_ratings = ($display_option & self::IMAGE_SHOW_RATINGS) !== 0;
+ $show_username = ($display_option & self::IMAGE_SHOW_USERNAME) !== 0;
+ $show_views = ($display_option & self::IMAGE_SHOW_VIEWS) !== 0;
+ $show_time = ($display_option & self::IMAGE_SHOW_TIME) !== 0;
+ $show_imagename = ($display_option & self::IMAGE_SHOW_IMAGENAME) !== 0;
+ $show_comments = ($display_option & self::IMAGE_SHOW_COMMENTS) !== 0;
+ $show_album = ($display_option & self::IMAGE_SHOW_ALBUM) !== 0;
+
+ switch ($thumbnail_link)
{
case 'image_page':
$action = $this->helper->route('phpbbgallery_core_image', array('image_id' => (int) $image_data['image_id']));
@@ -668,6 +637,7 @@ public function assign_block($image_block_name, $image_data, $display_option = 0
$action = false;
break;
}
+
switch ($imagename_link)
{
case 'image_page':
@@ -680,6 +650,7 @@ public function assign_block($image_block_name, $image_data, $display_option = 0
$action_image = false;
break;
}
+
$this->template->assign_block_vars($image_block_name, array(
'IMAGE_ID' => $image_data['image_id'],
'U_IMAGE' => $show_imagename ? $action_image : false,
From f1593e8414ef885914eff7ef0312429559132c74 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 01:31:19 +0100
Subject: [PATCH 053/138] Fix typos
---
core/album/manage.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/album/manage.php b/core/album/manage.php
index cbc4493b..b6700363 100644
--- a/core/album/manage.php
+++ b/core/album/manage.php
@@ -997,10 +997,10 @@ public function delete_album_content($album_id)
// Adjust users image counts
if (!empty($image_counts))
{
- foreach ($image_counts as $image_user_id => $substract)
+ foreach ($image_counts as $image_user_id => $subtract)
{
$this->gallery_user->set_user_id($image_user_id);
- $this->gallery_user->update_images((0 - $substract));
+ $this->gallery_user->update_images((0 - $subtract));
}
}
@@ -1072,7 +1072,7 @@ public function move_album_by($album_row, $action = 'move_up', $steps = 1)
/**
* $left_id and $right_id define the scope of the nodes that are affected by the move.
- * $diff_up and $diff_down are the values to substract or add to each node's left_id
+ * $diff_up and $diff_down are the values to subtract or add to each node's left_id
* and right_id in order to move them up or down.
* $move_up_left and $move_up_right define the scope of the nodes that are moving
* up. Other nodes in the scope of ($left_id, $right_id) are considered to move down.
From 3056fabeb886142e049bfa544758784074032863 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 01:31:31 +0100
Subject: [PATCH 054/138] Refactor acp gallery logs module
Fix typo
Fix language acp
Fix typos
Fix error eslint
Fix missing lang
---
core/acp/gallery_logs_module.php | 146 ++++++++++++++++++-------------
core/acp/main_module.php | 2 +-
core/log.php | 6 +-
3 files changed, 89 insertions(+), 65 deletions(-)
diff --git a/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
index fe3a9641..8e29e9e7 100644
--- a/core/acp/gallery_logs_module.php
+++ b/core/acp/gallery_logs_module.php
@@ -3,7 +3,7 @@
*
* @package phpBB Gallery
* @version $Id$
-* @copyright (c) 2007 nickvergessen nickvergessen@gmx.de http://www.flying-bits.org
+* @copyright (c) 2025 Leinad4Mind https://leinad4mind.top/forum
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@@ -23,81 +23,103 @@ function main($id, $mode)
global $phpbb_container;
$this->language = $phpbb_container->get('language');
+ $this->language->add_lang(['info_acp_gallery_logs'], 'phpbbgallery/core');
- $this->language->add_lang(array('info_acp_gallery_logs'), 'phpbbgallery/core');
$this->tpl_name = 'gallery_logs';
add_form_key('acp_logs');
- $page = $request->variable('page', 0);
- $filter_log = $request->variable('lf', 'all');
- $sort_days = $request->variable('st', 0);
- $sort_key = $request->variable('sk', 't');
- $sort_dir = $request->variable('sd', 'd');
- $deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
- $marked = $request->variable('mark', array(0));
+
+ $page = $request->variable('page', 0);
+ $filter_log = $request->variable('lf', 'all');
+ $sort_days = $request->variable('st', 0);
+ $sort_key = $request->variable('sk', 't');
+ $sort_dir = $request->variable('sd', 'd');
+ $deletemark = $request->is_set_post('delmarked');
+ $marked = $request->variable('mark', []);
+
$log = $phpbb_container->get('phpbbgallery.core.log');
+ $valid_filters = ['all', 'admin', 'moderator', 'system'];
+ $valid_sort_keys = ['u', 't', 'i', 'o'];
+ $valid_sort_dirs = ['a', 'd'];
+
+ // Sanitize inputs
+ if (!in_array($filter_log, $valid_filters))
+ {
+ $filter_log = 'all';
+ }
+ if (!in_array($sort_key, $valid_sort_keys))
+ {
+ $sort_key = 't';
+ }
+ if (!in_array($sort_dir, $valid_sort_dirs))
+ {
+ $sort_dir = 'd';
+ }
+
// Delete entries if requested and able
- if (($deletemark) && $auth->acl_get('a_clearlogs'))
+ if ($deletemark && $auth->acl_get('a_clearlogs') && !empty($marked))
{
+ if (!check_form_key('acp_logs'))
+ {
+ trigger_error($this->language->lang('FORM_INVALID'));
+ }
+
if (confirm_box(true))
{
$log->delete_logs($marked);
}
else
{
- confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields(array(
+ confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields([
'page' => $page,
'delmarked' => $deletemark,
'mark' => $marked,
- 'st' => $sort_days,
- 'sk' => $sort_key,
- 'sd' => $sort_dir,
+ 'st' => $sort_days,
+ 'sk' => $sort_key,
+ 'sd' => $sort_dir,
'i' => $id,
'mode' => $mode,
- 'action' => $this->u_action,
- )));
+ 'action' => $this->u_action,
+ ]));
}
}
+
switch ($mode)
{
case 'main':
- switch ($filter_log)
- {
- case 'all':
- $title = 'ACP_GALLERY_LOGS';
- $template->assign_vars(array(
- 'L_TITLE' => $this->language->lang('ACP_GALLERY_LOGS'),
- 'L_EXPLAIN' => '',
- 'S_SELECT_OPTION' => 'all'
- ));
- break;
- case 'admin':
- $title = 'ACP_LOG_GALLERY_ADM';
- $template->assign_vars(array(
- 'L_TITLE' => $this->language->lang('ACP_LOG_GALLERY_ADM'),
- 'L_EXPLAIN' => $this->language->lang('ACP_LOG_GALLERY_ADM_EXP'),
- 'S_SELECT_OPTION' => 'admin'
- ));
- break;
- case 'moderator':
- $title = 'ACP_LOG_GALLERY_MOD';
- $template->assign_vars(array(
- 'L_TITLE' => $this->language->lang('ACP_LOG_GALLERY_MOD'),
- 'L_EXPLAIN' => $this->language->lang('ACP_LOG_GALLERY_MOD_EXP'),
- 'S_SELECT_OPTION' => 'moderator'
- ));
- break;
- case 'system':
- $title = 'ACP_LOG_GALLERY_SYSTEM';
- $template->assign_vars(array(
- 'L_TITLE' => $this->language->lang('ACP_LOG_GALLERY_SYSTEM'),
- 'L_EXPLAIN' => $this->language->lang('ACP_LOG_GALLERY_SYSTEM_EXP'),
- 'S_SELECT_OPTION' => 'system'
- ));
- break;
- }
- $limit_days = array(0 => $this->language->lang('ALL_ENTRIES'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
- $sort_by_text = array('u' => $this->language->lang('SORT_USER_ID'), 't' => $this->language->lang('SORT_DATE'), 'i' => $this->language->lang('SORT_IP'), 'o' => $this->language->lang('SORT_ACTION'));
+ // Template vars based on filter
+ $log_titles = [
+ 'all' => ['ACP_GALLERY_LOGS', ''],
+ 'admin' => ['ACP_LOG_GALLERY_ADM', 'ACP_LOG_GALLERY_ADM_EXP'],
+ 'moderator'=> ['ACP_LOG_GALLERY_MOD', 'ACP_LOG_GALLERY_MOD_EXP'],
+ 'system' => ['ACP_LOG_GALLERY_SYSTEM', 'ACP_LOG_GALLERY_SYSTEM_EXP'],
+ ];
+ $title = $log_titles[$filter_log][0];
+
+ $template->assign_vars([
+ 'L_TITLE' => $this->language->lang($log_titles[$filter_log][0]),
+ 'L_EXPLAIN' => $log_titles[$filter_log][1] ? $this->language->lang($log_titles[$filter_log][1]) : '',
+ 'S_SELECT_OPTION' => $filter_log,
+ ]);
+
+ // Sorting
+ $limit_days = [
+ 0 => $this->language->lang('ALL_ENTRIES'),
+ 1 => $this->language->lang('1_DAY'),
+ 7 => $this->language->lang('7_DAYS'),
+ 14 => $this->language->lang('2_WEEKS'),
+ 30 => $this->language->lang('1_MONTH'),
+ 90 => $this->language->lang('3_MONTHS'),
+ 180 => $this->language->lang('6_MONTHS'),
+ 365 => $this->language->lang('1_YEAR'),
+ ];
+ $sort_by_text = [
+ 'u' => $this->language->lang('SORT_USER_ID'),
+ 't' => $this->language->lang('SORT_DATE'),
+ 'i' => $this->language->lang('SORT_IP'),
+ 'o' => $this->language->lang('SORT_ACTION'),
+ ];
+
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
@@ -109,26 +131,28 @@ function main($id, $mode)
'U_ACTION' => $this->u_action . "&$u_sort_param&page=$page",
));
$this->page_title = $this->language->lang($title);
- // Let's build some additional parameters for the log
- $additional = array();
+
+ // Build additional filters
+ $additional = [];
if ($sort_days > 0)
{
$additional['sort_days'] = $sort_days;
}
- if ($sort_key != 't')
+ if ($sort_key !== 't')
{
$additional['sort_key'] = $sort_key;
}
- if ($sort_dir != 'd')
+ if ($sort_dir !== 'd')
{
$additional['sort_dir'] = $sort_dir;
}
- $log->build_list($filter_log, 25, ($page/25) + 1, -1, 0, $additional);
- break;
+
+ // Build list
+ $log->build_list($filter_log, 25, (int) ($page / 25) + 1, -1, 0, $additional);
+ break;
default:
- trigger_error('NO_MODE', E_USER_ERROR);
- break;
+ trigger_error('NO_MODE', E_USER_ERROR);
}
}
}
diff --git a/core/acp/main_module.php b/core/acp/main_module.php
index d11098b7..fccd95a7 100644
--- a/core/acp/main_module.php
+++ b/core/acp/main_module.php
@@ -528,7 +528,7 @@ function overview()
/* Resync stats as per server
* Time: 0.271s
* Queries: 1087
- * Peak Memmoty usage: 8.62MB
+ * Peak Memory usage: 8.62MB
*/
if (isset($resync_albums_to_cpf_stage))
{
diff --git a/core/log.php b/core/log.php
index e8c25bac..697c296f 100644
--- a/core/log.php
+++ b/core/log.php
@@ -81,9 +81,9 @@ public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $
* Add item to log
*
* @param string $log_type type of action (user/mod/admin/system) max 16 chars
- * @param string $log_action action we are loging (add/remove/approve/unaprove/delete) max 32 chars
+ * @param string $log_action action we are logging (add/remove/approve/unapproved/delete) max 32 chars
* @param int $album
- * @param int $image Image we are loging for (can be 0)
+ * @param int $image Image we are logging for (can be 0)
* @param array|string $description Description string
*/
public function add_log($log_type, $log_action, $album = 0, $image = 0, $description = array())
@@ -152,7 +152,7 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
{
$sql_where[] = "l.log_type = '" . $this->db->sql_escape($type) . "'";
}
- // If album is -1 we are calling it from ACP so ... prority!
+ // If album is -1 we are calling it from ACP so ... priority!
// If album is 0 we are calling it from moderator log, so we need album we can access
$mod_array = $this->gallery_auth->acl_album_ids('m_status');
// Patch for missing album
From f3a68818eb8005d34cfb8f10033ef97ca4b70bbe Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 02:50:33 +0100
Subject: [PATCH 055/138] Fix pagination properly
---
core/acp/gallery_logs_module.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
index 8e29e9e7..f860e428 100644
--- a/core/acp/gallery_logs_module.php
+++ b/core/acp/gallery_logs_module.php
@@ -148,7 +148,7 @@ function main($id, $mode)
}
// Build list
- $log->build_list($filter_log, 25, (int) ($page / 25) + 1, -1, 0, $additional);
+ $log->build_list($filter_log, 25, $page + 1, -1, 0, $additional);
break;
default:
From bc0a3f8d7bd5e4e4b12a788704c2e613b9526076 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 02:56:36 +0100
Subject: [PATCH 056/138] Fix count
this was suming the log ids numbers x'D
---
core/acp/gallery_logs_module.php | 2 +-
core/log.php | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
index f860e428..6e54ae03 100644
--- a/core/acp/gallery_logs_module.php
+++ b/core/acp/gallery_logs_module.php
@@ -148,7 +148,7 @@ function main($id, $mode)
}
// Build list
- $log->build_list($filter_log, 25, $page + 1, -1, 0, $additional);
+ $log->build_list($filter_log, 25, (int) $page + 1, -1, 0, $additional);
break;
default:
diff --git a/core/log.php b/core/log.php
index 697c296f..a7134f60 100644
--- a/core/log.php
+++ b/core/log.php
@@ -210,8 +210,9 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
$sql_array['ORDER_BY'] = 'l.log_time ' . (isset($additional['sort_dir']) ? 'ASC' : 'DESC');
$sql_array['GROUP_BY'] = 'l.log_time, l.log_id, i.image_id';
}
+
// So we need count - so define SELECT
- $sql_array['SELECT'] = 'SUM(l.log_id) as count';
+ $sql_array['SELECT'] = 'COUNT(l.log_id) as count';
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query($sql);
$row = $this->db->sql_fetchrow($result);
From 1691e1f8266aa1212995cb72e94ad99a1ea29adb Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 08:43:35 +0100
Subject: [PATCH 057/138] build acp list according item per page
---
core/acp/gallery_logs_module.php | 2 +-
core/log.php | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/acp/gallery_logs_module.php b/core/acp/gallery_logs_module.php
index 6e54ae03..d75d90f4 100644
--- a/core/acp/gallery_logs_module.php
+++ b/core/acp/gallery_logs_module.php
@@ -148,7 +148,7 @@ function main($id, $mode)
}
// Build list
- $log->build_list($filter_log, 25, (int) $page + 1, -1, 0, $additional);
+ $log->build_list($filter_log, 0, (int) $page + 1, -1, 0, $additional);
break;
default:
diff --git a/core/log.php b/core/log.php
index a7134f60..7e89b4aa 100644
--- a/core/log.php
+++ b/core/log.php
@@ -127,13 +127,13 @@ public function delete_logs($mark)
* @param array $additional
* @internal param int $start start count used to build paging
*/
- public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0, $additional = array())
+ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0, $additional = [])
{
if ($limit == 0)
{
$limit = $this->gallery_config->get('items_per_page');
}
- $this->language->add_lang(array('info_acp_gallery_logs'), 'phpbbgallery/core');
+ $this->language->add_lang(['info_acp_gallery_logs'], 'phpbbgallery/core');
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
$sql_array = array(
@@ -147,7 +147,7 @@ public function build_list($type, $limit = 0, $page = 1, $album = 0, $image = 0,
)
)
);
- $sql_where = array();
+ $sql_where = [];
if ($type != 'all')
{
$sql_where[] = "l.log_type = '" . $this->db->sql_escape($type) . "'";
From cadd0ab93ef89affc387f6a22832587781b3f36f Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 08:45:43 +0100
Subject: [PATCH 058/138] refactor moderate controller
---
core/controller/moderate.php | 41 ++++++++++++++++--------------------
1 file changed, 18 insertions(+), 23 deletions(-)
diff --git a/core/controller/moderate.php b/core/controller/moderate.php
index 4a4a12ab..496f0c07 100644
--- a/core/controller/moderate.php
+++ b/core/controller/moderate.php
@@ -330,7 +330,7 @@ public function action_log($page, $album_id)
/**
* Index Controller
- * Route: gallery/modarate/reports
+ * Route: gallery/moderate/reports
*
* @param $page
* @param $album_id
@@ -425,56 +425,51 @@ public function album_overview($album_id, $page)
{
if (confirm_box(true) || $moving_target)
{
+ $message = '';
switch ($action)
{
case 'approve':
$this->image->approve_images($actions_array, $album_id);
$this->album->update_info($album_id);
-
$message = $this->language->lang('WAITING_APPROVED_IMAGE', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
+
case 'unapprove':
$this->image->unapprove_images($actions_array, $album_id);
$this->album->update_info($album_id);
-
$message = $this->language->lang('WAITING_UNAPPROVED_IMAGE', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
+
case 'lock':
$this->image->lock_images($actions_array, $album_id);
$this->album->update_info($album_id);
-
$message = $this->language->lang('WAITING_LOCKED_IMAGE', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
+
case 'delete':
$this->moderate->delete_images($actions_array);
$this->album->update_info($album_id);
-
$message = $this->language->lang('DELETED_IMAGES', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
+
case 'move':
$this->image->move_image($actions_array, $moving_target);
$this->album->update_info($album_id);
$this->album->update_info($moving_target);
-
$message = $this->language->lang('MOVED_IMAGES', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
+
case 'report':
$this->report->close_reports_by_image($actions_array);
$message = $this->language->lang('WAITING_REPORTED_DONE', count($actions_array));
- $this->url->meta_refresh(3, $back_link);
- trigger_error($message);
break;
}
+
+ if (!empty($message))
+ {
+ $this->url->meta_refresh(3, $back_link);
+ trigger_error($message);
+ }
}
else
{
@@ -536,7 +531,7 @@ public function album_overview($album_id, $page)
/**
* Index Controller
- * Route: gallery/modarate/image/{image_id}
+ * Route: gallery/moderate/image/{image_id}
*
* @param $image_id
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
@@ -687,7 +682,7 @@ public function image($image_id)
/**
* Index Controller
- * Route: gallery/modarate/image/{image_id}/approve
+ * Route: gallery/moderate/image/{image_id}/approve
*
* @param $image_id
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
@@ -754,7 +749,7 @@ public function approve($image_id)
/**
* Index Controller
- * Route: gallery/modarate/image/{image_id}/unapprove
+ * Route: gallery/moderate/image/{image_id}/unapprove
*
* @param $image_id
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
@@ -794,7 +789,7 @@ public function unapprove($image_id)
/**
* Index Controller
- * Route: gallery/modarate/image/{image_id}/move
+ * Route: gallery/moderate/image/{image_id}/move
*
* @param $image_id
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
@@ -842,7 +837,7 @@ public function move($image_id): \Symfony\Component\HttpFoundation\Response
/**
* Index Controller
- * Route: gallery/modarate/image/{image_id}/lock
+ * Route: gallery/moderate/image/{image_id}/lock
*
* @param $image_id
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
From c108aa9fc4fcfd346b59ffd01367df84081c0b00 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 09:18:12 +0100
Subject: [PATCH 059/138] Fix all typos
---
tests/controller/gallery_index_test.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php
index b3e0b481..bedd5e78 100644
--- a/tests/controller/gallery_index_test.php
+++ b/tests/controller/gallery_index_test.php
@@ -149,6 +149,7 @@ public function test_controller_base_case_1()
'U_VIEW_FORUM' => 'phpbbgallery_core_index',
))
);
+
$this->template->expects($this->exactly(6))
->method('assign_vars')
->withConsecutive(
From 0acc32ab9d8cc5ea49047ac09a53b2aaeadc4f32 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 12:59:08 +0100
Subject: [PATCH 060/138] Extra improvements
---
core/controller/search.php | 8 ++++----
core/file/file.php | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/core/controller/search.php b/core/controller/search.php
index 71ac3493..a5408d98 100644
--- a/core/controller/search.php
+++ b/core/controller/search.php
@@ -440,7 +440,7 @@ public function recent($page)
));
$limit = $this->gallery_config->get('items_per_page');
- $start = ($page - 1) * $this->gallery_config->get('items_per_page');
+ $start = ($page - 1) * $limit;
$image_counter = $this->gallery_search->recent_count();
$this->gallery_search->recent($limit, $start);
@@ -482,7 +482,7 @@ public function recent_comments($page)
));
$limit = $this->gallery_config->get('items_per_page');
- $start = ($page - 1) * $this->gallery_config->get('items_per_page');
+ $start = ($page - 1) * $limit;
$this->gallery_search->recent_comments($limit, $start);
@@ -523,7 +523,7 @@ public function ego_search($page)
));
$limit = $this->gallery_config->get('items_per_page');
- $start = ($page - 1) * $this->gallery_config->get('items_per_page');
+ $start = ($page - 1) * $limit;
$this->gallery_search->recent($limit, $start, $this->user->data['user_id']);
@@ -564,7 +564,7 @@ public function toprated($page)
));
$limit = $this->gallery_config->get('items_per_page');
- $start = ($page - 1) * $this->gallery_config->get('items_per_page');
+ $start = ($page - 1) * $limit;
$this->gallery_search->rating($limit, $start);
diff --git a/core/file/file.php b/core/file/file.php
index 33763775..a14ed1ac 100644
--- a/core/file/file.php
+++ b/core/file/file.php
@@ -170,22 +170,22 @@ public function read_image($force_filesize = false)
switch (utf8_substr(strtolower($this->image_source), -4))
{
case '.png':
- $this->image = imagecreatefrompng($this->image_source);
+ $this->image_type = 'png';
+ $this->image = @imagecreatefrompng($this->image_source);
imagealphablending($this->image, true); // Set alpha blending on ...
imagesavealpha($this->image, true); // ... and save alphablending!
- $this->image_type = 'png';
break;
case '.webp':
- $this->image = imagecreatefromwebp($this->image_source);
$this->image_type = 'webp';
+ $this->image = imagecreatefromwebp($this->image_source);
break;
case '.gif':
- $this->image = imagecreatefromgif($this->image_source);
$this->image_type = 'gif';
+ $this->image = imagecreatefromgif($this->image_source);
break;
default:
- $this->image = imagecreatefromjpeg($this->image_source);
$this->image_type = 'jpeg';
+ $this->image = imagecreatefromjpeg($this->image_source);
break;
}
From d1a58c1fb70c98a17b9c737eea0a023e77ebe32b Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 13:12:27 +0100
Subject: [PATCH 061/138] Fix image controller
Using orphan variable instead of hardcoded number on sql
Add if the user doesnt have moderator permission for specific album then doesn't show the image.
---
core/controller/image.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index 3e78be52..41547604 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -260,6 +260,7 @@ public function base($image_id, $page = 0)
$album_data = $this->loader->get($album_id);
$this->check_permissions($album_id, $album_data['album_user_id'], $this->data['image_status'], $album_data['album_auth_access']);
$this->display->generate_navigation($album_data);
+ $image_status_check = !$this->gallery_auth->acl_check('m_status', $album_id, $album_data['album_user_id']) ? ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED : '';
if (!$this->user->data['is_bot'] && isset($this->user->data['session_page']) && (strpos($this->user->data['session_page'], '&image_id=' . $image_id) === false || isset($this->user->data['session_created'])))
{
$sql = 'UPDATE ' . $this->table_images . '
@@ -349,11 +350,11 @@ public function base($image_id, $page = 0)
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_sort_order .= $sql_help_sort;
- // Let's see if there is prieveus image
+ // Let's see if there is previous image
$sql = 'SELECT *
FROM ' . $this->table_images . '
- WHERE image_album_id = ' . (int) $album_id . "
- AND image_status <> 3
+ WHERE image_album_id = ' . (int) $album_id . $image_status_check . "
+ AND image_status <> " . (int) \phpbbgallery\core\block::STATUS_ORPHAN . "
ORDER BY $sql_sort_order" . $sql_help_sort;
$result = $this->db->sql_query($sql);
$images_array = array();
From f52f9ea6ef08a22a22299f7217e71807132b436f Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 16:29:13 +0100
Subject: [PATCH 062/138] Fix meta refresh on approval
---
core/controller/moderate.php | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/core/controller/moderate.php b/core/controller/moderate.php
index 496f0c07..4f563427 100644
--- a/core/controller/moderate.php
+++ b/core/controller/moderate.php
@@ -723,12 +723,8 @@ public function approve($image_id)
// So we need to see if there are still unapproved images in the album
$this->notification_helper->read('approval', $album_data['album_id']);
$message = $this->language->lang('WAITING_APPROVED_IMAGE', 1);
- //meta_refresh($meta_refresh_time, $image_backlink);
- $this->template->assign_vars(array(
- 'INFORMATION' => $message
- ));
- return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY'));
- //trigger_error($message);
+ meta_refresh($meta_refresh_time, $image_backlink);
+ trigger_error($message);
}
else
{
From 4169c75265cad6056ac3cc22e845454734af15b8 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 16:30:32 +0100
Subject: [PATCH 063/138] Improve code
---
core/controller/moderate.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/controller/moderate.php b/core/controller/moderate.php
index 4f563427..c420c47d 100644
--- a/core/controller/moderate.php
+++ b/core/controller/moderate.php
@@ -701,13 +701,13 @@ public function approve($image_id)
{
$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
}
- $action_ary = $this->request->variable('action', array('' => 0));
+ $action_ary = $this->request->variable('action', []);
$action_ary = array_keys($action_ary);
- $action = $action_ary[0] ?? 'approve';
+ $action = isset($action_ary[0]) ? $action_ary[0] : 'approve';
- if ($action == 'disapprove')
+ if ($action === 'disapprove')
{
- $redirect = new RedirectResponse($this->helper->route('phpbbgallery_core_image_delete', array('image_id' => $image_id)));
+ $redirect = new RedirectResponse($this->helper->route('phpbbgallery_core_image_delete', ['image_id' => $image_id]));
$redirect->send();
}
$show_notify = true;
From 22aa9b884916e576584135c99f4a63c3185adcb2 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 31 Jul 2025 17:07:44 +0100
Subject: [PATCH 064/138] New feature: Poster can see unapproved images
---
core/controller/album.php | 11 ++++++-
core/controller/file.php | 6 +++-
core/controller/image.php | 29 +++++++++++++------
core/image/image.php | 13 +++++++--
core/language/bg/gallery.php | 1 +
core/language/de/gallery.php | 1 +
core/language/en/gallery.php | 1 +
core/language/es/gallery.php | 1 +
core/language/fr/gallery.php | 1 +
core/language/it/gallery.php | 1 +
core/language/nl/gallery.php | 1 +
core/language/ru/gallery.php | 1 +
.../template/gallery/imageblock_polaroid.html | 7 ++++-
.../template/gallery/viewimage_body.html | 10 +++++++
core/styles/prosilver/theme/gallery.css | 16 ++++++++++
15 files changed, 86 insertions(+), 14 deletions(-)
diff --git a/core/controller/album.php b/core/controller/album.php
index 06cf9b90..081ad2d8 100644
--- a/core/controller/album.php
+++ b/core/controller/album.php
@@ -242,11 +242,20 @@ protected function display_images($album_id, $album_data, $start, $limit)
$image_status_check = ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED;
$image_counter = $album_data['album_images'];
- if ($this->auth->acl_check('m_status', $album_id, $album_data['album_user_id']))
+
+ $user_id = $this->user->data['user_id'];
+ $album_owner_id = $album_data['album_user_id'];
+
+ if ($this->auth->acl_check('m_status', $album_id, $album_owner_id))
{
$image_status_check = '';
$image_counter = $album_data['album_images_real'];
}
+ else if ($user_id == $album_owner_id)
+ {
+ $image_status_check = " AND (image_status <> " . \phpbbgallery\core\block::STATUS_UNAPPROVED . " OR image_user_id = $user_id)";
+ $image_counter = $album_data['album_images_real'];
+ }
if (in_array($sort_key, array('r', 'ra')))
{
diff --git a/core/controller/file.php b/core/controller/file.php
index 8783f038..af46551b 100644
--- a/core/controller/file.php
+++ b/core/controller/file.php
@@ -287,7 +287,11 @@ public function check_auth()
$this->data['image_filemissing'] = 0;
$this->data['album_watermark'] = 0;
}
- if ((!$this->auth->acl_check('i_view', $this->data['album_id'], $this->data['album_user_id'])) || (!$this->auth->acl_check('m_status', $this->data['album_id'], $this->data['album_user_id']) && ($this->data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED)))
+ if (!$this->auth->acl_check('i_view', $this->data['album_id'], $this->data['album_user_id']) || (
+ !$this->auth->acl_check('m_status', $this->data['album_id'], $this->data['album_user_id'])
+ && $this->data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED
+ && $this->data['image_user_id'] != $this->user->data['user_id']
+ ))
{
// Missing permissions
// trigger_error('NOT_AUTHORISED');
diff --git a/core/controller/image.php b/core/controller/image.php
index 41547604..e96d6493 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -258,9 +258,19 @@ public function base($image_id, $page = 0)
$album_id = (int) $this->data['image_album_id'];
$album_data = $this->loader->get($album_id);
- $this->check_permissions($album_id, $album_data['album_user_id'], $this->data['image_status'], $album_data['album_auth_access']);
+ $this->check_permissions($album_id, $album_data['album_user_id'], $this->data['image_status'], $album_data['album_auth_access'], $this->data);
$this->display->generate_navigation($album_data);
- $image_status_check = !$this->gallery_auth->acl_check('m_status', $album_id, $album_data['album_user_id']) ? ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED : '';
+
+ if ($this->gallery_auth->acl_check('m_status', $album_id, $album_data['album_user_id']))
+ {
+ $image_status_check = '';
+ }
+ else
+ {
+ $user_id = (int) $this->user->data['user_id'];
+ $image_status_check = ' AND (image_status = ' . \phpbbgallery\core\block::STATUS_APPROVED . ' OR image_user_id = ' . $user_id . ')';
+ }
+
if (!$this->user->data['is_bot'] && isset($this->user->data['session_page']) && (strpos($this->user->data['session_page'], '&image_id=' . $image_id) === false || isset($this->user->data['session_created'])))
{
$sql = 'UPDATE ' . $this->table_images . '
@@ -353,9 +363,10 @@ public function base($image_id, $page = 0)
// Let's see if there is previous image
$sql = 'SELECT *
FROM ' . $this->table_images . '
- WHERE image_album_id = ' . (int) $album_id . $image_status_check . "
- AND image_status <> " . (int) \phpbbgallery\core\block::STATUS_ORPHAN . "
- ORDER BY $sql_sort_order" . $sql_help_sort;
+ WHERE image_album_id = ' . (int) $album_id . '
+ AND image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . '
+ ' . $image_status_check . '
+ ORDER BY ' . $sql_sort_order . $sql_help_sort;
$result = $this->db->sql_query($sql);
$images_array = array();
while ($row = $this->db->sql_fetchrow($result))
@@ -1195,7 +1206,7 @@ public function report($image_id)
* @param $album_auth_level
* @internal param array $album_data
*/
- protected function check_permissions($album_id, $owner_id, $image_status, $album_auth_level)
+ protected function check_permissions($album_id, $owner_id, $image_status, $album_auth_level, $user_data)
{
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
$zebra_array = $this->gallery_auth->get_user_zebra($this->user->data['user_id']);
@@ -1216,13 +1227,13 @@ protected function check_permissions($album_id, $owner_id, $image_status, $album
else
{
//return $this->error('NOT_AUTHORISED', 403);
- redirect('/gallery/album/' . $album_id);
+ redirect('gallery/album/' . $album_id);
}
}
- if (!$this->gallery_auth->acl_check('m_status', $album_id, $owner_id) && ($image_status == \phpbbgallery\core\block::STATUS_UNAPPROVED))
+ if (!$this->gallery_auth->acl_check('m_status', $album_id, $owner_id) && $user_data['image_user_id'] != $this->user->data['user_id'] && ($image_status == \phpbbgallery\core\block::STATUS_UNAPPROVED))
{
//return $this->error('NOT_AUTHORISED', 403);
- redirect('/gallery/album/' . $album_id);
+ redirect('gallery/album/' . $album_id);
}
}
diff --git a/core/image/image.php b/core/image/image.php
index 4826226f..75941be9 100644
--- a/core/image/image.php
+++ b/core/image/image.php
@@ -602,8 +602,17 @@ public function get_last_image()
$sql = 'SELECT *
FROM ' . $this->table_images . '
WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . '
- AND ((' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('i_view'), false, true) . ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
- OR ' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('m_status'), false, true) . ') AND ' . $this->db->sql_in_set('image_album_id', $public, true, true) . '
+ AND (
+ (
+ ' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('i_view'), false, true) . '
+ AND (
+ image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . '
+ OR image_user_id = ' . (int) $this->user->data['user_id'] . '
+ )
+ )
+ OR ' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('m_status'), false, true) . '
+ )
+ AND ' . $this->db->sql_in_set('image_album_id', $public, true, true) . '
ORDER BY ' . $sql_order;
$result = $this->db->sql_query_limit($sql, $sql_limit);
diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php
index 0e863d7a..ee889fd1 100644
--- a/core/language/bg/gallery.php
+++ b/core/language/bg/gallery.php
@@ -150,6 +150,7 @@
'IMAGE_LOCKED' => 'Съжаляваме, но това изображение е заключено. Вече не можете да го коментирате.',
'IMAGE_NAME' => 'Име на изображение',
'IMAGE_NOT_EXIST' => 'Това изображение не съществува.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% от всички изображения',
'IMAGE_STATUS' => 'Статус',
'IMAGE_URL' => 'Image-URL',
diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php
index 36f8e2bf..e910351a 100644
--- a/core/language/de/gallery.php
+++ b/core/language/de/gallery.php
@@ -151,6 +151,7 @@
'IMAGE_LOCKED' => 'Entschuldigung, aber dieses Bild wurde gesperrt. Du kannst für dieses Bild keine Kommentare mehr abgeben.',
'IMAGE_NAME' => 'Bildname',
'IMAGE_NOT_EXIST' => 'Dieses Bild existiert nicht',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% aller Bilder',
'IMAGE_STATUS' => 'Status',
'IMAGE_URL' => 'Bildlink',
diff --git a/core/language/en/gallery.php b/core/language/en/gallery.php
index 3eab3177..a644f09b 100644
--- a/core/language/en/gallery.php
+++ b/core/language/en/gallery.php
@@ -150,6 +150,7 @@
'IMAGE_LOCKED' => 'Sorry, this image is locked. You cannot post comments for this image anymore.',
'IMAGE_NAME' => 'Imagename',
'IMAGE_NOT_EXIST' => 'This image does not exist.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% of all images',
'IMAGE_STATUS' => 'Status',
'IMAGE_URL' => 'Image-URL',
diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php
index 7f7936f7..efaf61e8 100644
--- a/core/language/es/gallery.php
+++ b/core/language/es/gallery.php
@@ -150,6 +150,7 @@
'IMAGE_LOCKED' => 'Lo siento, esta imagen está bloqueada. No puedes publicar más comentarios para esta imagen. ',
'IMAGE_NAME' => 'Nombre de imagen',
'IMAGE_NOT_EXIST' => 'Esta imagen no existe.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% de todas las imágenes',
'IMAGE_STATUS' => 'Estado',
'IMAGE_URL' => 'Imagen-URL',
diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php
index ae7d3323..58f208b6 100644
--- a/core/language/fr/gallery.php
+++ b/core/language/fr/gallery.php
@@ -165,6 +165,7 @@
'IMAGE_LOCKED' => 'Désolé, cette image est verrouillée. Vous ne pouvez pas publier de commentaires sur cette image.',
'IMAGE_NAME' => 'Nom de l’image',
'IMAGE_NOT_EXIST' => 'Cette image n’existe pas.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% de toutes les images',
'IMAGE_STATUS' => 'Statut',
'IMAGE_URL' => 'Lien',
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index 80642df4..78b70ab6 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -150,6 +150,7 @@
'IMAGE_LOCKED' => 'Spiacente, quest’immagine è bloccata. Non si può più commentare quest’immagine.',
'IMAGE_NAME' => 'Nome immagine',
'IMAGE_NOT_EXIST' => 'Quest’immagine non esiste.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% di tutte le immagini',
'IMAGE_STATUS' => 'Stato',
'IMAGE_URL' => 'URL-Immagine',
diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php
index 102f16ff..9417ee5e 100644
--- a/core/language/nl/gallery.php
+++ b/core/language/nl/gallery.php
@@ -151,6 +151,7 @@
'IMAGE_LOCKED' => 'Sorry, deze afbeelding is gesloten. Je kan geen reacties meer plaatsen op deze afbeelding.',
'IMAGE_NAME' => 'Afbeeldingsnaam',
'IMAGE_NOT_EXIST' => 'Deze afbeelding bestaat niet.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% van alle afbeeldingen',
'IMAGE_STATUS' => 'Status',
'IMAGE_URL' => 'Afbeeldingslink',
diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php
index 3522bc9f..ef19ef94 100644
--- a/core/language/ru/gallery.php
+++ b/core/language/ru/gallery.php
@@ -142,6 +142,7 @@
'IMAGE_LOCKED' => 'Фото блокировано. Вы не можете оставлять к нему комментарии.',
'IMAGE_NAME' => 'Название',
'IMAGE_NOT_EXIST' => 'Фото не найдено.',
+ 'IMAGE_NOT_APPROVED' => 'For approval',
'IMAGE_PCT' => '%.2f%% всех фотографий',
'IMAGE_STATUS' => 'Статус',
'IMAGE_URL' => 'Ссылка на фото',
diff --git a/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
index e76dce70..c637aaad 100644
--- a/core/styles/prosilver/template/gallery/imageblock_polaroid.html
+++ b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
@@ -17,10 +17,15 @@
+
+ {L_IMAGE_NOT_APPROVED}
+
+
+
-
diff --git a/acpcleanup/composer.json b/acpcleanup/composer.json
index 1681fd05..77a74cd9 100644
--- a/acpcleanup/composer.json
+++ b/acpcleanup/composer.json
@@ -26,12 +26,12 @@
}
],
"require": {
- "php": ">=5.3"
+ "php": ">=7.2",
},
"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": {
diff --git a/acpcleanup/config/services.yml b/acpcleanup/config/services.yml
index 0ef56a9a..87af9f19 100644
--- a/acpcleanup/config/services.yml
+++ b/acpcleanup/config/services.yml
@@ -1,6 +1,6 @@
parameters:
- tables.phpbbgallery.albums: '%core.table_prefix%gallery_albums'
- tables.phpbbgallery.images: '%core.table_prefix%gallery_images'
+ phpbbgallery.acpcleanup.tables.albums: '%core.table_prefix%gallery_albums'
+ phpbbgallery.acpcleanup.tables.images: '%core.table_prefix%gallery_images'
services:
phpbbgallery.acpcleanup.cleanup:
@@ -16,5 +16,5 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.moderate'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
\ No newline at end of file
+ - '%phpbbgallery.acpcleanup.tables.albums%'
+ - '%phpbbgallery.acpcleanup.tables.images%'
\ No newline at end of file
diff --git a/acpcleanup/ext.php b/acpcleanup/ext.php
index be21c251..403aa47e 100644
--- a/acpcleanup/ext.php
+++ b/acpcleanup/ext.php
@@ -1,11 +1,53 @@
container->get('ext.manager');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
+
+ 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);
+ }
+}
\ No newline at end of file
diff --git a/acpcleanup/language/bg/index.htm b/acpcleanup/language/bg/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
index ff8f2fcb..7170615d 100644
--- a/acpcleanup/language/bg/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
@@ -17,10 +17,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' => 'Тук можете да изтриете малко останки.',
@@ -74,4 +74,7 @@
'MOVE_TO_USER' => 'Премести при потребител',
'MOVE_TO_USER_EXP' => 'Изображенията и коментарите ще бъдат преместеи като такива на посочения потребител. Ако не посочите потребител - Гост е зададен по-подразбиране',
'CLEAN_USER_NOT_FOUND' => 'Желаният от вас потребител не е открит!',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpcleanup/language/de/index.htm b/acpcleanup/language/de/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
index db903f2e..e2efa666 100644
--- a/acpcleanup/language/de/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/de/info_acp_gallery_cleanup.php
@@ -18,10 +18,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.',
@@ -76,4 +76,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' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpcleanup/language/en/index.htm b/acpcleanup/language/en/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/en/info_acp_gallery_cleanup.php b/acpcleanup/language/en/info_acp_gallery_cleanup.php
index f401cabf..d263470f 100644
--- a/acpcleanup/language/en/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/en/info_acp_gallery_cleanup.php
@@ -17,10 +17,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.',
@@ -75,4 +75,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.',
+]);
diff --git a/acpcleanup/language/fr/index.htm b/acpcleanup/language/fr/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/fr/info_acp_gallery_cleanup.php b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
index 4eb85df5..5d4124a2 100644
--- a/acpcleanup/language/fr/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
@@ -18,10 +18,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.',
@@ -76,4 +76,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' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpcleanup/language/it/index.htm b/acpcleanup/language/it/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
index 3ad5024d..e86a9ebf 100644
--- a/acpcleanup/language/it/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/it/info_acp_gallery_cleanup.php
@@ -17,10 +17,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.',
@@ -75,4 +75,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' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpcleanup/language/ru/index.htm b/acpcleanup/language/ru/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
index 841e8ff1..9fb37a80 100644
--- a/acpcleanup/language/ru/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
@@ -18,10 +18,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' => 'Здесь вы можете удалить некоторые остатки.',
@@ -76,4 +76,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.',
+]);
diff --git a/acpcleanup/migrations/m1_init.php b/acpcleanup/migrations/m1_init.php
index 6910ebfa..ea4dc7f2 100644
--- a/acpcleanup/migrations/m1_init.php
+++ b/acpcleanup/migrations/m1_init.php
@@ -2,7 +2,7 @@
/**
*
* @package phpBB Gallery ACP Cleanup
-* @copyright (c) 2014 satanasov
+* @copyright (c) 2014 satanasov | 2025 Leinad4Mind
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -13,23 +13,23 @@ class m1_init extends \phpbb\db\migration\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',
+ ]
+ ]],
+ ];
}
}
From 80465b29970427bbacbe641b5e74c060c3b3bae0 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 21:42:44 +0100
Subject: [PATCH 086/138] Improve ACP Import
---
acpimport/acp/main_info.php | 38 +++--
acpimport/adm/style/gallery_acpimport.html | 11 --
acpimport/adm/style/index.htm | 0
acpimport/composer.json | 4 +-
acpimport/ext.php | 52 ++++++-
acpimport/language/bg/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/language/de/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/language/en/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/language/fr/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/language/it/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/language/ru/index.htm | 0
...import.php => info_acp_gallery_import.php} | 9 +-
acpimport/migrations/m1_init.php | 131 ++++++++++++------
18 files changed, 193 insertions(+), 97 deletions(-)
create mode 100644 acpimport/adm/style/index.htm
create mode 100644 acpimport/language/bg/index.htm
rename acpimport/language/bg/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (91%)
create mode 100644 acpimport/language/de/index.htm
rename acpimport/language/de/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (89%)
create mode 100644 acpimport/language/en/index.htm
rename acpimport/language/en/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (87%)
create mode 100644 acpimport/language/fr/index.htm
rename acpimport/language/fr/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (89%)
create mode 100644 acpimport/language/it/index.htm
rename acpimport/language/it/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (88%)
create mode 100644 acpimport/language/ru/index.htm
rename acpimport/language/ru/{info_acp_gallery_acpimport.php => info_acp_gallery_import.php} (92%)
diff --git a/acpimport/acp/main_info.php b/acpimport/acp/main_info.php
index da3055ae..07d86352 100644
--- a/acpimport/acp/main_info.php
+++ b/acpimport/acp/main_info.php
@@ -2,28 +2,36 @@
/**
*
* @package phpBB Gallery - ACP Import Extension
-* @copyright (c) 2012 nickvergessen - http://www.flying-bits.org/
+* @copyright (c) 2012 nickvergessen | 2025 Leinad4Mind
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbbgallery\acpimport\acp;
+/**
+ * ACP Module Info class for Gallery Import
+ */
class main_info
{
- function module()
+ /**
+ * Returns module information
+ *
+ * @return array Module configuration
+ */
+ public function module(): array
{
- return array(
- 'filename' => 'main_module',
- 'title' => 'PHPBB_GALLERY',
- 'version' => '1.0.0',
- 'modes' => array(
- 'import_images' => array(
- 'title' => 'ACP_IMPORT_ALBUMS',
- 'auth' => 'acl_a_gallery_import && ext_phpbbgallery/acpimport',
- 'cat' => array('PHPBB_GALLERY')
- ),
- ),
- );
+ return [
+ 'filename' => '\phpbbgallery\acpimport\acp\main_module',
+ 'title' => 'PHPBB_GALLERY',
+ 'version' => '1.2.2',
+ 'modes' => [
+ 'import_images' => [
+ 'title' => 'ACP_IMPORT_ALBUMS',
+ 'auth' => 'ext_phpbbgallery/acpimport && acl_a_gallery_import',
+ 'cat' => ['PHPBB_GALLERY'],
+ ],
+ ],
+ ];
}
-}
+}
\ No newline at end of file
diff --git a/acpimport/adm/style/gallery_acpimport.html b/acpimport/adm/style/gallery_acpimport.html
index 8577b566..f6459629 100644
--- a/acpimport/adm/style/gallery_acpimport.html
+++ b/acpimport/adm/style/gallery_acpimport.html
@@ -47,15 +47,4 @@ {ACP_GALLERY_TITLE}
-
diff --git a/acpimport/adm/style/index.htm b/acpimport/adm/style/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/composer.json b/acpimport/composer.json
index e4a452a2..74e160a4 100644
--- a/acpimport/composer.json
+++ b/acpimport/composer.json
@@ -26,12 +26,12 @@
}
],
"require": {
- "php": ">=5.3"
+ "php": ">=7.2"
},
"extra": {
"display-name": "phpBB Gallery Add-on: ACP Import",
"soft-require": {
- "phpbb/phpbb": ">=3.1.0-RC2,<3.3.0@dev"
+ "phpbb/phpbb": ">=3.2.0,<4.0.0@dev"
}
},
"version-check": {
diff --git a/acpimport/ext.php b/acpimport/ext.php
index 52a0f408..d5a55f57 100644
--- a/acpimport/ext.php
+++ b/acpimport/ext.php
@@ -1,11 +1,53 @@
container->get('ext.manager');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
+
+ 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/acpimport', 'info_acp_gallery_import');
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
+ $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
+ );
+ }
+
+ return parent::enable_step($old_state);
+ }
+}
\ No newline at end of file
diff --git a/acpimport/language/bg/index.htm b/acpimport/language/bg/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/bg/info_acp_gallery_acpimport.php b/acpimport/language/bg/info_acp_gallery_import.php
similarity index 91%
rename from acpimport/language/bg/info_acp_gallery_acpimport.php
rename to acpimport/language/bg/info_acp_gallery_import.php
index 685887ae..f48c21c5 100644
--- a/acpimport/language/bg/info_acp_gallery_acpimport.php
+++ b/acpimport/language/bg/info_acp_gallery_import.php
@@ -17,10 +17,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Вкарване на изображения',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Тук можете да вкарате голямо количество изображения от файловата система. Преди да вкарате изображенията, моля оразмерете ги на ръка.',
@@ -39,4 +39,7 @@
'MISSING_IMPORT_SCHEMA' => 'Избраната таблица за вкарване (%s) не може да бъде открита.',
'NO_FILE_SELECTED' => 'Трябва да изберете поне един фаил.',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/language/de/index.htm b/acpimport/language/de/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/de/info_acp_gallery_acpimport.php b/acpimport/language/de/info_acp_gallery_import.php
similarity index 89%
rename from acpimport/language/de/info_acp_gallery_acpimport.php
rename to acpimport/language/de/info_acp_gallery_import.php
index d3d23e47..3ec63566 100644
--- a/acpimport/language/de/info_acp_gallery_acpimport.php
+++ b/acpimport/language/de/info_acp_gallery_import.php
@@ -18,10 +18,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Neue Bilder importieren',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Hier kannst Du die Anzahl von Bilder eingeben, die importiert werden sollen. Bevor Du die Bilder importierst, ändere die Größe von Hand mit einer Bildbearbeitungssoftware.',
@@ -40,4 +40,7 @@
'MISSING_IMPORT_SCHEMA' => 'Das Import-Schema (%s) konnte nicht gefunden werden.',
'NO_FILE_SELECTED' => 'Du musst mindestens eine Datei auswählen.',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/language/en/index.htm b/acpimport/language/en/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/en/info_acp_gallery_acpimport.php b/acpimport/language/en/info_acp_gallery_import.php
similarity index 87%
rename from acpimport/language/en/info_acp_gallery_acpimport.php
rename to acpimport/language/en/info_acp_gallery_import.php
index 0f8da1ff..105e24cd 100644
--- a/acpimport/language/en/info_acp_gallery_acpimport.php
+++ b/acpimport/language/en/info_acp_gallery_import.php
@@ -17,10 +17,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Import Images',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Here you can bulk import images from the file system. Before importing images, please be sure to resize them by hand.',
@@ -39,4 +39,7 @@
'MISSING_IMPORT_SCHEMA' => 'The specified import-schema (%s) could not be found.',
'NO_FILE_SELECTED' => 'You need to select at least one file.',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/language/fr/index.htm b/acpimport/language/fr/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/fr/info_acp_gallery_acpimport.php b/acpimport/language/fr/info_acp_gallery_import.php
similarity index 89%
rename from acpimport/language/fr/info_acp_gallery_acpimport.php
rename to acpimport/language/fr/info_acp_gallery_import.php
index c0b14b3f..9c27c5ad 100644
--- a/acpimport/language/fr/info_acp_gallery_acpimport.php
+++ b/acpimport/language/fr/info_acp_gallery_import.php
@@ -18,10 +18,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Importer des images',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Vous pouvez importer ici des images à partir du système de fichier. Avant d’importer des images, n’oubliez pas de les redimensionner manuellement.',
@@ -40,4 +40,7 @@
'MISSING_IMPORT_SCHEMA' => 'Le schéma d’importation spécifié (%s) n’a pas pu être trouvé.',
'NO_FILE_SELECTED' => 'Vous devez sélectionner au moins un fichier.',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/language/it/index.htm b/acpimport/language/it/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/it/info_acp_gallery_acpimport.php b/acpimport/language/it/info_acp_gallery_import.php
similarity index 88%
rename from acpimport/language/it/info_acp_gallery_acpimport.php
rename to acpimport/language/it/info_acp_gallery_import.php
index 8872ef27..56388234 100644
--- a/acpimport/language/it/info_acp_gallery_acpimport.php
+++ b/acpimport/language/it/info_acp_gallery_import.php
@@ -17,10 +17,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Importa Immagini',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Da qui puoi importare in massa immagini dal file system. Prima di importare le immagini assicurati di ridimensionarle manualmente.',
@@ -39,4 +39,7 @@
'MISSING_IMPORT_SCHEMA' => 'Lo schema di importazione specificato (%s) non e\' stato trovato.',
'NO_FILE_SELECTED' => 'Devi selezionare almeno un file.',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/language/ru/index.htm b/acpimport/language/ru/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/acpimport/language/ru/info_acp_gallery_acpimport.php b/acpimport/language/ru/info_acp_gallery_import.php
similarity index 92%
rename from acpimport/language/ru/info_acp_gallery_acpimport.php
rename to acpimport/language/ru/info_acp_gallery_import.php
index 2eb0170f..4b9084ae 100644
--- a/acpimport/language/ru/info_acp_gallery_acpimport.php
+++ b/acpimport/language/ru/info_acp_gallery_import.php
@@ -18,10 +18,10 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'ACP_IMPORT_ALBUMS' => 'Импорт новых изображений',
'ACP_IMPORT_ALBUMS_EXPLAIN' => 'Здесь вы можете ввести количество изображений, которые будут импортированы. Перед тем, как импортировать изображения, измените размер вручную, используя программное обеспечение для редактирования изображений',
@@ -40,4 +40,7 @@
'MISSING_IMPORT_SCHEMA' => 'Схема импорта (%s) не могла быть найдена',
'NO_FILE_SELECTED' => 'Вы должны выбрать минимум один файл',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
index a83c174c..88919a6b 100644
--- a/acpimport/migrations/m1_init.php
+++ b/acpimport/migrations/m1_init.php
@@ -1,80 +1,119 @@
'\phpbbgallery\acpimport\acp\main_module',
- 'module_langname' => 'ACP_IMPORT_ALBUMS',
- 'module_mode' => 'import_images',
- 'module_auth' => 'ext_phpbbgallery/acpimport && acl_a_gallery_import',
- )
- )),
- array('custom', array(array(&$this, 'create_file_system'))),
- );
+ return [
+ ['permission.add', ['a_gallery_import', true, 'a_board']],
+ ['module.add', [
+ 'acp',
+ 'PHPBB_GALLERY',
+ [
+ 'module_basename' => '\phpbbgallery\acpimport\acp\main_module',
+ 'module_langname' => 'ACP_IMPORT_ALBUMS',
+ 'module_mode' => 'import_images',
+ 'module_auth' => 'ext_phpbbgallery/acpimport && acl_a_gallery_import',
+ ]
+ ]],
+ ['custom', [[&$this, 'create_file_system']]],
+ ];
}
- public function create_file_system()
+ /**
+ * Create import directory
+ *
+ * @return void
+ */
+ public function create_file_system(): void
{
global $phpbb_root_path;
$phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
- if (is_writable($phpbb_root_path . 'files'))
- {
- @mkdir($phpbbgallery_core_file_import, 0755, true);
+ if (!is_dir($phpbbgallery_core_file_import)) {
+ if (is_writable($phpbb_root_path . 'files'))
+ {
+ @mkdir($phpbbgallery_core_file_import, 0755, true);
+ }
}
}
- public function remove_file_system()
+ /**
+ * Remove import directory
+ *
+ * @return void
+ */
+ public function remove_file_system(): void
{
global $phpbb_root_path;
$phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
// Clean dirs
- $this->recursiveRemoveDirectory($phpbbgallery_core_file_import);
+ if (is_dir($phpbbgallery_core_file_import)) {
+ $this->recursiveRemoveDirectory($phpbbgallery_core_file_import);
+ }
}
- function recursiveRemoveDirectory($directory)
+
+ /**
+ * Recursively remove a directory
+ *
+ * @param string $directory Directory path
+ * @return void
+ */
+ private function recursiveRemoveDirectory(string $directory): void
{
- foreach (glob("{$directory}/*") as $file)
- {
- if (is_dir($file))
- {
- recursiveRemoveDirectory($file);
- }
- else
- {
- unlink($file);
- }
+ if (!is_dir($directory)) {
+ return;
+ }
+
+ $files = new \FilesystemIterator($directory);
+ foreach ($files as $file) {
+ if ($file->isDir()) {
+ $this->recursiveRemoveDirectory($file->getPathname());
+ } else {
+ @unlink($file->getPathname());
+ }
}
- rmdir($directory);
+ @rmdir($directory);
}
}
From 7c501bc64d1ba3d8d89d6ce1d93429888dc93459 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:12:33 +0100
Subject: [PATCH 087/138] Improve Exif
---
exif/composer.json | 4 +-
exif/event/exif_listener.php | 6 +-
exif/exif.php | 2 +-
exif/ext.php | 52 +++++++++++++--
exif/language/bg/{exif.php => info_exif.php} | 9 ++-
exif/language/de/index.htm | 0
exif/language/de/{exif.php => info_exif.php} | 9 ++-
exif/language/en/{exif.php => info_exif.php} | 9 ++-
exif/language/fr/index.htm | 0
exif/language/fr/{exif.php => info_exif.php} | 9 ++-
exif/language/it/{exif.php => info_exif.php} | 9 ++-
exif/language/ru/index.htm | 0
exif/language/ru/{exif.php => info_exif.php} | 9 ++-
exif/migrations/m1_init.php | 67 ++++++++++----------
tests/functional/phpbbgallery_alpha_test.php | 6 +-
tests/functional/phpbbgallery_delta_test.php | 2 +-
16 files changed, 128 insertions(+), 65 deletions(-)
rename exif/language/bg/{exif.php => info_exif.php} (94%)
create mode 100644 exif/language/de/index.htm
rename exif/language/de/{exif.php => info_exif.php} (95%)
rename exif/language/en/{exif.php => info_exif.php} (94%)
create mode 100644 exif/language/fr/index.htm
rename exif/language/fr/{exif.php => info_exif.php} (95%)
rename exif/language/it/{exif.php => info_exif.php} (95%)
create mode 100644 exif/language/ru/index.htm
rename exif/language/ru/{exif.php => info_exif.php} (96%)
diff --git a/exif/composer.json b/exif/composer.json
index 5a0884c4..22dd62e1 100644
--- a/exif/composer.json
+++ b/exif/composer.json
@@ -26,12 +26,12 @@
}
],
"require": {
- "php": ">=5.3"
+ "php": ">=7.2"
},
"extra": {
"display-name": "phpBB Gallery Add-on: Exif",
"soft-require": {
- "phpbb/phpbb": ">=3.1.0-RC2,<3.3.0@dev"
+ "phpbb/phpbb": ">=3.2.0,<4.0.0@dev"
}
},
"version-check": {
diff --git a/exif/event/exif_listener.php b/exif/event/exif_listener.php
index 2f177bf2..e4e5e20b 100644
--- a/exif/event/exif_listener.php
+++ b/exif/event/exif_listener.php
@@ -78,7 +78,7 @@ public function acp_config_get_display_vars($event)
$return_ary = $event['return_ary'];
if (isset($return_ary['vars']['IMAGE_SETTINGS']))
{
- $this->user->add_lang_ext('phpbbgallery/exif', 'exif');
+ $this->user->add_lang_ext('phpbbgallery/exif', 'info_exif');
$return_ary['vars']['IMAGE_SETTINGS']['disp_exifdata'] = array('lang' => 'DISP_EXIF_DATA', 'validate' => 'bool', 'type' => 'radio:yes_no');
$event['return_ary'] = $return_ary;
@@ -141,7 +141,7 @@ public function posting_edit_before_rotate($event)
public function ucp_set_settings_nosubmit()
{
global $template, $phpbb_ext_gallery;
- $this->user->add_lang_ext('phpbbgallery/exif', 'exif');
+ $this->user->add_lang_ext('phpbbgallery/exif', 'info_exif');
$template->assign_vars(array(
'S_VIEWEXIFS' => $this->gallery_user->get_data('user_viewexif'),
@@ -233,7 +233,7 @@ public function user_validate_data($event)
public function viewimage($event)
{
- $this->user->add_lang_ext('phpbbgallery/exif', 'exif');
+ $this->user->add_lang_ext('phpbbgallery/exif', 'info_exif');
// To do (test contests)
if ($this->gallery_config->get('disp_exifdata') && ($event['image_data']['image_has_exif'] != \phpbbgallery\exif\exif::UNAVAILABLE) && (substr($event['image_data']['image_filename'], -4) == '.jpg') && function_exists('exif_read_data') /*&& ($this->gallery_auth->acl_check('m_status', $event['image_data']['image_album_id'], $event['album_data']['album_user_id']) || ($event['image_data']['image_contest'] != phpbb_ext_gallery_core_image::IN_CONTEST))*/)
diff --git a/exif/exif.php b/exif/exif.php
index b057f1f1..3353b46a 100644
--- a/exif/exif.php
+++ b/exif/exif.php
@@ -171,7 +171,7 @@ private function prepare_data()
{
global $user;
- $user->add_lang_ext('phpbbgallery/exif', 'exif');
+ $user->add_lang_ext('phpbbgallery/exif', 'info_exif');
$this->prepared_data = array();
if (isset($this->data["EXIF"]["DateTimeOriginal"]))
diff --git a/exif/ext.php b/exif/ext.php
index 25825bad..f4261e1b 100644
--- a/exif/ext.php
+++ b/exif/ext.php
@@ -1,11 +1,53 @@
container->get('ext.manager');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/exif', 'info_exif');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
+
+ 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/exif', 'info_exif');
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
+ $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
+ );
+ }
+
+ return parent::enable_step($old_state);
+ }
+}
\ No newline at end of file
diff --git a/exif/language/bg/exif.php b/exif/language/bg/info_exif.php
similarity index 94%
rename from exif/language/bg/exif.php
rename to exif/language/bg/info_exif.php
index 41ea7b34..5f690135 100644
--- a/exif/language/bg/exif.php
+++ b/exif/language/bg/info_exif.php
@@ -18,13 +18,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'Exif Data',
'EXIF_APERTURE' => 'F-number',
'EXIF_CAM_MODEL' => 'Camera-model',
@@ -92,4 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'This feature can not be used at the moment, as the need function “exif_read_data“ is not included in your PHP Installation.',
'SHOW_EXIF' => 'show/hide',
'VIEWEXIFS_DEFAULT' => 'View Exif-Data by default',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/language/de/index.htm b/exif/language/de/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/exif/language/de/exif.php b/exif/language/de/info_exif.php
similarity index 95%
rename from exif/language/de/exif.php
rename to exif/language/de/info_exif.php
index 0c52d339..22de1b8c 100644
--- a/exif/language/de/exif.php
+++ b/exif/language/de/info_exif.php
@@ -19,13 +19,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'EXIF-Daten',
'EXIF_APERTURE' => 'Blende',
'EXIF_CAM_MODEL' => 'Kamera-Modell',
@@ -93,4 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Diese Funktion kann im Moment nicht verwendet werden, da die Funktion “exif_read_data“ nicht in Deiner PHP-Installation enthalten ist.',
'SHOW_EXIF' => 'ein-/ausblenden',
'VIEWEXIFS_DEFAULT' => 'Ansicht Exif-Daten standardmäßig',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/language/en/exif.php b/exif/language/en/info_exif.php
similarity index 94%
rename from exif/language/en/exif.php
rename to exif/language/en/info_exif.php
index 41ea7b34..5f690135 100644
--- a/exif/language/en/exif.php
+++ b/exif/language/en/info_exif.php
@@ -18,13 +18,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'Exif Data',
'EXIF_APERTURE' => 'F-number',
'EXIF_CAM_MODEL' => 'Camera-model',
@@ -92,4 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'This feature can not be used at the moment, as the need function “exif_read_data“ is not included in your PHP Installation.',
'SHOW_EXIF' => 'show/hide',
'VIEWEXIFS_DEFAULT' => 'View Exif-Data by default',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/language/fr/index.htm b/exif/language/fr/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/exif/language/fr/exif.php b/exif/language/fr/info_exif.php
similarity index 95%
rename from exif/language/fr/exif.php
rename to exif/language/fr/info_exif.php
index 9fbf07d9..6a30fef8 100644
--- a/exif/language/fr/exif.php
+++ b/exif/language/fr/info_exif.php
@@ -19,13 +19,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'Informations des images',
'EXIF_APERTURE' => 'Nombre-F',
'EXIF_CAM_MODEL' => 'Modèle d’appareil photo',
@@ -93,4 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Cette fonctionnalité ne peut pas être utilisée pour le moment, car la fonction « exif_read_data » n’est pas incluse dans l’installation de votre PHP.',
'SHOW_EXIF' => 'Afficher/Cacher',
'VIEWEXIFS_DEFAULT' => 'Voir les informations des images par défaut',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/language/it/exif.php b/exif/language/it/info_exif.php
similarity index 95%
rename from exif/language/it/exif.php
rename to exif/language/it/info_exif.php
index 430f56ee..27c13e91 100644
--- a/exif/language/it/exif.php
+++ b/exif/language/it/info_exif.php
@@ -18,13 +18,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'Dati Exif',
'EXIF_APERTURE' => 'F-number',
'EXIF_CAM_MODEL' => 'Modello Camera',
@@ -92,4 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'Questa caratteristica non puo\' essere utilizzatal momento, dato che la funzione “exif_read_data“ non e\' inclusa nella tua installazione di PHP.',
'SHOW_EXIF' => 'mostra/nascondi',
'VIEWEXIFS_DEFAULT' => 'Visualizza Dati-Exif in modo predefinito',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/language/ru/index.htm b/exif/language/ru/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/exif/language/ru/exif.php b/exif/language/ru/info_exif.php
similarity index 96%
rename from exif/language/ru/exif.php
rename to exif/language/ru/info_exif.php
index b96bc524..f15cf9b4 100644
--- a/exif/language/ru/exif.php
+++ b/exif/language/ru/info_exif.php
@@ -19,13 +19,13 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
/**
* Language for Exif data
*/
-$lang = array_merge($lang, array(
+$lang = array_merge($lang, [
'EXIF_DATA' => 'EXIF-Данные',
'EXIF_APERTURE' => 'Диафрагма',
'EXIF_CAM_MODEL' => 'Модель камеры',
@@ -93,4 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Эта функция не может использоваться на данный момент, т.к. функция "exif_read_data" не входит в установке PHP',
'SHOW_EXIF' => 'Показать / Скрыть',
'VIEWEXIFS_DEFAULT' => 'Просмотр EXIF-Данных по умолчанию',
-));
+
+ 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+]);
diff --git a/exif/migrations/m1_init.php b/exif/migrations/m1_init.php
index 83ddf5bc..d3a5d893 100644
--- a/exif/migrations/m1_init.php
+++ b/exif/migrations/m1_init.php
@@ -2,54 +2,57 @@
/**
*
* @package phpBB Gallery EXIF
-* @copyright (c) 2014 satanasov
+* @copyright (c) 2014 satanasov | 2025 Leinad4Mind
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbbgallery\exif\migrations;
-class m1_init extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class m1_init extends migration
{
- static public function depends_on()
+ public static function depends_on(): array
{
- return array('\phpbbgallery\core\migrations\release_1_2_0');
+ return ['\phpbbgallery\core\migrations\release_1_2_0'];
}
- public function update_data()
+ public function update_data(): array
{
- return array(
- // add config
- array('config.add', array('phpbb_gallery_disp_exifdata', 1))
- );
+ return [
+ ['config.add', ['phpbb_gallery_disp_exifdata', 1]],
+ ];
}
- //lets create the needed table
- public function update_schema()
+
+ // Let's create the needed table
+ public function update_schema(): array
{
- return array(
- 'add_columns' => array(
- $this->table_prefix . 'gallery_images' => array(
- 'image_has_exif' => array('UINT:3', 2),
- 'image_exif_data' => array('TEXT', ''),
- ),
- $this->table_prefix . 'gallery_users' => array(
- 'user_viewexif' => array('UINT:1', 0),
- ),
- ),
- );
+ return [
+ 'add_columns' => [
+ $this->table_prefix . 'gallery_images' => [
+ 'image_has_exif' => ['UINT:3', 2],
+ 'image_exif_data' => ['TEXT', ''],
+ ],
+ $this->table_prefix . 'gallery_users' => [
+ 'user_viewexif' => ['UINT:1', 0],
+ ],
+ ],
+ ];
}
- public function revert_schema()
+
+ public function revert_schema(): array
{
- return array(
- 'drop_columns' => array(
- $this->table_prefix . 'gallery_images' => array(
+ return [
+ 'drop_columns' => [
+ $this->table_prefix . 'gallery_images' => [
'image_has_exif',
- 'image_exif_data'
- ),
- $this->table_prefix . 'gallery_users' => array(
+ 'image_exif_data',
+ ],
+ $this->table_prefix . 'gallery_users' => [
'user_viewexif',
- ),
- ),
- );
+ ],
+ ],
+ ];
}
}
diff --git a/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php
index 64a901bd..f62106fa 100644
--- a/tests/functional/phpbbgallery_alpha_test.php
+++ b/tests/functional/phpbbgallery_alpha_test.php
@@ -91,7 +91,7 @@ public function test_install($ext, $lang, $path, $search)
$this->logout();
}
// Stop core so we can test if all works with all add-ons off
- public function togle_data()
+ public function toggle_data()
{
return array(
'core' => array('phpbbgallery/core'),
@@ -101,9 +101,9 @@ public function togle_data()
);
}
/**
- * @dataProvider togle_data
+ * @dataProvider toggle_data
*/
- public function togle_core($ext)
+ public function toggle_core($ext)
{
$this->get_db();
if (strpos($this->db->get_sql_layer(), 'sqlite3') === 0)
diff --git a/tests/functional/phpbbgallery_delta_test.php b/tests/functional/phpbbgallery_delta_test.php
index 0668955b..a0e27b8f 100644
--- a/tests/functional/phpbbgallery_delta_test.php
+++ b/tests/functional/phpbbgallery_delta_test.php
@@ -256,7 +256,7 @@ public function test_exif($image, $state)
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/exif', 'exif');
+ $this->add_lang_ext('phpbbgallery/exif', 'info_exif');
$this->set_option('disp_exifdata', $state);
if ($image == 'first')
From 876be87c49dbff790c5411b230024467bc515409 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:13:43 +0100
Subject: [PATCH 088/138] Improve Core
---
core/language/bg/gallery.php | 2 +-
core/language/bg/gallery_acp.php | 2 +-
core/language/bg/gallery_mcp.php | 2 +-
core/language/bg/gallery_notifications.php | 2 +-
core/language/bg/gallery_ucp.php | 2 +-
core/language/bg/info_acp_gallery.php | 2 +-
core/language/bg/info_acp_gallery_logs.php | 2 +-
core/language/bg/info_ucp_gallery.php | 2 +-
core/language/bg/install_gallery.php | 2 +-
core/language/bg/permissions_gallery.php | 2 +-
core/language/de/gallery.php | 2 +-
core/language/de/gallery_acp.php | 2 +-
core/language/de/gallery_mcp.php | 2 +-
core/language/de/gallery_notifications.php | 2 +-
core/language/de/gallery_ucp.php | 2 +-
core/language/de/info_acp_gallery.php | 2 +-
core/language/de/info_acp_gallery_logs.php | 2 +-
core/language/de/info_ucp_gallery.php | 2 +-
core/language/de/install_gallery.php | 2 +-
core/language/de/permissions_gallery.php | 2 +-
core/language/en/gallery.php | 2 +-
core/language/en/gallery_acp.php | 2 +-
core/language/en/gallery_mcp.php | 2 +-
core/language/en/gallery_notifications.php | 2 +-
core/language/en/gallery_ucp.php | 2 +-
core/language/en/info_acp_gallery.php | 2 +-
core/language/en/info_acp_gallery_logs.php | 2 +-
core/language/en/info_ucp_gallery.php | 2 +-
core/language/en/install_gallery.php | 2 +-
core/language/en/permissions_gallery.php | 2 +-
core/language/es/gallery.php | 2 +-
core/language/es/gallery_acp.php | 2 +-
core/language/es/gallery_mcp.php | 2 +-
core/language/es/gallery_notifications.php | 2 +-
core/language/es/gallery_ucp.php | 2 +-
core/language/es/info_acp_gallery.php | 2 +-
core/language/es/info_acp_gallery_logs.php | 2 +-
core/language/es/info_ucp_gallery.php | 2 +-
core/language/es/install_gallery.php | 2 +-
core/language/es/permissions_gallery.php | 2 +-
core/language/fr/gallery.php | 2 +-
core/language/fr/gallery_acp.php | 2 +-
core/language/fr/gallery_mcp.php | 2 +-
core/language/fr/gallery_notifications.php | 2 +-
core/language/fr/gallery_ucp.php | 2 +-
core/language/fr/info_acp_gallery.php | 2 +-
core/language/fr/info_acp_gallery_logs.php | 2 +-
core/language/fr/info_ucp_gallery.php | 2 +-
core/language/fr/install_gallery.php | 2 +-
core/language/fr/permissions_gallery.php | 2 +-
core/language/it/gallery.php | 2 +-
core/language/it/gallery_acp.php | 2 +-
core/language/it/gallery_mcp.php | 2 +-
core/language/it/gallery_notifications.php | 2 +-
core/language/it/gallery_ucp.php | 2 +-
core/language/it/info_acp_gallery.php | 2 +-
core/language/it/info_acp_gallery_logs.php | 2 +-
core/language/it/info_ucp_gallery.php | 2 +-
core/language/it/install_gallery.php | 2 +-
core/language/it/permissions_gallery.php | 2 +-
core/language/nl/gallery.php | 2 +-
core/language/nl/gallery_acp.php | 2 +-
core/language/nl/gallery_mcp.php | 2 +-
core/language/nl/gallery_notifications.php | 2 +-
core/language/nl/gallery_ucp.php | 2 +-
core/language/nl/info_acp_gallery.php | 2 +-
core/language/nl/info_acp_gallery_logs.php | 2 +-
core/language/nl/info_ucp_gallery.php | 2 +-
core/language/nl/install_gallery.php | 2 +-
core/language/nl/permissions_gallery.php | 2 +-
core/language/ru/gallery.php | 2 +-
core/language/ru/gallery_acp.php | 2 +-
core/language/ru/gallery_mcp.php | 2 +-
core/language/ru/gallery_notifications.php | 2 +-
core/language/ru/gallery_ucp.php | 2 +-
core/language/ru/info_acp_gallery.php | 2 +-
core/language/ru/info_acp_gallery_logs.php | 2 +-
core/language/ru/info_ucp_gallery.php | 2 +-
core/language/ru/install_gallery.php | 2 +-
core/language/ru/permissions_gallery.php | 2 +-
80 files changed, 80 insertions(+), 80 deletions(-)
diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php
index 1218cba6..7aadc5ea 100644
--- a/core/language/bg/gallery.php
+++ b/core/language/bg/gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index 44c6ea2b..516c39ce 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php
index 67d88ea1..4d439d5f 100644
--- a/core/language/bg/gallery_mcp.php
+++ b/core/language/bg/gallery_mcp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/gallery_notifications.php b/core/language/bg/gallery_notifications.php
index b3c7189f..ef016ad7 100644
--- a/core/language/bg/gallery_notifications.php
+++ b/core/language/bg/gallery_notifications.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/gallery_ucp.php b/core/language/bg/gallery_ucp.php
index fa829a0d..5267c0a1 100644
--- a/core/language/bg/gallery_ucp.php
+++ b/core/language/bg/gallery_ucp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/info_acp_gallery.php b/core/language/bg/info_acp_gallery.php
index 03b37932..4ae77405 100644
--- a/core/language/bg/info_acp_gallery.php
+++ b/core/language/bg/info_acp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/info_acp_gallery_logs.php b/core/language/bg/info_acp_gallery_logs.php
index 995f898f..00dc0b15 100644
--- a/core/language/bg/info_acp_gallery_logs.php
+++ b/core/language/bg/info_acp_gallery_logs.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/info_ucp_gallery.php b/core/language/bg/info_ucp_gallery.php
index a951251e..c5378baa 100644
--- a/core/language/bg/info_ucp_gallery.php
+++ b/core/language/bg/info_ucp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index 4ecc47cf..35d08434 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/bg/permissions_gallery.php b/core/language/bg/permissions_gallery.php
index b1e5ce93..b0e3dc56 100644
--- a/core/language/bg/permissions_gallery.php
+++ b/core/language/bg/permissions_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php
index 180d28c3..480c2c96 100644
--- a/core/language/de/gallery.php
+++ b/core/language/de/gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index 27a3d463..6cab1489 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php
index 13d95a3e..cf2ab26a 100644
--- a/core/language/de/gallery_mcp.php
+++ b/core/language/de/gallery_mcp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/gallery_notifications.php b/core/language/de/gallery_notifications.php
index 05905a2d..b37b94bb 100644
--- a/core/language/de/gallery_notifications.php
+++ b/core/language/de/gallery_notifications.php
@@ -22,7 +22,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/gallery_ucp.php b/core/language/de/gallery_ucp.php
index efd82714..a457ad85 100644
--- a/core/language/de/gallery_ucp.php
+++ b/core/language/de/gallery_ucp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
index ea3da467..43991e4e 100644
--- a/core/language/de/info_acp_gallery.php
+++ b/core/language/de/info_acp_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/info_acp_gallery_logs.php b/core/language/de/info_acp_gallery_logs.php
index a93aa4b0..63885bc1 100644
--- a/core/language/de/info_acp_gallery_logs.php
+++ b/core/language/de/info_acp_gallery_logs.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/info_ucp_gallery.php b/core/language/de/info_ucp_gallery.php
index 21ac9325..fc207e53 100644
--- a/core/language/de/info_ucp_gallery.php
+++ b/core/language/de/info_ucp_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index 9d5b5ae3..10e8f169 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/de/permissions_gallery.php b/core/language/de/permissions_gallery.php
index c21c3a52..5cf5cd32 100644
--- a/core/language/de/permissions_gallery.php
+++ b/core/language/de/permissions_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/en/gallery.php b/core/language/en/gallery.php
index 16bd21d9..3e0695d1 100644
--- a/core/language/en/gallery.php
+++ b/core/language/en/gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php
index e486c8be..faeecd6a 100644
--- a/core/language/en/gallery_acp.php
+++ b/core/language/en/gallery_acp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php
index 128d8f46..495bc496 100644
--- a/core/language/en/gallery_mcp.php
+++ b/core/language/en/gallery_mcp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/gallery_notifications.php b/core/language/en/gallery_notifications.php
index 94522399..73ab4534 100644
--- a/core/language/en/gallery_notifications.php
+++ b/core/language/en/gallery_notifications.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/gallery_ucp.php b/core/language/en/gallery_ucp.php
index 2d713989..fe01756f 100644
--- a/core/language/en/gallery_ucp.php
+++ b/core/language/en/gallery_ucp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/info_acp_gallery.php b/core/language/en/info_acp_gallery.php
index 11b84f3f..789a08c5 100644
--- a/core/language/en/info_acp_gallery.php
+++ b/core/language/en/info_acp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/info_acp_gallery_logs.php b/core/language/en/info_acp_gallery_logs.php
index 2c8b5622..4145bdc3 100644
--- a/core/language/en/info_acp_gallery_logs.php
+++ b/core/language/en/info_acp_gallery_logs.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/info_ucp_gallery.php b/core/language/en/info_ucp_gallery.php
index 53710dd2..0beb59f5 100644
--- a/core/language/en/info_ucp_gallery.php
+++ b/core/language/en/info_ucp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
index dc563be2..1f3ef563 100644
--- a/core/language/en/install_gallery.php
+++ b/core/language/en/install_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/en/permissions_gallery.php b/core/language/en/permissions_gallery.php
index 548ae665..115661a3 100644
--- a/core/language/en/permissions_gallery.php
+++ b/core/language/en/permissions_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php
index d1ba6d82..d0921929 100644
--- a/core/language/es/gallery.php
+++ b/core/language/es/gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php
index 8087336e..51776fb1 100644
--- a/core/language/es/gallery_acp.php
+++ b/core/language/es/gallery_acp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php
index eedabe8a..a4fc50e8 100644
--- a/core/language/es/gallery_mcp.php
+++ b/core/language/es/gallery_mcp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/gallery_notifications.php b/core/language/es/gallery_notifications.php
index fa4b5632..7303a0a8 100644
--- a/core/language/es/gallery_notifications.php
+++ b/core/language/es/gallery_notifications.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/gallery_ucp.php b/core/language/es/gallery_ucp.php
index fc036bc5..f49fa32e 100644
--- a/core/language/es/gallery_ucp.php
+++ b/core/language/es/gallery_ucp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/info_acp_gallery.php b/core/language/es/info_acp_gallery.php
index b4e85f90..96a5bbca 100644
--- a/core/language/es/info_acp_gallery.php
+++ b/core/language/es/info_acp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/info_acp_gallery_logs.php b/core/language/es/info_acp_gallery_logs.php
index fd9df309..3fa8de7c 100644
--- a/core/language/es/info_acp_gallery_logs.php
+++ b/core/language/es/info_acp_gallery_logs.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/info_ucp_gallery.php b/core/language/es/info_ucp_gallery.php
index 2c072582..9e527b2a 100644
--- a/core/language/es/info_ucp_gallery.php
+++ b/core/language/es/info_ucp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index 56ee328c..3261da09 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/es/permissions_gallery.php b/core/language/es/permissions_gallery.php
index 9128dc13..cc6cab22 100644
--- a/core/language/es/permissions_gallery.php
+++ b/core/language/es/permissions_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php
index 1091cd4b..ac555a31 100644
--- a/core/language/fr/gallery.php
+++ b/core/language/fr/gallery.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
index 8048595e..3a06c846 100644
--- a/core/language/fr/gallery_acp.php
+++ b/core/language/fr/gallery_acp.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php
index 8daf7492..c3a7c0f3 100644
--- a/core/language/fr/gallery_mcp.php
+++ b/core/language/fr/gallery_mcp.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/gallery_notifications.php b/core/language/fr/gallery_notifications.php
index 262f519d..f09ad634 100644
--- a/core/language/fr/gallery_notifications.php
+++ b/core/language/fr/gallery_notifications.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/gallery_ucp.php b/core/language/fr/gallery_ucp.php
index 19810469..a700fb37 100644
--- a/core/language/fr/gallery_ucp.php
+++ b/core/language/fr/gallery_ucp.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/info_acp_gallery.php b/core/language/fr/info_acp_gallery.php
index 2535281c..f89eda75 100644
--- a/core/language/fr/info_acp_gallery.php
+++ b/core/language/fr/info_acp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/info_acp_gallery_logs.php b/core/language/fr/info_acp_gallery_logs.php
index c6a547a0..9c74e5e6 100644
--- a/core/language/fr/info_acp_gallery_logs.php
+++ b/core/language/fr/info_acp_gallery_logs.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/info_ucp_gallery.php b/core/language/fr/info_ucp_gallery.php
index b84e8a37..0acf2443 100644
--- a/core/language/fr/info_ucp_gallery.php
+++ b/core/language/fr/info_ucp_gallery.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index ffa7c2df..41d069f7 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/fr/permissions_gallery.php b/core/language/fr/permissions_gallery.php
index e2498b4d..e18a626f 100644
--- a/core/language/fr/permissions_gallery.php
+++ b/core/language/fr/permissions_gallery.php
@@ -19,7 +19,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// DEVELOPERS PLEASE NOTE
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index 0c09b408..2c7272dc 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/gallery_acp.php b/core/language/it/gallery_acp.php
index fcb7edce..3ed3b693 100644
--- a/core/language/it/gallery_acp.php
+++ b/core/language/it/gallery_acp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php
index 98dee3d0..a7bf1a5a 100644
--- a/core/language/it/gallery_mcp.php
+++ b/core/language/it/gallery_mcp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/gallery_notifications.php b/core/language/it/gallery_notifications.php
index 534f25f1..b13f8f37 100644
--- a/core/language/it/gallery_notifications.php
+++ b/core/language/it/gallery_notifications.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/gallery_ucp.php b/core/language/it/gallery_ucp.php
index 6325645c..0d944cd0 100644
--- a/core/language/it/gallery_ucp.php
+++ b/core/language/it/gallery_ucp.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/info_acp_gallery.php b/core/language/it/info_acp_gallery.php
index 2b35b752..22b70c8d 100644
--- a/core/language/it/info_acp_gallery.php
+++ b/core/language/it/info_acp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/info_acp_gallery_logs.php b/core/language/it/info_acp_gallery_logs.php
index d77513ba..8c914666 100644
--- a/core/language/it/info_acp_gallery_logs.php
+++ b/core/language/it/info_acp_gallery_logs.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/info_ucp_gallery.php b/core/language/it/info_ucp_gallery.php
index 84e9b1b0..e28bb173 100644
--- a/core/language/it/info_ucp_gallery.php
+++ b/core/language/it/info_ucp_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
index 22a43621..4b95a0be 100644
--- a/core/language/it/install_gallery.php
+++ b/core/language/it/install_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/it/permissions_gallery.php b/core/language/it/permissions_gallery.php
index 699b649a..7ddc7c0f 100644
--- a/core/language/it/permissions_gallery.php
+++ b/core/language/it/permissions_gallery.php
@@ -20,7 +20,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php
index 5fbe2e54..f8582d45 100644
--- a/core/language/nl/gallery.php
+++ b/core/language/nl/gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
index 006c6521..f2f398fb 100644
--- a/core/language/nl/gallery_acp.php
+++ b/core/language/nl/gallery_acp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php
index 31c98224..0698b686 100644
--- a/core/language/nl/gallery_mcp.php
+++ b/core/language/nl/gallery_mcp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/gallery_notifications.php b/core/language/nl/gallery_notifications.php
index 23851318..0a221295 100644
--- a/core/language/nl/gallery_notifications.php
+++ b/core/language/nl/gallery_notifications.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/gallery_ucp.php b/core/language/nl/gallery_ucp.php
index 50d75f19..7fa2f939 100644
--- a/core/language/nl/gallery_ucp.php
+++ b/core/language/nl/gallery_ucp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/info_acp_gallery.php b/core/language/nl/info_acp_gallery.php
index e99bc687..33604238 100644
--- a/core/language/nl/info_acp_gallery.php
+++ b/core/language/nl/info_acp_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/info_acp_gallery_logs.php b/core/language/nl/info_acp_gallery_logs.php
index 928104d0..4a7874bf 100644
--- a/core/language/nl/info_acp_gallery_logs.php
+++ b/core/language/nl/info_acp_gallery_logs.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/info_ucp_gallery.php b/core/language/nl/info_ucp_gallery.php
index dc46bd12..f3cedf86 100644
--- a/core/language/nl/info_ucp_gallery.php
+++ b/core/language/nl/info_ucp_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index f52c0627..7fb21931 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/nl/permissions_gallery.php b/core/language/nl/permissions_gallery.php
index 75560c01..f7651e57 100644
--- a/core/language/nl/permissions_gallery.php
+++ b/core/language/nl/permissions_gallery.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php
index 1897a19e..e279a3e7 100644
--- a/core/language/ru/gallery.php
+++ b/core/language/ru/gallery.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'ADD_UPLOAD_FIELD' => 'Добавить несколько файлов',
diff --git a/core/language/ru/gallery_acp.php b/core/language/ru/gallery_acp.php
index 99fe4f7f..e7646fd4 100644
--- a/core/language/ru/gallery_acp.php
+++ b/core/language/ru/gallery_acp.php
@@ -21,7 +21,7 @@
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
diff --git a/core/language/ru/gallery_mcp.php b/core/language/ru/gallery_mcp.php
index 72185b1f..ccb71d8d 100644
--- a/core/language/ru/gallery_mcp.php
+++ b/core/language/ru/gallery_mcp.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'CHOOSE_ACTION' => 'Выберите желаемое действие',
diff --git a/core/language/ru/gallery_notifications.php b/core/language/ru/gallery_notifications.php
index 0b67b0b6..feb879ee 100644
--- a/core/language/ru/gallery_notifications.php
+++ b/core/language/ru/gallery_notifications.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'NOTIFICATION_PHPBBGALLERY_IMAGE_FOR_APPROVAL' => '%2$s фото загружено для утверждения в альбоме %1$s ',
diff --git a/core/language/ru/gallery_ucp.php b/core/language/ru/gallery_ucp.php
index 09be3c8f..597154a5 100644
--- a/core/language/ru/gallery_ucp.php
+++ b/core/language/ru/gallery_ucp.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'ACCESS_CONTROL_ALL' => 'Все',
diff --git a/core/language/ru/info_acp_gallery.php b/core/language/ru/info_acp_gallery.php
index fe926ce7..a87b6d66 100644
--- a/core/language/ru/info_acp_gallery.php
+++ b/core/language/ru/info_acp_gallery.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'ACP_GALLERY_ALBUM_MANAGEMENT' => 'Управление альбомом',
diff --git a/core/language/ru/info_acp_gallery_logs.php b/core/language/ru/info_acp_gallery_logs.php
index 0d3f2aaf..8cf845d4 100644
--- a/core/language/ru/info_acp_gallery_logs.php
+++ b/core/language/ru/info_acp_gallery_logs.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'ACP_LOG_GALLERY_MOD' => 'Логи модератора',
diff --git a/core/language/ru/info_ucp_gallery.php b/core/language/ru/info_ucp_gallery.php
index acbb8a78..39a7f200 100644
--- a/core/language/ru/info_ucp_gallery.php
+++ b/core/language/ru/info_ucp_gallery.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'UCP_GALLERY' => 'Галерея',
diff --git a/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
index 75566a00..a541ae45 100644
--- a/core/language/ru/install_gallery.php
+++ b/core/language/ru/install_gallery.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
$lang = array_merge($lang, array(
'BBCODES_NEEDS_REPARSE' => 'BBCode нуждается в переобработке.',
diff --git a/core/language/ru/permissions_gallery.php b/core/language/ru/permissions_gallery.php
index 22b63983..03a4b15c 100644
--- a/core/language/ru/permissions_gallery.php
+++ b/core/language/ru/permissions_gallery.php
@@ -18,7 +18,7 @@
}
if (empty($lang) || !is_array($lang))
{
- $lang = array();
+ $lang = [];
}
// Adding the permissions
$lang = array_merge($lang, array(
From 5d194252795f71dcc88c053f8bce222aff98555c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:27:23 +0100
Subject: [PATCH 089/138] Improve index and album controlers
---
core/controller/album.php | 1 -
core/controller/index.php | 27 +++++++++------------------
2 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/core/controller/album.php b/core/controller/album.php
index 6942cd44..e3e4a605 100644
--- a/core/controller/album.php
+++ b/core/controller/album.php
@@ -330,7 +330,6 @@ protected function display_images($album_id, $album_data, $start, $limit)
$result = $this->db->sql_query_limit($sql, $limit, $start);
// Now let's get display options
- $show_ip = $show_ratings = $show_username = $show_views = $show_time = $show_imagename = $show_comments = $show_album = false;
$show_options = (int) $this->gallery_config->get('album_display');
$show_ip = ($show_options & self::ALBUM_SHOW_IP) !== 0;
$show_ratings = ($show_options & self::ALBUM_SHOW_RATINGS) !== 0;
diff --git a/core/controller/index.php b/core/controller/index.php
index daaeb10c..686fb34c 100644
--- a/core/controller/index.php
+++ b/core/controller/index.php
@@ -66,6 +66,7 @@ class index
const RRC_MODE_RECENT_COMMENTS = 4;
const RRC_MODE_RANDOM_IMAGES = 2;
const RRC_MODE_RECENT_IMAGES = 1;
+
/**
* Constructor
*
@@ -301,22 +302,12 @@ protected function assign_dropdown_links($base_route)
$this->gallery_auth->load_user_permissions($this->user->data['user_id']);
// Now let's get display options
- $show_comments = $show_random = $show_recent = false;
- $show_options = $this->gallery_config->get('rrc_gindex_mode');
- if ($show_options >= 4)
- {
- $show_comments = true;
- $show_options = $show_options - 4;
- }
- if ($show_options >= 2)
- {
- $show_random = true;
- $show_options = $show_options - 2;
- }
- if ($show_options == 1)
- {
- $show_recent = true;
- }
+ $show_options = (int) $this->gallery_config->get('rrc_gindex_mode');
+
+ $show_comments = (bool) ($show_options & self::RRC_MODE_RECENT_COMMENTS);
+ $show_random = (bool) ($show_options & self::RRC_MODE_RANDOM_IMAGES);
+ $show_recent = (bool) ($show_options & self::RRC_MODE_RECENT_IMAGES);
+
$this->template->assign_vars(array(
'TOTAL_IMAGES' => ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '',
'TOTAL_COMMENTS' => ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '',
@@ -327,14 +318,14 @@ protected function assign_dropdown_links($base_route)
$this->template->assign_vars(array(
'U_MCP' => ($this->gallery_auth->acl_check_global('m_')) ? $this->helper->route('phpbbgallery_core_moderate') : '',
'U_MARK_ALBUMS' => ($this->user->data['is_registered']) ? $this->helper->route($base_route, array('hash' => generate_link_hash('global'), 'mark' => 'albums')) : '',
- 'S_LOGIN_ACTION' => append_sid($this->root_path . 'ucp.' . $this->php_ext, 'mode=login&redirect=' . urlencode($this->helper->route($base_route))),
+ 'S_LOGIN_ACTION' => append_sid($this->root_path . 'ucp.' . $this->php_ext, 'mode=login&redirect=' . urlencode($this->helper->route($base_route))),
'U_GALLERY_SEARCH' => $this->helper->route('phpbbgallery_core_search'),
'U_G_SEARCH_COMMENTED' => $this->config['phpbb_gallery_allow_comments'] && $show_comments ? $this->helper->route('phpbbgallery_core_search_commented') : false,
//'U_G_SEARCH_CONTESTS' => $this->config['phpbb_gallery_allow_rates'] && $this->config['phpbb_gallery_contests_ended'] ? $this->helper->route('phpbbgallery_core_search_contests') : '',
'U_G_SEARCH_RECENT' => $show_recent ? $this->helper->route('phpbbgallery_core_search_recent') : false,
'U_G_SEARCH_RANDOM' => $show_random ? $this->helper->route('phpbbgallery_core_search_random') : false,
- 'U_G_SEARCH_SELF' => $this->helper->route('phpbbgallery_core_search_egosearch'),
+ 'U_G_SEARCH_SELF' => $this->helper->route('phpbbgallery_core_search_egosearch'),
'U_G_SEARCH_TOPRATED' => $this->config['phpbb_gallery_allow_rates'] ? $this->helper->route('phpbbgallery_core_search_toprated') : '',
));
}
From d91017d95b504accbc570256541f88ba182856a6 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:42:23 +0100
Subject: [PATCH 090/138] Improve ACP Import
---
tests/functional/phpbbgallery_alpha_test.php | 2 +-
tests/functional/phpbbgallery_delta_test.php | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php
index f62106fa..1eae200a 100644
--- a/tests/functional/phpbbgallery_alpha_test.php
+++ b/tests/functional/phpbbgallery_alpha_test.php
@@ -69,7 +69,7 @@ public function install_data()
),
'acp_import' => array(
'phpbbgallery/acpimport',
- 'info_acp_gallery_acpimport',
+ 'info_acp_gallery_import',
'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images',
'ACP_IMPORT_ALBUMS'
),
diff --git a/tests/functional/phpbbgallery_delta_test.php b/tests/functional/phpbbgallery_delta_test.php
index a0e27b8f..8bd1b4f5 100644
--- a/tests/functional/phpbbgallery_delta_test.php
+++ b/tests/functional/phpbbgallery_delta_test.php
@@ -31,7 +31,7 @@ public function test_prepare_import()
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
$crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
@@ -71,7 +71,7 @@ public function test_acp_import_change_uploader()
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
$crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
@@ -110,7 +110,7 @@ public function test_acp_import_change_image_name()
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
$crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
@@ -150,7 +150,7 @@ public function test_acp_import_add_to_user_gallery_existing()
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
$crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
//$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
@@ -189,7 +189,7 @@ public function test_acp_import_add_to_user_gallery_not_existing()
$this->add_lang_ext('phpbbgallery/core', 'gallery_acp');
$this->add_lang_ext('phpbbgallery/core', 'gallery');
- $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_acpimport');
+ $this->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
$crawler = self::request('GET', 'adm/index.php?i=-phpbbgallery-acpimport-acp-main_module&mode=import_images&sid=' . $this->sid);
//$album_id = $crawler->filter('option:contains("First test album!")')->attr('value');
From 7cd8a7b449063a2dd16ec5b9d5bd019be107ecc9 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:42:40 +0100
Subject: [PATCH 091/138] Improve Exif
---
tests/functional/phpbbgallery_alpha_test.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php
index 1eae200a..1f06667f 100644
--- a/tests/functional/phpbbgallery_alpha_test.php
+++ b/tests/functional/phpbbgallery_alpha_test.php
@@ -57,7 +57,7 @@ public function install_data()
// This is core, now extensions
'exif' => array(
'phpbbgallery/exif',
- 'exif',
+ 'info_exif',
'adm/index.php?i=-phpbbgallery-core-acp-config_module&mode=main',
'DISP_EXIF_DATA'
),
From c47929f657fefdcc2964e8731deb2623b2405622 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:49:19 +0100
Subject: [PATCH 092/138] Fix spaces to tabs
---
acpcleanup/ext.php | 78 +++++++++++++++++++++++-----------------------
acpimport/ext.php | 76 ++++++++++++++++++++++----------------------
core/ext.php | 2 +-
exif/ext.php | 78 +++++++++++++++++++++++-----------------------
4 files changed, 117 insertions(+), 117 deletions(-)
diff --git a/acpcleanup/ext.php b/acpcleanup/ext.php
index 403aa47e..f891f194 100644
--- a/acpcleanup/ext.php
+++ b/acpcleanup/ext.php
@@ -1,53 +1,53 @@
container->get('ext.manager');
-
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
- {
- $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
- return false;
- }
+ /**
+ * 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');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
- return true;
- }
+ 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']
- );
- }
+ /**
+ * 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);
- }
+ return parent::enable_step($old_state);
+ }
}
\ No newline at end of file
diff --git a/acpimport/ext.php b/acpimport/ext.php
index d5a55f57..498ca385 100644
--- a/acpimport/ext.php
+++ b/acpimport/ext.php
@@ -2,52 +2,52 @@
/**
* phpBB Gallery - ACP Import Extension
*
- * @package phpBB Gallery
+ * @package phpBB Gallery
* @copyright (c) 2012 nickvergessen | 2025 Leinad4Mind
- * @license GNU General Public License v2
+ * @license GNU General Public License v2
*/
namespace phpbbgallery\acpimport;
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');
-
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
- {
- $this->container->get('user')->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
- return false;
- }
+ /**
+ * 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');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
- return true;
- }
+ 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/acpimport', 'info_acp_gallery_import');
- $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
- $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
- );
- }
+ /**
+ * 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/acpimport', 'info_acp_gallery_import');
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
+ $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
+ );
+ }
- return parent::enable_step($old_state);
- }
+ return parent::enable_step($old_state);
+ }
}
\ No newline at end of file
diff --git a/core/ext.php b/core/ext.php
index 6f45d106..5d9a862e 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -1,6 +1,6 @@
container->get('ext.manager');
-
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
- {
- $this->container->get('user')->add_lang_ext('phpbbgallery/exif', 'info_exif');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
- return false;
- }
+ /**
+ * 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');
+
+ // Check if phpbbgallery/core is enabled
+ if (!$manager->is_enabled('phpbbgallery/core'))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/exif', 'info_exif');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
+ }
- return true;
- }
+ 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/exif', 'info_exif');
- $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
- $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
- );
- }
+ /**
+ * 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/exif', 'info_exif');
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
+ $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
+ );
+ }
- return parent::enable_step($old_state);
- }
+ return parent::enable_step($old_state);
+ }
}
\ No newline at end of file
From d4c3dc21764c4abffc0ae09fe7b2141b626e7070 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 22:55:42 +0100
Subject: [PATCH 093/138] Fix EPV
---
acpcleanup/acp/main_module.php | 4 ++--
acpcleanup/composer.json | 2 +-
acpcleanup/ext.php | 16 +++++++---------
.../language/bg/info_acp_gallery_cleanup.php | 2 +-
.../language/de/info_acp_gallery_cleanup.php | 2 +-
.../language/it/info_acp_gallery_cleanup.php | 2 +-
.../language/ru/info_acp_gallery_cleanup.php | 2 +-
acpimport/acp/main_info.php | 2 +-
acpimport/composer.json | 2 +-
acpimport/ext.php | 8 +++-----
acpimport/migrations/m1_init.php | 19 +++++++++++++------
core/album/album.php | 2 +-
core/composer.json | 2 +-
exif/composer.json | 2 +-
exif/ext.php | 8 +++-----
exif/language/bg/info_exif.php | 2 +-
exif/language/de/info_exif.php | 2 +-
exif/language/en/info_exif.php | 2 +-
exif/language/fr/info_exif.php | 2 +-
exif/language/it/info_exif.php | 2 +-
exif/language/ru/info_exif.php | 2 +-
21 files changed, 44 insertions(+), 43 deletions(-)
diff --git a/acpcleanup/acp/main_module.php b/acpcleanup/acp/main_module.php
index a89215f2..69b68530 100644
--- a/acpcleanup/acp/main_module.php
+++ b/acpcleanup/acp/main_module.php
@@ -23,7 +23,7 @@ public function main(int $id, string $mode): void
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);
@@ -46,7 +46,7 @@ public function cleanup(bool $submit = false): void
global $auth, $cache, $db, $template, $user, $phpbb_ext_gallery, $table_prefix, $phpbb_container, $request;
$delete = $request->is_set_post('delete');
- $prune = $request->is_set_post('prune');
+ $prune = $request->is_set_post('prune');
$missing_sources = $request->variable('source', array(0));
$missing_entries = $request->variable('entry', array(''), true);
diff --git a/acpcleanup/composer.json b/acpcleanup/composer.json
index 77a74cd9..936d5e43 100644
--- a/acpcleanup/composer.json
+++ b/acpcleanup/composer.json
@@ -26,7 +26,7 @@
}
],
"require": {
- "php": ">=7.2",
+ "php": ">=7.1"
},
"extra": {
"display-name": "phpBB Gallery Add-on: ACP Cleanup",
diff --git a/acpcleanup/ext.php b/acpcleanup/ext.php
index f891f194..b8713c4c 100644
--- a/acpcleanup/ext.php
+++ b/acpcleanup/ext.php
@@ -20,13 +20,13 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
-
+
// Check if phpbbgallery/core is enabled
if (!$manager->is_enabled('phpbbgallery/core'))
{
- $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
- return false;
+ $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
+ trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ return false;
}
return true;
@@ -42,12 +42,10 @@ 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']
- );
+ $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);
}
-}
\ No newline at end of file
+}
diff --git a/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
index 7170615d..e013ba42 100644
--- a/acpcleanup/language/bg/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
@@ -74,7 +74,7 @@
'MOVE_TO_USER' => 'Премести при потребител',
'MOVE_TO_USER_EXP' => 'Изображенията и коментарите ще бъдат преместеи като такива на посочения потребител. Ако не посочите потребител - Гост е зададен по-подразбиране',
'CLEAN_USER_NOT_FOUND' => 'Желаният от вас потребител не е открит!',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
index e2efa666..b4a79e86 100644
--- a/acpcleanup/language/de/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/de/info_acp_gallery_cleanup.php
@@ -76,7 +76,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' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
index e86a9ebf..7bd2b373 100644
--- a/acpcleanup/language/it/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/it/info_acp_gallery_cleanup.php
@@ -75,7 +75,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' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
index 9fb37a80..f6134c57 100644
--- a/acpcleanup/language/ru/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
@@ -76,7 +76,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.',
]);
diff --git a/acpimport/acp/main_info.php b/acpimport/acp/main_info.php
index 07d86352..dcaa49cb 100644
--- a/acpimport/acp/main_info.php
+++ b/acpimport/acp/main_info.php
@@ -34,4 +34,4 @@ public function module(): array
],
];
}
-}
\ No newline at end of file
+}
diff --git a/acpimport/composer.json b/acpimport/composer.json
index 74e160a4..d72cff62 100644
--- a/acpimport/composer.json
+++ b/acpimport/composer.json
@@ -26,7 +26,7 @@
}
],
"require": {
- "php": ">=7.2"
+ "php": ">=7.1"
},
"extra": {
"display-name": "phpBB Gallery Add-on: ACP Import",
diff --git a/acpimport/ext.php b/acpimport/ext.php
index 498ca385..5be61162 100644
--- a/acpimport/ext.php
+++ b/acpimport/ext.php
@@ -20,7 +20,7 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
-
+
// Check if phpbbgallery/core is enabled
if (!$manager->is_enabled('phpbbgallery/core'))
{
@@ -43,11 +43,9 @@ public function enable_step($old_state)
if (empty($old_state))
{
$this->container->get('user')->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
- $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
- $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
- );
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']);
}
return parent::enable_step($old_state);
}
-}
\ No newline at end of file
+}
diff --git a/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
index 88919a6b..4d0fb8dc 100644
--- a/acpimport/migrations/m1_init.php
+++ b/acpimport/migrations/m1_init.php
@@ -69,7 +69,8 @@ public function create_file_system(): void
$phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
- if (!is_dir($phpbbgallery_core_file_import)) {
+ if (!is_dir($phpbbgallery_core_file_import))
+ {
if (is_writable($phpbb_root_path . 'files'))
{
@mkdir($phpbbgallery_core_file_import, 0755, true);
@@ -89,7 +90,8 @@ public function remove_file_system(): void
$phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
// Clean dirs
- if (is_dir($phpbbgallery_core_file_import)) {
+ if (is_dir($phpbbgallery_core_file_import))
+ {
$this->recursiveRemoveDirectory($phpbbgallery_core_file_import);
}
}
@@ -102,15 +104,20 @@ public function remove_file_system(): void
*/
private function recursiveRemoveDirectory(string $directory): void
{
- if (!is_dir($directory)) {
+ if (!is_dir($directory))
+ {
return;
}
$files = new \FilesystemIterator($directory);
- foreach ($files as $file) {
- if ($file->isDir()) {
+ foreach ($files as $file)
+ {
+ if ($file->isDir())
+ {
$this->recursiveRemoveDirectory($file->getPathname());
- } else {
+ }
+ else
+ {
@unlink($file->getPathname());
}
}
diff --git a/core/album/album.php b/core/album/album.php
index 2fb27573..0b05d692 100644
--- a/core/album/album.php
+++ b/core/album/album.php
@@ -188,7 +188,7 @@ public function check_user($album_id, $user_id = false)
* @internal param $ (string || array) $ignore_id disabled albums, Exp: on moving: the album
* where the image is now
*/
- public function get_albumbox($ignore_personals, $select_name, $select_id = false, $requested_permission = false, $ignore_id = false, $album_user_id = (int) \phpbbgallery\core\block::PUBLIC_ALBUM, $requested_album_type = -1)
+ public function get_albumbox($ignore_personals, $select_name, $select_id = false, $requested_permission = false, $ignore_id = false, $album_user_id = \phpbbgallery\core\block::PUBLIC_ALBUM, $requested_album_type = -1)
{
// Instead of the query we use the cache
$album_data = $this->gallery_cache->get('albums');
diff --git a/core/composer.json b/core/composer.json
index df4c1d91..ccb7527d 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -31,7 +31,7 @@
"extra": {
"display-name": "phpBB Gallery",
"soft-require": {
- "phpbb/phpbb": ">=3.3.0@dev"
+ "phpbb/phpbb": ">=3.3.0,<4.0.0@dev"
}
},
"version-check": {
diff --git a/exif/composer.json b/exif/composer.json
index 22dd62e1..2a790e57 100644
--- a/exif/composer.json
+++ b/exif/composer.json
@@ -26,7 +26,7 @@
}
],
"require": {
- "php": ">=7.2"
+ "php": ">=7.1"
},
"extra": {
"display-name": "phpBB Gallery Add-on: Exif",
diff --git a/exif/ext.php b/exif/ext.php
index 9abc65a9..e08518f9 100644
--- a/exif/ext.php
+++ b/exif/ext.php
@@ -20,7 +20,7 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
-
+
// Check if phpbbgallery/core is enabled
if (!$manager->is_enabled('phpbbgallery/core'))
{
@@ -43,11 +43,9 @@ public function enable_step($old_state)
if (empty($old_state))
{
$this->container->get('user')->add_lang_ext('phpbbgallery/exif', 'info_exif');
- $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS',
- $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']
- );
+ $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS']);
}
return parent::enable_step($old_state);
}
-}
\ No newline at end of file
+}
diff --git a/exif/language/bg/info_exif.php b/exif/language/bg/info_exif.php
index 5f690135..33a82cf5 100644
--- a/exif/language/bg/info_exif.php
+++ b/exif/language/bg/info_exif.php
@@ -92,7 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'This feature can not be used at the moment, as the need function “exif_read_data“ is not included in your PHP Installation.',
'SHOW_EXIF' => 'show/hide',
'VIEWEXIFS_DEFAULT' => 'View Exif-Data by default',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/exif/language/de/info_exif.php b/exif/language/de/info_exif.php
index 22de1b8c..c0492573 100644
--- a/exif/language/de/info_exif.php
+++ b/exif/language/de/info_exif.php
@@ -93,7 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Diese Funktion kann im Moment nicht verwendet werden, da die Funktion “exif_read_data“ nicht in Deiner PHP-Installation enthalten ist.',
'SHOW_EXIF' => 'ein-/ausblenden',
'VIEWEXIFS_DEFAULT' => 'Ansicht Exif-Daten standardmäßig',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/exif/language/en/info_exif.php b/exif/language/en/info_exif.php
index 5f690135..33a82cf5 100644
--- a/exif/language/en/info_exif.php
+++ b/exif/language/en/info_exif.php
@@ -92,7 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'This feature can not be used at the moment, as the need function “exif_read_data“ is not included in your PHP Installation.',
'SHOW_EXIF' => 'show/hide',
'VIEWEXIFS_DEFAULT' => 'View Exif-Data by default',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/exif/language/fr/info_exif.php b/exif/language/fr/info_exif.php
index 6a30fef8..ef1ae1e2 100644
--- a/exif/language/fr/info_exif.php
+++ b/exif/language/fr/info_exif.php
@@ -93,7 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Cette fonctionnalité ne peut pas être utilisée pour le moment, car la fonction « exif_read_data » n’est pas incluse dans l’installation de votre PHP.',
'SHOW_EXIF' => 'Afficher/Cacher',
'VIEWEXIFS_DEFAULT' => 'Voir les informations des images par défaut',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/exif/language/it/info_exif.php b/exif/language/it/info_exif.php
index 27c13e91..40d908e7 100644
--- a/exif/language/it/info_exif.php
+++ b/exif/language/it/info_exif.php
@@ -92,7 +92,7 @@
'DISP_EXIF_DATA_EXP' => 'Questa caratteristica non puo\' essere utilizzatal momento, dato che la funzione “exif_read_data“ non e\' inclusa nella tua installazione di PHP.',
'SHOW_EXIF' => 'mostra/nascondi',
'VIEWEXIFS_DEFAULT' => 'Visualizza Dati-Exif in modo predefinito',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
diff --git a/exif/language/ru/info_exif.php b/exif/language/ru/info_exif.php
index f15cf9b4..8a3cabfc 100644
--- a/exif/language/ru/info_exif.php
+++ b/exif/language/ru/info_exif.php
@@ -93,7 +93,7 @@
'DISP_EXIF_DATA_EXP' => 'Эта функция не может использоваться на данный момент, т.к. функция "exif_read_data" не входит в установке PHP',
'SHOW_EXIF' => 'Показать / Скрыть',
'VIEWEXIFS_DEFAULT' => 'Просмотр EXIF-Данных по умолчанию',
-
+
'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
]);
From 0c9c1aeb2151e0cf83a172e2c556ef51b6c7a92c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 2 Aug 2025 23:21:09 +0100
Subject: [PATCH 094/138] Fix search controller
---
core/controller/search.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/controller/search.php b/core/controller/search.php
index 571c7092..480b9516 100644
--- a/core/controller/search.php
+++ b/core/controller/search.php
@@ -148,7 +148,7 @@ public function base($page = 1)
$keywords = utf8_normalize_nfc($this->request->variable('keywords', '', true));
$add_keywords = utf8_normalize_nfc($this->request->variable('add_keywords', '', true));
$username = $this->request->variable('username', '', true);
- $user_id = $this->request->variable('user_id', array(0));
+ $user_id = $this->request->variable('user_id', array(0));
$search_terms = $this->request->variable('terms', 'all');
$search_album = $this->request->variable('aid', array(0));
$search_child = $this->request->variable('sc', true);
@@ -199,7 +199,6 @@ public function base($page = 1)
);
if ($keywords || $username || $user_id || $search_id || $submit)
{
- $user_id_ary[] = (int) ANONYMOUS;
// Let's resolve username to user id ... or array of them.
if ($username)
{
@@ -219,10 +218,10 @@ public function base($page = 1)
$user_id_ary[] = (int) $row['user_id'];
}
$this->db->sql_freeresult($result);
+ $user_id_ary[] = (int) ANONYMOUS;
+ $user_id = $user_id_ary;
}
- $user_id = $user_id_ary;
-
if (!empty($user_id))
{
$sql_where[] = $this->db->sql_in_set('i.image_user_id', $user_id);
From 1874fa86259899604b7be25b9285e69dab5175f9 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 3 Aug 2025 21:51:15 +0100
Subject: [PATCH 095/138] Fix
---
core/controller/search.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/controller/search.php b/core/controller/search.php
index 480b9516..c7d63460 100644
--- a/core/controller/search.php
+++ b/core/controller/search.php
@@ -213,11 +213,13 @@ public function base($page = 1)
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $this->db->sql_query_limit($sql, 100);
+ $user_id_ary = [];
while ($row = $this->db->sql_fetchrow($result))
{
$user_id_ary[] = (int) $row['user_id'];
}
$this->db->sql_freeresult($result);
+
$user_id_ary[] = (int) ANONYMOUS;
$user_id = $user_id_ary;
}
From b7f208d21106346e8e87e8078547766b49749a1d Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 16:29:22 +0100
Subject: [PATCH 096/138] Fix polaroid prosilver bug
---
.../template/gallery/imageblock_polaroid.html | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
index 0677279f..1d2f42f1 100644
--- a/core/styles/prosilver/template/gallery/imageblock_polaroid.html
+++ b/core/styles/prosilver/template/gallery/imageblock_polaroid.html
@@ -19,16 +19,18 @@
From 77be43f616aa5d234bf298129c722a2f854e4ae3 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 16:30:34 +0100
Subject: [PATCH 097/138] Fix action keys on disapprove
---
core/controller/moderate.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/controller/moderate.php b/core/controller/moderate.php
index 019a3247..cab5d02f 100644
--- a/core/controller/moderate.php
+++ b/core/controller/moderate.php
@@ -702,10 +702,9 @@ public function approve($image_id)
{
$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
}
- $action_ary = $this->request->variable('action', []);
- $action_ary = array_keys($action_ary);
- $action = isset($action_ary[0]) ? $action_ary[0] : 'approve';
-
+ $action_keys = array_keys($this->request->variable('action', ['approve' => 1]));
+ $action = $action_keys[0] ?? 'approve';
+
if ($action === 'disapprove')
{
$redirect = new RedirectResponse($this->helper->route('phpbbgallery_core_image_delete', ['image_id' => $image_id]));
From ba1f34652dd1d3f0a6b8532cb5ed5cc11036d35b Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 17:30:16 +0100
Subject: [PATCH 098/138] Attempt to fix verify json
---
gallery-cleanup.json | 4 ++--
gallery-core.json | 4 ++--
gallery-exif.json | 4 ++--
gallery-import.json | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gallery-cleanup.json b/gallery-cleanup.json
index 40f37dab..e95fc70f 100644
--- a/gallery-cleanup.json
+++ b/gallery-cleanup.json
@@ -1,9 +1,9 @@
{
"stable": {
- "1.2": {
+ "3.3": {
"current": "1.2.2",
"download": "https://github.com/satanasov/phpbbgallery",
- "announcement": "https://github.com/satanasov/phpbbgallery",
+ "announcement": "https://www.phpbb.com/customise/db/extension/phpbb_gallery",
"eol": null,
"security": false
}
diff --git a/gallery-core.json b/gallery-core.json
index d9868394..85adbd04 100644
--- a/gallery-core.json
+++ b/gallery-core.json
@@ -1,9 +1,9 @@
{
"stable": {
- "3.0": {
+ "3.3": {
"current": "3.4.0",
"download": "https://github.com/satanasov/phpbbgallery",
- "announcement": "https://github.com/satanasov/phpbbgallery",
+ "announcement": "https://www.phpbb.com/customise/db/extension/phpbb_gallery",
"eol": null,
"security": false
}
diff --git a/gallery-exif.json b/gallery-exif.json
index 40f37dab..e95fc70f 100644
--- a/gallery-exif.json
+++ b/gallery-exif.json
@@ -1,9 +1,9 @@
{
"stable": {
- "1.2": {
+ "3.3": {
"current": "1.2.2",
"download": "https://github.com/satanasov/phpbbgallery",
- "announcement": "https://github.com/satanasov/phpbbgallery",
+ "announcement": "https://www.phpbb.com/customise/db/extension/phpbb_gallery",
"eol": null,
"security": false
}
diff --git a/gallery-import.json b/gallery-import.json
index 40f37dab..e95fc70f 100644
--- a/gallery-import.json
+++ b/gallery-import.json
@@ -1,9 +1,9 @@
{
"stable": {
- "1.2": {
+ "3.3": {
"current": "1.2.2",
"download": "https://github.com/satanasov/phpbbgallery",
- "announcement": "https://github.com/satanasov/phpbbgallery",
+ "announcement": "https://www.phpbb.com/customise/db/extension/phpbb_gallery",
"eol": null,
"security": false
}
From 057712f92849457907a79b981cf397b295970c42 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 17:34:33 +0100
Subject: [PATCH 099/138] space
---
core/acp/main_module.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/acp/main_module.php b/core/acp/main_module.php
index 2f5ff162..b7012de2 100644
--- a/core/acp/main_module.php
+++ b/core/acp/main_module.php
@@ -569,7 +569,7 @@ function overview()
'IMAGES_PER_DAY' => $images_per_day,
'TOTAL_ALBUMS' => $num_albums,
'TOTAL_PERSONALS' => $config['phpbb_gallery_num_pegas'],
- 'GUPLOAD_DIR_SIZE' => get_formatted_filesize($dir_sizes['stat']),
+ 'GUPLOAD_DIR_SIZE' => get_formatted_filesize($dir_sizes['stat']),
'MEDIUM_DIR_SIZE' => get_formatted_filesize($dir_sizes['stat_medium']),
'CACHE_DIR_SIZE' => get_formatted_filesize($dir_sizes['stat_cache']),
'GALLERY_VERSION' => $config['phpbb_gallery_version'],
From 9ca2fd0af2891e9711a04adacc98a847e8631c5c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 18:10:20 +0100
Subject: [PATCH 100/138] Fix comments count after bad merge
---
core/search.php | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/core/search.php b/core/search.php
index 0d6fec47..6d62c337 100644
--- a/core/search.php
+++ b/core/search.php
@@ -230,7 +230,6 @@ public function random($limit, $user = 0, $fields = 'rrc_gindex_display', $block
);
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query($sql);
- $rowset = array();
$show_options = $this->gallery_config->get($fields);
$thumbnail_link = $this->gallery_config->get('link_thumbnail');
@@ -340,22 +339,22 @@ public function recent_comments($limit, $start = 0, $pagination = true)
$sql_array['WHERE'] .= ' AND ((' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums), false, true) . ' AND image_status <> ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
OR ' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('m_status'), $exclude_albums), false, true) . ')';
- $sql_array['SELECT'] = 'COUNT(c.comment_id) as count';
- $sql = $this->db->sql_build_query('SELECT', $sql_array);
+ $sql_array_count = $sql_array;
+ $sql_array_count['SELECT'] = 'COUNT(c.comment_id) as count';
+ unset($sql_array_count['GROUP_BY'], $sql_array_count['ORDER_BY']);
+ $sql = $this->db->sql_build_query('SELECT', $sql_array_count);
$result = $this->db->sql_query($sql);
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
- $count = 0;
- if ($row)
- {
- $count = $row['count'];
- }
+
+ $count = ($row) ? (int) $row['count'] : 0;
+
$sql_array['SELECT'] = '*';
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query_limit($sql, $sql_limit, $start);
- $rowset = array();
+ $rowset = [];
- $users_array = array();
+ $users_array = [];
while ($row = $this->db->sql_fetchrow($result))
{
$rowset[] = $row;
@@ -374,7 +373,6 @@ public function recent_comments($limit, $start = 0, $pagination = true)
$this->user_loader->load_users(array_keys($users_array));
foreach ($rowset as $var)
{
-
$album_tmp = $this->album->get_info($var['image_album_id']);
$this->template->assign_block_vars('commentrow', array(
'COMMENT_ID' => (int) $var['comment_id'],
@@ -392,17 +390,19 @@ public function recent_comments($limit, $start = 0, $pagination = true)
'IMAGE_TIME' => $this->user->format_date($var['image_time']),
));
}
- $this->template->assign_vars(array(
+ $this->template->assign_vars([
'SEARCH_MATCHES' => $this->language->lang('TOTAL_COMMENTS_SPRINTF', $count),
'SEARCH_TITLE' => $this->language->lang('RECENT_COMMENTS'),
- ));
+ ]);
if ($pagination)
{
- $this->pagination->generate_template_pagination(array(
- 'routes' => array(
- 'phpbbgallery_core_search_commented',
- 'phpbbgallery_core_search_commented_page',),
- 'params' => array()), 'pagination', 'page', $count, $limit, $start
+ $this->pagination->generate_template_pagination([
+ 'routes' => [
+ 'phpbbgallery_core_search_commented',
+ 'phpbbgallery_core_search_commented_page'
+ ],
+ 'params' => []
+ ], 'pagination', 'page', $count, $limit, $start
);
}
}
@@ -501,7 +501,7 @@ public function recent($limit, $start = 0, $user = 0, $fields = 'rrc_gindex_disp
$sql_ary['ORDER_BY'] = $sql_order;
$sql = $this->db->sql_build_query('SELECT', $sql_ary);
$result = $this->db->sql_query_limit($sql, $sql_limit, $start);
- $id_ary = array();
+ $id_ary = [];
while ($row = $this->db->sql_fetchrow($result))
{
$id_ary[] = $row['image_id'];
@@ -627,7 +627,7 @@ public function rating($limit, $start = 0)
$sql_array['ORDER_BY'] = 'image_rate_avg DESC, image_rates DESC';
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query_limit($sql, $limit, $start);
- $rowset = array();
+ $rowset = [];
while ($row = $this->db->sql_fetchrow($result))
{
From 1aacec50620ce99fb15174dc71c61c9dc3defc78 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Tue, 5 Aug 2025 19:48:25 +0100
Subject: [PATCH 101/138] Uniformize copyright structure
---
acpcleanup/acp/main_info.php | 15 ++++++----
acpcleanup/acp/main_module.php | 15 ++++++----
acpcleanup/cleanup.php | 16 +++++-----
acpcleanup/ext.php | 9 +++---
.../language/bg/info_acp_gallery_cleanup.php | 16 ++++++----
.../language/de/info_acp_gallery_cleanup.php | 17 ++++++-----
.../language/en/info_acp_gallery_cleanup.php | 15 ++++++----
.../language/fr/info_acp_gallery_cleanup.php | 17 ++++++-----
.../language/it/info_acp_gallery_cleanup.php | 16 ++++++----
.../language/ru/info_acp_gallery_cleanup.php | 17 ++++++-----
acpcleanup/migrations/m1_init.php | 15 ++++++----
acpimport/acp/main_info.php | 15 ++++++----
acpimport/acp/main_module.php | 15 ++++++----
acpimport/ext.php | 7 +++--
.../language/bg/info_acp_gallery_import.php | 16 ++++++----
.../language/de/info_acp_gallery_import.php | 17 ++++++-----
.../language/en/info_acp_gallery_import.php | 15 ++++++----
.../language/fr/info_acp_gallery_import.php | 17 ++++++-----
.../language/it/info_acp_gallery_import.php | 16 ++++++----
.../language/ru/info_acp_gallery_import.php | 17 ++++++-----
acpimport/migrations/m1_init.php | 9 ++++--
core/acp/albums_info.php | 16 +++++-----
core/acp/albums_module.php | 29 ++++++++++---------
core/acp/config_info.php | 15 ++++++----
core/acp/config_module.php | 15 ++++++----
core/acp/gallery_logs_info.php | 16 +++++-----
core/acp/gallery_logs_module.php | 16 +++++-----
core/acp/main_info.php | 16 +++++-----
core/acp/main_module.php | 16 +++++-----
core/acp/permissions_info.php | 16 +++++-----
core/acp/permissions_module.php | 16 +++++-----
core/adm/style/gallery_albums.html | 11 -------
core/adm/style/gallery_main.html | 11 -------
core/adm/style/gallery_permissions.html | 11 -------
core/album/album.php | 11 +++----
core/album/display.php | 16 +++++-----
core/album/loader.php | 16 +++++-----
core/album/manage.php | 29 ++++++++++---------
core/auth/auth.php | 16 +++++-----
core/auth/level.php | 16 +++++-----
core/auth/set.php | 16 +++++-----
core/block.bkp | 16 +++++-----
core/block.php | 16 +++++-----
core/cache.php | 17 ++++++-----
core/comment.php | 16 +++++-----
core/config.php | 15 +++++-----
core/constants.php | 16 +++++-----
core/contest.php | 16 +++++-----
core/controller/album.php | 12 ++++----
core/controller/comment.php | 15 +++++-----
core/controller/file.php | 16 +++++-----
core/controller/image.php | 12 ++++----
core/controller/index.php | 16 +++++-----
core/controller/moderate.php | 16 +++++-----
core/controller/search.php | 15 +++++-----
core/controller/upload.php | 16 +++++-----
core/cron/cron_cleaner.php | 17 ++++++-----
core/event/main_listener.php | 12 +++++---
core/ext.php | 9 ++++++
core/file/file.php | 16 +++++-----
core/file/types/multiform.php | 15 +++++-----
core/image/image.php | 16 +++++-----
core/language/bg/gallery.php | 16 +++++-----
core/language/bg/gallery_acp.php | 16 +++++-----
core/language/bg/gallery_mcp.php | 22 +++++++-------
core/language/bg/gallery_notifications.php | 22 +++++++-------
core/language/bg/gallery_ucp.php | 22 +++++++-------
core/language/bg/index.htm | 0
core/language/bg/info_acp_gallery.php | 16 +++++-----
core/language/bg/info_acp_gallery_logs.php | 22 +++++++-------
core/language/bg/info_ucp_gallery.php | 22 +++++++-------
core/language/bg/install_gallery.php | 22 +++++++-------
core/language/bg/permissions_gallery.php | 22 +++++++-------
core/language/de/gallery.php | 17 +++++------
core/language/de/gallery_acp.php | 17 +++++------
core/language/de/gallery_mcp.php | 23 +++++++--------
core/language/de/gallery_notifications.php | 24 +++++++--------
core/language/de/gallery_ucp.php | 25 ++++++++--------
core/language/de/info_acp_gallery.php | 17 +++++------
core/language/de/info_acp_gallery_logs.php | 23 +++++++--------
core/language/de/info_ucp_gallery.php | 23 +++++++--------
core/language/de/install_gallery.php | 23 +++++++--------
core/language/de/permissions_gallery.php | 22 +++++++-------
core/language/en/gallery.php | 15 +++++-----
core/language/en/gallery_acp.php | 15 +++++-----
core/language/en/gallery_mcp.php | 21 +++++++-------
core/language/en/gallery_notifications.php | 21 +++++++-------
core/language/en/gallery_ucp.php | 21 +++++++-------
core/language/en/info_acp_gallery.php | 15 +++++-----
core/language/en/info_acp_gallery_logs.php | 21 +++++++-------
core/language/en/info_ucp_gallery.php | 21 +++++++-------
core/language/en/install_gallery.php | 21 +++++++-------
core/language/en/permissions_gallery.php | 21 +++++++-------
core/language/es/gallery.php | 22 +++++++-------
core/language/es/gallery_acp.php | 22 +++++++-------
core/language/es/gallery_mcp.php | 22 +++++++-------
core/language/es/gallery_notifications.php | 22 +++++++-------
core/language/es/gallery_ucp.php | 22 +++++++-------
core/language/es/info_acp_gallery.php | 22 +++++++-------
core/language/es/info_acp_gallery_logs.php | 22 +++++++-------
core/language/es/info_ucp_gallery.php | 22 +++++++-------
core/language/es/install_gallery.php | 22 +++++++-------
core/language/es/permissions_gallery.php | 22 +++++++-------
core/language/fr/gallery.php | 21 +++++++-------
core/language/fr/gallery_acp.php | 21 +++++++-------
core/language/fr/gallery_mcp.php | 21 +++++++-------
core/language/fr/gallery_notifications.php | 21 +++++++-------
core/language/fr/gallery_ucp.php | 21 +++++++-------
core/language/fr/info_acp_gallery.php | 14 ++++-----
core/language/fr/info_acp_gallery_logs.php | 21 +++++++-------
core/language/fr/info_ucp_gallery.php | 21 +++++++-------
core/language/fr/install_gallery.php | 21 +++++++-------
core/language/fr/permissions_gallery.php | 21 +++++++-------
core/language/it/gallery.php | 22 +++++++-------
core/language/it/gallery_acp.php | 22 +++++++-------
core/language/it/gallery_mcp.php | 22 +++++++-------
core/language/it/gallery_notifications.php | 22 +++++++-------
core/language/it/gallery_ucp.php | 22 +++++++-------
core/language/it/info_acp_gallery.php | 22 +++++++-------
core/language/it/info_acp_gallery_logs.php | 22 +++++++-------
core/language/it/info_ucp_gallery.php | 22 +++++++-------
core/language/it/install_gallery.php | 22 +++++++-------
core/language/it/permissions_gallery.php | 22 +++++++-------
core/language/nl/gallery.php | 17 +++++------
core/language/nl/gallery_acp.php | 17 +++++------
core/language/nl/gallery_mcp.php | 23 +++++++--------
core/language/nl/gallery_notifications.php | 23 +++++++--------
core/language/nl/gallery_ucp.php | 23 +++++++--------
core/language/nl/info_acp_gallery.php | 17 +++++------
core/language/nl/info_acp_gallery_logs.php | 23 +++++++--------
core/language/nl/info_ucp_gallery.php | 23 +++++++--------
core/language/nl/install_gallery.php | 23 +++++++--------
core/language/nl/permissions_gallery.php | 23 +++++++--------
core/language/ru/gallery.php | 23 ++++++++-------
core/language/ru/gallery_acp.php | 23 +++++++--------
core/language/ru/gallery_mcp.php | 23 ++++++++-------
core/language/ru/gallery_notifications.php | 23 ++++++++-------
core/language/ru/gallery_ucp.php | 23 ++++++++-------
core/language/ru/info_acp_gallery.php | 23 ++++++++-------
core/language/ru/info_acp_gallery_logs.php | 23 ++++++++-------
core/language/ru/info_ucp_gallery.php | 23 ++++++++-------
core/language/ru/install_gallery.php | 23 ++++++++-------
core/language/ru/permissions_gallery.php | 23 ++++++++-------
core/log.php | 15 +++++-----
core/migrations/release_1_2_0.php | 15 ++++++----
core/migrations/release_1_2_0_add_bbcode.php | 15 ++++++----
.../release_1_2_0_create_filesystem.php | 14 +++++----
core/migrations/release_1_2_0_db_create.php | 15 ++++++----
core/migrations/release_3_2_1_0.php | 11 ++++---
core/migrations/release_3_2_1_1.php | 11 +++++--
core/migrations/release_3_3_0.php | 11 +++++--
core/migrations/split_ucp_module_settings.php | 15 ++++++----
core/misc.php | 16 +++++-----
core/moderate.php | 11 +++----
core/notification.php | 16 +++++-----
.../events/phpbbgallery_image_approved.php | 15 ++++++----
.../phpbbgallery_image_for_approval.php | 15 ++++++----
.../phpbbgallery_image_not_approved.php | 12 +++++---
.../events/phpbbgallery_new_comment.php | 15 ++++++----
.../events/phpbbgallery_new_image.php | 15 ++++++----
.../events/phpbbgallery_new_report.php | 15 ++++++----
core/notification/helper.php | 15 ++++++----
core/rating.php | 16 +++++-----
core/report.php | 16 +++++-----
core/search.php | 14 +++++----
.../event/memberlist_view_content_append.html | 2 --
core/ucp/main_info.php | 16 +++++-----
core/ucp/main_module.php | 16 +++++-----
core/ucp/settings_info.php | 16 +++++-----
core/ucp/settings_module.php | 16 +++++-----
core/upload.php | 16 +++++-----
core/url.php | 16 +++++-----
core/user.php | 12 ++++----
exif/event/exif_listener.php | 17 ++++++-----
exif/exif.php | 15 ++++++----
exif/ext.php | 9 +++---
exif/language/bg/info_exif.php | 16 ++++++----
exif/language/de/info_exif.php | 17 ++++++-----
exif/language/en/info_exif.php | 15 ++++++----
exif/language/fr/info_exif.php | 17 ++++++-----
exif/language/it/info_exif.php | 16 ++++++----
exif/language/ru/info_exif.php | 17 ++++++-----
exif/migrations/m1_init.php | 15 ++++++----
183 files changed, 1713 insertions(+), 1508 deletions(-)
create mode 100644 core/language/bg/index.htm
diff --git a/acpcleanup/acp/main_info.php b/acpcleanup/acp/main_info.php
index 74d1482f..b9319903 100644
--- a/acpcleanup/acp/main_info.php
+++ b/acpcleanup/acp/main_info.php
@@ -1,11 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
index b4a79e86..0a777bd5 100644
--- a/acpcleanup/language/de/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/de/info_acp_gallery_cleanup.php
@@ -1,12 +1,15 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpcleanup/language/en/info_acp_gallery_cleanup.php b/acpcleanup/language/en/info_acp_gallery_cleanup.php
index d263470f..0c086708 100644
--- a/acpcleanup/language/en/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/en/info_acp_gallery_cleanup.php
@@ -1,11 +1,14 @@
, inspired by darky and the phpBB-fr.com Team
+ */
/**
* DO NOT CHANGE
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
index 7bd2b373..b2eb0d45 100644
--- a/acpcleanup/language/it/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/it/info_acp_gallery_cleanup.php
@@ -1,11 +1,15 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpcleanup/migrations/m1_init.php b/acpcleanup/migrations/m1_init.php
index ea4dc7f2..7f963e9c 100644
--- a/acpcleanup/migrations/m1_init.php
+++ b/acpcleanup/migrations/m1_init.php
@@ -1,11 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpimport/language/de/info_acp_gallery_import.php b/acpimport/language/de/info_acp_gallery_import.php
index 3ec63566..01fca421 100644
--- a/acpimport/language/de/info_acp_gallery_import.php
+++ b/acpimport/language/de/info_acp_gallery_import.php
@@ -1,12 +1,15 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpimport/language/en/info_acp_gallery_import.php b/acpimport/language/en/info_acp_gallery_import.php
index 105e24cd..7ea1b7a5 100644
--- a/acpimport/language/en/info_acp_gallery_import.php
+++ b/acpimport/language/en/info_acp_gallery_import.php
@@ -1,11 +1,14 @@
, inspired by darky and the phpBB-fr.com Team
+ */
/**
* DO NOT CHANGE
diff --git a/acpimport/language/it/info_acp_gallery_import.php b/acpimport/language/it/info_acp_gallery_import.php
index 56388234..ad3e3be9 100644
--- a/acpimport/language/it/info_acp_gallery_import.php
+++ b/acpimport/language/it/info_acp_gallery_import.php
@@ -1,11 +1,15 @@
+ */
/**
* DO NOT CHANGE
diff --git a/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
index 4d0fb8dc..0b1363d7 100644
--- a/acpimport/migrations/m1_init.php
+++ b/acpimport/migrations/m1_init.php
@@ -2,9 +2,12 @@
/**
* phpBB Gallery - ACP Import Extension
*
- * @package phpBB Gallery
- * @copyright (c) 2014 satanasov | 2025 Leinad4Mind
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ * @package phpbbgallery/acpimport
+ * @author nickvergessen
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2007-2012 nickvergessen, 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
*/
namespace phpbbgallery\acpimport\migrations;
diff --git a/core/acp/albums_info.php b/core/acp/albums_info.php
index 81156f91..3f8a9547 100644
--- a/core/acp/albums_info.php
+++ b/core/acp/albums_info.php
@@ -1,12 +1,14 @@
{L_NOTIFY}
-
\ No newline at end of file
diff --git a/core/adm/style/gallery_main.html b/core/adm/style/gallery_main.html
index 9f6c1ae2..14897cdf 100644
--- a/core/adm/style/gallery_main.html
+++ b/core/adm/style/gallery_main.html
@@ -163,15 +163,4 @@ {ACP_GALLERY_TITLE}
-
\ No newline at end of file
diff --git a/core/adm/style/gallery_permissions.html b/core/adm/style/gallery_permissions.html
index 1bd1eda1..4d6924ba 100644
--- a/core/adm/style/gallery_permissions.html
+++ b/core/adm/style/gallery_permissions.html
@@ -308,15 +308,4 @@ {c_mask.C_MASK_NAME}
-
\ No newline at end of file
diff --git a/core/album/album.php b/core/album/album.php
index 0b05d692..96729ff5 100644
--- a/core/album/album.php
+++ b/core/album/album.php
@@ -1,11 +1,12 @@
- * @license GNU General Public License, version 2 (GPL-2.0)
- *
- * For full copyright and license information, please see
- * the docs/CREDITS.txt file.
- *
+ * @package phpbbgallery/core
+ * @author nickvergessen
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014 nickvergessen, 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
*/
namespace phpbbgallery\core\file\types;
diff --git a/core/image/image.php b/core/image/image.php
index 1a7ef9bf..435cbcea 100644
--- a/core/image/image.php
+++ b/core/image/image.php
@@ -1,12 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/bg/gallery_acp.php b/core/language/bg/gallery_acp.php
index 516c39ce..a2aae914 100644
--- a/core/language/bg/gallery_acp.php
+++ b/core/language/bg/gallery_acp.php
@@ -1,14 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php
index 4d439d5f..1d403837 100644
--- a/core/language/bg/gallery_mcp.php
+++ b/core/language/bg/gallery_mcp.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/gallery_notifications.php b/core/language/bg/gallery_notifications.php
index ef016ad7..f7da902f 100644
--- a/core/language/bg/gallery_notifications.php
+++ b/core/language/bg/gallery_notifications.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/gallery_ucp.php b/core/language/bg/gallery_ucp.php
index 5267c0a1..0a578db1 100644
--- a/core/language/bg/gallery_ucp.php
+++ b/core/language/bg/gallery_ucp.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/index.htm b/core/language/bg/index.htm
new file mode 100644
index 00000000..e69de29b
diff --git a/core/language/bg/info_acp_gallery.php b/core/language/bg/info_acp_gallery.php
index 4ae77405..1edd601b 100644
--- a/core/language/bg/info_acp_gallery.php
+++ b/core/language/bg/info_acp_gallery.php
@@ -1,14 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/bg/info_acp_gallery_logs.php b/core/language/bg/info_acp_gallery_logs.php
index 00dc0b15..4a340021 100644
--- a/core/language/bg/info_acp_gallery_logs.php
+++ b/core/language/bg/info_acp_gallery_logs.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/info_ucp_gallery.php b/core/language/bg/info_ucp_gallery.php
index c5378baa..a26ae8b0 100644
--- a/core/language/bg/info_ucp_gallery.php
+++ b/core/language/bg/info_ucp_gallery.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index 35d08434..bc12ee96 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/bg/permissions_gallery.php b/core/language/bg/permissions_gallery.php
index b0e3dc56..32bd69b7 100644
--- a/core/language/bg/permissions_gallery.php
+++ b/core/language/bg/permissions_gallery.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php
index 480c2c96..e44c920a 100644
--- a/core/language/de/gallery.php
+++ b/core/language/de/gallery.php
@@ -1,15 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/de/gallery_acp.php b/core/language/de/gallery_acp.php
index 6cab1489..b283a559 100644
--- a/core/language/de/gallery_acp.php
+++ b/core/language/de/gallery_acp.php
@@ -1,15 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php
index cf2ab26a..460345c0 100644
--- a/core/language/de/gallery_mcp.php
+++ b/core/language/de/gallery_mcp.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/gallery_notifications.php b/core/language/de/gallery_notifications.php
index b37b94bb..8426a9bd 100644
--- a/core/language/de/gallery_notifications.php
+++ b/core/language/de/gallery_notifications.php
@@ -1,20 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/gallery_ucp.php b/core/language/de/gallery_ucp.php
index a457ad85..682846d5 100644
--- a/core/language/de/gallery_ucp.php
+++ b/core/language/de/gallery_ucp.php
@@ -1,19 +1,18 @@
+ */
-/**
-* DO NOT CHANGE
-*/
+ /**
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/info_acp_gallery.php b/core/language/de/info_acp_gallery.php
index 43991e4e..46d77838 100644
--- a/core/language/de/info_acp_gallery.php
+++ b/core/language/de/info_acp_gallery.php
@@ -1,15 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/de/info_acp_gallery_logs.php b/core/language/de/info_acp_gallery_logs.php
index 63885bc1..5f5a18bf 100644
--- a/core/language/de/info_acp_gallery_logs.php
+++ b/core/language/de/info_acp_gallery_logs.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/info_ucp_gallery.php b/core/language/de/info_ucp_gallery.php
index fc207e53..03c74843 100644
--- a/core/language/de/info_ucp_gallery.php
+++ b/core/language/de/info_ucp_gallery.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index 10e8f169..98a633cb 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/de/permissions_gallery.php b/core/language/de/permissions_gallery.php
index 5cf5cd32..f5ff4d59 100644
--- a/core/language/de/permissions_gallery.php
+++ b/core/language/de/permissions_gallery.php
@@ -1,18 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/en/gallery.php b/core/language/en/gallery.php
index 3e0695d1..4916d741 100644
--- a/core/language/en/gallery.php
+++ b/core/language/en/gallery.php
@@ -1,14 +1,13 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/gallery_acp.php b/core/language/fr/gallery_acp.php
index 3a06c846..01caa79a 100644
--- a/core/language/fr/gallery_acp.php
+++ b/core/language/fr/gallery_acp.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php
index c3a7c0f3..5b16a074 100644
--- a/core/language/fr/gallery_mcp.php
+++ b/core/language/fr/gallery_mcp.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/gallery_notifications.php b/core/language/fr/gallery_notifications.php
index f09ad634..7d2d7fc2 100644
--- a/core/language/fr/gallery_notifications.php
+++ b/core/language/fr/gallery_notifications.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/gallery_ucp.php b/core/language/fr/gallery_ucp.php
index a700fb37..c337f084 100644
--- a/core/language/fr/gallery_ucp.php
+++ b/core/language/fr/gallery_ucp.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/info_acp_gallery.php b/core/language/fr/info_acp_gallery.php
index f89eda75..c033c63f 100644
--- a/core/language/fr/info_acp_gallery.php
+++ b/core/language/fr/info_acp_gallery.php
@@ -1,13 +1,13 @@
- 2018 Stanislav Atanasov
- * @license GNU General Public License, version 2 (GPL-2.0-only)
- *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
*/
/**
diff --git a/core/language/fr/info_acp_gallery_logs.php b/core/language/fr/info_acp_gallery_logs.php
index 9c74e5e6..d3c6871c 100644
--- a/core/language/fr/info_acp_gallery_logs.php
+++ b/core/language/fr/info_acp_gallery_logs.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/info_ucp_gallery.php b/core/language/fr/info_ucp_gallery.php
index 0acf2443..b076d57b 100644
--- a/core/language/fr/info_ucp_gallery.php
+++ b/core/language/fr/info_ucp_gallery.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index 41d069f7..96b22129 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/fr/permissions_gallery.php b/core/language/fr/permissions_gallery.php
index e18a626f..c28ce662 100644
--- a/core/language/fr/permissions_gallery.php
+++ b/core/language/fr/permissions_gallery.php
@@ -1,17 +1,18 @@
- 2018 Stanislav Atanasov
-* @license GNU General Public License, version 2 (GPL-2.0-only)
-*
-*/
+ * phpBB Gallery - ACP Core Extension [French Translation]
+ *
+ * @package phpbbgallery/core
+ * @author satanasov
+ * @author Leinad4Mind
+ * @copyright 2014- satanasov, 2018- Leinad4Mind
+ * @license GPL-2.0-only
+ * @translator pokyto (aka le.poke) , inspired by darky and the phpBB-fr.com Team
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index 2c7272dc..501e793f 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -1,18 +1,18 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/nl/gallery_acp.php b/core/language/nl/gallery_acp.php
index f2f398fb..7b5e37ae 100644
--- a/core/language/nl/gallery_acp.php
+++ b/core/language/nl/gallery_acp.php
@@ -1,15 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php
index 0698b686..f83d53a8 100644
--- a/core/language/nl/gallery_mcp.php
+++ b/core/language/nl/gallery_mcp.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/gallery_notifications.php b/core/language/nl/gallery_notifications.php
index 0a221295..83a60897 100644
--- a/core/language/nl/gallery_notifications.php
+++ b/core/language/nl/gallery_notifications.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/gallery_ucp.php b/core/language/nl/gallery_ucp.php
index 7fa2f939..3b9782f9 100644
--- a/core/language/nl/gallery_ucp.php
+++ b/core/language/nl/gallery_ucp.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/info_acp_gallery.php b/core/language/nl/info_acp_gallery.php
index 33604238..6debd1b2 100644
--- a/core/language/nl/info_acp_gallery.php
+++ b/core/language/nl/info_acp_gallery.php
@@ -1,15 +1,14 @@
+ */
/**
* DO NOT CHANGE
diff --git a/core/language/nl/info_acp_gallery_logs.php b/core/language/nl/info_acp_gallery_logs.php
index 4a7874bf..6f3c4740 100644
--- a/core/language/nl/info_acp_gallery_logs.php
+++ b/core/language/nl/info_acp_gallery_logs.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/info_ucp_gallery.php b/core/language/nl/info_ucp_gallery.php
index f3cedf86..e1a0e1a4 100644
--- a/core/language/nl/info_ucp_gallery.php
+++ b/core/language/nl/info_ucp_gallery.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index 7fb21931..943cb43b 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/nl/permissions_gallery.php b/core/language/nl/permissions_gallery.php
index f7651e57..cfa5e5f8 100644
--- a/core/language/nl/permissions_gallery.php
+++ b/core/language/nl/permissions_gallery.php
@@ -1,19 +1,18 @@
+ */
/**
-* DO NOT CHANGE
-*/
+ * DO NOT CHANGE
+ */
if (!defined('IN_PHPBB'))
{
exit;
diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php
index e279a3e7..d97dad3c 100644
--- a/core/language/ru/gallery.php
+++ b/core/language/ru/gallery.php
@@ -1,17 +1,18 @@
-
-
\ No newline at end of file
diff --git a/core/ucp/main_info.php b/core/ucp/main_info.php
index 204b4ad5..fea3c1bd 100644
--- a/core/ucp/main_info.php
+++ b/core/ucp/main_info.php
@@ -1,12 +1,14 @@
+ */
/**
* @ignore
diff --git a/exif/language/de/info_exif.php b/exif/language/de/info_exif.php
index c0492573..944c52b1 100644
--- a/exif/language/de/info_exif.php
+++ b/exif/language/de/info_exif.php
@@ -1,12 +1,15 @@
+ */
/**
* @ignore
diff --git a/exif/language/en/info_exif.php b/exif/language/en/info_exif.php
index 33a82cf5..6a371a7e 100644
--- a/exif/language/en/info_exif.php
+++ b/exif/language/en/info_exif.php
@@ -1,11 +1,14 @@
, inspired by darky and the phpBB-fr.com Team
+ */
/**
* @ignore
diff --git a/exif/language/it/info_exif.php b/exif/language/it/info_exif.php
index 40d908e7..93446b95 100644
--- a/exif/language/it/info_exif.php
+++ b/exif/language/it/info_exif.php
@@ -1,11 +1,15 @@
+ */
/**
* @ignore
diff --git a/exif/migrations/m1_init.php b/exif/migrations/m1_init.php
index d3a5d893..e8636af2 100644
--- a/exif/migrations/m1_init.php
+++ b/exif/migrations/m1_init.php
@@ -1,11 +1,14 @@
Date: Wed, 6 Aug 2025 21:33:15 +0100
Subject: [PATCH 102/138] Fix missing translations
---
core/language/bg/gallery.php | 2 +-
core/language/de/gallery.php | 2 +-
core/language/de/gallery_mcp.php | 2 +-
core/language/es/gallery.php | 2 +-
core/language/fr/gallery.php | 2 +-
core/language/it/gallery.php | 2 +-
core/language/nl/gallery.php | 2 +-
core/language/ru/gallery.php | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php
index 4da4f817..755f0e26 100644
--- a/core/language/bg/gallery.php
+++ b/core/language/bg/gallery.php
@@ -150,7 +150,7 @@
'IMAGE_LOCKED' => 'Съжаляваме, но това изображение е заключено. Вече не можете да го коментирате.',
'IMAGE_NAME' => 'Име на изображение',
'IMAGE_NOT_EXIST' => 'Това изображение не съществува.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'За одобрение',
'IMAGE_PCT' => '%.2f%% от всички изображения',
'IMAGE_STATUS' => 'Статус',
'IMAGE_URL' => 'Image-URL',
diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php
index e44c920a..dc66ce61 100644
--- a/core/language/de/gallery.php
+++ b/core/language/de/gallery.php
@@ -150,7 +150,7 @@
'IMAGE_LOCKED' => 'Entschuldigung, aber dieses Bild wurde gesperrt. Du kannst für dieses Bild keine Kommentare mehr abgeben.',
'IMAGE_NAME' => 'Bildname',
'IMAGE_NOT_EXIST' => 'Dieses Bild existiert nicht',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'Wartet auf Freigabe',
'IMAGE_PCT' => '%.2f%% aller Bilder',
'IMAGE_STATUS' => 'Status',
'IMAGE_URL' => 'Bildlink',
diff --git a/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php
index 2f624e35..0501f770 100644
--- a/core/language/de/gallery_mcp.php
+++ b/core/language/de/gallery_mcp.php
@@ -56,7 +56,7 @@
'QUEUE_A_DELETE2_CONFIRM' => 'Bist du dir sicher, dass du das Bild löschen möchtest?',
'QUEUE_A_LOCK' => 'Bildkommentare sperren',
'QUEUE_A_LOCK2' => 'Bildkommentare genehmigen und sperren?',
- 'QUEUE_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass Sie die Kommentare zu diesem Bild genehmigen und sperren möchten?',
+ 'QUEUE_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass du die Kommentare zu diesem Bild genehmigen oder sperren möchtest?',
'QUEUE_A_MOVE' => 'Bild verschieben',
'QUEUE_A_UNAPPROVE' => 'erneute Freischaltung erzwingen',
'QUEUE_A_UNAPPROVE2' => 'erneute Freischaltung erzwingen?',
diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php
index bbe7bf2d..b4833fb9 100644
--- a/core/language/es/gallery.php
+++ b/core/language/es/gallery.php
@@ -150,7 +150,7 @@
'IMAGE_LOCKED' => 'Lo siento, esta imagen está bloqueada. No puedes publicar más comentarios para esta imagen. ',
'IMAGE_NAME' => 'Nombre de imagen',
'IMAGE_NOT_EXIST' => 'Esta imagen no existe.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'Para aprobación',
'IMAGE_PCT' => '%.2f%% de todas las imágenes',
'IMAGE_STATUS' => 'Estado',
'IMAGE_URL' => 'Imagen-URL',
diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php
index 517fbabb..f105e233 100644
--- a/core/language/fr/gallery.php
+++ b/core/language/fr/gallery.php
@@ -166,7 +166,7 @@
'IMAGE_LOCKED' => 'Désolé, cette image est verrouillée. Vous ne pouvez pas publier de commentaires sur cette image.',
'IMAGE_NAME' => 'Nom de l’image',
'IMAGE_NOT_EXIST' => 'Cette image n’existe pas.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'Pour approbation',
'IMAGE_PCT' => '%.2f%% de toutes les images',
'IMAGE_STATUS' => 'Statut',
'IMAGE_URL' => 'Lien',
diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php
index 501e793f..96594508 100644
--- a/core/language/it/gallery.php
+++ b/core/language/it/gallery.php
@@ -150,7 +150,7 @@
'IMAGE_LOCKED' => 'Spiacente, quest’immagine è bloccata. Non si può più commentare quest’immagine.',
'IMAGE_NAME' => 'Nome immagine',
'IMAGE_NOT_EXIST' => 'Quest’immagine non esiste.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'Per approvazione',
'IMAGE_PCT' => '%.2f%% di tutte le immagini',
'IMAGE_STATUS' => 'Stato',
'IMAGE_URL' => 'URL-Immagine',
diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php
index 6c03eb79..ea347b81 100644
--- a/core/language/nl/gallery.php
+++ b/core/language/nl/gallery.php
@@ -150,7 +150,7 @@
'IMAGE_LOCKED' => 'Sorry, deze afbeelding is gesloten. Je kan geen reacties meer plaatsen op deze afbeelding.',
'IMAGE_NAME' => 'Afbeeldingsnaam',
'IMAGE_NOT_EXIST' => 'Deze afbeelding bestaat niet.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'Ter goedkeuring',
'IMAGE_PCT' => '%.2f%% van alle afbeeldingen',
'IMAGE_STATUS' => 'Status',
'IMAGE_URL' => 'Afbeeldingslink',
diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php
index d97dad3c..d07c74b6 100644
--- a/core/language/ru/gallery.php
+++ b/core/language/ru/gallery.php
@@ -143,7 +143,7 @@
'IMAGE_LOCKED' => 'Фото блокировано. Вы не можете оставлять к нему комментарии.',
'IMAGE_NAME' => 'Название',
'IMAGE_NOT_EXIST' => 'Фото не найдено.',
- 'IMAGE_NOT_APPROVED' => 'For approval',
+ 'IMAGE_NOT_APPROVED' => 'На утверждение',
'IMAGE_PCT' => '%.2f%% всех фотографий',
'IMAGE_STATUS' => 'Статус',
'IMAGE_URL' => 'Ссылка на фото',
From ef96d65b2a6edb6162ecf45326c9f5e8481677b3 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Wed, 6 Aug 2025 21:38:02 +0100
Subject: [PATCH 103/138] Add missing translations
---
acpcleanup/language/bg/info_acp_gallery_cleanup.php | 4 ++--
acpcleanup/language/de/info_acp_gallery_cleanup.php | 4 ++--
acpcleanup/language/fr/info_acp_gallery_cleanup.php | 4 ++--
acpcleanup/language/it/info_acp_gallery_cleanup.php | 4 ++--
acpcleanup/language/ru/info_acp_gallery_cleanup.php | 4 ++--
acpimport/language/bg/info_acp_gallery_import.php | 4 ++--
acpimport/language/de/info_acp_gallery_import.php | 4 ++--
acpimport/language/fr/info_acp_gallery_import.php | 4 ++--
acpimport/language/it/info_acp_gallery_import.php | 4 ++--
acpimport/language/ru/info_acp_gallery_import.php | 4 ++--
exif/language/bg/info_exif.php | 4 ++--
exif/language/de/info_exif.php | 4 ++--
exif/language/en/index copy.htm | 0
exif/language/fr/info_exif.php | 4 ++--
exif/language/it/info_exif.php | 4 ++--
exif/language/ru/info_exif.php | 4 ++--
16 files changed, 30 insertions(+), 30 deletions(-)
delete mode 100644 exif/language/en/index copy.htm
diff --git a/acpcleanup/language/bg/info_acp_gallery_cleanup.php b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
index 70f91c45..2618cc0c 100644
--- a/acpcleanup/language/bg/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/bg/info_acp_gallery_cleanup.php
@@ -79,6 +79,6 @@
'MOVE_TO_USER_EXP' => 'Изображенията и коментарите ще бъдат преместеи като такива на посочения потребител. Ако не посочите потребител - Гост е зададен по-подразбиране',
'CLEAN_USER_NOT_FOUND' => 'Желаният от вас потребител не е открит!',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Първо трябва да бъде инсталирано и активирано разширението phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Разширението е активирано успешно.',
]);
diff --git a/acpcleanup/language/de/info_acp_gallery_cleanup.php b/acpcleanup/language/de/info_acp_gallery_cleanup.php
index 0a777bd5..09524687 100644
--- a/acpcleanup/language/de/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/de/info_acp_gallery_cleanup.php
@@ -80,6 +80,6 @@
'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' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Die phpBB Gallery Core-Erweiterung muss zuerst installiert und aktiviert werden.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Die Erweiterung wurde erfolgreich aktiviert.',
]);
diff --git a/acpcleanup/language/fr/info_acp_gallery_cleanup.php b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
index 219134c8..4573f30b 100644
--- a/acpcleanup/language/fr/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/fr/info_acp_gallery_cleanup.php
@@ -80,6 +80,6 @@
'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' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ '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.',
]);
diff --git a/acpcleanup/language/it/info_acp_gallery_cleanup.php b/acpcleanup/language/it/info_acp_gallery_cleanup.php
index 030532ec..a392dad2 100644
--- a/acpcleanup/language/it/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/it/info_acp_gallery_cleanup.php
@@ -80,6 +80,6 @@
'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' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'L\'estensione phpBB Gallery Core deve essere prima installata e abilitata.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'L\'estensione è stata abilitata con successo.',
]);
diff --git a/acpcleanup/language/ru/info_acp_gallery_cleanup.php b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
index 5753d833..4c5800b4 100644
--- a/acpcleanup/language/ru/info_acp_gallery_cleanup.php
+++ b/acpcleanup/language/ru/info_acp_gallery_cleanup.php
@@ -80,6 +80,6 @@
'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.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Сначала необходимо установить и включить расширение phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Расширение успешно включено.',
]);
diff --git a/acpimport/language/bg/info_acp_gallery_import.php b/acpimport/language/bg/info_acp_gallery_import.php
index e143dade..7734722e 100644
--- a/acpimport/language/bg/info_acp_gallery_import.php
+++ b/acpimport/language/bg/info_acp_gallery_import.php
@@ -44,6 +44,6 @@
'NO_FILE_SELECTED' => 'Трябва да изберете поне един фаил.',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Първо трябва да бъде инсталирано и активирано разширението phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Разширението е активирано успешно.',
]);
diff --git a/acpimport/language/de/info_acp_gallery_import.php b/acpimport/language/de/info_acp_gallery_import.php
index 01fca421..934b6915 100644
--- a/acpimport/language/de/info_acp_gallery_import.php
+++ b/acpimport/language/de/info_acp_gallery_import.php
@@ -44,6 +44,6 @@
'NO_FILE_SELECTED' => 'Du musst mindestens eine Datei auswählen.',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Die phpBB Gallery Core-Erweiterung muss zuerst installiert und aktiviert werden.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Die Erweiterung wurde erfolgreich aktiviert.',
]);
diff --git a/acpimport/language/fr/info_acp_gallery_import.php b/acpimport/language/fr/info_acp_gallery_import.php
index c8511a63..1e742af4 100644
--- a/acpimport/language/fr/info_acp_gallery_import.php
+++ b/acpimport/language/fr/info_acp_gallery_import.php
@@ -44,6 +44,6 @@
'NO_FILE_SELECTED' => 'Vous devez sélectionner au moins un fichier.',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ '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.',
]);
diff --git a/acpimport/language/it/info_acp_gallery_import.php b/acpimport/language/it/info_acp_gallery_import.php
index 62b3a129..0bd1e26b 100644
--- a/acpimport/language/it/info_acp_gallery_import.php
+++ b/acpimport/language/it/info_acp_gallery_import.php
@@ -44,6 +44,6 @@
'NO_FILE_SELECTED' => 'Devi selezionare almeno un file.',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'L\'estensione phpBB Gallery Core deve essere prima installata e abilitata.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'L\'estensione è stata abilitata con successo.',
]);
diff --git a/acpimport/language/ru/info_acp_gallery_import.php b/acpimport/language/ru/info_acp_gallery_import.php
index 81e04eec..d5103360 100644
--- a/acpimport/language/ru/info_acp_gallery_import.php
+++ b/acpimport/language/ru/info_acp_gallery_import.php
@@ -44,6 +44,6 @@
'NO_FILE_SELECTED' => 'Вы должны выбрать минимум один файл',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Сначала необходимо установить и включить расширение phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Расширение успешно включено.',
]);
diff --git a/exif/language/bg/info_exif.php b/exif/language/bg/info_exif.php
index 2a39b210..0513c11b 100644
--- a/exif/language/bg/info_exif.php
+++ b/exif/language/bg/info_exif.php
@@ -97,6 +97,6 @@
'SHOW_EXIF' => 'show/hide',
'VIEWEXIFS_DEFAULT' => 'View Exif-Data by default',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Първо трябва да бъде инсталирано и активирано разширението phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Разширението е активирано успешно.',
]);
diff --git a/exif/language/de/info_exif.php b/exif/language/de/info_exif.php
index 944c52b1..3963fad2 100644
--- a/exif/language/de/info_exif.php
+++ b/exif/language/de/info_exif.php
@@ -97,6 +97,6 @@
'SHOW_EXIF' => 'ein-/ausblenden',
'VIEWEXIFS_DEFAULT' => 'Ansicht Exif-Daten standardmäßig',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Die phpBB Gallery Core-Erweiterung muss zuerst installiert und aktiviert werden.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Die Erweiterung wurde erfolgreich aktiviert.',
]);
diff --git a/exif/language/en/index copy.htm b/exif/language/en/index copy.htm
deleted file mode 100644
index e69de29b..00000000
diff --git a/exif/language/fr/info_exif.php b/exif/language/fr/info_exif.php
index bcd9fb91..32773855 100644
--- a/exif/language/fr/info_exif.php
+++ b/exif/language/fr/info_exif.php
@@ -97,6 +97,6 @@
'SHOW_EXIF' => 'Afficher/Cacher',
'VIEWEXIFS_DEFAULT' => 'Voir les informations des images par défaut',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ '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.',
]);
diff --git a/exif/language/it/info_exif.php b/exif/language/it/info_exif.php
index dea94eeb..7c12ddaf 100644
--- a/exif/language/it/info_exif.php
+++ b/exif/language/it/info_exif.php
@@ -97,6 +97,6 @@
'SHOW_EXIF' => 'mostra/nascondi',
'VIEWEXIFS_DEFAULT' => 'Visualizza Dati-Exif in modo predefinito',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'L\'estensione phpBB Gallery Core deve essere prima installata e abilitata.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'L\'estensione è stata abilitata con successo.',
]);
diff --git a/exif/language/ru/info_exif.php b/exif/language/ru/info_exif.php
index ed9a891b..137ff2d9 100644
--- a/exif/language/ru/info_exif.php
+++ b/exif/language/ru/info_exif.php
@@ -97,6 +97,6 @@
'SHOW_EXIF' => 'Показать / Скрыть',
'VIEWEXIFS_DEFAULT' => 'Просмотр EXIF-Данных по умолчанию',
- 'GALLERY_CORE_NOT_FOUND' => 'phpBB Gallery Core extension must be installed and enabled first.',
- 'EXTENSION_ENABLE_SUCCESS' => 'The extension has been enabled successfully.',
+ 'GALLERY_CORE_NOT_FOUND' => 'Сначала необходимо установить и включить расширение phpBB Gallery Core.',
+ 'EXTENSION_ENABLE_SUCCESS' => 'Расширение успешно включено.',
]);
From 27cd4f18e28561bf58aaaa2cc54ebcd03774924a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Wed, 6 Aug 2025 21:59:59 +0100
Subject: [PATCH 104/138] Improvements configs
---
acpcleanup/config/services.yml | 8 +--
core/config/services.yml | 88 ++++++++++++++---------------
core/config/services_controller.yml | 24 ++++----
core/config/tables.yml | 26 ++++-----
4 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/acpcleanup/config/services.yml b/acpcleanup/config/services.yml
index 87af9f19..7d1e8c0d 100644
--- a/acpcleanup/config/services.yml
+++ b/acpcleanup/config/services.yml
@@ -1,6 +1,6 @@
parameters:
- phpbbgallery.acpcleanup.tables.albums: '%core.table_prefix%gallery_albums'
- phpbbgallery.acpcleanup.tables.images: '%core.table_prefix%gallery_images'
+ phpbbgallery.tables.albums: '%core.table_prefix%gallery_albums'
+ phpbbgallery.tables.images: '%core.table_prefix%gallery_images'
services:
phpbbgallery.acpcleanup.cleanup:
@@ -16,5 +16,5 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.moderate'
- - '%phpbbgallery.acpcleanup.tables.albums%'
- - '%phpbbgallery.acpcleanup.tables.images%'
\ No newline at end of file
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
\ No newline at end of file
diff --git a/core/config/services.yml b/core/config/services.yml
index bac3cd6e..2475b8a7 100644
--- a/core/config/services.yml
+++ b/core/config/services.yml
@@ -17,10 +17,10 @@ services:
- '@phpbbgallery.core.cache'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.config'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.watch%'
- - '%tables.phpbbgallery.contests%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.watch%'
+ - '%phpbbgallery.tables.contests%'
phpbbgallery.core.album.display:
class: phpbbgallery\core\album\display
arguments:
@@ -38,17 +38,17 @@ services:
- '@phpbbgallery.core.misc'
- '%core.root_path%'
- '%core.php_ext%'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.contests%'
- - '%tables.phpbbgallery.tracking%'
- - '%tables.phpbbgallery.moderators%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.contests%'
+ - '%phpbbgallery.tables.tracking%'
+ - '%phpbbgallery.tables.moderators%'
phpbbgallery.core.album.loader:
class: phpbbgallery\core\album\loader
arguments:
- '@dbal.conn'
- '@user'
- '@phpbbgallery.core.contest'
- - '%tables.phpbbgallery.albums%'
+ - '%phpbbgallery.tables.albums%'
phpbbgallery.core.album.manage:
class: phpbbgallery\core\album\manage
arguments:
@@ -68,12 +68,12 @@ services:
- '@phpbbgallery.core.report'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.notification'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.comments%'
- - '%tables.phpbbgallery.permissions%'
- - '%tables.phpbbgallery.moderators%'
- - '%tables.phpbbgallery.contests%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.permissions%'
+ - '%phpbbgallery.tables.moderators%'
+ - '%phpbbgallery.tables.contests%'
phpbbgallery.core.misc:
class: phpbbgallery\core\misc
arguments:
@@ -84,7 +84,7 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.user'
- '@phpbbgallery.core.url'
- - '%tables.phpbbgallery.tracking%'
+ - '%phpbbgallery.tables.tracking%'
phpbbgallery.core.auth:
class: phpbbgallery\core\auth\auth
arguments:
@@ -93,10 +93,10 @@ services:
- '@phpbbgallery.core.user'
- '@user'
- '@auth'
- - '%tables.phpbbgallery.permissions%'
- - '%tables.phpbbgallery.roles%'
- - '%tables.phpbbgallery.users%'
- - '%tables.phpbbgallery.albums%'
+ - '%phpbbgallery.tables.permissions%'
+ - '%phpbbgallery.tables.roles%'
+ - '%phpbbgallery.tables.users%'
+ - '%phpbbgallery.tables.albums%'
phpbbgallery.core.auth.level:
class: phpbbgallery\core\auth\level
arguments:
@@ -110,8 +110,8 @@ services:
arguments:
- '@cache'
- '@dbal.conn'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.file.tool:
class: phpbbgallery\core\file\file
arguments:
@@ -139,7 +139,7 @@ services:
- '@phpbbgallery.core.user'
- '@phpbbgallery.core.contest'
- '@phpbbgallery.core.file.tool'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.user:
class: phpbbgallery\core\user
arguments:
@@ -149,7 +149,7 @@ services:
- '@profilefields.manager'
- '@config'
- '@auth'
- - '%tables.phpbbgallery.users%'
+ - '%phpbbgallery.tables.users%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.config:
@@ -171,8 +171,8 @@ services:
- '@phpbbgallery.core.config'
- '@pagination'
- '@phpbbgallery.core.notification.helper'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.reports%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.reports%'
phpbbgallery.core.comment:
class: phpbbgallery\core\comment
arguments:
@@ -181,8 +181,8 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.auth'
- '@phpbbgallery.core.block'
- - '%tables.phpbbgallery.comments%'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.url:
class: phpbbgallery\core\url
arguments:
@@ -209,7 +209,7 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.notification'
- '@phpbbgallery.core.rating'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.search:
class: phpbbgallery\core\search
arguments:
@@ -224,15 +224,15 @@ services:
- '@phpbbgallery.core.image'
- '@pagination'
- '@user_loader'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.comments%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.comments%'
phpbbgallery.core.notification:
class: phpbbgallery\core\notification
arguments:
- '@dbal.conn'
- '@user'
- - '%tables.phpbbgallery.watch%'
+ - '%phpbbgallery.tables.watch%'
phpbbgallery.core.notification.helper:
class: phpbbgallery\core\notification\helper
arguments:
@@ -248,7 +248,7 @@ services:
- '@service_container'
- '%core.root_path%'
- '%core.php_ext%'
- - '%tables.phpbbgallery.watch%'
+ - '%phpbbgallery.tables.watch%'
calls:
- [set_image, ['@phpbbgallery.core.image']]
phpbbgallery.core.log:
@@ -263,8 +263,8 @@ services:
- '@pagination'
- '@phpbbgallery.core.auth'
- '@phpbbgallery.core.config'
- - '%tables.phpbbgallery.log%'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.log%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.block:
class: phpbbgallery\core\block
phpbbgallery.core.contest:
@@ -272,8 +272,8 @@ services:
arguments:
- '@dbal.conn'
- '@phpbbgallery.core.config'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.contests%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.contests%'
phpbbgallery.core.upload:
class: phpbbgallery\core\upload
arguments:
@@ -288,7 +288,7 @@ services:
- '@phpbbgallery.core.url'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.file.tool'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.images%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.rating:
@@ -301,9 +301,9 @@ services:
- '@request'
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.auth'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.rates%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.rates%'
#######################
#### Define event #####
#######################
@@ -317,8 +317,8 @@ services:
- '@phpbbgallery.core.search'
- '@phpbbgallery.core.config'
- '@dbal.conn'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.users%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.users%'
- '%core.php_ext%'
tags:
- { name: event.listener }
diff --git a/core/config/services_controller.yml b/core/config/services_controller.yml
index 550bb476..964f7980 100644
--- a/core/config/services_controller.yml
+++ b/core/config/services_controller.yml
@@ -26,7 +26,7 @@ services:
- '@phpbbgallery.core.upload'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.contest'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.images%'
- '%core.root_path%'
phpbbgallery.core.controller.album:
class: phpbbgallery\core\controller\album
@@ -48,7 +48,7 @@ services:
- '@phpbbgallery.core.image'
- '@request'
- '@phpbbgallery.core.contest'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.controller.file:
class: phpbbgallery\core\controller\file
arguments:
@@ -63,8 +63,8 @@ services:
- '%phpbbgallery.core.file.medium%'
- '%phpbbgallery.core.file.mini%'
- '%phpbbgallery.core.file.watermark%'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
phpbbgallery.core.controller.image:
class: phpbbgallery\core\controller\image
arguments:
@@ -97,10 +97,10 @@ services:
- '@phpbbgallery.core.rating'
- '@phpbbgallery.core.block'
- '@service_container'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.users%'
- - '%tables.phpbbgallery.comments%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.users%'
+ - '%phpbbgallery.tables.comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.index:
@@ -142,9 +142,9 @@ services:
- '@phpbbgallery.core.image'
- '@phpbbgallery.core.url'
- '@phpbbgallery.core.search'
- - '%tables.phpbbgallery.images%'
- - '%tables.phpbbgallery.albums%'
- - '%tables.phpbbgallery.comments%'
+ - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.comment:
@@ -173,7 +173,7 @@ services:
- '@phpbbgallery.core.notification'
- '@phpbbgallery.core.rating'
- '@service_container'
- - '%tables.phpbbgallery.comments%'
+ - '%phpbbgallery.tables.comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.moderate:
diff --git a/core/config/tables.yml b/core/config/tables.yml
index 2491cd5a..d4a138ce 100644
--- a/core/config/tables.yml
+++ b/core/config/tables.yml
@@ -4,16 +4,16 @@ parameters:
phpbbgallery.core.file.mini: '%core.root_path%files/phpbbgallery/core/mini/'
phpbbgallery.core.file.watermark: '%core.root_path%ext/phpbbgallery/core/images/watermark.png'
- tables.phpbbgallery.albums: '%core.table_prefix%gallery_albums'
- tables.phpbbgallery.contests: '%core.table_prefix%gallery_contests'
- tables.phpbbgallery.images: '%core.table_prefix%gallery_images'
- tables.phpbbgallery.moderators: '%core.table_prefix%gallery_modscache'
- tables.phpbbgallery.permissions: '%core.table_prefix%gallery_permissions'
- tables.phpbbgallery.roles: '%core.table_prefix%gallery_roles'
- tables.phpbbgallery.tracking: '%core.table_prefix%gallery_albums_track'
- tables.phpbbgallery.users: '%core.table_prefix%gallery_users'
- tables.phpbbgallery.comments: '%core.table_prefix%gallery_comments'
- tables.phpbbgallery.reports: '%core.table_prefix%gallery_reports'
- tables.phpbbgallery.rates: '%core.table_prefix%gallery_rates'
- tables.phpbbgallery.log: '%core.table_prefix%gallery_log'
- tables.phpbbgallery.watch: '%core.table_prefix%gallery_watch'
+ phpbbgallery.tables.albums: '%core.table_prefix%gallery_albums'
+ phpbbgallery.tables.contests: '%core.table_prefix%gallery_contests'
+ phpbbgallery.tables.images: '%core.table_prefix%gallery_images'
+ phpbbgallery.tables.moderators: '%core.table_prefix%gallery_modscache'
+ phpbbgallery.tables.permissions: '%core.table_prefix%gallery_permissions'
+ phpbbgallery.tables.roles: '%core.table_prefix%gallery_roles'
+ phpbbgallery.tables.tracking: '%core.table_prefix%gallery_albums_track'
+ phpbbgallery.tables.users: '%core.table_prefix%gallery_users'
+ phpbbgallery.tables.comments: '%core.table_prefix%gallery_comments'
+ phpbbgallery.tables.reports: '%core.table_prefix%gallery_reports'
+ phpbbgallery.tables.rates: '%core.table_prefix%gallery_rates'
+ phpbbgallery.tables.log: '%core.table_prefix%gallery_log'
+ phpbbgallery.tables.watch: '%core.table_prefix%gallery_watch'
From 77aebdeaa1dae534c1a924ec2fd572280006987a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 16:52:02 +0100
Subject: [PATCH 105/138] Prevent uninstall core if sub.ext are installed
---
core/ext.php | 22 ++++++++++++++++++++++
core/language/bg/install_gallery.php | 2 ++
core/language/de/install_gallery.php | 2 ++
core/language/en/install_gallery.php | 2 ++
core/language/es/install_gallery.php | 2 ++
core/language/fr/install_gallery.php | 2 ++
core/language/it/install_gallery.php | 2 ++
core/language/nl/install_gallery.php | 2 ++
core/language/ru/install_gallery.php | 4 ++++
9 files changed, 40 insertions(+)
diff --git a/core/ext.php b/core/ext.php
index 50bcc188..d5639be6 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -68,6 +68,28 @@ function enable_step($old_state)
*/
function disable_step($old_state)
{
+ $extensions = $this->container->get('ext.manager');
+
+ // List of dependent sub-extensions that must be disabled/uninstalled first
+ $sub_extensions = [
+ 'phpbbgallery/exif',
+ 'phpbbgallery/acpcleanup',
+ 'phpbbgallery/acpimport',
+ ];
+
+ // Check if any sub-extension is enabled - if yes, block disabling core
+ foreach ($sub_extensions as $sub_ext)
+ {
+ if ($extensions->is_enabled($sub_ext))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
+ $error_msg = sprintf(
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
+ $sub_ext
+ );
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+ }
switch ($old_state)
{
case '': // Empty means nothing has run yet
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index bc12ee96..73736805 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Трябва да деактивирате/деинсталирате разширението %s , преди да деактивирате основното разширение.',
));
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index 98a633cb..fda3f000 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Mit dieser Option kannst du deine phpBB Gallery-Version auf den neuesten Stand bringen.',
'VERSION_NOT_SUPPORTED' => 'Leider konnte das Update-Schema für Versionen < 1.0.6 nicht übernommen werden.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Sie müssen die Erweiterung %s deaktivieren/deinstallieren, bevor Sie die Kern-Erweiterung deaktivieren können.',
));
diff --git a/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
index 7b1f480e..88beafcb 100644
--- a/core/language/en/install_gallery.php
+++ b/core/language/en/install_gallery.php
@@ -130,4 +130,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'You must disable/uninstall the extension %s before disabling the core extension.',
));
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index c7c3ecc5..cebca8c2 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Aquí puedes actualizar tu versión de la galería de phpBB.',
'VERSION_NOT_SUPPORTED' => 'Lo sentimos, pero sus actualizaciones anteriores a 1.0.6 no son compatibles con este sistema de instalación / actualización.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Debe desactivar/desinstalar la extensión %s antes de desactivar la extensión principal.',
));
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index 96b22129..57273b61 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -147,4 +147,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Ici, vous pouvez mettre à jour la Galerie phpBB.',
'VERSION_NOT_SUPPORTED' => 'Désolé, mais les mises à jour inférieures à la version 1.0.6 ne sont pas supportées par cette version d’installation.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Vous devez désactiver/désinstaller l’extension %s avant de désactiver l’extension principale.',
));
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
index 94c71f35..2b06e61d 100644
--- a/core/language/it/install_gallery.php
+++ b/core/language/it/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Puoi aggiornare la tua versione di phpBB Gallery.',
'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'È necessario disattivare/disinstallare l’estensione %s prima di disattivare l’estensione principale.',
));
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index 943cb43b..cec8fca0 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Hier kan je de phpBB galerij updaten.',
'VERSION_NOT_SUPPORTED' => 'Sorry, maar updates van voor versie 1.0.6 worden door deze installatie niet ondersteund.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'U moet de extensie %s uitschakelen/verwijderen voordat u de kern-extensie uitschakelt.',
));
diff --git a/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
index b22d646e..01f9823d 100644
--- a/core/language/ru/install_gallery.php
+++ b/core/language/ru/install_gallery.php
@@ -109,6 +109,10 @@
'UNINSTALL_START' => 'Удаление',
'UNINSTALL_FINISHED' => 'Удаление почти закончено',
'UNINSTALL_FINISHED_EXPLAIN' => 'Вы успешно удалили phpBB Gallery.Теперь вам осталось откатить изменения в файлах конференции, описанные в install.xml , и удалить файлы галереи. После этого ваша конференция будет полностью очищена от галереи. ',
+
'UPDATE_INSTALLATION_EXPLAIN' => 'Обновление phpBB Gallery.',
+
'VERSION_NOT_SUPPORTED' => 'Извините, но обновление галереи с версий < 1.0.6 не поддерживаются данной версией инсталятора.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Перед отключением основного расширения необходимо отключить/удалить расширение %s .',
));
From 5d6d6dadb2e2ad2cf6a41477c123706a4589502e Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 16:52:02 +0100
Subject: [PATCH 106/138] Prevent uninstall core if sub.ext are installed
---
core/ext.php | 32 +++++++++++++++++++++-------
core/language/bg/install_gallery.php | 2 ++
core/language/de/install_gallery.php | 2 ++
core/language/en/install_gallery.php | 2 ++
core/language/es/install_gallery.php | 2 ++
core/language/fr/install_gallery.php | 2 ++
core/language/it/install_gallery.php | 2 ++
core/language/nl/install_gallery.php | 2 ++
core/language/ru/install_gallery.php | 4 ++++
9 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/core/ext.php b/core/ext.php
index a6372019..e1b28494 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -9,7 +9,7 @@
* @license GPL-2.0-only
*/
-// this file is not really needed, when empty it can be ommitted
+// this file is not really needed, when empty it can be omitted
// however you can override the default methods and add custom
// installation logic
@@ -17,11 +17,12 @@
class ext extends \phpbb\extension\base
{
- protected $add_ons = array(
+ protected $sub_extensions = [
+ 'phpbbgallery/acpcleanup',
'phpbbgallery/acpimport',
'phpbbgallery/exif',
- 'phpbbgallery/acpcleanup',
- );
+ ];
+
/**
* Single enable step that installs any included migrations
*
@@ -36,12 +37,12 @@ function enable_step($old_state)
// Disable list of official extensions
$extensions = $this->container->get('ext.manager');
$configured = $extensions->all_disabled();
- //var_dump($configured);
- foreach ($this->add_ons as $var)
+
+ foreach ($this->sub_extensions as $sub_ext)
{
- if (array_key_exists($var, $configured))
+ if (array_key_exists($sub_ext, $configured))
{
- $extensions->enable($var);
+ $extensions->enable($sub_ext);
}
}
// Enable board rules notifications
@@ -68,6 +69,21 @@ function enable_step($old_state)
*/
function disable_step($old_state)
{
+ $extensions = $this->container->get('ext.manager');
+
+ // Check if any sub-extension is enabled - if yes, block disabling core
+ foreach ($this->$sub_extensions as $sub_ext)
+ {
+ if ($extensions->is_enabled($sub_ext))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
+ $error_msg = sprintf(
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
+ $sub_ext
+ );
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+ }
switch ($old_state)
{
case '': // Empty means nothing has run yet
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index f670ff3b..4732fc1e 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Трябва да деактивирате/деинсталирате разширението %s , преди да деактивирате основното разширение.',
));
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index 763b5e08..fb542719 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Mit dieser Option kannst du deine phpBB Gallery-Version auf den neuesten Stand bringen.',
'VERSION_NOT_SUPPORTED' => 'Leider konnte das Update-Schema für Versionen < 1.0.6 nicht übernommen werden.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Sie müssen die Erweiterung %s deaktivieren/deinstallieren, bevor Sie die Kern-Erweiterung deaktivieren können.',
));
diff --git a/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
index 7d77f566..213282bb 100644
--- a/core/language/en/install_gallery.php
+++ b/core/language/en/install_gallery.php
@@ -130,4 +130,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'You must disable/uninstall the extension %s before disabling the core extension.',
));
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index 6ff2e3be..accec7bb 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Aquí puedes actualizar tu versión de la galería de phpBB.',
'VERSION_NOT_SUPPORTED' => 'Lo sentimos, pero sus actualizaciones anteriores a 1.0.6 no son compatibles con este sistema de instalación / actualización.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Debe desactivar/desinstalar la extensión %s antes de desactivar la extensión principal.',
));
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index d4f4e22f..09aabc0e 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -147,4 +147,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Ici, vous pouvez mettre à jour la Galerie phpBB.',
'VERSION_NOT_SUPPORTED' => 'Désolé, mais les mises à jour inférieures à la version 1.0.6 ne sont pas supportées par cette version d’installation.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Vous devez désactiver/désinstaller l’extension %s avant de désactiver l’extension principale.',
));
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
index 2c94bb16..ecacab5d 100644
--- a/core/language/it/install_gallery.php
+++ b/core/language/it/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Puoi aggiornare la tua versione di phpBB Gallery.',
'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'È necessario disattivare/disinstallare l’estensione %s prima di disattivare l’estensione principale.',
));
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index d68d0a79..9e3ab873 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -131,4 +131,6 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Hier kan je de phpBB galerij updaten.',
'VERSION_NOT_SUPPORTED' => 'Sorry, maar updates van voor versie 1.0.6 worden door deze installatie niet ondersteund.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'U moet de extensie %s uitschakelen/verwijderen voordat u de kern-extensie uitschakelt.',
));
diff --git a/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
index 8cefaa84..e545611d 100644
--- a/core/language/ru/install_gallery.php
+++ b/core/language/ru/install_gallery.php
@@ -109,6 +109,10 @@
'UNINSTALL_START' => 'Удаление',
'UNINSTALL_FINISHED' => 'Удаление почти закончено',
'UNINSTALL_FINISHED_EXPLAIN' => 'Вы успешно удалили phpBB Gallery.Теперь вам осталось откатить изменения в файлах конференции, описанные в install.xml , и удалить файлы галереи. После этого ваша конференция будет полностью очищена от галереи. ',
+
'UPDATE_INSTALLATION_EXPLAIN' => 'Обновление phpBB Gallery.',
+
'VERSION_NOT_SUPPORTED' => 'Извините, но обновление галереи с версий < 1.0.6 не поддерживаются данной версией инсталятора.',
+
+ 'GALLERY_SUB_EXT_FOUND' => 'Перед отключением основного расширения необходимо отключить/удалить расширение %s .',
));
From fbdadc003ab03a92b5cfa17925415da4fa3bac4a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 17:00:36 +0100
Subject: [PATCH 107/138] preventing before purging not disabling
---
core/ext.php | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/core/ext.php b/core/ext.php
index e1b28494..61aab35c 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -69,29 +69,14 @@ function enable_step($old_state)
*/
function disable_step($old_state)
{
- $extensions = $this->container->get('ext.manager');
-
- // Check if any sub-extension is enabled - if yes, block disabling core
- foreach ($this->$sub_extensions as $sub_ext)
- {
- if ($extensions->is_enabled($sub_ext))
- {
- $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
- $error_msg = sprintf(
- $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
- $sub_ext
- );
- trigger_error($error_msg, E_USER_WARNING);
- }
- }
switch ($old_state)
{
case '': // Empty means nothing has run yet
// Disable list of official extensions
$extensions = $this->container->get('ext.manager');
- foreach ($this->add_ons as $var)
+ foreach ($this->sub_extensions as $sub_ext)
{
- $extensions->disable($var);
+ $extensions->disable($sub_ext);
}
// Disable board rules notifications
@@ -119,6 +104,22 @@ function disable_step($old_state)
*/
function purge_step($old_state)
{
+ $extensions = $this->container->get('ext.manager');
+
+ // Check if any sub-extension is enabled - if yes, block purging core
+ foreach ($this->sub_extensions as $sub_ext)
+ {
+ if ($extensions->is_enabled($sub_ext))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
+ $error_msg = sprintf(
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
+ $sub_ext
+ );
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+ }
+
switch ($old_state)
{
case '': // Empty means nothing has run yet
From 1493f31ad2a92428bae7ed8ed1162ac28a87de15 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 17:06:33 +0100
Subject: [PATCH 108/138] Better translations
---
core/ext.php | 2 +-
core/language/bg/install_gallery.php | 4 ++--
core/language/de/install_gallery.php | 2 +-
core/language/en/install_gallery.php | 4 ++--
core/language/es/install_gallery.php | 2 +-
core/language/fr/install_gallery.php | 4 ++--
core/language/it/install_gallery.php | 4 ++--
core/language/nl/install_gallery.php | 4 ++--
core/language/ru/install_gallery.php | 4 ++--
9 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/core/ext.php b/core/ext.php
index 61aab35c..36c8fcd7 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -113,7 +113,7 @@ function purge_step($old_state)
{
$this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
$error_msg = sprintf(
- $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_UNINSTALL'),
$sub_ext
);
trigger_error($error_msg, E_USER_WARNING);
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index 4732fc1e..2f576042 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -130,7 +130,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
- 'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+ 'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
- 'GALLERY_SUB_EXT_FOUND' => 'Трябва да деактивирате/деинсталирате разширението %s , преди да деактивирате основното разширение.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'Трябва да деинсталирате разширението %s , преди да деинсталирате основното разширение.',
));
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index fb542719..8d585137 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -132,5 +132,5 @@
'VERSION_NOT_SUPPORTED' => 'Leider konnte das Update-Schema für Versionen < 1.0.6 nicht übernommen werden.',
- 'GALLERY_SUB_EXT_FOUND' => 'Sie müssen die Erweiterung %s deaktivieren/deinstallieren, bevor Sie die Kern-Erweiterung deaktivieren können.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'Sie müssen die Erweiterung %s deinstallieren, bevor Sie die Kern-Erweiterung deinstallieren können.',
));
diff --git a/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
index 213282bb..17c5e8c1 100644
--- a/core/language/en/install_gallery.php
+++ b/core/language/en/install_gallery.php
@@ -129,7 +129,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Here you can Update your phpBB Gallery-Version.',
- 'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
+ 'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
- 'GALLERY_SUB_EXT_FOUND' => 'You must disable/uninstall the extension %s before disabling the core extension.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'You must uninstall the extension %s before uninstalling the core extension.',
));
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index accec7bb..661a142d 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -132,5 +132,5 @@
'VERSION_NOT_SUPPORTED' => 'Lo sentimos, pero sus actualizaciones anteriores a 1.0.6 no son compatibles con este sistema de instalación / actualización.',
- 'GALLERY_SUB_EXT_FOUND' => 'Debe desactivar/desinstalar la extensión %s antes de desactivar la extensión principal.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'Debe desinstalar la extensión %s antes de desinstalar la extensión principal.',
));
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index 09aabc0e..77e3e0ce 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -146,7 +146,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Ici, vous pouvez mettre à jour la Galerie phpBB.',
- 'VERSION_NOT_SUPPORTED' => 'Désolé, mais les mises à jour inférieures à la version 1.0.6 ne sont pas supportées par cette version d’installation.',
+ 'VERSION_NOT_SUPPORTED' => 'Désolé, mais les mises à jour inférieures à la version 1.0.6 ne sont pas supportées par cette version d’installation.',
- 'GALLERY_SUB_EXT_FOUND' => 'Vous devez désactiver/désinstaller l’extension %s avant de désactiver l’extension principale.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'Vous devez désinstaller l’extension %s avant de désinstaller l’extension principale.',
));
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
index ecacab5d..0f3f3848 100644
--- a/core/language/it/install_gallery.php
+++ b/core/language/it/install_gallery.php
@@ -130,7 +130,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Puoi aggiornare la tua versione di phpBB Gallery.',
- 'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
+ 'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
- 'GALLERY_SUB_EXT_FOUND' => 'È necessario disattivare/disinstallare l’estensione %s prima di disattivare l’estensione principale.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'È necessario disinstallare l’estensione %s prima di disinstallare l’estensione principale.',
));
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index 9e3ab873..eb36099d 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -130,7 +130,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Hier kan je de phpBB galerij updaten.',
- 'VERSION_NOT_SUPPORTED' => 'Sorry, maar updates van voor versie 1.0.6 worden door deze installatie niet ondersteund.',
+ 'VERSION_NOT_SUPPORTED' => 'Sorry, maar updates van voor versie 1.0.6 worden door deze installatie niet ondersteund.',
- 'GALLERY_SUB_EXT_FOUND' => 'U moet de extensie %s uitschakelen/verwijderen voordat u de kern-extensie uitschakelt.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'U moet de extensie %s verwijderen voordat u de kern-extensie verwijdert.',
));
diff --git a/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
index e545611d..2561390c 100644
--- a/core/language/ru/install_gallery.php
+++ b/core/language/ru/install_gallery.php
@@ -112,7 +112,7 @@
'UPDATE_INSTALLATION_EXPLAIN' => 'Обновление phpBB Gallery.',
- 'VERSION_NOT_SUPPORTED' => 'Извините, но обновление галереи с версий < 1.0.6 не поддерживаются данной версией инсталятора.',
+ 'VERSION_NOT_SUPPORTED' => 'Извините, но обновление галереи с версий < 1.0.6 не поддерживаются данной версией инсталятора.',
- 'GALLERY_SUB_EXT_FOUND' => 'Перед отключением основного расширения необходимо отключить/удалить расширение %s .',
+ 'GALLERY_SUB_EXT_UNINSTALL' => 'Перед удалением основного расширения необходимо удалить расширение %s .',
));
From 3b2b3734a1dfeb2bbf56ca0bfb541567dd3a3d25 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 17:43:10 +0100
Subject: [PATCH 109/138] Fix epv
---
core/ext.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/ext.php b/core/ext.php
index 36c8fcd7..5dc8acc3 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -113,7 +113,7 @@ function purge_step($old_state)
{
$this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
$error_msg = sprintf(
- $this->container->get('user')->lang('GALLERY_SUB_EXT_UNINSTALL'),
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_UNINSTALL'),
$sub_ext
);
trigger_error($error_msg, E_USER_WARNING);
From 69f816ec1847adc35f026ca466b41508e1f29414 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 23:13:27 +0100
Subject: [PATCH 110/138] Fix epv
---
core/ext.php | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/core/ext.php b/core/ext.php
index d5639be6..7e2c1b99 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -125,6 +125,22 @@ function disable_step($old_state)
*/
function purge_step($old_state)
{
+ $extensions = $this->container->get('ext.manager');
+
+ // Check if any sub-extension is enabled - if yes, block purging core
+ foreach ($this->sub_extensions as $sub_ext)
+ {
+ if ($extensions->is_enabled($sub_ext))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
+ $error_msg = sprintf(
+ $this->container->get('user')->lang('GALLERY_SUB_EXT_UNINSTALL'),
+ $sub_ext
+ );
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+ }
+
switch ($old_state)
{
case '': // Empty means nothing has run yet
From b460f007f6bc613cb72015fa8112166f66673391 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sat, 9 Aug 2025 23:15:25 +0100
Subject: [PATCH 111/138] clean
---
core/ext.php | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/core/ext.php b/core/ext.php
index e05785ef..5dc8acc3 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -69,28 +69,6 @@ function enable_step($old_state)
*/
function disable_step($old_state)
{
- $extensions = $this->container->get('ext.manager');
-
- // List of dependent sub-extensions that must be disabled/uninstalled first
- $sub_extensions = [
- 'phpbbgallery/exif',
- 'phpbbgallery/acpcleanup',
- 'phpbbgallery/acpimport',
- ];
-
- // Check if any sub-extension is enabled - if yes, block disabling core
- foreach ($sub_extensions as $sub_ext)
- {
- if ($extensions->is_enabled($sub_ext))
- {
- $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
- $error_msg = sprintf(
- $this->container->get('user')->lang('GALLERY_SUB_EXT_FOUND'),
- $sub_ext
- );
- trigger_error($error_msg, E_USER_WARNING);
- }
- }
switch ($old_state)
{
case '': // Empty means nothing has run yet
From c40bcd127ec14c6dff5ebfc56960fd22c816afcf Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 01:06:41 +0100
Subject: [PATCH 112/138] Improve migrations
---
acpcleanup/migrations/m1_init.php | 4 ++-
core/migrations/release_1_2_0.php | 20 +++----------
core/migrations/release_1_2_0_add_bbcode.php | 6 ++--
.../release_1_2_0_create_filesystem.php | 4 ++-
core/migrations/release_1_2_0_db_create.php | 4 ++-
core/migrations/release_3_2_1_0.php | 6 ++--
core/migrations/release_3_2_1_1.php | 12 ++++----
core/migrations/release_3_3_0.php | 12 ++++----
core/migrations/release_3_4_0.php | 29 +++++++++++++++++++
core/migrations/split_ucp_module_settings.php | 2 +-
10 files changed, 65 insertions(+), 34 deletions(-)
create mode 100644 core/migrations/release_3_4_0.php
diff --git a/acpcleanup/migrations/m1_init.php b/acpcleanup/migrations/m1_init.php
index 7f963e9c..17b741e7 100644
--- a/acpcleanup/migrations/m1_init.php
+++ b/acpcleanup/migrations/m1_init.php
@@ -12,7 +12,9 @@
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()
{
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index 1f856ef3..0d84a700 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -12,7 +12,9 @@
namespace phpbbgallery\core\migrations;
-class release_1_2_0 extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_1_2_0 extends migration
{
static public function depends_on()
{
@@ -63,13 +65,6 @@ public function update_data()
'module_mode' => 'main',
'module_auth' => 'ext_phpbbgallery/core && acl_a_viewlogs',
))),
- // Todo CLEANUP Add-on
- /*array('module.add', array('acp', 'PHPBB_GALLERY', array(
- 'module_basename' => '\phpbbgallery\core\acp\gallery_module',
- 'module_langname' => 'ACP_GALLERY_CLEANUP',
- 'module_mode' => 'cleanup',
- 'module_auth' => 'ext_phpbbgallery/core && acl_a_gallery_cleanup',
- ))),*/
// UCP
array('module.add', array('ucp', '', 'UCP_GALLERY')),
@@ -98,14 +93,7 @@ public function update_data()
'module_mode' => 'manage_favorites',
'module_auth' => 'ext_phpbbgallery/core',
))),
-
- // Logs
- array('module.add', array('acp', 'ACP_FORUM_LOGS', array(
- 'module_basename' => '\phpbbgallery\core\acp\gallery_logs_module',
- 'module_langname' => 'ACP_GALLERY_LOGS',
- 'module_mode' => 'main',
- 'module_auth' => 'ext_phpbbgallery/core && acl_a_viewlogs',
- ))),*/
+*/
// @todo: ADD BBCODE
array('custom', array(array(&$this, 'install_config'))),
diff --git a/core/migrations/release_1_2_0_add_bbcode.php b/core/migrations/release_1_2_0_add_bbcode.php
index 9d024583..2e4ffc9c 100644
--- a/core/migrations/release_1_2_0_add_bbcode.php
+++ b/core/migrations/release_1_2_0_add_bbcode.php
@@ -12,11 +12,13 @@
namespace phpbbgallery\core\migrations;
-class release_1_2_0_add_bbcode extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_1_2_0_add_bbcode extends migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0');
+ return array('\phpbbgallery\core\migrations\release_1_2_0_db_create');
}
public function update_data()
diff --git a/core/migrations/release_1_2_0_create_filesystem.php b/core/migrations/release_1_2_0_create_filesystem.php
index 301925aa..77a9eb10 100644
--- a/core/migrations/release_1_2_0_create_filesystem.php
+++ b/core/migrations/release_1_2_0_create_filesystem.php
@@ -11,7 +11,9 @@
namespace phpbbgallery\core\migrations;
-class release_1_2_0_create_filesystem extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_1_2_0_create_filesystem extends migration
{
static public function depends_on()
{
diff --git a/core/migrations/release_1_2_0_db_create.php b/core/migrations/release_1_2_0_db_create.php
index 12cb105f..2a2a829d 100644
--- a/core/migrations/release_1_2_0_db_create.php
+++ b/core/migrations/release_1_2_0_db_create.php
@@ -12,7 +12,9 @@
namespace phpbbgallery\core\migrations;
-class release_1_2_0_db_create extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_1_2_0_db_create extends migration
{
static public function depends_on()
{
diff --git a/core/migrations/release_3_2_1_0.php b/core/migrations/release_3_2_1_0.php
index 58a86108..bfd58bb3 100644
--- a/core/migrations/release_3_2_1_0.php
+++ b/core/migrations/release_3_2_1_0.php
@@ -11,11 +11,13 @@
namespace phpbbgallery\core\migrations;
-class release_3_2_1_0 extends \phpbb\db\migration\profilefield_base_migration
+use phpbb\db\migration\profilefield_base_migration;
+
+class release_3_2_1_0 extends profilefield_base_migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0');
+ return array('\phpbbgallery\core\migrations\split_ucp_module_settings');
}
public function update_data()
diff --git a/core/migrations/release_3_2_1_1.php b/core/migrations/release_3_2_1_1.php
index e177d075..87cf42f1 100644
--- a/core/migrations/release_3_2_1_1.php
+++ b/core/migrations/release_3_2_1_1.php
@@ -11,18 +11,20 @@
namespace phpbbgallery\core\migrations;
-class release_3_2_1_1 extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_3_2_1_1 extends migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0_db_create');
+ return ['\phpbbgallery\core\migrations\release_3_2_1_0'];
}
public function update_data()
{
- return array(
- array('config.update', array('phpbb_gallery_version', '3.2.2'))
- );
+ return [
+ ['config.update', ['phpbb_gallery_version', '3.2.2']]
+ ];
}
public function update_schema()
diff --git a/core/migrations/release_3_3_0.php b/core/migrations/release_3_3_0.php
index f8087144..e3f9f5df 100644
--- a/core/migrations/release_3_3_0.php
+++ b/core/migrations/release_3_3_0.php
@@ -11,18 +11,20 @@
namespace phpbbgallery\core\migrations;
-class release_3_3_0 extends \phpbb\db\migration\migration
+use phpbb\db\migration\migration;
+
+class release_3_3_0 extends migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0_db_create');
+ return ['\phpbbgallery\core\migrations\release_3_2_1_1'];
}
public function update_data()
{
- return array(
- array('config.update', array('phpbb_gallery_version', '3.3.0'))
- );
+ return [
+ ['config.update', ['phpbb_gallery_version', '3.3.0']]
+ ];
}
}
diff --git a/core/migrations/release_3_4_0.php b/core/migrations/release_3_4_0.php
new file mode 100644
index 00000000..4961bdf0
--- /dev/null
+++ b/core/migrations/release_3_4_0.php
@@ -0,0 +1,29 @@
+
Date: Sun, 10 Aug 2025 01:25:47 +0100
Subject: [PATCH 113/138] Fix import error on uninstall
---
acpimport/migrations/m1_init.php | 12 ++++++------
core/migrations/release_1_2_0.php | 3 ++-
core/migrations/release_1_2_0_add_bbcode.php | 2 +-
core/migrations/release_1_2_0_create_filesystem.php | 8 +-------
core/migrations/release_3_2_1_0.php | 2 +-
core/migrations/release_3_2_1_1.php | 2 +-
core/migrations/release_3_3_0.php | 2 +-
core/migrations/release_3_4_0.php | 2 +-
core/migrations/split_ucp_module_settings.php | 2 +-
9 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/acpimport/migrations/m1_init.php b/acpimport/migrations/m1_init.php
index 0b1363d7..7a09fa5b 100644
--- a/acpimport/migrations/m1_init.php
+++ b/acpimport/migrations/m1_init.php
@@ -70,13 +70,13 @@ public function create_file_system(): void
{
global $phpbb_root_path;
- $phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
+ $phpbbgallery_import_file = $phpbb_root_path . 'files/phpbbgallery/import';
- if (!is_dir($phpbbgallery_core_file_import))
+ if (!is_dir($phpbbgallery_import_file))
{
if (is_writable($phpbb_root_path . 'files'))
{
- @mkdir($phpbbgallery_core_file_import, 0755, true);
+ @mkdir($phpbbgallery_import_file, 0755, true);
}
}
}
@@ -90,12 +90,12 @@ public function remove_file_system(): void
{
global $phpbb_root_path;
- $phpbbgallery_core_file_import = $phpbb_root_path . 'files/phpbbgallery/import';
+ $phpbbgallery_import_file = $phpbb_root_path . 'files/phpbbgallery/import';
// Clean dirs
- if (is_dir($phpbbgallery_core_file_import))
+ if (is_dir($phpbbgallery_import_file))
{
- $this->recursiveRemoveDirectory($phpbbgallery_core_file_import);
+ $this->recursiveRemoveDirectory($phpbbgallery_import_file);
}
}
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index 0d84a700..1b450b5f 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -20,6 +20,7 @@ static public function depends_on()
{
return array('\phpbb\db\migration\data\v310\gold');
}
+
public function update_data()
{
return array(
@@ -27,7 +28,7 @@ public function update_data()
array('permission.add', array('a_gallery_albums', true, 'a_board')),
array('permission.add', array('a_gallery_cleanup', true, 'a_board')),
- // ACP
+ // ACP
array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'PHPBB_GALLERY')),
array('module.add', array('acp', 'PHPBB_GALLERY', array(
'module_basename' => '\phpbbgallery\core\acp\main_module',
diff --git a/core/migrations/release_1_2_0_add_bbcode.php b/core/migrations/release_1_2_0_add_bbcode.php
index 2e4ffc9c..4b65b4e5 100644
--- a/core/migrations/release_1_2_0_add_bbcode.php
+++ b/core/migrations/release_1_2_0_add_bbcode.php
@@ -18,7 +18,7 @@ class release_1_2_0_add_bbcode extends migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0_db_create');
+ return array('\phpbbgallery\core\migrations\release_1_2_0');
}
public function update_data()
diff --git a/core/migrations/release_1_2_0_create_filesystem.php b/core/migrations/release_1_2_0_create_filesystem.php
index 77a9eb10..23c5a9b2 100644
--- a/core/migrations/release_1_2_0_create_filesystem.php
+++ b/core/migrations/release_1_2_0_create_filesystem.php
@@ -43,7 +43,6 @@ public function create_file_system()
$phpbbgallery_core_file_medium = $phpbb_root_path . 'files/phpbbgallery/core/medium';
$phpbbgallery_core_file_mini = $phpbb_root_path . 'files/phpbbgallery/core/mini';
$phpbbgallery_core_file_source = $phpbb_root_path . 'files/phpbbgallery/core/source';
- $phpbbgallery_import_file = $phpbb_root_path . 'files/phpbbgallery/import';
if (is_writable($phpbb_root_path . 'files'))
{
@@ -51,7 +50,6 @@ public function create_file_system()
@mkdir($phpbbgallery_core_file_medium, 0755, true);
@mkdir($phpbbgallery_core_file_mini, 0755, true);
@mkdir($phpbbgallery_core_file_source, 0755, true);
- @mkdir($phpbbgallery_import_file, 0755, true);
}
}
@@ -63,17 +61,12 @@ public function remove_file_system()
$phpbbgallery_core_file_medium = $phpbb_root_path . 'files/phpbbgallery/core/medium';
$phpbbgallery_core_file_mini = $phpbb_root_path . 'files/phpbbgallery/core/mini';
$phpbbgallery_core_file_source = $phpbb_root_path . 'files/phpbbgallery/core/source';
- $phpbbgallery_import_file = $phpbb_root_path . 'files/phpbbgallery/import';
// Clean dirs
$this->recursiveRemoveDirectory($phpbbgallery_core_file_mini);
$this->recursiveRemoveDirectory($phpbbgallery_core_file_medium);
$this->recursiveRemoveDirectory($phpbbgallery_core_file_source);
$this->recursiveRemoveDirectory($phpbbgallery_core_file);
- if (file_exists($phpbbgallery_import_file))
- {
- $this->recursiveRemoveDirectory($phpbbgallery_import_file);
- }
$this->recursiveRemoveDirectory($phpbb_root_path . 'files/phpbbgallery');
}
@@ -86,6 +79,7 @@ public function copy_images()
copy($phpbbgallery_core_images_source . '/upload/no_hotlinking.jpg', $phpbbgallery_core_file_source . '/no_hotlinking.jpg');
copy($phpbbgallery_core_images_source . '/upload/not_authorised.jpg', $phpbbgallery_core_file_source . '/not_authorised.jpg');
}
+
function recursiveRemoveDirectory($directory)
{
foreach (glob("{$directory}/*") as $file)
diff --git a/core/migrations/release_3_2_1_0.php b/core/migrations/release_3_2_1_0.php
index bfd58bb3..a900ee00 100644
--- a/core/migrations/release_3_2_1_0.php
+++ b/core/migrations/release_3_2_1_0.php
@@ -17,7 +17,7 @@ class release_3_2_1_0 extends profilefield_base_migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\split_ucp_module_settings');
+ return array('\phpbbgallery\core\migrations\release_1_2_0');
}
public function update_data()
diff --git a/core/migrations/release_3_2_1_1.php b/core/migrations/release_3_2_1_1.php
index 87cf42f1..b919b179 100644
--- a/core/migrations/release_3_2_1_1.php
+++ b/core/migrations/release_3_2_1_1.php
@@ -17,7 +17,7 @@ class release_3_2_1_1 extends migration
{
static public function depends_on()
{
- return ['\phpbbgallery\core\migrations\release_3_2_1_0'];
+ return ['\phpbbgallery\core\migrations\release_1_2_0_db_create'];
}
public function update_data()
diff --git a/core/migrations/release_3_3_0.php b/core/migrations/release_3_3_0.php
index e3f9f5df..5ba437be 100644
--- a/core/migrations/release_3_3_0.php
+++ b/core/migrations/release_3_3_0.php
@@ -17,7 +17,7 @@ class release_3_3_0 extends migration
{
static public function depends_on()
{
- return ['\phpbbgallery\core\migrations\release_3_2_1_1'];
+ return ['\phpbbgallery\core\migrations\release_1_2_0_db_create'];
}
public function update_data()
diff --git a/core/migrations/release_3_4_0.php b/core/migrations/release_3_4_0.php
index 4961bdf0..2d650b80 100644
--- a/core/migrations/release_3_4_0.php
+++ b/core/migrations/release_3_4_0.php
@@ -16,7 +16,7 @@ class release_3_4_0 extends migration
{
static public function depends_on()
{
- return ['\phpbbgallery\core\migrations\release_3_3_0'];
+ return ['\phpbbgallery\core\migrations\release_1_2_0_db_create'];
}
public function update_data()
diff --git a/core/migrations/split_ucp_module_settings.php b/core/migrations/split_ucp_module_settings.php
index dad6e21f..1f02fa4e 100644
--- a/core/migrations/split_ucp_module_settings.php
+++ b/core/migrations/split_ucp_module_settings.php
@@ -16,7 +16,7 @@ class split_ucp_module_settings extends \phpbb\db\migration\migration
{
static public function depends_on()
{
- return array('\phpbbgallery\core\migrations\release_1_2_0_create_filesystem');
+ return array('\phpbbgallery\core\migrations\release_1_2_0');
}
public function update_data()
From 18998451573ed1c3bf88895a06e716e621b27624 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 10:58:27 +0100
Subject: [PATCH 114/138] Improve enabling/disabling/purging
---
acpcleanup/ext.php | 22 +++++++++++++++----
acpimport/ext.php | 22 +++++++++++++++----
core/ext.php | 33 ++++++++++++----------------
core/language/bg/install_gallery.php | 5 ++++-
core/language/de/install_gallery.php | 5 ++++-
core/language/en/install_gallery.php | 5 ++++-
core/language/es/install_gallery.php | 5 ++++-
core/language/fr/install_gallery.php | 5 ++++-
core/language/it/install_gallery.php | 5 ++++-
core/language/nl/install_gallery.php | 5 ++++-
core/language/ru/install_gallery.php | 5 ++++-
exif/ext.php | 22 +++++++++++++++----
12 files changed, 100 insertions(+), 39 deletions(-)
diff --git a/acpcleanup/ext.php b/acpcleanup/ext.php
index de648b5e..ade3dfa8 100644
--- a/acpcleanup/ext.php
+++ b/acpcleanup/ext.php
@@ -21,15 +21,29 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
+ $user = $this->container->get('user');
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
+ $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)
{
- $this->container->get('user')->add_lang_ext('phpbbgallery/acpcleanup', 'info_acp_gallery_cleanup');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ // 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;
}
diff --git a/acpimport/ext.php b/acpimport/ext.php
index 70780128..63f00c26 100644
--- a/acpimport/ext.php
+++ b/acpimport/ext.php
@@ -21,15 +21,29 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
+ $user = $this->container->get('user');
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
+ $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)
{
- $this->container->get('user')->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ // Core not installed at all
+ $user->add_lang_ext('phpbbgallery/acpimport', 'info_acp_gallery_import');
+ 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;
}
diff --git a/core/ext.php b/core/ext.php
index 5dc8acc3..9d6d2af4 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -34,17 +34,6 @@ function enable_step($old_state)
switch ($old_state)
{
case '': // Empty means nothing has run yet
- // Disable list of official extensions
- $extensions = $this->container->get('ext.manager');
- $configured = $extensions->all_disabled();
-
- foreach ($this->sub_extensions as $sub_ext)
- {
- if (array_key_exists($sub_ext, $configured))
- {
- $extensions->enable($sub_ext);
- }
- }
// Enable board rules notifications
$phpbb_notifications = $this->container->get('notification_manager');
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.image_for_approval');
@@ -54,6 +43,7 @@ function enable_step($old_state)
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.new_report');
return 'notifications';
break;
+
default:
// Run parent enable step method
return parent::enable_step($old_state);
@@ -105,21 +95,26 @@ function disable_step($old_state)
function purge_step($old_state)
{
$extensions = $this->container->get('ext.manager');
+ $configured = $extensions->all_disabled();
+
+ $disabled_sub_exts = [];
- // Check if any sub-extension is enabled - if yes, block purging core
foreach ($this->sub_extensions as $sub_ext)
{
- if ($extensions->is_enabled($sub_ext))
+ if (isset($configured[$sub_ext]))
{
- $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
- $error_msg = sprintf(
- $this->container->get('user')->lang('GALLERY_SUB_EXT_UNINSTALL'),
- $sub_ext
- );
- trigger_error($error_msg, E_USER_WARNING);
+ $disabled_sub_exts[] = '» ' . $sub_ext;
}
}
+ if (!empty($disabled_sub_exts))
+ {
+ $this->container->get('user')->add_lang_ext('phpbbgallery/core', 'install_gallery');
+ $error_msg = sprintf($this->container->get('user')->lang(
+ 'GALLERY_SUB_EXT_UNINSTALL', implode(' ', $disabled_sub_exts),count($disabled_sub_exts)));
+ trigger_error($error_msg, E_USER_WARNING);
+ }
+
switch ($old_state)
{
case '': // Empty means nothing has run yet
diff --git a/core/language/bg/install_gallery.php b/core/language/bg/install_gallery.php
index 6e9c1f12..b4a1a332 100644
--- a/core/language/bg/install_gallery.php
+++ b/core/language/bg/install_gallery.php
@@ -132,5 +132,8 @@
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'Трябва да деинсталирате разширението %s , преди да деинсталирате основното разширение.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'Трябва да деинсталирате разширението: %s преди да деинсталирате основното разширение.',
+ 2 => 'Трябва да деинсталирате разширенията: %s преди да деинсталирате основното разширение.',
+ ),
));
diff --git a/core/language/de/install_gallery.php b/core/language/de/install_gallery.php
index f84b4743..7837bea7 100644
--- a/core/language/de/install_gallery.php
+++ b/core/language/de/install_gallery.php
@@ -132,5 +132,8 @@
'VERSION_NOT_SUPPORTED' => 'Leider konnte das Update-Schema für Versionen < 1.0.6 nicht übernommen werden.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'Sie müssen die Erweiterung %s deinstallieren, bevor Sie die Kern-Erweiterung deinstallieren können.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'Sie müssen die Erweiterung deinstallieren: %s bevor Sie die Kern-Erweiterung deinstallieren können.',
+ 2 => 'Sie müssen die Erweiterungen deinstallieren: %s bevor Sie die Kern-Erweiterung deinstallieren können.',
+ ),
));
diff --git a/core/language/en/install_gallery.php b/core/language/en/install_gallery.php
index d806faeb..38cf3cee 100644
--- a/core/language/en/install_gallery.php
+++ b/core/language/en/install_gallery.php
@@ -131,5 +131,8 @@
'VERSION_NOT_SUPPORTED' => 'Sorry, but your updates prior to 1.0.6 are not supported from this install/update-system.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'You must uninstall the extension %s before uninstalling the core extension.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'You must uninstall the extension: %s before uninstalling the core extension.',
+ 2 => 'You must uninstall the extensions: %s before uninstalling the core extension.',
+ ),
));
diff --git a/core/language/es/install_gallery.php b/core/language/es/install_gallery.php
index 34428a07..39e2daa8 100644
--- a/core/language/es/install_gallery.php
+++ b/core/language/es/install_gallery.php
@@ -132,5 +132,8 @@
'VERSION_NOT_SUPPORTED' => 'Lo sentimos, pero sus actualizaciones anteriores a 1.0.6 no son compatibles con este sistema de instalación / actualización.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'Debe desinstalar la extensión %s antes de desinstalar la extensión principal.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'Debe desinstalar la extensión: %s antes de desinstalar la extensión principal.',
+ 2 => 'Debe desinstalar las extensiones: %s antes de desinstalar la extensión principal.',
+ ),
));
diff --git a/core/language/fr/install_gallery.php b/core/language/fr/install_gallery.php
index 498d9876..9f076d47 100644
--- a/core/language/fr/install_gallery.php
+++ b/core/language/fr/install_gallery.php
@@ -148,5 +148,8 @@
'VERSION_NOT_SUPPORTED' => 'Désolé, mais les mises à jour inférieures à la version 1.0.6 ne sont pas supportées par cette version d’installation.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'Vous devez désinstaller l’extension %s avant de désinstaller l’extension principale.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'Vous devez désinstaller l’extension: %s avant de désinstaller l’extension principale.',
+ 2 => 'Vous devez désinstaller les extensions: %s avant de désinstaller l’extension principale.',
+ ),
));
diff --git a/core/language/it/install_gallery.php b/core/language/it/install_gallery.php
index efe1dfbc..7b30172f 100644
--- a/core/language/it/install_gallery.php
+++ b/core/language/it/install_gallery.php
@@ -132,5 +132,8 @@
'VERSION_NOT_SUPPORTED' => 'Spiacente, ma gli aggiornamenti dalle versioni inferiori a < 0.2.0 non sono supportate con questo processo di installazione.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'È necessario disinstallare l’estensione %s prima di disinstallare l’estensione principale.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'È necessario disinstallare l’estensione: %s prima di disinstallare l’estensione principale.',
+ 2 => 'È necessario disinstallare le estensioni: %s prima di disinstallare l’estensione principale.',
+ ),
));
diff --git a/core/language/nl/install_gallery.php b/core/language/nl/install_gallery.php
index f3f45362..ddf514a3 100644
--- a/core/language/nl/install_gallery.php
+++ b/core/language/nl/install_gallery.php
@@ -132,5 +132,8 @@
'VERSION_NOT_SUPPORTED' => 'Sorry, maar updates van voor versie 1.0.6 worden door deze installatie niet ondersteund.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'U moet de extensie %s verwijderen voordat u de kern-extensie verwijdert.',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'U moet de extensie: %s verwijderen voordat u de kern-extensie verwijdert.',
+ 2 => 'U moet de extensies: %s verwijderen voordat u de kern-extensie verwijdert.',
+ ),
));
diff --git a/core/language/ru/install_gallery.php b/core/language/ru/install_gallery.php
index aa73f2cc..f92b2e16 100644
--- a/core/language/ru/install_gallery.php
+++ b/core/language/ru/install_gallery.php
@@ -114,5 +114,8 @@
'VERSION_NOT_SUPPORTED' => 'Извините, но обновление галереи с версий < 1.0.6 не поддерживаются данной версией инсталятора.',
- 'GALLERY_SUB_EXT_UNINSTALL' => 'Перед удалением основного расширения необходимо удалить расширение %s .',
+ 'GALLERY_SUB_EXT_UNINSTALL' => array(
+ 1 => 'Вы должны удалить расширение: %s перед удалением основного расширения.',
+ 2 => 'Вы должны удалить расширения: %s перед удалением основного расширения.',
+ ),
));
diff --git a/exif/ext.php b/exif/ext.php
index 0badc198..2f26475b 100644
--- a/exif/ext.php
+++ b/exif/ext.php
@@ -21,15 +21,29 @@ class ext extends \phpbb\extension\base
public function is_enableable()
{
$manager = $this->container->get('ext.manager');
+ $user = $this->container->get('user');
- // Check if phpbbgallery/core is enabled
- if (!$manager->is_enabled('phpbbgallery/core'))
+ $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)
{
- $this->container->get('user')->add_lang_ext('phpbbgallery/exif', 'info_exif');
- trigger_error($this->container->get('user')->lang('GALLERY_CORE_NOT_FOUND'), E_USER_WARNING);
+ // Core not installed at all
+ $user->add_lang_ext('phpbbgallery/exif', 'info_exif');
+ 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;
}
From 34f4076376d1d07338808411ece27ba9f87c8a75 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 10:59:58 +0100
Subject: [PATCH 115/138] typo
---
core/migrations/release_1_2_0.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index 1b450b5f..1eefa35a 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -28,7 +28,7 @@ public function update_data()
array('permission.add', array('a_gallery_albums', true, 'a_board')),
array('permission.add', array('a_gallery_cleanup', true, 'a_board')),
- // ACP
+ // ACP
array('module.add', array('acp', 'ACP_CAT_DOT_MODS', 'PHPBB_GALLERY')),
array('module.add', array('acp', 'PHPBB_GALLERY', array(
'module_basename' => '\phpbbgallery\core\acp\main_module',
From 2d78fc0759795f73ef1d868ac573345c34090ae4 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 11:01:49 +0100
Subject: [PATCH 116/138] Fixes
---
acpcleanup/acp/main_info.php | 2 +-
acpimport/acp/main_info.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/acpcleanup/acp/main_info.php b/acpcleanup/acp/main_info.php
index b9319903..54427c17 100644
--- a/acpcleanup/acp/main_info.php
+++ b/acpcleanup/acp/main_info.php
@@ -27,7 +27,7 @@ public function module(): array
return [
'filename' => '\phpbbgallery\acpcleanup\acp\main_module',
'title' => 'PHPBB_GALLERY',
- 'version' => '1.2.2',
+ 'version' => '1.0.0',
'modes' => [
'cleanup' => [
'title' => 'ACP_GALLERY_CLEANUP',
diff --git a/acpimport/acp/main_info.php b/acpimport/acp/main_info.php
index 5ad1b593..28899f15 100644
--- a/acpimport/acp/main_info.php
+++ b/acpimport/acp/main_info.php
@@ -27,7 +27,7 @@ public function module(): array
return [
'filename' => '\phpbbgallery\acpimport\acp\main_module',
'title' => 'PHPBB_GALLERY',
- 'version' => '1.2.2',
+ 'version' => '1.0.0',
'modes' => [
'import_images' => [
'title' => 'ACP_IMPORT_ALBUMS',
From 08afa05f9d9ca1c80b84937fa58fd85a9abdd76a Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 11:30:26 +0100
Subject: [PATCH 117/138] Fix acp cleanup
---
acpcleanup/acp/main_module.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/acpcleanup/acp/main_module.php b/acpcleanup/acp/main_module.php
index ec0e353c..c60f95ec 100644
--- a/acpcleanup/acp/main_module.php
+++ b/acpcleanup/acp/main_module.php
@@ -14,11 +14,11 @@
class main_module
{
- protected string $u_action;
+ public string $u_action;
- public function main(int $id, string $mode): void
+ 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'));
$this->tpl_name = 'gallery_cleanup';
From a9b7b4e2cc988280ee4627717a80f88270b9aa9e Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 13:04:24 +0100
Subject: [PATCH 118/138] Fix typos
---
core/config/services_files.yml | 2 +-
core/upload.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/config/services_files.yml b/core/config/services_files.yml
index fa6ee4c4..2a5cb24b 100644
--- a/core/config/services_files.yml
+++ b/core/config/services_files.yml
@@ -2,7 +2,7 @@
#### Define file Types #####
########################################
services:
- phpbbgallery.core.files.type.multiform:
+ phpbbgallery.core.file.types.multiform:
class: phpbbgallery\core\file\types\multiform
shared: false
arguments:
diff --git a/core/upload.php b/core/upload.php
index e6969118..c778ae8f 100644
--- a/core/upload.php
+++ b/core/upload.php
@@ -202,7 +202,7 @@ public function upload_file($file_count)
$this->file_count = (int) $file_count;
//$this->files = $this->form_upload('files');
- $files = $this->file_upload->handle_upload('phpbbgallery.core.files.type.multiform', 'files');
+ $files = $this->file_upload->handle_upload('phpbbgallery.core.file.types.multiform', 'files');
foreach ($files as $var)
{
From ece3d3ebb1dec2f6d3f1dd123e5b881fe5093610 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 13:17:30 +0100
Subject: [PATCH 119/138] fix typo
---
core/upload.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/upload.php b/core/upload.php
index c778ae8f..3a8b71c2 100644
--- a/core/upload.php
+++ b/core/upload.php
@@ -613,7 +613,7 @@ private function get_current_upload_dir()
return 0;
}
- // This code is never invoced. It's left here for future implementation.
+ // This code is never invoked. It's left here for future implementation.
$this->gallery_config->inc('current_upload_dir_size', 1);
if ($this->gallery_config->get('current_upload_dir_size') >= self::NUM_FILES_PER_DIR)
{
@@ -804,7 +804,7 @@ public function get_allowed_types($get_types = false, $ignore_zip = false)
}
/**
- * Generate some kind of check so users only complete the uplaod for their images
+ * Generate some kind of check so users only complete the upload for their images
*/
public function generate_hidden_fields()
{
From eefb4c187eded6fc23a264a7f2f37aad68bc1186 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 14:35:51 +0100
Subject: [PATCH 120/138] Fix image_exif_data for MariaDB
---
exif/migrations/m2_fix_exif_field.php | 44 +++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 exif/migrations/m2_fix_exif_field.php
diff --git a/exif/migrations/m2_fix_exif_field.php b/exif/migrations/m2_fix_exif_field.php
new file mode 100644
index 00000000..ca0911d5
--- /dev/null
+++ b/exif/migrations/m2_fix_exif_field.php
@@ -0,0 +1,44 @@
+ [
+ $this->table_prefix . 'gallery_images' => [
+ 'image_exif_data' => ['TEXT', null],
+ ],
+ ],
+ ];
+ }
+
+ public function revert_schema(): array
+ {
+ return [
+ 'change_columns' => [
+ $this->table_prefix . 'gallery_images' => [
+ 'image_exif_data' => ['TEXT', ''],
+ ],
+ ],
+ ];
+ }
+}
From 402f4e610c3559b40a7b838aa393f8be4396af05 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 14:41:10 +0100
Subject: [PATCH 121/138] fix space to tabs
---
exif/migrations/m2_fix_exif_field.php | 52 +++++++++++++--------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/exif/migrations/m2_fix_exif_field.php b/exif/migrations/m2_fix_exif_field.php
index ca0911d5..d71512b9 100644
--- a/exif/migrations/m2_fix_exif_field.php
+++ b/exif/migrations/m2_fix_exif_field.php
@@ -13,32 +13,32 @@
class m2_fix_exif_field extends migration
{
- public static function depends_on(): array
- {
- return [
- '\phpbbgallery\exif\migrations\m1_init',
- ];
- }
+ public static function depends_on(): array
+ {
+ return [
+ '\phpbbgallery\exif\migrations\m1_init',
+ ];
+ }
- public function update_schema(): array
- {
- return [
- 'change_columns' => [
- $this->table_prefix . 'gallery_images' => [
- 'image_exif_data' => ['TEXT', null],
- ],
- ],
- ];
- }
+ public function update_schema(): array
+ {
+ return [
+ 'change_columns' => [
+ $this->table_prefix . 'gallery_images' => [
+ 'image_exif_data' => ['TEXT', null],
+ ],
+ ],
+ ];
+ }
- public function revert_schema(): array
- {
- return [
- 'change_columns' => [
- $this->table_prefix . 'gallery_images' => [
- 'image_exif_data' => ['TEXT', ''],
- ],
- ],
- ];
- }
+ public function revert_schema(): array
+ {
+ return [
+ 'change_columns' => [
+ $this->table_prefix . 'gallery_images' => [
+ 'image_exif_data' => ['TEXT', ''],
+ ],
+ ],
+ ];
+ }
}
From ad864c79736b22331a3ea29fe88cfb440efe40ae Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 14:47:23 +0100
Subject: [PATCH 122/138] Fix comments
---
exif/migrations/m2_fix_exif_field.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/exif/migrations/m2_fix_exif_field.php b/exif/migrations/m2_fix_exif_field.php
index d71512b9..168d068c 100644
--- a/exif/migrations/m2_fix_exif_field.php
+++ b/exif/migrations/m2_fix_exif_field.php
@@ -1,9 +1,10 @@
Date: Sun, 10 Aug 2025 16:08:59 +0100
Subject: [PATCH 123/138] rename
---
core/config/services_files.yml | 2 +-
core/controller/upload.php | 1 +
core/upload.php | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/config/services_files.yml b/core/config/services_files.yml
index 2a5cb24b..59723046 100644
--- a/core/config/services_files.yml
+++ b/core/config/services_files.yml
@@ -2,7 +2,7 @@
#### Define file Types #####
########################################
services:
- phpbbgallery.core.file.types.multiform:
+ phpbbgallery.core.files.types.multiform:
class: phpbbgallery\core\file\types\multiform
shared: false
arguments:
diff --git a/core/controller/upload.php b/core/controller/upload.php
index edcc0f29..edb2ae9b 100644
--- a/core/controller/upload.php
+++ b/core/controller/upload.php
@@ -210,6 +210,7 @@ public function main($album_id)
trigger_error($this->language->lang('USER_REACHED_QUOTA', $this->auth->acl_check('i_count', $album_id, $album_data['album_user_id'])));
}
}
+
$upload_files_limit = ($this->auth->acl_check('i_unlimited', $album_id, $album_data['album_user_id'])) ? $this->gallery_config->get('num_uploads') : min(($this->auth->acl_check('i_count', $album_id, $album_data['album_user_id']) - $own_images), $this->gallery_config->get('num_uploads'));
$process = $this->gallery_upload;
$process->set_up($album_id, $upload_files_limit);
diff --git a/core/upload.php b/core/upload.php
index 3a8b71c2..db1733d0 100644
--- a/core/upload.php
+++ b/core/upload.php
@@ -202,7 +202,7 @@ public function upload_file($file_count)
$this->file_count = (int) $file_count;
//$this->files = $this->form_upload('files');
- $files = $this->file_upload->handle_upload('phpbbgallery.core.file.types.multiform', 'files');
+ $files = $this->file_upload->handle_upload('phpbbgallery.core.files.types.multiform', 'files');
foreach ($files as $var)
{
From 9e0779d62d0067040f6431b97b6aa21f3728223e Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:13:24 +0100
Subject: [PATCH 124/138] Fix Undefined index on delete comment
---
core/controller/comment.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/controller/comment.php b/core/controller/comment.php
index 8520fc6f..6312818b 100644
--- a/core/controller/comment.php
+++ b/core/controller/comment.php
@@ -697,7 +697,9 @@ public function delete($image_id, $comment_id)
// Build smilies array
generate_smilies('inline', 0);
- $s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false;
+ $contest_start = $album_data['contest_start'] ?? 0;
+ $contest_end = $album_data['contest_end'] ?? 0;
+ $s_hide_comment_input = (time() < ($contest_start + $contest_end)) ? true : false;
$this->template->assign_vars(array(
'BBCODE_STATUS' => ($bbcode_status) ? sprintf($this->language->lang('BBCODE_IS_ON'), '', ' ') : sprintf($this->language->lang('BBCODE_IS_OFF'), '', ' '),
From b2da2a0f7fcdb22dc39c7d892e1d923186e5172f Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:19:00 +0100
Subject: [PATCH 125/138] Fix image name on report image
---
core/controller/image.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/controller/image.php b/core/controller/image.php
index 9b1e0eab..de63a6e3 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -1188,6 +1188,7 @@ public function report($image_id)
$this->template->assign_vars(array(
'ERROR' => $error,
'U_IMAGE' => ($image_id) ? $this->helper->route('phpbbgallery_core_image_file_medium', array('image_id' => $image_id)) : '',
+ 'IMAGE_NAME' => $image_data['image_name'],
'U_VIEW_IMAGE' => ($image_id) ? $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)) : '',
'IMAGE_RSZ_WIDTH' => $this->gallery_config->get('medium_width'),
'IMAGE_RSZ_HEIGHT' => $this->gallery_config->get('medium_height'),
From 559fffd2e1acfbbc72a43f70e6a4b34d40a0950c Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:21:08 +0100
Subject: [PATCH 126/138] Fix epv
---
core/controller/upload.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/controller/upload.php b/core/controller/upload.php
index edb2ae9b..9bd929da 100644
--- a/core/controller/upload.php
+++ b/core/controller/upload.php
@@ -210,7 +210,7 @@ public function main($album_id)
trigger_error($this->language->lang('USER_REACHED_QUOTA', $this->auth->acl_check('i_count', $album_id, $album_data['album_user_id'])));
}
}
-
+
$upload_files_limit = ($this->auth->acl_check('i_unlimited', $album_id, $album_data['album_user_id'])) ? $this->gallery_config->get('num_uploads') : min(($this->auth->acl_check('i_count', $album_id, $album_data['album_user_id']) - $own_images), $this->gallery_config->get('num_uploads'));
$process = $this->gallery_upload;
$process->set_up($album_id, $upload_files_limit);
From f845a3eb136ed322a228e802c5d857670b29e28d Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:39:58 +0100
Subject: [PATCH 127/138] Fix - Remove configs and permissions when delete
---
core/migrations/release_1_2_0.php | 40 +++++++++++++++++++++++++------
1 file changed, 33 insertions(+), 7 deletions(-)
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index 1eefa35a..501d2f7b 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -88,19 +88,32 @@ public function update_data()
'module_auth' => 'ext_phpbbgallery/core',
))),
//@todo move
-/* array('module.add', array('ucp', 'UCP_GALLERY', array(
- 'module_basename' => '\phpbbgallery\core\ucp\main_module',
- 'module_langname' => 'UCP_GALLERY_FAVORITES',
- 'module_mode' => 'manage_favorites',
- 'module_auth' => 'ext_phpbbgallery/core',
- ))),
-*/
+ /* array('module.add', array('ucp', 'UCP_GALLERY', array(
+ 'module_basename' => '\phpbbgallery\core\ucp\main_module',
+ 'module_langname' => 'UCP_GALLERY_FAVORITES',
+ 'module_mode' => 'manage_favorites',
+ 'module_auth' => 'ext_phpbbgallery/core',
+ ))),
+ */
// @todo: ADD BBCODE
array('custom', array(array(&$this, 'install_config'))),
);
}
+ public function revert_data()
+ {
+ return array(
+ // Remove permissions added
+ array('permission.remove', array('a_gallery_manage')),
+ array('permission.remove', array('a_gallery_albums')),
+ array('permission.remove', array('a_gallery_cleanup')),
+
+ // Remove config keys you installed
+ array('custom', array(array($this, 'uninstall_config'))),
+ );
+ }
+
public function install_config()
{
global $config;
@@ -120,6 +133,18 @@ public function install_config()
return true;
}
+ public function uninstall_config()
+ {
+ global $config;
+
+ foreach (self::$configs as $name => $value)
+ {
+ $config->delete('phpbb_gallery_' . $name);
+ }
+
+ return true;
+ }
+
static public $is_dynamic = array(
'mvc_time',
'mvc_version',
@@ -238,3 +263,4 @@ public function install_config()
'version' => '1.2.0',
);
}
+
From 3c3168c91a966f9d4888b6c5b0cb79cb15790b4e Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:42:45 +0100
Subject: [PATCH 128/138] Fix missing notification on purge/enable
---
core/ext.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/ext.php b/core/ext.php
index 9d6d2af4..43bf60f5 100644
--- a/core/ext.php
+++ b/core/ext.php
@@ -38,8 +38,9 @@ function enable_step($old_state)
$phpbb_notifications = $this->container->get('notification_manager');
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.image_for_approval');
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.image_approved');
- $phpbb_notifications->enable_notifications('phpbbgallery.core.notification.new_image');
+ $phpbb_notifications->enable_notifications('phpbbgallery.core.notification.image_not_approved');
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.new_comment');
+ $phpbb_notifications->enable_notifications('phpbbgallery.core.notification.new_image');
$phpbb_notifications->enable_notifications('phpbbgallery.core.notification.new_report');
return 'notifications';
break;
@@ -73,8 +74,9 @@ function disable_step($old_state)
$phpbb_notifications = $this->container->get('notification_manager');
$phpbb_notifications->disable_notifications('phpbbgallery.core.notification.image_for_approval');
$phpbb_notifications->disable_notifications('phpbbgallery.core.notification.image_approved');
- $phpbb_notifications->disable_notifications('phpbbgallery.core.notification.new_image');
+ $phpbb_notifications->disable_notifications('phpbbgallery.core.notification.image_not_approve');
$phpbb_notifications->disable_notifications('phpbbgallery.core.notification.new_comment');
+ $phpbb_notifications->disable_notifications('phpbbgallery.core.notification.new_image');
$phpbb_notifications->disable_notifications('phpbbgallery.core.notification.new_report');
return 'notifications';
From e2bd9f310f8529b82edc4b396947b67291a1199f Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 16:46:07 +0100
Subject: [PATCH 129/138] Fix extra line
---
core/migrations/release_1_2_0.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index 501d2f7b..fa6ccdd1 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -263,4 +263,3 @@ public function uninstall_config()
'version' => '1.2.0',
);
}
-
From 6f0eb594089483d1783192acf357d409490e2d70 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 17:02:02 +0100
Subject: [PATCH 130/138] Fix comment count after deleting image
---
core/comment.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/comment.php b/core/comment.php
index efad7396..a6583798 100644
--- a/core/comment.php
+++ b/core/comment.php
@@ -174,8 +174,8 @@ public function sync_image_comments($image_ids = false)
$sql = 'SELECT comment_image_id, COUNT(comment_id) AS num_comments, MAX(comment_id) AS last_comment
FROM ' . $this->comments_table . '
' . $sql_where . '
- GROUP BY comment_image_id, comment_id
- ORDER BY comment_id DESC';
+ GROUP BY comment_image_id
+ ORDER BY last_comment DESC';
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
From d4c86fd2f3fb45ef99c393eb77f2de5c3e923e73 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 17:22:48 +0100
Subject: [PATCH 131/138] Fix empty line on gallery configuration acp
---
core/acp/config_module.php | 13 +++++++++----
core/adm/style/gallery_logs.html | 2 +-
core/adm/style/gallery_main.html | 1 -
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/core/acp/config_module.php b/core/acp/config_module.php
index 7162ded9..e54477c0 100644
--- a/core/acp/config_module.php
+++ b/core/acp/config_module.php
@@ -215,10 +215,15 @@ public function main($id, $mode)
if (strpos($config_key, 'legend') !== false)
{
- $template->assign_block_vars('options', array(
- 'S_LEGEND' => true,
- 'LEGEND' => ($this->language->is_set($vars)) ? $this->language->lang($vars) : $vars)
- );
+ $legend_text = ($this->language->is_set($vars)) ? $this->language->lang($vars) : $vars;
+
+ if (!empty($legend_text))
+ {
+ $template->assign_block_vars('options', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $legend_text
+ ));
+ }
continue;
}
diff --git a/core/adm/style/gallery_logs.html b/core/adm/style/gallery_logs.html
index 00885814..58bd6a69 100644
--- a/core/adm/style/gallery_logs.html
+++ b/core/adm/style/gallery_logs.html
@@ -1,6 +1,6 @@
-
+
{L_TITLE}
diff --git a/core/adm/style/gallery_main.html b/core/adm/style/gallery_main.html
index 14897cdf..98324db4 100644
--- a/core/adm/style/gallery_main.html
+++ b/core/adm/style/gallery_main.html
@@ -7,7 +7,6 @@ {ACP_GALLERY_TITLE}
-
{L_VERSION_CHECK}
{mods.UP_TO_DATE}
From 39eb19dd062e92fa567404eb958f895901ca078f Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 17:37:12 +0100
Subject: [PATCH 132/138] Hide for now
---
core/controller/image.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index de63a6e3..2800672f 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -724,7 +724,8 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
'U_DELETE' => ($this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']) || ($this->gallery_auth->acl_check('c_delete', $album_id, $album_data['album_user_id']) && ($row['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_delete', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '',
'U_QUOTE' => ($this->gallery_auth->acl_check('c_post', $album_id, $album_data['album_user_id'])) ? $this->helper->route('phpbbgallery_core_comment_add', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '',
'U_EDIT' => ($this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']) || ($this->gallery_auth->acl_check('c_edit', $album_id, $album_data['album_user_id']) && ($row['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '',
- 'U_INFO' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
+ // TODO Whois link
+ // 'U_INFO' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
'POSTER_FULL' => get_username_string('full', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
'POSTER_COLOUR' => get_username_string('colour', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
From 767d7a623a594365e8f0eeaec64d277af6ba553d Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 19:45:14 +0100
Subject: [PATCH 133/138] Fix missing configs for correct unninstalling
---
core/config.php | 8 +++++---
core/migrations/release_1_2_0.php | 11 +++++++----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/core/config.php b/core/config.php
index 1cd9866e..f534bc65 100644
--- a/core/config.php
+++ b/core/config.php
@@ -64,6 +64,8 @@ class config
'hotlinking_domains' => 'anavaro.com',
+ 'items_per_page' => 15,
+
'jpg_quality' => 100,
'link_thumbnail' => 'image_page',
@@ -98,7 +100,6 @@ class config
'pegas_index_rnd_count' => 4,
//'pegas_index_recent' => true,
'pegas_index_rct_count' => 4,
- 'items_per_page' => 15,
'profile_user_images' => true,
'profile_pega' => true,
'prune_orphan_time' => 0,
@@ -108,8 +109,8 @@ class config
'rrc_gindex_display' => 173,
'rrc_gindex_mode' => 7,
'rrc_gindex_pegas' => true,
- 'rrc_profile_items' => 4,
'rrc_profile_display' => 141,
+ 'rrc_profile_items' => 4,
'rrc_profile_mode' => 3,
//'rrc_profile_pegas' => true,
@@ -121,7 +122,6 @@ class config
'thumbnail_quality' => 50,
'thumbnail_width' => 240,
- 'version' => '',
//'viewtopic_icon' => true,
//'viewtopic_images' => true,
//'viewtopic_link' => false,
@@ -132,6 +132,8 @@ class config
'watermark_position' => 20,
'watermark_source' => 'gallery/images/watermark.png',
'watermark_width' => 200,
+
+ 'version' => '',
);
/**
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index fa6ccdd1..e44e5914 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -164,6 +164,7 @@ public function uninstall_config()
'allow_hotlinking' => true,
'allow_jpg' => true,
'allow_png' => true,
+ 'allow_webp' => true,
'allow_rates' => true,
'allow_resize' => true,
'allow_rotate' => true,
@@ -187,11 +188,14 @@ public function uninstall_config()
'disp_statistic' => true,
'disp_total_images' => true,
'disp_whoisonline' => true,
+ 'disp_gallery_icon' => true,
'gdlib_version' => 2,
'hotlinking_domains' => 'anavaro.com',
+ 'items_per_page' => 15,
+
'jpg_quality' => 100,
'link_thumbnail' => 'image_page',
@@ -226,18 +230,20 @@ public function uninstall_config()
'pegas_index_rnd_count' => 4,
//'pegas_index_recent' => true,
'pegas_index_rct_count' => 4,
+
'profile_user_images' => true,
'profile_pega' => true,
'prune_orphan_time' => 0,
'rrc_gindex_comments' => false,
+ //'rrc_gindex_contests' => 1,
'rrc_gindex_display' => 173,
'rrc_gindex_mode' => 7,
'rrc_gindex_pegas' => true,
'rrc_profile_display' => 141,
+ 'rrc_profile_items' => 4,
'rrc_profile_mode' => 3,
//'rrc_profile_pegas' => true,
- 'rrc_profile_items' => 4,
'search_display' => 45,
@@ -257,9 +263,6 @@ public function uninstall_config()
'watermark_source' => 'ext/phpbbgallery/core/images/watermark.png',
'watermark_width' => 200,
- 'items_per_page' => 15,
-
- //Version
'version' => '1.2.0',
);
}
From eebc1c814bceb0c8e990c7eec7182807fa1840a4 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 19:48:43 +0100
Subject: [PATCH 134/138] Fix space
---
core/migrations/release_1_2_0.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/core/migrations/release_1_2_0.php b/core/migrations/release_1_2_0.php
index e44e5914..0d0f6e50 100644
--- a/core/migrations/release_1_2_0.php
+++ b/core/migrations/release_1_2_0.php
@@ -230,7 +230,6 @@ public function uninstall_config()
'pegas_index_rnd_count' => 4,
//'pegas_index_recent' => true,
'pegas_index_rct_count' => 4,
-
'profile_user_images' => true,
'profile_pega' => true,
'prune_orphan_time' => 0,
From 215d3a2ea5665c9acfb51191ef903a27ce951abc Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 20:00:44 +0100
Subject: [PATCH 135/138] Fix ip bug
---
core/block.bkp | 2 +-
core/controller/image.php | 3 ++-
.../styles/prosilver/template/gallery/recent_body.html | 4 ++--
.../prosilver/template/gallery/viewimage_body.html | 10 +++++-----
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/core/block.bkp b/core/block.bkp
index ec6cb77f..a58f4cd2 100644
--- a/core/block.bkp
+++ b/core/block.bkp
@@ -630,7 +630,7 @@ class block
'U_DELETE' => (phpbb_gallery::$auth->acl_check('m_comments', $album_id) || (phpbb_gallery::$auth->acl_check('c_delete', $album_id) && ($row['comment_user_id'] == $user->data['user_id']) && $user->data['is_registered'])) ? phpbb_gallery_url::append_sid('comment', "album_id=$album_id&image_id=$image_id&mode=delete&comment_id=" . $row['comment_id']) : '',
'U_QUOTE' => (phpbb_gallery::$auth->acl_check('c_post', $album_id)) ? phpbb_gallery_url::append_sid('comment', "album_id=$album_id&image_id=$image_id&mode=add&comment_id=" . $row['comment_id']) : '',
'U_EDIT' => (phpbb_gallery::$auth->acl_check('m_comments', $album_id) || (phpbb_gallery::$auth->acl_check('c_edit', $album_id) && ($row['comment_user_id'] == $user->data['user_id']) && $user->data['is_registered'])) ? phpbb_gallery_url::append_sid('comment', "album_id=$album_id&image_id=$image_id&mode=edit&comment_id=" . $row['comment_id']) : '',
- 'U_INFO' => ($auth->acl_get('a_')) ? phpbb_gallery_url::append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
+ 'U_WHOIS' => ($auth->acl_get('a_')) ? phpbb_gallery_url::append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
'UC_THUMBNAIL' => phpbb_gallery_image::generate_link('thumbnail', phpbb_gallery_config::get('link_thumbnail'), $row['image_id'], $row['image_name'], $row['image_album_id']),
'UC_IMAGE_NAME' => phpbb_gallery_image::generate_link('image_name', phpbb_gallery_config::get('link_image_name'), $row['image_id'], $row['image_name'], $row['image_album_id']),
diff --git a/core/controller/image.php b/core/controller/image.php
index 2800672f..631d7da3 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -725,12 +725,13 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
'U_QUOTE' => ($this->gallery_auth->acl_check('c_post', $album_id, $album_data['album_user_id'])) ? $this->helper->route('phpbbgallery_core_comment_add', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '',
'U_EDIT' => ($this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']) || ($this->gallery_auth->acl_check('c_edit', $album_id, $album_data['album_user_id']) && ($row['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id' => $image_id, 'comment_id' => $row['comment_id'])) : '',
// TODO Whois link
- // 'U_INFO' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
+ // 'U_WHOIS' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
'POSTER_FULL' => get_username_string('full', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
'POSTER_COLOUR' => get_username_string('colour', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
'POSTER_USERNAME' => get_username_string('username', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
'U_POSTER' => get_username_string('profile', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
+ 'POSTER_IP' => ($this->auth->acl_get('a_')) ? $row['comment_user_ip'] : '',
'SIGNATURE' => ($row['comment_signature'] && !$user_deleted) ? generate_text_for_display($this->users_data_array[$poster_id]['sig'], $row['comment_uid'], $row['comment_bitfield'], 7) : '',
'RANK_TITLE' => $user_deleted ? '' : $this->users_data_array[$poster_id]['rank_title'],
diff --git a/core/styles/prosilver/template/gallery/recent_body.html b/core/styles/prosilver/template/gallery/recent_body.html
index be046f3e..342f260d 100644
--- a/core/styles/prosilver/template/gallery/recent_body.html
+++ b/core/styles/prosilver/template/gallery/recent_body.html
@@ -17,11 +17,11 @@
-
+
diff --git a/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html
index 1c66e91f..78668288 100644
--- a/core/styles/prosilver/template/gallery/viewimage_body.html
+++ b/core/styles/prosilver/template/gallery/viewimage_body.html
@@ -70,9 +70,9 @@ {L_IMAGE_DESC}
{L_IMAGES}{L_COLON} {POSTER_GALLERY_IMAGES} {POSTER_GALLERY_IMAGES}
{L_JOINED}{L_COLON} {POSTER_JOINED}
{L_WARNINGS}{L_COLON} {POSTER_WARNINGS}
-
- {L_IP}{L_COLON} {POSTER_IP}
-
+
+ {L_IP}{L_COLON} {POSTER_IP}
+
{PROFILE_FIELD1_NAME}{L_COLON} {PROFILE_FIELD1_VALUE}
@@ -304,12 +304,12 @@ {L_IMAGE_NAME}{L_COLON}
-
+
From 99111a7dd43af23dcd32aa1890e7909645107051 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 23:45:48 +0100
Subject: [PATCH 136/138] Some improvements on viewimage
---
core/controller/image.php | 97 ++++++++++---------
.../template/gallery/viewimage_body.html | 12 +--
2 files changed, 54 insertions(+), 55 deletions(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index 631d7da3..99d7a6af 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -484,8 +484,8 @@ public function base($image_id, $page = 0)
'POSTER_WARNINGS' => $user_data['warnings'] ?? 0,
'POSTER_AGE' => $user_data['age'] ?? '',
- 'POSTER_ONLINE_IMG' => ($user_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? '' : (($user_data['online'] ?? false) ? $this->user->img('icon_user_online', 'ONLINE') : $this->user->img('icon_user_offline', 'OFFLINE')),
- 'S_POSTER_ONLINE' => ($user_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? false : (($user_data['online'] ?? false) ? true : false),
+ 'POSTER_ONLINE_IMG' => ($user_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? '' : ($user_data['online'] ? $this->user->img('icon_user_online', 'ONLINE') : $this->user->img('icon_user_offline', 'OFFLINE')),
+ 'S_POSTER_ONLINE' => ($user_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? false : $user_data['online'],
//'U_POSTER_PROFILE' => $user_data['profile'] ?? '',
'U_POSTER_SEARCH' => $user_data['search'] ?? '',
@@ -655,41 +655,24 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
$this->load_users_data();
- // Load online-information
- if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
- {
- $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
- FROM ' . SESSIONS_TABLE . '
- WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
- GROUP BY session_user_id';
- $result = $this->db->sql_query($sql);
-
- $update_time = $this->config['load_online_time'] * 60;
- while ($row = $this->db->sql_fetchrow($result))
- {
- $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
- }
- $this->db->sql_freeresult($result);
- }
-
foreach ($comments as $row)
{
$edit_info = '';
// Let's deploy new profile
$poster_id = $row['comment_user_id'];
-
+ $user_data = $this->users_data_array[$poster_id] ?? [];
if ($row['comment_edit_count'] > 0)
{
$edit_info = ($row['comment_edit_count'] == 1) ? $this->language->lang('IMAGE_EDITED_TIME_TOTAL') : $this->language->lang('IMAGE_EDITED_TIMES_TOTAL');
$edit_info = sprintf($edit_info, get_username_string('full', $row['comment_edit_user_id'], $this->users_data_array[$row['comment_edit_user_id']]['username'], $this->users_data_array[$row['comment_edit_user_id']]['user_colour']), $this->user->format_date($row['comment_edit_time'], false, true), $row['comment_edit_count']);
}
- $user_deleted = (isset($this->users_data_array[$poster_id]) ? false : true);
+ $user_deleted = (isset($user_data) ? false : true);
// End signature parsing, only if needed
- if ($this->users_data_array[$poster_id]['sig'] && empty($this->users_data_array[$poster_id]['sig_parsed']))
+ if ($user_data['sig'] && empty($user_data['sig_parsed']))
{
- $parse_flags = ($this->users_data_array[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
- $user_cache[$poster_id]['sig'] = generate_text_for_display($this->users_data_array[$poster_id]['sig'], $this->users_data_array[$poster_id]['sig_bbcode_uid'], $this->users_data_array[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true);
+ $parse_flags = ($user_data['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $user_cache[$poster_id]['sig'] = generate_text_for_display($user_data['sig'], $user_data['sig_bbcode_uid'], $user_data['sig_bbcode_bitfield'], $parse_flags, true);
$user_cache[$poster_id]['sig_parsed'] = true;
}
@@ -701,13 +684,13 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
}
$can_receive_pm = (
// They must be a "normal" user
- $this->users_data_array[$poster_id]['user_type'] != USER_IGNORE &&
+ $user_data['user_type'] != USER_IGNORE &&
// They must not be deactivated by the administrator
- ($this->users_data_array[$poster_id]['user_type'] != USER_INACTIVE || $this->users_data_array[$poster_id]['user_inactive_reason'] != INACTIVE_MANUAL) &&
+ ($user_data['user_type'] != USER_INACTIVE || $user_data['user_inactive_reason'] != INACTIVE_MANUAL) &&
// They must be able to read PMs
in_array($poster_id, $this->can_receive_pm_list) &&
// They must allow users to contact via PM
- (($this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) || $this->users_data_array[$poster_id]['allow_pm'])
+ (($this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) || $user_data['allow_pm'])
);
$u_pm = '';
if ($this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $can_receive_pm)
@@ -715,6 +698,7 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
$u_pm = append_sid("{$this->phpbb_root_path}ucp.$this->php_ext", 'i=pm&mode=compose');
}
+ $user_data = $this->users_data_array[$poster_id] ?? [];
$comment_row = array(
'U_COMMENT' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)) . '#comment_' . $row['comment_id'],
'COMMENT_ID' => $row['comment_id'],
@@ -727,30 +711,31 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
// TODO Whois link
// 'U_WHOIS' => ($this->auth->acl_get('a_')) ? $this->url->append_sid('mcp', 'mode=whois&ip=' . $row['comment_user_ip']) : '',
- 'POSTER_FULL' => get_username_string('full', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
- 'POSTER_COLOUR' => get_username_string('colour', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
- 'POSTER_USERNAME' => get_username_string('username', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
- 'U_POSTER' => get_username_string('profile', $poster_id, $this->users_data_array[$poster_id]['username'], $this->users_data_array[$poster_id]['user_colour']),
+ 'POSTER_FULL' => get_username_string('full', $poster_id, $user_data['username'], $user_data['user_colour']),
+ 'POSTER_COLOUR' => get_username_string('colour', $poster_id, $user_data['username'], $user_data['user_colour']),
+ 'POSTER_USERNAME' => get_username_string('username', $poster_id, $user_data['username'], $user_data['user_colour']),
+ 'U_POSTER' => get_username_string('profile', $poster_id, $user_data['username'], $user_data['user_colour']),
'POSTER_IP' => ($this->auth->acl_get('a_')) ? $row['comment_user_ip'] : '',
- 'SIGNATURE' => ($row['comment_signature'] && !$user_deleted) ? generate_text_for_display($this->users_data_array[$poster_id]['sig'], $row['comment_uid'], $row['comment_bitfield'], 7) : '',
- 'RANK_TITLE' => $user_deleted ? '' : $this->users_data_array[$poster_id]['rank_title'],
- 'RANK_IMG' => $user_deleted ? '' : $this->users_data_array[$poster_id]['rank_image'],
- 'RANK_IMG_SRC' => $user_deleted ? '' : $this->users_data_array[$poster_id]['rank_image_src'],
- 'POSTER_JOINED' => $user_deleted ? '' : $this->users_data_array[$poster_id]['joined'],
- 'POSTER_POSTS' => $user_deleted ? '' : $this->users_data_array[$poster_id]['posts'],
- 'POSTER_FROM' => isset($this->users_data_array[$poster_id]['from']) ? $this->users_data_array[$poster_id]['from'] : '',
- 'POSTER_AVATAR' => $user_deleted ? '' : $this->users_data_array[$poster_id]['avatar'],
- 'POSTER_WARNINGS' => $user_deleted ? '' : $this->users_data_array[$poster_id]['warnings'],
- 'POSTER_AGE' => $user_deleted ? '' : $this->users_data_array[$poster_id]['age'],
-
- 'MINI_POST_IMG' => $this->user->img('icon_post_target', 'POST'),
- 'ICQ_STATUS_IMG' => isset($this->users_data_array[$poster_id]['icq_status_img']) ? $this->users_data_array[$poster_id]['icq_status_img'] : '',
- 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? '' : ($user_deleted ? '' : (($this->users_data_array[$poster_id]['online']) ? $this->user->img('icon_user_online', 'ONLINE') : $this->user->img('icon_user_offline', 'OFFLINE'))),
- 'S_ONLINE' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? false : ($user_deleted ? '' : (($this->users_data_array[$poster_id]['online']) ? true : false)),
+ 'POSTER_SIGNATURE' => ($row['comment_signature'] && !$user_deleted) ? generate_text_for_display($user_data['sig'], $row['comment_uid'], $row['comment_bitfield'], 7) : '',
+ 'POSTER_RANK_TITLE' => $user_deleted ? '' : $user_data['rank_title'],
+ 'POSTER_RANK_IMG' => $user_deleted ? '' : $user_data['rank_image'],
+ 'POSTER_RANK_IMG_SRC' => $user_deleted ? '' : $user_data['rank_image_src'],
+ 'POSTER_JOINED' => $user_deleted ? '' : $user_data['joined'],
+ 'POSTER_POSTS' => $user_deleted ? '' : $user_data['posts'],
+ 'POSTER_FROM' => isset($user_data['from']) ? $user_data['from'] : '',
+ 'POSTER_AVATAR' => $user_deleted ? '' : $user_data['avatar'],
+ 'POSTER_WARNINGS' => $user_deleted ? '' : $user_data['warnings'],
+ 'POSTER_AGE' => $user_deleted ? '' : $user_data['age'],
+
+ // 'MINI_POST_IMG' => $this->user->img('icon_post_target', 'POST'),
+ // 'ICQ_STATUS_IMG' => isset($user_data['icq_status_img']) ? $user_data['icq_status_img'] : '',
+ 'POSTER_ONLINE_IMG' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? '' : ($user_deleted ? '' : ($user_data['online'] ? $this->user->img('icon_user_online', 'ONLINE') : $this->user->img('icon_user_offline', 'OFFLINE'))),
+ 'S_POSTER_ONLINE' => ($poster_id == ANONYMOUS || !$this->config['load_onlinetrack']) ? false : ($user_deleted ? '' : $user_data['online']),
'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && count($cp_row['row'])) ? true : false,
);
+ var_dump($user_data['online']);
if (isset($cp_row['row']) && count($cp_row['row']))
{
$comment_row = array_merge($comment_row, $cp_row['row']);
@@ -766,12 +751,12 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
array(
'ID' => 'email',
'NAME' => $this->language->lang('SEND_EMAIL'),
- 'U_CONTACT' => $this->users_data_array[$poster_id]['email'],
+ 'U_CONTACT' => $user_data['email'],
),
array(
'ID' => 'jabber',
'NAME' => $this->language->lang('JABBER'),
- 'U_CONTACT' => $this->users_data_array[$poster_id]['jabber'],
+ 'U_CONTACT' => $user_data['jabber'],
),
);
@@ -1289,5 +1274,21 @@ protected function load_users_data()
}
$this->can_receive_pm_list = (empty($this->can_receive_pm_list) || !isset($this->can_receive_pm_list[0]['u_readpm'])) ? array() : $this->can_receive_pm_list[0]['u_readpm'];
+ // Load online-information
+ if ($this->config['load_onlinetrack'] && sizeof($this->users_id_array))
+ {
+ $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
+ FROM ' . SESSIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('session_user_id', $this->users_id_array) . '
+ GROUP BY session_user_id';
+ $result = $this->db->sql_query($sql);
+
+ $update_time = $this->config['load_online_time'] * 60;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->users_data_array[$row['session_user_id']]['online'] = (time() - $update_time < $row['online_time'] && (($row['viewonline']) || $this->auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ $this->db->sql_freeresult($result);
+ }
}
}
diff --git a/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html
index 78668288..8a8331a9 100644
--- a/core/styles/prosilver/template/gallery/viewimage_body.html
+++ b/core/styles/prosilver/template/gallery/viewimage_body.html
@@ -70,9 +70,8 @@ {L_IMAGE_DESC}
{L_IMAGES}{L_COLON} {POSTER_GALLERY_IMAGES} {POSTER_GALLERY_IMAGES}
{L_JOINED}{L_COLON} {POSTER_JOINED}
{L_WARNINGS}{L_COLON} {POSTER_WARNINGS}
-
- {L_IP}{L_COLON} {POSTER_IP}
-
+ {L_IP}{L_COLON} {POSTER_IP}
+
{PROFILE_FIELD1_NAME}{L_COLON} {PROFILE_FIELD1_VALUE}
@@ -241,7 +240,7 @@ {L_IMAGE_NAME}{L_COLON}
- {commentrow.POSTER_AVATAR} {commentrow.POSTER_AVATAR}
+ {commentrow.POSTER_AVATAR} {commentrow.POSTER_AVATAR}
@@ -258,7 +257,7 @@ {L_IMAGE_NAME}{L_COLON}{L_IMAGES}{L_COLON} {POSTER_GALLERY_IMAGES} {POSTER_GALLERY_IMAGES}
{L_JOINED}{L_COLON} {commentrow.POSTER_JOINED}
{L_WARNINGS}{L_COLON} {commentrow.POSTER_WARNINGS}
- {L_IP}{L_COLON} {commentrow.POSTER_IP}
+ {L_IP}{L_COLON} {commentrow.POSTER_IP}
@@ -267,12 +266,11 @@ {L_IMAGE_NAME}{L_COLON}
-
+
-
{L_CONTACT}{L_COLON}
From 20957afd7f0471d98559ff7af50808bf41c303d5 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Sun, 10 Aug 2025 23:50:35 +0100
Subject: [PATCH 137/138] clean var dump
---
core/controller/image.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/controller/image.php b/core/controller/image.php
index 99d7a6af..3d894851 100644
--- a/core/controller/image.php
+++ b/core/controller/image.php
@@ -735,7 +735,7 @@ protected function display_comments($image_id, $image_data, $album_id, $album_da
'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && count($cp_row['row'])) ? true : false,
);
- var_dump($user_data['online']);
+
if (isset($cp_row['row']) && count($cp_row['row']))
{
$comment_row = array_merge($comment_row, $cp_row['row']);
From fc4a8685c15bf6e0a1e726550b98ca90bfb4a823 Mon Sep 17 00:00:00 2001
From: Leinad4Mind
Date: Thu, 14 Aug 2025 16:08:16 +0100
Subject: [PATCH 138/138] Solve conflicts with some extensions
problem is from a phpbb limitation, and some extension developers that loves to use hippies coding x'D
---
acpcleanup/config/services.yml | 8 +--
core/config/services.yml | 88 ++++++++++++++---------------
core/config/services_controller.yml | 24 ++++----
core/config/tables.yml | 36 ++++++------
4 files changed, 79 insertions(+), 77 deletions(-)
diff --git a/acpcleanup/config/services.yml b/acpcleanup/config/services.yml
index 7d1e8c0d..f2c0d6f8 100644
--- a/acpcleanup/config/services.yml
+++ b/acpcleanup/config/services.yml
@@ -1,6 +1,6 @@
parameters:
- phpbbgallery.tables.albums: '%core.table_prefix%gallery_albums'
- phpbbgallery.tables.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:
@@ -16,5 +16,5 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.moderate'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
\ No newline at end of file
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
\ No newline at end of file
diff --git a/core/config/services.yml b/core/config/services.yml
index 2475b8a7..cbbaa667 100644
--- a/core/config/services.yml
+++ b/core/config/services.yml
@@ -17,10 +17,10 @@ services:
- '@phpbbgallery.core.cache'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.config'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.watch%'
- - '%phpbbgallery.tables.contests%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_watch%'
+ - '%phpbbgallery.tables.gallery_contests%'
phpbbgallery.core.album.display:
class: phpbbgallery\core\album\display
arguments:
@@ -38,17 +38,17 @@ services:
- '@phpbbgallery.core.misc'
- '%core.root_path%'
- '%core.php_ext%'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.contests%'
- - '%phpbbgallery.tables.tracking%'
- - '%phpbbgallery.tables.moderators%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_contests%'
+ - '%phpbbgallery.tables.gallery_tracking%'
+ - '%phpbbgallery.tables.gallery_moderators%'
phpbbgallery.core.album.loader:
class: phpbbgallery\core\album\loader
arguments:
- '@dbal.conn'
- '@user'
- '@phpbbgallery.core.contest'
- - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.gallery_albums%'
phpbbgallery.core.album.manage:
class: phpbbgallery\core\album\manage
arguments:
@@ -68,12 +68,12 @@ services:
- '@phpbbgallery.core.report'
- '@phpbbgallery.core.log'
- '@phpbbgallery.core.notification'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.comments%'
- - '%phpbbgallery.tables.permissions%'
- - '%phpbbgallery.tables.moderators%'
- - '%phpbbgallery.tables.contests%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_comments%'
+ - '%phpbbgallery.tables.gallery_permissions%'
+ - '%phpbbgallery.tables.gallery_moderators%'
+ - '%phpbbgallery.tables.gallery_contests%'
phpbbgallery.core.misc:
class: phpbbgallery\core\misc
arguments:
@@ -84,7 +84,7 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.user'
- '@phpbbgallery.core.url'
- - '%phpbbgallery.tables.tracking%'
+ - '%phpbbgallery.tables.gallery_tracking%'
phpbbgallery.core.auth:
class: phpbbgallery\core\auth\auth
arguments:
@@ -93,10 +93,10 @@ services:
- '@phpbbgallery.core.user'
- '@user'
- '@auth'
- - '%phpbbgallery.tables.permissions%'
- - '%phpbbgallery.tables.roles%'
- - '%phpbbgallery.tables.users%'
- - '%phpbbgallery.tables.albums%'
+ - '%phpbbgallery.tables.gallery_permissions%'
+ - '%phpbbgallery.tables.gallery_roles%'
+ - '%phpbbgallery.tables.gallery_users%'
+ - '%phpbbgallery.tables.gallery_albums%'
phpbbgallery.core.auth.level:
class: phpbbgallery\core\auth\level
arguments:
@@ -110,8 +110,8 @@ services:
arguments:
- '@cache'
- '@dbal.conn'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.file.tool:
class: phpbbgallery\core\file\file
arguments:
@@ -139,7 +139,7 @@ services:
- '@phpbbgallery.core.user'
- '@phpbbgallery.core.contest'
- '@phpbbgallery.core.file.tool'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.user:
class: phpbbgallery\core\user
arguments:
@@ -149,7 +149,7 @@ services:
- '@profilefields.manager'
- '@config'
- '@auth'
- - '%phpbbgallery.tables.users%'
+ - '%phpbbgallery.tables.gallery_users%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.config:
@@ -171,8 +171,8 @@ services:
- '@phpbbgallery.core.config'
- '@pagination'
- '@phpbbgallery.core.notification.helper'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.reports%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_reports%'
phpbbgallery.core.comment:
class: phpbbgallery\core\comment
arguments:
@@ -181,8 +181,8 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.auth'
- '@phpbbgallery.core.block'
- - '%phpbbgallery.tables.comments%'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_comments%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.url:
class: phpbbgallery\core\url
arguments:
@@ -209,7 +209,7 @@ services:
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.notification'
- '@phpbbgallery.core.rating'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.search:
class: phpbbgallery\core\search
arguments:
@@ -224,15 +224,15 @@ services:
- '@phpbbgallery.core.image'
- '@pagination'
- '@user_loader'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_comments%'
phpbbgallery.core.notification:
class: phpbbgallery\core\notification
arguments:
- '@dbal.conn'
- '@user'
- - '%phpbbgallery.tables.watch%'
+ - '%phpbbgallery.tables.gallery_watch%'
phpbbgallery.core.notification.helper:
class: phpbbgallery\core\notification\helper
arguments:
@@ -248,7 +248,7 @@ services:
- '@service_container'
- '%core.root_path%'
- '%core.php_ext%'
- - '%phpbbgallery.tables.watch%'
+ - '%phpbbgallery.tables.gallery_watch%'
calls:
- [set_image, ['@phpbbgallery.core.image']]
phpbbgallery.core.log:
@@ -263,8 +263,8 @@ services:
- '@pagination'
- '@phpbbgallery.core.auth'
- '@phpbbgallery.core.config'
- - '%phpbbgallery.tables.log%'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_log%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.block:
class: phpbbgallery\core\block
phpbbgallery.core.contest:
@@ -272,8 +272,8 @@ services:
arguments:
- '@dbal.conn'
- '@phpbbgallery.core.config'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.contests%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_contests%'
phpbbgallery.core.upload:
class: phpbbgallery\core\upload
arguments:
@@ -288,7 +288,7 @@ services:
- '@phpbbgallery.core.url'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.file.tool'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_images%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.rating:
@@ -301,9 +301,9 @@ services:
- '@request'
- '@phpbbgallery.core.config'
- '@phpbbgallery.core.auth'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.rates%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_rates%'
#######################
#### Define event #####
#######################
@@ -317,8 +317,8 @@ services:
- '@phpbbgallery.core.search'
- '@phpbbgallery.core.config'
- '@dbal.conn'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.users%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_users%'
- '%core.php_ext%'
tags:
- { name: event.listener }
diff --git a/core/config/services_controller.yml b/core/config/services_controller.yml
index 964f7980..eb97b283 100644
--- a/core/config/services_controller.yml
+++ b/core/config/services_controller.yml
@@ -26,7 +26,7 @@ services:
- '@phpbbgallery.core.upload'
- '@phpbbgallery.core.block'
- '@phpbbgallery.core.contest'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_images%'
- '%core.root_path%'
phpbbgallery.core.controller.album:
class: phpbbgallery\core\controller\album
@@ -48,7 +48,7 @@ services:
- '@phpbbgallery.core.image'
- '@request'
- '@phpbbgallery.core.contest'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.controller.file:
class: phpbbgallery\core\controller\file
arguments:
@@ -63,8 +63,8 @@ services:
- '%phpbbgallery.core.file.medium%'
- '%phpbbgallery.core.file.mini%'
- '%phpbbgallery.core.file.watermark%'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
phpbbgallery.core.controller.image:
class: phpbbgallery\core\controller\image
arguments:
@@ -97,10 +97,10 @@ services:
- '@phpbbgallery.core.rating'
- '@phpbbgallery.core.block'
- '@service_container'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.users%'
- - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_users%'
+ - '%phpbbgallery.tables.gallery_comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.index:
@@ -142,9 +142,9 @@ services:
- '@phpbbgallery.core.image'
- '@phpbbgallery.core.url'
- '@phpbbgallery.core.search'
- - '%phpbbgallery.tables.images%'
- - '%phpbbgallery.tables.albums%'
- - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.gallery_images%'
+ - '%phpbbgallery.tables.gallery_albums%'
+ - '%phpbbgallery.tables.gallery_comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.comment:
@@ -173,7 +173,7 @@ services:
- '@phpbbgallery.core.notification'
- '@phpbbgallery.core.rating'
- '@service_container'
- - '%phpbbgallery.tables.comments%'
+ - '%phpbbgallery.tables.gallery_comments%'
- '%core.root_path%'
- '%core.php_ext%'
phpbbgallery.core.controller.moderate:
diff --git a/core/config/tables.yml b/core/config/tables.yml
index d4a138ce..90f46d4b 100644
--- a/core/config/tables.yml
+++ b/core/config/tables.yml
@@ -1,19 +1,21 @@
parameters:
- phpbbgallery.core.file.source: '%core.root_path%files/phpbbgallery/core/source/'
- phpbbgallery.core.file.medium: '%core.root_path%files/phpbbgallery/core/medium/'
- phpbbgallery.core.file.mini: '%core.root_path%files/phpbbgallery/core/mini/'
- phpbbgallery.core.file.watermark: '%core.root_path%ext/phpbbgallery/core/images/watermark.png'
+ phpbbgallery.core:
+ file.source: '%core.root_path%files/phpbbgallery/core/source/'
+ file.medium: '%core.root_path%files/phpbbgallery/core/medium/'
+ file.mini: '%core.root_path%files/phpbbgallery/core/mini/'
+ file.watermark: '%core.root_path%ext/phpbbgallery/core/images/watermark.png'
- phpbbgallery.tables.albums: '%core.table_prefix%gallery_albums'
- phpbbgallery.tables.contests: '%core.table_prefix%gallery_contests'
- phpbbgallery.tables.images: '%core.table_prefix%gallery_images'
- phpbbgallery.tables.moderators: '%core.table_prefix%gallery_modscache'
- phpbbgallery.tables.permissions: '%core.table_prefix%gallery_permissions'
- phpbbgallery.tables.roles: '%core.table_prefix%gallery_roles'
- phpbbgallery.tables.tracking: '%core.table_prefix%gallery_albums_track'
- phpbbgallery.tables.users: '%core.table_prefix%gallery_users'
- phpbbgallery.tables.comments: '%core.table_prefix%gallery_comments'
- phpbbgallery.tables.reports: '%core.table_prefix%gallery_reports'
- phpbbgallery.tables.rates: '%core.table_prefix%gallery_rates'
- phpbbgallery.tables.log: '%core.table_prefix%gallery_log'
- phpbbgallery.tables.watch: '%core.table_prefix%gallery_watch'
+ phpbbgallery.tables:
+ gallery_albums: '%core.table_prefix%gallery_albums'
+ gallery_contests: '%core.table_prefix%gallery_contests'
+ gallery_images: '%core.table_prefix%gallery_images'
+ gallery_moderators: '%core.table_prefix%gallery_modscache'
+ gallery_permissions: '%core.table_prefix%gallery_permissions'
+ gallery_roles: '%core.table_prefix%gallery_roles'
+ gallery_tracking: '%core.table_prefix%gallery_albums_track'
+ gallery_users: '%core.table_prefix%gallery_users'
+ gallery_comments: '%core.table_prefix%gallery_comments'
+ gallery_reports: '%core.table_prefix%gallery_reports'
+ gallery_rates: '%core.table_prefix%gallery_rates'
+ gallery_log: '%core.table_prefix%gallery_log'
+ gallery_watch: '%core.table_prefix%gallery_watch'