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 @@ [![Tests](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml/badge.svg)](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml) [![Code Coverage](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/badges/quality-score.png?b=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 @@ [![Tests](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml/badge.svg)](https://github.com/satanasov/phpbbgallery/actions/workflows/tests.yml) [![Code Coverage](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/satanasov/phpbbgallery/badges/quality-score.png?b=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 + +[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3JQ8HDK6Y7A2N) - BTC: 12afvCTp1dRrQdHaavzthZ1dNWMoi8eyc8 - ETH: 0x363abc8edf41ac89906b20e90cf7fdc71fe78cd5 -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](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: - -[![alt text](http://lab.anavaro.com/forum/images/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3JQ8HDK6Y7A2N) - -![alt text](http://www.xe.com/themes/xe/images/symbols/xbt.gif) 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_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_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' => '', - 'S_SELECT_SORT_KEY' => '' - ) - ) - ); - $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' => '', - 'S_SELECT_SORT_KEY' => '' - ) - ) - ); - $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' => '', + 'S_SELECT_SORT_KEY' => '' + ) + ) + ); + $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' => '', + 'S_SELECT_SORT_KEY' => '' + ) + ) + ); + $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' => '' - ) - ) - ); - $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' => '' - ) - ) - ); - $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' => '' - ) - ) - ); - $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' => '' + ) + ) + ); + $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' => '' + ) + ) + ); + $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' => '' + ) + ) + ); + $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' => 'TestImage6', - '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' => 'TestImage5', - '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' => 'TestImage4', - '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' => 'TestImage3', - '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' => 'TestImage2', - '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' => 'TestImage1', - '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' => 'TestImage6', - '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' => 'TestImage5', - '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' => 'TestImage3', - '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' => 'TestImage2', - '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' => 'TestImage3', - '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' => 'TestImage2', - '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' => 'TestImage1', - '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' => 'TestImage3', - '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' => 'TestImage2', - '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' => 'TestImage1', - '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' => 'TestImage6', + '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' => 'TestImage5', + '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' => 'TestImage4', + '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' => 'TestImage3', + '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' => 'TestImage2', + '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' => 'TestImage1', + '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' => 'TestImage6', + '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' => 'TestImage5', + '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' => 'TestImage3', + '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' => 'TestImage2', + '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' => 'TestImage3', + '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' => 'TestImage2', + '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' => 'TestImage1', + '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' => 'TestImage3', + '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' => 'TestImage2', + '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' => 'TestImage1', + '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} +

+ +
{imageblock.image.UC_IMAGE_NAME} -

+

diff --git a/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html index 82369ac5..25f5a58e 100644 --- a/core/styles/prosilver/template/gallery/viewimage_body.html +++ b/core/styles/prosilver/template/gallery/viewimage_body.html @@ -1,6 +1,16 @@

{L_IMAGE_NAME}{L_COLON} {IMAGE_NAME}

+ +
+
+
+ For Approval +
+
+
+ +
diff --git a/core/styles/prosilver/theme/gallery.css b/core/styles/prosilver/theme/gallery.css index 0a46930e..79f183a4 100644 --- a/core/styles/prosilver/theme/gallery.css +++ b/core/styles/prosilver/theme/gallery.css @@ -194,6 +194,22 @@ input.autowidth-gallery { box-sizing: border-box; } +.post > .inner > .unapproved { + text-align: center; + overflow: hidden; + padding: 8px; + font-size: larger; + font-weight: 700; + background-color: #ffcc66; + color: black; + border-radius: 10px; +} + +.polaroid .post-notice.unapproved { + background-color: #ffcc66; + font-weight: 700; +} + .trophy-container { position: relative; From 8e92de6a0710ac0137e835fcba7c702ae34f76d8 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Thu, 31 Jul 2025 18:30:05 +0100 Subject: [PATCH 065/138] Fix error epv --- tests/controller/gallery_album_test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/controller/gallery_album_test.php b/tests/controller/gallery_album_test.php index 9677bbdf..e251c998 100644 --- a/tests/controller/gallery_album_test.php +++ b/tests/controller/gallery_album_test.php @@ -368,6 +368,7 @@ public function test_for_base_load_modreators_allow_rates_and_comments() 'S_STATUS_APPROVED' => true, 'S_STATUS_UNAPPROVED' => false, 'S_STATUS_UNAPPROVED_ACTION' => '', + 'S_STATUS_UNAPPROVED_PERMISSIONS' => false, 'S_STATUS_LOCKED' => false, 'U_REPORT' => '', 'U_STATUS' => '', From faff0c4a4531256df04300e62d1ef2b3997b2e8a Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Thu, 31 Jul 2025 18:41:48 +0100 Subject: [PATCH 066/138] Clean --- core/album/display.php | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/core/album/display.php b/core/album/display.php index b4a44a53..7850647a 100644 --- a/core/album/display.php +++ b/core/album/display.php @@ -229,7 +229,7 @@ public function get_parents($album_data) } else { - $album_parents = $this->safe_unserialize($album_data['album_parents']); + $album_parents = @unserialize($album_data['album_parents']); } } @@ -360,10 +360,6 @@ public function display_albums($root_data = '', $display_moderators = true, $ret $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') - { - $first_char = ''; - } if ($first_char == 'other') { @@ -392,7 +388,6 @@ 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); @@ -797,22 +792,4 @@ 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)) - { - // @EPV-IGNORE unserialize usage is safe here - $result = @unserialize($data); - - if ($result === false && $data !== 'b:0;') - { - return []; - } - - return $result; - } - - return []; - } } From b1352a165e3861382a00ed24e977afcfdfb72ed5 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Thu, 31 Jul 2025 18:48:49 +0100 Subject: [PATCH 067/138] Fix --- core/file/file.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/file/file.php b/core/file/file.php index a14ed1ac..5558aa49 100644 --- a/core/file/file.php +++ b/core/file/file.php @@ -251,7 +251,8 @@ public function write_image($destination, $quality = -1, $destroy_image = false) */ public function header_filename($file) { - $user_agent = $this->request->server('HTTP_USER_AGENT'); + $raw = $this->request->server('HTTP_USER_AGENT'); + $user_agent = htmlspecialchars($raw); // There be dragons here. // Not many follows the RFC... From d1375a47375bce01e1e0bc82d54d57fdda6f981f Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Thu, 31 Jul 2025 18:53:27 +0100 Subject: [PATCH 068/138] clean --- exif/exif.php | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/exif/exif.php b/exif/exif.php index 30ab0446..19318b46 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 = $this->safe_unserialize($data); + $this->data = @unserialize($data); } else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN)) { @@ -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' => $value, + 'EXIF_VALUE' => htmlspecialchars($value), )); } $template->assign_vars(array( @@ -319,24 +319,6 @@ public function set_status() $db->sql_query($sql); } - 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;') - { - 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 97ce4d9b81d7ec510bbc95ae6ccc1129c7e20d5e Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Thu, 31 Jul 2025 18:54:07 +0100 Subject: [PATCH 069/138] clean --- .../prosilver/template/event/gallery_viewimage_details.bkp | 2 +- .../prosilver/template/event/gallery_viewimage_details.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp b/exif/styles/prosilver/template/event/gallery_viewimage_details.bkp index 82d81174..f2c2457a 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_VALUE|escape('html')}
+
{exif_value.EXIF_VALUE}
diff --git a/exif/styles/prosilver/template/event/gallery_viewimage_details.html b/exif/styles/prosilver/template/event/gallery_viewimage_details.html index f82d213a..8445ac72 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_VALUE|escape('html')}
+
{exif_value.EXIF_VALUE}
From 5ae388cc36f5c9be9d64341570a48d651697922b Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sat, 2 Aug 2025 01:01:16 +0100 Subject: [PATCH 070/138] Fix all typos on comments --- core/acp/permissions_module.php | 16 ++++++++-------- core/album/album.php | 2 +- core/album/display.php | 2 +- core/album/manage.php | 6 +++--- core/auth/auth.php | 4 ++-- core/cache.php | 2 +- core/controller/file.php | 2 +- core/controller/image.php | 2 +- core/controller/moderate.php | 6 +++--- core/controller/search.php | 4 ++-- core/event/main_listener.php | 2 +- core/file/file.php | 2 +- core/image/image.php | 8 ++++---- core/notification/helper.php | 4 ++-- core/search.php | 2 +- exif/exif.php | 6 +++--- tests/controller/gallery_index_test.php | 2 +- tests/core/core_search_test.php | 4 ++-- 18 files changed, 38 insertions(+), 38 deletions(-) diff --git a/core/acp/permissions_module.php b/core/acp/permissions_module.php index 6359c9a7..ca3de295 100644 --- a/core/acp/permissions_module.php +++ b/core/acp/permissions_module.php @@ -139,7 +139,7 @@ function permissions_c_mask() // Init album $gallery_album = $phpbb_container->get('phpbbgallery.core.album'); - // Send contants to the template + // Send constants to the template $template->assign_vars(array( 'C_OWN_PERSONAL_ALBUMS' => $gallery_auth::OWN_ALBUM, 'C_PERSONAL_ALBUMS' => $gallery_auth::PERSONAL_ALBUM, @@ -676,7 +676,7 @@ private function permissions_set() $gallery_user = $phpbb_container->get('phpbbgallery.core.user'); $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); - // Send contants to the template + // Send constants to the template $submit = (isset($_POST['submit'])) ? true : false; $album_id = $request->variable('album_id', array(0)); $group_id = $request->variable('group_id', array(0)); @@ -795,7 +795,7 @@ private function permissions_set() } else { - // The choosen option was disabled: Hacking attempt?! + // The chosen option was disabled: Hacking attempt?! trigger_error('HACKING_ATTEMPT', E_USER_WARNING); } } @@ -824,7 +824,7 @@ private function permissions_set() } else { - // The choosen option was disabled: Hacking attempt?! + // The chosen option was disabled: Hacking attempt?! trigger_error('HACKING_ATTEMPT', E_USER_WARNING); } } @@ -921,7 +921,7 @@ private function permissions_set() { $sql_where .= (($sql_where) ? ' AND ' : '') . $p_mask . ' = ' . $value; } - // Check back, so we dont give more permissions than the admin wants to + // Check back, so we don't give more permissions than the admin wants to $check_permissions_to_default = array_diff($permissions->p_masks_anti[$p_system], $p_set['p_mask']); foreach ($check_permissions_to_default as $p_mask) { @@ -1120,7 +1120,7 @@ private function copy_album_permissions() /** * Create the drop-down-options to inherit the c_masks - * or check, whether the choosen option is valid + * or check, whether the chosen option is valid * @param $cache_obtain_album_list * @param $allowed_albums * @param $album_id @@ -1173,7 +1173,7 @@ private function inherit_albums($cache_obtain_album_list, $allowed_albums, $albu /** * Create the drop-down-options to inherit the v_masks - * or check, whether the choosen option is valid + * or check, whether the chosen option is valid * @param $cache_obtain_album_list * @param $allowed_albums * @param $allowed_victims @@ -1246,7 +1246,7 @@ private function inherit_victims($cache_obtain_album_list, $allowed_albums, $all /** * Create the drop-down-options to inherit the v_masks - * or check, whether the choosen option is valid + * or check, whether the chosen option is valid * @param $p_system * @param $allowed_victims * @param $victim_id diff --git a/core/album/album.php b/core/album/album.php index 928fb4de..ce668257 100644 --- a/core/album/album.php +++ b/core/album/album.php @@ -3,7 +3,7 @@ /** * * @package PhpBB Gallery - * @copyright (c) 2017 satanasov + * @copyright (c) 2017 Lucifer * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/core/album/display.php b/core/album/display.php index 7850647a..c8c9def0 100644 --- a/core/album/display.php +++ b/core/album/display.php @@ -465,7 +465,7 @@ public function display_albums($root_data = '', $display_moderators = true, $ret while ($row = $this->db->sql_fetchrow($result)) { $album_id = $row['album_id']; - //if user has no right to see the album - scip it here! + //if user has no right to see the album - skip it here! if (!in_array($album_id, $listable)) { continue; diff --git a/core/album/manage.php b/core/album/manage.php index 3cda5681..f41d38cc 100644 --- a/core/album/manage.php +++ b/core/album/manage.php @@ -275,7 +275,7 @@ public function update_album_data(&$album_data, &$contest_data) unset($album_data_sql['album_password_confirm']); */ - // What are we going to do tonight Brain? The same thing we do everynight, + // What are we going to do tonight Brain? The same thing we do every night, // try to take over the world ... or decide whether to continue update // and if so, whether it's a new album/cat/contest or an existing one if (sizeof($errors)) @@ -593,7 +593,7 @@ public function move_album($from_id, $to_id) AND right_id > " . (int) $from_data['right_id']; $this->db->sql_query($sql); - // Resync righthand side of tree + // Resync right-hand side of tree $sql = 'UPDATE ' . $this->albums_table . " SET left_id = left_id - $diff, right_id = right_id - $diff, album_parents = '' WHERE album_user_id = " . (int) $this->user_id . ' @@ -613,7 +613,7 @@ public function move_album($from_id, $to_id) AND ' . $this->db->sql_in_set('album_id', $moved_ids, true); $this->db->sql_query($sql); - // Resync the righthand side of the tree + // Resync the right-hand side of the tree $sql = 'UPDATE ' . $this->albums_table . ' SET left_id = left_id + ' . (int) $diff . ', right_id = right_id + ' . (int) $diff . ', album_parents = \'\' WHERE album_user_id = ' . (int) $this->user_id . ' diff --git a/core/auth/auth.php b/core/auth/auth.php index 19319646..e7685aee 100644 --- a/core/auth/auth.php +++ b/core/auth/auth.php @@ -495,7 +495,7 @@ public function get_user_foes($user_id) public function get_zebra_state($zebra_array, $album_author, $album_id) { $state = 0; - // if we check for ourselves or user is mod or admin - make bigest possible step + // if we check for ourselves or user is mod or admin - make biggest possible step if ($this->phpbb_user->data['user_id'] == $album_author || $this->acl_check('m_', $album_author, $album_id) || $this->auth->acl_get('a_user')) { $state = 5; @@ -791,7 +791,7 @@ public function acl_users_ids($acl, $album_id) } $this->db->sql_freeresult($result); - // Now we will select the roles that have the setted ACL + // Now we will select the roles that have the set ACL $sql = 'SELECT role_id FROM ' . $this->table_roles . ' WHERE ' . $acl . ' = 1 and ' . $this->db->sql_in_set('role_id', $roles_id['roles'], false, true); $result = $this->db->sql_query($sql); $roles = array(); diff --git a/core/cache.php b/core/cache.php index 1a1f67cd..0eda28b7 100644 --- a/core/cache.php +++ b/core/cache.php @@ -164,7 +164,7 @@ public function destroy_images() /** * Destroy album cache - * Basicly some tests fail due album cache not destroyed ... + * Basically some tests fail due album cache not destroyed ... * So lets try it now? */ public function destroy_albums() diff --git a/core/controller/file.php b/core/controller/file.php index a6075632..a7450b4a 100644 --- a/core/controller/file.php +++ b/core/controller/file.php @@ -469,7 +469,7 @@ protected function check_hot_link() { $haystak = array(); $haystak = explode(',', $this->config['phpbb_gallery_hotlinking_domains']); - //add one extra array - current phpbbdomain + //add one extra array - current phpbb domain $haystak[] = $this->config['server_name']; $referrer = $this->request->server('HTTP_REFERER', ''); $not_hl = false; diff --git a/core/controller/image.php b/core/controller/image.php index 6b5a5a6b..efaa8e79 100644 --- a/core/controller/image.php +++ b/core/controller/image.php @@ -592,7 +592,7 @@ public function base($image_id, $page = 0) } - // Different link, when we rate and dont comment + // Different link, when we rate and don't comment if (!$s_hide_comment_input) { //$this->template->assign_var('S_COMMENT_ACTION', append_sid($this->url->path('full') . 'comment/' . $image_id . '/add/0')); diff --git a/core/controller/moderate.php b/core/controller/moderate.php index 88b7e596..9eca560e 100644 --- a/core/controller/moderate.php +++ b/core/controller/moderate.php @@ -133,7 +133,7 @@ public function __construct(\phpbb\config\config $config, \phpbb\request\request /** * Index Controller - * Route: gallery/modarate + * Route: gallery/moderate * * @param int $album_id * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object @@ -183,7 +183,7 @@ public function base($album_id = 0) /** * Index Controller - * Route: gallery/modarate/approve + * Route: gallery/moderate/approve * * @param $page * @param $album_id @@ -287,7 +287,7 @@ public function queue_approve($page, $album_id) /** * Index Controller - * Route: gallery/modarate/actions + * Route: gallery/moderate/actions * * @param $page * @param $album_id diff --git a/core/controller/search.php b/core/controller/search.php index 9eaaa178..bfe7203b 100644 --- a/core/controller/search.php +++ b/core/controller/search.php @@ -3,7 +3,7 @@ /** * * @package phpBB Gallery Core -* @copyright (c) 2014 Luifer +* @copyright (c) 2014 Lucifer * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ @@ -192,7 +192,7 @@ public function base($page = 1) 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); $sql_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); - // We will build SQL array and then build query (easely change count with rq) + // We will build SQL array and then build query (easily change count with rq) $sql_array = $sql_where = array(); $sql_array['FROM'] = array( $this->images_table => 'i', diff --git a/core/event/main_listener.php b/core/event/main_listener.php index 9ac336ab..fb852c09 100644 --- a/core/event/main_listener.php +++ b/core/event/main_listener.php @@ -21,7 +21,7 @@ static public function getSubscribedEvents() 'core.user_setup' => 'load_language_on_setup', 'core.page_header' => 'add_page_header_link', 'core.memberlist_view_profile' => 'user_profile_galleries', - //'core.generate_profile_fields_template_data_before' => 'profile_fileds', + //'core.generate_profile_fields_template_data_before' => 'profile_fields', 'core.grab_profile_fields_data' => 'get_user_ids', //'core.viewonline_overwrite_location' => 'add_newspage_viewonline', ); diff --git a/core/file/file.php b/core/file/file.php index 5558aa49..8155fbff 100644 --- a/core/file/file.php +++ b/core/file/file.php @@ -173,7 +173,7 @@ public function read_image($force_filesize = false) $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! + imagesavealpha($this->image, true); // ... and save alpha blending! break; case '.webp': $this->image_type = 'webp'; diff --git a/core/image/image.php b/core/image/image.php index fa5ca8c8..721b2960 100644 --- a/core/image/image.php +++ b/core/image/image.php @@ -286,7 +286,7 @@ public function get_filenames($images) * Generate link to image * * @param string $content what's in the link: image_name, thumbnail, fake_thumbnail, medium or lastimage_icon - * @param string $mode where does the link leed to: highslide, lytebox, lytebox_slide_show, image_page, image, none + * @param string $mode where does the link lead to: highslide, lytebox, lytebox_slide_show, image_page, image, none * @param int $image_id * @param string $image_name * @param int $album_id @@ -326,7 +326,7 @@ public function generate_link($content, $mode, $image_id, $image_name, $album_id case 'medium': $content = '{IMAGE_NAME}'; $content = str_replace(array('{U_MEDIUM}', '{IMAGE_NAME}'), array($medium_url, $image_name), $content); - //cheat for animated/transparent gifs + //cheat for animated/transparent gif if ($is_gif) { $content = '{IMAGE_NAME}'; @@ -379,7 +379,7 @@ public function generate_link($content, $mode, $image_id, $image_name, $album_id * * @event phpbbgallery.core.image.generate_link * @var string mode type of link - * @var string tpl html to be outputed + * @var string tpl html to be outputted * @since 1.2.0 */ $vars = array('mode', 'tpl'); @@ -535,7 +535,7 @@ public function unapprove_images($image_id_ary, $album_id) /** * Move image - * @oaram (int) $image_id The image that we want to move_uploaded_file + * @param (int) $image_id The image that we want to move_uploaded_file * @param $image_id_ary * @param $album_id * @internal param $ (int) $album_id The album we want to move image to diff --git a/core/notification/helper.php b/core/notification/helper.php index 077ec79f..e93e3f75 100644 --- a/core/notification/helper.php +++ b/core/notification/helper.php @@ -228,7 +228,7 @@ public function add_albums($album_ids, $user_id = false) $album_ids = $this->cast_mixed_int2array($album_ids); $user_id = (int) (($user_id) ? $user_id : $this->user->data['user_id']); - // First check if we are not subscribed alredy for some + // First check if we are not subscribed already for some $sql = 'SELECT * FROM ' . $this->watch_table . ' WHERE user_id = ' . $user_id . ' and ' . $this->db->sql_in_set('album_id', $album_ids); $result = $this->db->sql_query($sql); $exclude = array(); @@ -292,7 +292,7 @@ static public function cast_mixed_int2array($ids) public function new_image($data) { $get_watchers = $this->get_album_watchers($data['album_id']); - // let's exclude all users that are uploadoing something and are approved + // let's exclude all users that are uploading something and are approved $targets = array_diff($get_watchers, $data['targets']); $data['targets'] = $targets; diff --git a/core/search.php b/core/search.php index e667e8b7..1cc5e918 100644 --- a/core/search.php +++ b/core/search.php @@ -2,7 +2,7 @@ /** * * @package phpBB Gallery Core -* @copyright (c) 2014 Luifer +* @copyright (c) 2014 Lucifer * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/exif/exif.php b/exif/exif.php index 19318b46..b057f1f1 100644 --- a/exif/exif.php +++ b/exif/exif.php @@ -98,7 +98,7 @@ public function __construct($file, $image_id = false) } /** - * Intepret the values from the database, and read the data if we don't have it. + * Interpret the values from the database, and read the data if we don't have it. * * @param int $status Value of a status constant (see beginning of the class) * @param mixed $data Either an empty string or the serialized array of the Exif from the database @@ -131,7 +131,7 @@ public function read() if (!empty($this->data["EXIF"])) { - // Unset invalid Exifs + // Unset invalid Exif's foreach ($this->data as $key => $array) { if (!in_array($key, self::$allowed_groups)) @@ -276,7 +276,7 @@ private function prepare_data() * Sends the Exif into the template * * @param bool $expand_view Shall we expand the Exif data on page view or collapse? - * @param string $block Name of the template loop the Exifs are displayed in. + * @param string $block Name of the template loop the Exif's are displayed in. */ public function send_to_template($expand_view = true, $block = 'exif_value') { diff --git a/tests/controller/gallery_index_test.php b/tests/controller/gallery_index_test.php index 48d77404..95cf99be 100644 --- a/tests/controller/gallery_index_test.php +++ b/tests/controller/gallery_index_test.php @@ -698,7 +698,7 @@ public function test_controller_base_case_4() * 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 + * will have to make different test for each case * Default case -> admin see all personal albums with default per page */ public function test_index_personal_case_1() diff --git a/tests/core/core_search_test.php b/tests/core/core_search_test.php index 6af77de7..6107daa2 100644 --- a/tests/core/core_search_test.php +++ b/tests/core/core_search_test.php @@ -387,7 +387,7 @@ public function rrc_gindex_display_test_data() 'U_STATUS' => '', 'L_STATUS' => 'CHANGE_IMAGE_STATUS', ) - ), Skip 128 as auth witll not allow admin IDin */ + ), Skip 128 as auth will not allow admin ID in */ '64' => array( 64, //rrc_gindex_display state array( @@ -753,7 +753,7 @@ public function test_rrc_profile_display_random($state, $expect) /** - * TEST LINK GENERATION FOR THUMBAIL AND IMAGE NAME + * TEST LINK GENERATION FOR THUMBNAIL AND IMAGE NAME * - link_thumbnail in recent() * - link_thumbnail in random() * + link_thumbnail in rating() From 9119c016d4fdbfec8f1fb354509c37064c694cb1 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sat, 2 Aug 2025 01:06:21 +0100 Subject: [PATCH 071/138] Fix auth typo --- acpcleanup/acp/main_module.php | 2 +- core/controller/album.php | 4 +-- core/controller/comment.php | 16 +++++------ core/controller/file.php | 22 +++++++-------- core/controller/image.php | 10 +++---- core/controller/moderate.php | 28 +++++++++---------- core/controller/upload.php | 4 +-- .../release_1_2_0_create_filesystem.php | 2 +- core/misc.php | 4 +-- tests/functional/phpbbgallery_alpha_test.php | 2 +- 10 files changed, 47 insertions(+), 47 deletions(-) diff --git a/acpcleanup/acp/main_module.php b/acpcleanup/acp/main_module.php index 81646376..6f83e1d9 100644 --- a/acpcleanup/acp/main_module.php +++ b/acpcleanup/acp/main_module.php @@ -366,7 +366,7 @@ function cleanup() && !in_array($file, $requested_source) ) { - if ((strpos($file, 'image_not_exist') !== false) || (strpos($file, 'not_authorised') !== false) || (strpos($file, 'no_hotlinking') !== false)) + if ((strpos($file, 'image_not_exist') !== false) || (strpos($file, 'not_authorized') !== false) || (strpos($file, 'no_hotlinking') !== false)) { continue; } diff --git a/core/controller/album.php b/core/controller/album.php index eacc862f..c4c23ab1 100644 --- a/core/controller/album.php +++ b/core/controller/album.php @@ -523,8 +523,8 @@ protected function check_permissions($album_id, $owner_id, $album_auth_level) } else { - //return $this->error('NOT_AUTHORISED', 403); - trigger_error($this->language->lang('NOT_AUTHORISED')); + //return $this->error('NOT_AUTHORIZED', 403); + trigger_error($this->language->lang('NOT_AUTHORIZED')); } } } diff --git a/core/controller/comment.php b/core/controller/comment.php index 099581a5..5763260a 100644 --- a/core/controller/comment.php +++ b/core/controller/comment.php @@ -183,7 +183,7 @@ public function add($image_id, $comment_id) $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('c_post', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } add_form_key('gallery'); $this->language->add_lang('posting'); @@ -442,19 +442,19 @@ public function edit($image_id, $comment_id) } else { - $this->misc->not_authorised($image_backlink, $image_loginlink); + $this->misc->not_authorized($image_backlink, $image_loginlink); } $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('c_edit', $album_id, $album_data['album_user_id']) /*&& $mode == 'add'*/) { if (!$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($image_backlink, $image_loginlink); + $this->misc->not_authorized($image_backlink, $image_loginlink); } $this->language->add_lang('posting'); @@ -656,19 +656,19 @@ public function delete($image_id, $comment_id) } else { - $this->misc->not_authorised($image_backlink, $image_loginlink); + $this->misc->not_authorized($image_backlink, $image_loginlink); } $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('c_edit', $album_id, $album_data['album_user_id']) /*&& $mode == 'add'*/) { if (!$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($image_backlink, $image_loginlink); + $this->misc->not_authorized($image_backlink, $image_loginlink); } $this->language->add_lang('posting'); @@ -798,7 +798,7 @@ public function rate($image_id) if (!($this->gallery_config->get('allow_rates') && $rating->is_able())) { // The user is unable to rate. - $this->misc->not_authorised($image_backlink, $image_loginlink); + $this->misc->not_authorized($image_backlink, $image_loginlink); } $this->language->add_lang('posting'); diff --git a/core/controller/file.php b/core/controller/file.php index a7450b4a..6cb702e1 100644 --- a/core/controller/file.php +++ b/core/controller/file.php @@ -254,8 +254,8 @@ public function load_data($image_id) { // Image or album does not exist // trigger_error('INVALID_IMAGE'); - $this->error = 'not_authorised.jpg'; - $this->data['image_filename'] = 'not_authorised.jpg'; + $this->error = 'not_authorized.jpg'; + $this->data['image_filename'] = 'not_authorized.jpg'; $this->data['image_name'] = 'You are not authorized!'; $this->data['image_user_id'] = 1; $this->data['image_status'] = 2; @@ -276,9 +276,9 @@ public function check_auth() if (($this->data['image_user_id'] != $this->user->data['user_id']) && ($this->data['image_status'] == (int) \phpbbgallery\core\block::STATUS_ORPHAN)) { // The image is currently being uploaded - // trigger_error('NOT_AUTHORISED'); - $this->error = 'not_authorised.jpg'; - $this->data['image_filename'] = 'not_authorised.jpg'; + // trigger_error('NOT_AUTHORIZED'); + $this->error = 'not_authorized.jpg'; + $this->data['image_filename'] = 'not_authorized.jpg'; $this->data['image_name'] = 'You are not authorized!'; $this->data['image_user_id'] = 1; $this->data['image_status'] = 2; @@ -294,9 +294,9 @@ public function check_auth() )) { // Missing permissions - // trigger_error('NOT_AUTHORISED'); - $this->error = 'not_authorised.jpg'; - $this->data['image_filename'] = 'not_authorised.jpg'; + // trigger_error('NOT_AUTHORIZED'); + $this->error = 'not_authorized.jpg'; + $this->data['image_filename'] = 'not_authorized.jpg'; $this->data['image_name'] = 'You are not authorized!'; $this->data['image_user_id'] = 1; $this->data['image_status'] = 2; @@ -308,9 +308,9 @@ public function check_auth() if (($this->auth->get_zebra_state($zebra_array, (int) $this->data['album_user_id'], $this->data['album_id']) < (int) $this->data['album_auth_access'] && !$this->error)) { // Zebra parameters not met - // trigger_error('NOT_AUTHORISED'); - $this->error = 'not_authorised.jpg'; - $this->data['image_filename'] = 'not_authorised.jpg'; + // trigger_error('NOT_AUTHORIZED'); + $this->error = 'not_authorized.jpg'; + $this->data['image_filename'] = 'not_authorized.jpg'; $this->data['image_name'] = 'You are not authorized!'; $this->data['image_user_id'] = 1; $this->data['image_status'] = 2; diff --git a/core/controller/image.php b/core/controller/image.php index efaa8e79..8bc027d6 100644 --- a/core/controller/image.php +++ b/core/controller/image.php @@ -840,7 +840,7 @@ public function edit($image_id) { if (!$this->gallery_auth->acl_check('m_edit', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } if ($submit) @@ -1082,7 +1082,7 @@ public function delete($image_id) { if (!$this->gallery_auth->acl_check('m_delete', $album_id, $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } $s_hidden_fields = build_hidden_fields(array( @@ -1138,7 +1138,7 @@ public function report($image_id) $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('i_report', $album_id, $album_data['album_user_id']) || ($image_data['image_user_id'] == $this->user->data['user_id'])) { - $this->misc->not_authorised($image_backlink, ''); + $this->misc->not_authorized($image_backlink, ''); } add_form_key('gallery'); $submit = $this->request->variable('submit', false); @@ -1226,13 +1226,13 @@ protected function check_permissions($album_id, $owner_id, $image_status, $album } else { - //return $this->error('NOT_AUTHORISED', 403); + //return $this->error('NOT_AUTHORIZED', 403); redirect('gallery/album/' . $album_id); } } if (!$this->gallery_auth->acl_check('m_status', $album_id, $owner_id) && $user_data['image_user_id'] != $this->user->data['user_id'] && ($image_status == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED)) { - //return $this->error('NOT_AUTHORISED', 403); + //return $this->error('NOT_AUTHORIZED', 403); redirect('gallery/album/' . $album_id); } } diff --git a/core/controller/moderate.php b/core/controller/moderate.php index 9eca560e..f30b1293 100644 --- a/core/controller/moderate.php +++ b/core/controller/moderate.php @@ -147,7 +147,7 @@ public function base($album_id = 0) { if (!$this->gallery_auth->acl_check_global('m_')) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else @@ -155,7 +155,7 @@ public function base($album_id = 0) $album = $this->album->get_info($album_id); if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } $this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core'); @@ -209,7 +209,7 @@ public function queue_approve($page, $album_id) { if (!$this->gallery_auth->acl_check_global('m_status')) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else @@ -217,7 +217,7 @@ public function queue_approve($page, $album_id) $album = $this->album->get_info($album_id); if (!$this->gallery_auth->acl_check('m_status', $album['album_id'], $album['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } if (!empty($approve_ary)) @@ -305,7 +305,7 @@ public function action_log($page, $album_id) { if (!$this->gallery_auth->acl_check_global('m_')) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else @@ -313,7 +313,7 @@ public function action_log($page, $album_id) $album = $this->album->get_info($album_id); if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } $this->template->assign_vars(array( @@ -377,7 +377,7 @@ public function reports($page, $album_id, $status) { if (!$this->gallery_auth->acl_check_global('m_report')) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else @@ -385,7 +385,7 @@ public function reports($page, $album_id, $status) $album = $this->album->get_info($album_id); if (!$this->gallery_auth->acl_check('m_report', $album['album_id'], $album['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } @@ -506,7 +506,7 @@ public function album_overview($album_id, $page) { if (!$this->gallery_auth->acl_check_global('m_')) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } else @@ -514,7 +514,7 @@ public function album_overview($album_id, $page) $album = $this->album->get_info($album_id); if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } $this->template->assign_vars(array( @@ -699,7 +699,7 @@ public function approve($image_id) $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } $action_ary = $this->request->variable('action', []); $action_ary = array_keys($action_ary); @@ -762,7 +762,7 @@ public function unapprove($image_id) $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } $this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core'); @@ -804,7 +804,7 @@ public function move($image_id): \Symfony\Component\HttpFoundation\Response $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('m_move', $image_data['image_album_id'], $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } $moving_target = $this->request->variable('moving_target', ''); @@ -852,7 +852,7 @@ public function lock($image_id) $this->gallery_auth->load_user_permissions($this->user->data['user_id']); if (!$this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $album_data['album_user_id'])) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } if (confirm_box(true)) { diff --git a/core/controller/upload.php b/core/controller/upload.php index a5f53b2e..10f798b3 100644 --- a/core/controller/upload.php +++ b/core/controller/upload.php @@ -157,7 +157,7 @@ public function main($album_id) $this->auth->load_user_permissions($this->user->data['user_id']); if (!$this->auth->acl_check('i_upload', $album_id, $album_data['album_user_id']) || ($album_data['album_status'] == $this->block->get_album_status_locked())) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } if ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) { @@ -165,7 +165,7 @@ public function main($album_id) $contest = $this->contest->get_contest($album_id, 'album'); if ($contest['contest_start'] + $contest['contest_rating'] <= time()) { - $this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); + $this->misc->not_authorized($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD'); } } $page_title = 'Upload to "' . $album_data['album_name'] . '"'; diff --git a/core/migrations/release_1_2_0_create_filesystem.php b/core/migrations/release_1_2_0_create_filesystem.php index 18c3d404..f2a7edad 100644 --- a/core/migrations/release_1_2_0_create_filesystem.php +++ b/core/migrations/release_1_2_0_create_filesystem.php @@ -80,7 +80,7 @@ public function copy_images() $phpbbgallery_core_images_source = $phpbb_root_path . 'ext/phpbbgallery/core/images'; copy($phpbbgallery_core_images_source . '/upload/image_not_exist.jpg', $phpbbgallery_core_file_source . '/image_not_exist.jpg'); 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'); + copy($phpbbgallery_core_images_source . '/upload/not_authorized.jpg', $phpbbgallery_core_file_source . '/not_authorized.jpg'); } function recursiveRemoveDirectory($directory) { diff --git a/core/misc.php b/core/misc.php index c519b66e..3dc56c15 100644 --- a/core/misc.php +++ b/core/misc.php @@ -105,7 +105,7 @@ public function display_captcha($mode) * @param string $loginlink * @param string $login_explain */ - public function not_authorised($backlink, $loginlink = '', $login_explain = '') + public function not_authorized($backlink, $loginlink = '', $login_explain = '') { if (!$this->user->data['is_registered'] && $loginlink) { @@ -122,7 +122,7 @@ public function not_authorised($backlink, $loginlink = '', $login_explain = '') else { $this->url->meta_refresh(3, $backlink); - trigger_error('NOT_AUTHORISED'); + trigger_error('NOT_AUTHORIZED'); } } diff --git a/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php index 64a901bd..4e0f5221 100644 --- a/tests/functional/phpbbgallery_alpha_test.php +++ b/tests/functional/phpbbgallery_alpha_test.php @@ -146,7 +146,7 @@ public function test_basic_gallery_access() $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->assertContains('You are not authorized to access this area', $crawler->text()); $this->logout(); } From e4fc86b693b051cec8fb6d4ef94ee4aba864a7e0 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sat, 2 Aug 2025 01:09:10 +0100 Subject: [PATCH 072/138] Fix unapproved typo --- core/language/bg/gallery.php | 4 ++-- core/language/bg/gallery_mcp.php | 16 ++++++------- core/language/de/gallery_mcp.php | 16 ++++++------- core/language/en/gallery.php | 4 ++-- core/language/en/gallery_acp.php | 2 +- core/language/en/gallery_mcp.php | 16 ++++++------- core/language/es/gallery.php | 4 ++-- core/language/es/gallery_mcp.php | 16 ++++++------- core/language/fr/gallery.php | 4 ++-- core/language/fr/gallery_mcp.php | 16 ++++++------- core/language/it/gallery.php | 4 ++-- core/language/it/gallery_mcp.php | 16 ++++++------- core/language/nl/gallery.php | 4 ++-- core/language/nl/gallery_mcp.php | 16 ++++++------- core/language/ru/gallery.php | 4 ++-- core/language/ru/gallery_mcp.php | 16 ++++++------- core/moderate.php | 4 ++-- .../template/gallery/imageblock_polaroid.html | 2 +- .../template/gallery/mcp_approve.html | 4 ++-- .../prosilver/template/gallery/mcp_body.html | 6 ++--- .../gallery/moderate_approve_queue.html | 24 +++++++++---------- .../template/gallery/search_results.html | 2 +- .../template/gallery/viewimage_body.html | 4 ++-- tests/controller/gallery_album_test.php | 2 +- tests/core/core_image_test.php | 2 +- tests/functional/phpbbgallery_alpha_test.php | 2 +- 26 files changed, 105 insertions(+), 105 deletions(-) diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php index ee889fd1..cb273394 100644 --- a/core/language/bg/gallery.php +++ b/core/language/bg/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Позволени типове', 'APPROVE' => 'Одобри', - 'DISAPPROVE' => 'Отхвърли', + 'DISAPPROVED' => 'Отхвърли', 'APPROVE_IMAGE' => 'Одобри изображение', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Enter your descriptions here, it may contain no more than %d characters.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'Не разрешено разширение на изборажението', - 'DONT_RATE_IMAGE' => 'Don’t rate image', + 'DO_NOT_RATE_IMAGE' => 'Don’t rate image', 'EDIT_COMMENT' => 'Edit comment', 'EDIT_IMAGE' => 'Edit', diff --git a/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php index 6058b498..03813a89 100644 --- a/core/language/bg/gallery_mcp.php +++ b/core/language/bg/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => 'Заключи изображение?', 'QUEUE_A_LOCK2_CONFIRM' => 'Сигурен ли сте, че искате да заключите това изображение?', 'QUEUE_A_MOVE' => 'Премести изображение', - 'QUEUE_A_UNAPPROVE' => 'Махни одобрение на изборажение', - 'QUEUE_A_UNAPPROVE2' => 'Махни одобрение на изборажение?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Сиигирен ли сте, че искате да махнете одобрението на това изборажение?', + 'QUEUE_A_UNAPPROVED' => 'Махни одобрение на изборажение', + 'QUEUE_A_UNAPPROVED2' => 'Махни одобрение на изборажение?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Сиигирен ли сте, че искате да махнете одобрението на това изборажение?', 'QUEUE_STATUS_0' => 'Изображението чака одобрение.', 'QUEUE_STATUS_1' => 'Изображението е одобрено.', @@ -76,10 +76,10 @@ 'QUEUES_A_LOCK2' => 'Заключи избораженията?', 'QUEUES_A_LOCK2_CONFIRM' => 'Сигурни ли сте, че искате да заключите тези изображения?', 'QUEUES_A_MOVE' => 'Премести избораженията', - 'QUEUES_A_UNAPPROVE' => 'Махни одобрението на изборажения', - 'QUEUES_A_UNAPPROVE2' => 'Махни одобрението на изборажения?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', + 'QUEUES_A_UNAPPROVED' => 'Махни одобрението на изборажения', + 'QUEUES_A_UNAPPROVED2' => 'Махни одобрението на изборажения?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', 'REPORT_A_CLOSE' => 'Затвори доклад', 'REPORT_A_CLOSE2' => 'Затвори доклад?', @@ -116,7 +116,7 @@ 1 => 'Общо 1 изображение беше одобрено.', 2 => 'Общо %s изображения бяха одобрени.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Не са отхвърлени изображения.', 1 => 'Общо 1 изображение е отхвърлено.', 2 => 'Общо %s изображения са отхвърлени.', diff --git a/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php index ac2a0ffa..ef84c1b8 100644 --- a/core/language/de/gallery_mcp.php +++ b/core/language/de/gallery_mcp.php @@ -59,9 +59,9 @@ 'QUEUE_A_LOCK2' => 'Bild sperren?', 'QUEUE_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass du das Bild sperren möchtest?', 'QUEUE_A_MOVE' => 'Bild verschieben', - 'QUEUE_A_UNAPPROVE' => 'erneute Freischaltung erzwingen', - 'QUEUE_A_UNAPPROVE2' => 'erneute Freischaltung erzwingen?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUE_A_UNAPPROVED' => 'erneute Freischaltung erzwingen', + 'QUEUE_A_UNAPPROVED2' => 'erneute Freischaltung erzwingen?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', 'QUEUE_STATUS_0' => 'Das Bild wartet auf Freigabe.', 'QUEUE_STATUS_1' => 'Das Bild ist freigeschaltet.', @@ -77,10 +77,10 @@ 'QUEUES_A_LOCK2' => 'Bilder sperren?', 'QUEUES_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass du die Bilder sperren möchtest?', 'QUEUES_A_MOVE' => 'Bilder verschieben', - 'QUEUES_A_UNAPPROVE' => 'erneute Freischaltung erzwingen', - 'QUEUES_A_UNAPPROVE2' => 'erneute Freischaltung erzwingen?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUES_A_UNAPPROVED' => 'erneute Freischaltung erzwingen', + 'QUEUES_A_UNAPPROVED2' => 'erneute Freischaltung erzwingen?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', 'REPORT_A_CLOSE' => 'Meldung schliessen', 'REPORT_A_CLOSE2' => 'Meldung schliessen?', @@ -117,7 +117,7 @@ 1 => 'Insgesamt ist 1 Bild freigeschaltet.', 2 => 'Insgesamt sind %s Bilder freigeschaltet.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Keine Bilder abgelehnt.', 1 => 'Insgesamt ist 1 Bild abgelehnt.', 2 => 'Insgesamt sind %s Bilder abgelehnt.', diff --git a/core/language/en/gallery.php b/core/language/en/gallery.php index a644f09b..125e465e 100644 --- a/core/language/en/gallery.php +++ b/core/language/en/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Allowed filetypes', 'APPROVE' => 'Approve', - 'DISAPPROVE' => 'Dissaprove', + 'DISAPPROVED' => 'Disapproved', 'APPROVE_IMAGE' => 'Approve image', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Enter your descriptions here, it may contain no more than %d characters.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'This image extension is not allowed', - 'DONT_RATE_IMAGE' => 'Don’t rate image', + 'DO_NOT_RATE_IMAGE' => 'Don’t rate image', 'EDIT_COMMENT' => 'Edit comment', 'EDIT_IMAGE' => 'Edit', diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php index 190c2b5f..f0a5c15d 100644 --- a/core/language/en/gallery_acp.php +++ b/core/language/en/gallery_acp.php @@ -270,7 +270,7 @@ 'PERMISSIONS_EXPLAIN' => 'Here you can alter which users and groups can access which albums.', 'PERMISSIONS_STORED' => 'Permissions were stored successful.', 'PERSONAL_ALBUM_INDEX' => 'View personal albums as album on the index', - 'PERSONAL_ALBUM_INDEX_EXP' => 'If choosen “No“, there will be the link, right beneath.', + 'PERSONAL_ALBUM_INDEX_EXP' => 'If chosen “No“, there will be the link, right beneath.', 'PEGA_CREATED' => 'Created personal gallery for %s.', 'PEGA_ALREADY_EXISTS' => '%s already has a personal gallery.', 'PGALLERIES_PER_PAGE' => 'Number of personal galleries per page', diff --git a/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php index ed00ec76..d26e66e8 100644 --- a/core/language/en/gallery_mcp.php +++ b/core/language/en/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => 'Lock image?', 'QUEUE_A_LOCK2_CONFIRM' => 'Are you sure, you want to lock this image?', 'QUEUE_A_MOVE' => 'Move image', - 'QUEUE_A_UNAPPROVE' => 'Unapprove image', - 'QUEUE_A_UNAPPROVE2' => 'Unapprove image?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove this image?', + 'QUEUE_A_UNAPPROVED' => 'Unapprove image', + 'QUEUE_A_UNAPPROVED2' => 'Unapprove image?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove this image?', 'QUEUE_STATUS_0' => 'The image is waiting for approval.', 'QUEUE_STATUS_1' => 'The image is approved.', @@ -76,10 +76,10 @@ 'QUEUES_A_LOCK2' => 'Lock images?', 'QUEUES_A_LOCK2_CONFIRM' => 'Are you sure, you want to lock these images?', 'QUEUES_A_MOVE' => 'Move images', - 'QUEUES_A_UNAPPROVE' => 'Unapprove images', - 'QUEUES_A_UNAPPROVE2' => 'Unapprove images?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove these images?', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove these images?', + 'QUEUES_A_UNAPPROVED' => 'Unapprove images', + 'QUEUES_A_UNAPPROVED2' => 'Unapprove images?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove these images?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove these images?', 'REPORT_A_CLOSE' => 'Close report', 'REPORT_A_CLOSE2' => 'Close report?', @@ -116,7 +116,7 @@ 1 => 'In total there is 1 image approved.', 2 => 'In total there are %s images approved.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'No images disapproved.', 1 => 'In total there is 1 image disapproved.', 2 => 'In total there are %s images disapproved.', diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php index efaf61e8..3ef44b61 100644 --- a/core/language/es/gallery.php +++ b/core/language/es/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Tipo de archivo permitido', 'APPROVE' => 'Aprobar', - 'DISAPPROVE' => 'Desaprobar', + 'DISAPPROVED' => 'Desaprobar', 'APPROVE_IMAGE' => 'Aprobar imagen', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Introduzca sus descripciones aquí, puede contener no más de %d caracteres.', 'DETAILS' => 'Detalles', 'DISALLOWED_EXTENSION' => 'Esta extensión de imagen no está permitida', - 'DONT_RATE_IMAGE' => 'No valorar la imagen', + 'DO_NOT_RATE_IMAGE' => 'No valorar la imagen', 'EDIT_COMMENT' => 'Editar comentario', 'EDIT_IMAGE' => 'Editar', diff --git a/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php index f9d97260..0515f6f7 100644 --- a/core/language/es/gallery_mcp.php +++ b/core/language/es/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => '¿Bloquear imagen?', 'QUEUE_A_LOCK2_CONFIRM' => '¿Seguro que quieres bloquear esta imagen?', 'QUEUE_A_MOVE' => 'Mover imagen', - '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_A_UNAPPROVED' => 'No aprobar imagen', + 'QUEUE_A_UNAPPROVED2' => '¿Aprobar la imagen?', + 'QUEUE_A_UNAPPROVED2_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.', @@ -76,10 +76,10 @@ '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?', - '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?', + 'QUEUES_A_UNAPPROVED' => 'No aprobar imágenes', + 'QUEUES_A_UNAPPROVED2' => '¿Aprobar imágenes?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => '¿Estás seguro de que quieres desautorizar estas imágenes?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => '¿Está seguro de que desea desautorizar estas imágenes?', 'REPORT_A_CLOSE' => 'Cerrar informe', 'REPORT_A_CLOSE2' => 'Cerrar informe?', @@ -116,7 +116,7 @@ 1 => 'En total hay 1 imagen aprobada.', 2 => 'En total se han aprobado %s imágenes aprobadas.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'No hay imágenes rechazadas.', 1 => 'En total hay 1 imagen rechazada.', 2 => 'En total hay %s imágenes rechazadas.', diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php index 58f208b6..ee02d312 100644 --- a/core/language/fr/gallery.php +++ b/core/language/fr/gallery.php @@ -62,7 +62,7 @@ ), 'ALLOWED_FILETYPES' => 'Types de fichiers autorisés', 'APPROVE' => 'Valider', - 'DISAPPROVE' => 'Refuser', + 'DISAPPROVED' => 'Refuser', 'APPROVE_IMAGE' => 'Valider l’image', //@todo @@ -132,7 +132,7 @@ 'DESCRIPTION_LENGTH' => 'Saisissez votre description ici. Elle ne peut pas contenir plus de %d caractères.', 'DETAILS' => 'Détails', 'DISALLOWED_EXTENSION' => 'L’extension de cette image n’est pas autorisée.', - 'DONT_RATE_IMAGE' => 'Ne pas noter l’image', + 'DO_NOT_RATE_IMAGE' => 'Ne pas noter l’image', 'EDIT_COMMENT' => 'Modifier le commentaire', 'EDIT_IMAGE' => 'Modifier', diff --git a/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php index 1b0a2eec..5719a7be 100644 --- a/core/language/fr/gallery_mcp.php +++ b/core/language/fr/gallery_mcp.php @@ -73,9 +73,9 @@ 'QUEUE_A_LOCK2' => 'Verrouiller l’image ?', 'QUEUE_A_LOCK2_CONFIRM' => 'Êtes-vous sûr de vouloir verrouiller cette image ?', 'QUEUE_A_MOVE' => 'Déplacer l’image', - 'QUEUE_A_UNAPPROVE' => 'Refuser l’image', - 'QUEUE_A_UNAPPROVE2' => 'Refuser l’image ?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser cette image ?', + 'QUEUE_A_UNAPPROVED' => 'Refuser l’image', + 'QUEUE_A_UNAPPROVED2' => 'Refuser l’image ?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser cette image ?', 'QUEUE_STATUS_0' => 'L’image est attente de validation.', 'QUEUE_STATUS_1' => 'L’image est validée.', @@ -91,10 +91,10 @@ 'QUEUES_A_LOCK2' => 'Verrouiller les images ?', 'QUEUES_A_LOCK2_CONFIRM' => 'Êtes-vous sûr de vouloir verrouiller ces images ?', 'QUEUES_A_MOVE' => 'Déplacer les images', - 'QUEUES_A_UNAPPROVE' => 'Refuser les images', - 'QUEUES_A_UNAPPROVE2' => 'Refuser les images ?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', + 'QUEUES_A_UNAPPROVED' => 'Refuser les images', + 'QUEUES_A_UNAPPROVED2' => 'Refuser les images ?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', 'REPORT_A_CLOSE' => 'Fermer le rapport', 'REPORT_A_CLOSE2' => 'Fermer le rapport ?', @@ -131,7 +131,7 @@ 1 => 'Il y a au total 1 image validée.', 2 => 'Il y a au total %s images approved.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Aucune image désapprouvé.', 1 => 'Il y a au total 1 image désapprouvée.', 2 => 'Il y a au total %s images désapprouvées.', diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php index 78b70ab6..c9c919ec 100644 --- a/core/language/it/gallery.php +++ b/core/language/it/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Tipi di file permessi', 'APPROVE' => 'Approva', - 'DISAPPROVE' => 'Dissaprova', + 'DISAPPROVED' => 'Dissaprova', 'APPROVE_IMAGE' => 'Approva immagine', //@todo @@ -117,7 +117,7 @@ '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', + 'DO_NOT_RATE_IMAGE' => 'Non valutare immagine', 'EDIT_COMMENT' => 'Modifica commento', 'EDIT_IMAGE' => 'Modifica', diff --git a/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php index 11b3a1f7..2fd97406 100644 --- a/core/language/it/gallery_mcp.php +++ b/core/language/it/gallery_mcp.php @@ -58,9 +58,9 @@ '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_A_UNAPPROVED' => 'Disapprova immagine', + 'QUEUE_A_UNAPPROVED2' => 'Disapprova immagine?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare questa immagine?', 'QUEUE_STATUS_0' => 'Questa immagine è in attesa di approvazione.', 'QUEUE_STATUS_1' => 'Questa immagine è stata approvata.', @@ -76,10 +76,10 @@ '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?', + 'QUEUES_A_UNAPPROVED' => 'Disapprova immagini', + 'QUEUES_A_UNAPPROVED2' => 'Disapprova immagini?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare queste immagini?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare queste immagini?', 'REPORT_A_CLOSE' => 'Chiudi segnalazione', 'REPORT_A_CLOSE2' => 'Chiudi segnalazione?', @@ -116,7 +116,7 @@ 1 => 'In totale c’è 1 immagine approvata.', 2 => 'In totale ci sono %s imamagini approvate.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Nessuna immagine disapprovata.', 1 => 'In totale c’è 1 immagine disapprovata.', 2 => 'In totale ci sono %s immagini disapprovate.', diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php index 9417ee5e..156ac89a 100644 --- a/core/language/nl/gallery.php +++ b/core/language/nl/gallery.php @@ -48,7 +48,7 @@ ), 'ALLOWED_FILETYPES' => 'Toegestane bestandsformaten', 'APPROVE' => 'Goedkeuren', - 'DISAPPROVE' => 'Afkeuren', + 'DISAPPROVED' => 'Afkeuren', 'APPROVE_IMAGE' => 'Afbeelding goedkeuren', //@todo @@ -118,7 +118,7 @@ 'DESCRIPTION_LENGTH' => 'Je kan hier een omschrijving invoeren, deze mag niet meer dan %d karakters bevatten.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'De afbeeldingsextensie is niet toegestaan', - 'DONT_RATE_IMAGE' => 'Beoordeel afbeeldingen niet', + 'DO_NOT_RATE_IMAGE' => 'Beoordeel afbeeldingen niet', 'EDIT_COMMENT' => 'Wijzig reactie', 'EDIT_IMAGE' => 'Wijzig', diff --git a/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php index 6d891cd3..9fd7c034 100644 --- a/core/language/nl/gallery_mcp.php +++ b/core/language/nl/gallery_mcp.php @@ -59,9 +59,9 @@ 'QUEUE_A_LOCK2' => 'Afbeelding sluiten?', 'QUEUE_A_LOCK2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt sluiten?', 'QUEUE_A_MOVE' => 'Verplaats afbeelding', - 'QUEUE_A_UNAPPROVE' => 'Afbeelding afkeuren', - 'QUEUE_A_UNAPPROVE2' => 'Afbeelding afkeuren?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt afkeuren?', + 'QUEUE_A_UNAPPROVED' => 'Afbeelding afkeuren', + 'QUEUE_A_UNAPPROVED2' => 'Afbeelding afkeuren?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt afkeuren?', 'QUEUE_STATUS_0' => 'De afbeelding wacht op goedkeuring.', 'QUEUE_STATUS_1' => 'De afbeelding is goedgekeurd.', @@ -77,10 +77,10 @@ 'QUEUES_A_LOCK2' => 'Afbeeldingen sluiten?', 'QUEUES_A_LOCK2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt sluiten?', 'QUEUES_A_MOVE' => 'Verplaats afbeeldingen', - 'QUEUES_A_UNAPPROVE' => 'Afbeeldingen afkeuren', - 'QUEUES_A_UNAPPROVE2' => 'Afbeeldingen afkeuren?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', + 'QUEUES_A_UNAPPROVED' => 'Afbeeldingen afkeuren', + 'QUEUES_A_UNAPPROVED2' => 'Afbeeldingen afkeuren?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', 'REPORT_A_CLOSE' => 'Sluit melding', 'REPORT_A_CLOSE2' => 'Melding sluiten?', @@ -117,7 +117,7 @@ 1 => 'In totaal is er 1 afbeelding goedgekeurd.', 2 => 'In totaal zijn er %s afbeeldingen goedgekeurd.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Geen afgekeurde afbeeldingen.', 1 => 'In totaal is er 1 afbeelding afgekleurd.', 2 => 'In totaal zijn er %s afbeeldingen afgekeurd.', diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php index ef19ef94..09f00739 100644 --- a/core/language/ru/gallery.php +++ b/core/language/ru/gallery.php @@ -44,7 +44,7 @@ ), 'ALLOWED_FILETYPES' => 'Разрешённые типы файлов', 'APPROVE' => 'Одобрить', - 'DISAPPROVE' => 'Не одобрять', + 'DISAPPROVED' => 'Не одобрять', 'APPROVE_IMAGE' => 'Одобрить фото', //@todo 'ALBUM_COMMENT_CAN' => 'Вы можете оставлять комментарии', @@ -110,7 +110,7 @@ 'DESCRIPTION_LENGTH' => 'Введите описание (не более %d символов).', 'DETAILS' => 'Информация', 'DISALLOWED_EXTENSION' => 'Изображение с таким расширением не разрешено', - 'DONT_RATE_IMAGE' => 'Нет оценки', + 'DO_NOT_RATE_IMAGE' => 'Нет оценки', 'EDIT_COMMENT' => 'Редактировать комментарий', 'EDIT_IMAGE' => 'Редактировать', diff --git a/core/language/ru/gallery_mcp.php b/core/language/ru/gallery_mcp.php index 08aa5b41..46908d86 100644 --- a/core/language/ru/gallery_mcp.php +++ b/core/language/ru/gallery_mcp.php @@ -50,9 +50,9 @@ 'QUEUE_A_LOCK2' => 'Блокировать фотографию?', 'QUEUE_A_LOCK2_CONFIRM' => 'Подтвердите блокировку фотографии.', 'QUEUE_A_MOVE' => 'Переместить фотографию', - 'QUEUE_A_UNAPPROVE' => 'Отклонить фотографию', - 'QUEUE_A_UNAPPROVE2' => 'Отклонить фотографию?', - 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Подтвердите, что хотите отклонить эту фотографию.', + 'QUEUE_A_UNAPPROVED' => 'Отклонить фотографию', + 'QUEUE_A_UNAPPROVED2' => 'Отклонить фотографию?', + 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Подтвердите, что хотите отклонить эту фотографию.', 'QUEUE_STATUS_0' => 'Это фото ожидает одобрения.', 'QUEUE_STATUS_1' => 'Это фото одобрено.', 'QUEUE_STATUS_2' => 'Это фото блокировано.', @@ -66,10 +66,10 @@ 'QUEUES_A_LOCK2' => 'Заблокировать фотографии?', 'QUEUES_A_LOCK2_CONFIRM' => 'Подтвердите блокировку фотографий.', 'QUEUES_A_MOVE' => 'Переместить фотографии', - 'QUEUES_A_UNAPPROVE' => 'Отклонить фотографии', - 'QUEUES_A_UNAPPROVE2' => 'Отклонить фотографии?', - 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Подтвердите, что хотите отклонить эти фотографии.', - 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Вы действительно хотите не одобрять фотографии?', + 'QUEUES_A_UNAPPROVED' => 'Отклонить фотографии', + 'QUEUES_A_UNAPPROVED2' => 'Отклонить фотографии?', + 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Подтвердите, что хотите отклонить эти фотографии.', + 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Вы действительно хотите не одобрять фотографии?', 'REPORT_A_CLOSE' => 'Закрыть жалобу', 'REPORT_A_CLOSE2' => 'Закрыть жалобу?', 'REPORT_A_CLOSE2_CONFIRM' => 'Подтвердите закрытие жалобы.', @@ -101,7 +101,7 @@ 1 => 'Всего 1 фотография одобрена.', 2 => 'Всего %s фотографий одобрено.', ), - 'WAITING_DISPPROVED_IMAGE' => array( + 'WAITING_DISAPPROVED_IMAGE' => array( 0 => 'Нет фотографий, которые не были одобренны.', 1 => 'Всего 1 фотография не одобрена.', 2 => 'Всего %s фото нуждающиеся в одобрении.', diff --git a/core/moderate.php b/core/moderate.php index 61d9c817..bccbfdd3 100644 --- a/core/moderate.php +++ b/core/moderate.php @@ -209,7 +209,7 @@ public function build_list($album, $page = 1, $per_page = 0) foreach ($waiting_images as $VAR) { $album_tmp = $this->album->get_info($VAR['image_album_id']); - $this->template->assign_block_vars('unaproved', array( + $this->template->assign_block_vars('unapproved_image', array( 'U_IMAGE_ID' => $VAR['image_id'], 'U_IMAGE' => $this->helper->route('phpbbgallery_core_image_file_mini', array('image_id' => $VAR['image_id'])), 'U_IMAGE_URL' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $VAR['image_id'])), @@ -291,7 +291,7 @@ public function album_overview($album_id, $page = 1, $per_page = 0) $status[] = 0; $status[] = 2; $actions['approve'] = 'QUEUES_A_APPROVE'; - $actions['unapprove'] = 'QUEUES_A_UNAPPROVE'; + $actions['unapproved'] = 'QUEUES_A_UNAPPROVED'; $actions['lock'] = 'QUEUES_A_LOCK'; } if ($this->gallery_auth->acl_check('m_delete', $album['album_id'], $album['album_user_id'])) diff --git a/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html index f6fb9dc9..f131cbb5 100644 --- a/core/styles/prosilver/template/gallery/imageblock_polaroid.html +++ b/core/styles/prosilver/template/gallery/imageblock_polaroid.html @@ -26,7 +26,7 @@ {imageblock.image.UC_IMAGE_NAME}

- +

diff --git a/core/styles/prosilver/template/gallery/mcp_approve.html b/core/styles/prosilver/template/gallery/mcp_approve.html index 14472bcf..0e699021 100644 --- a/core/styles/prosilver/template/gallery/mcp_approve.html +++ b/core/styles/prosilver/template/gallery/mcp_approve.html @@ -8,7 +8,7 @@

{MESSAGE_TITLE}

-
- +
-   +  
diff --git a/core/styles/prosilver/template/gallery/search_results.html b/core/styles/prosilver/template/gallery/search_results.html index b5246cb2..f75c1a3d 100644 --- a/core/styles/prosilver/template/gallery/search_results.html +++ b/core/styles/prosilver/template/gallery/search_results.html @@ -83,7 +83,7 @@

{SEARCH_TITLE}{SEARCH_MATCHES}{imageblock.image.UC_IMAGE_NAME}

- +

diff --git a/core/styles/prosilver/template/gallery/viewimage_body.html b/core/styles/prosilver/template/gallery/viewimage_body.html index d6c668f2..2d5c3a4d 100644 --- a/core/styles/prosilver/template/gallery/viewimage_body.html +++ b/core/styles/prosilver/template/gallery/viewimage_body.html @@ -168,7 +168,7 @@

{L_IMAGE_NAME}{L_COLON} @@ -192,7 +192,7 @@

{L_IMAGE_NAME}{L_COLON} - + diff --git a/tests/controller/gallery_album_test.php b/tests/controller/gallery_album_test.php index b1298318..fdc535e9 100644 --- a/tests/controller/gallery_album_test.php +++ b/tests/controller/gallery_album_test.php @@ -281,7 +281,7 @@ public function test_for_base_clean() * 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() + public function test_for_base_load_moderators_allow_rates_and_comments() { $this->template->expects($this->exactly(12)) ->method('assign_block_vars') diff --git a/tests/core/core_image_test.php b/tests/core/core_image_test.php index 75cb4fdb..a41c7198 100644 --- a/tests/core/core_image_test.php +++ b/tests/core/core_image_test.php @@ -258,7 +258,7 @@ public function test_get_filenames($request, $expected) */ /** - * TODO: Add test for unapprove_images + * TODO: Add test for unapproved_images */ /** diff --git a/tests/functional/phpbbgallery_alpha_test.php b/tests/functional/phpbbgallery_alpha_test.php index 4e0f5221..26b243f9 100644 --- a/tests/functional/phpbbgallery_alpha_test.php +++ b/tests/functional/phpbbgallery_alpha_test.php @@ -567,7 +567,7 @@ public function test_disaprove_image() $image = $crawler->filter('a:contains("Valid but needs delete")')->parents()->parents(); - $form = $image->selectButton($this->lang('DISAPPROVE'))->form(); + $form = $image->selectButton($this->lang('DISAPPROVED'))->form(); $crawler = self::submit($form); From 022526080637752983f5d15737dbd0eaef17f9e6 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sat, 2 Aug 2025 01:10:12 +0100 Subject: [PATCH 073/138] Fix typos --- core/block.bkp | 2 +- core/config/routing.yml | 6 ++-- core/controller/file.php | 8 +++--- core/controller/moderate.php | 28 +++++++++---------- core/image/image.php | 4 +-- core/language/de/gallery.php | 4 +-- .../template/gallery/comment_body.html | 2 +- tests/functional/phpbbgallery_beta_test.php | 6 ++-- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/core/block.bkp b/core/block.bkp index 976dad7c..32ebb637 100644 --- a/core/block.bkp +++ b/core/block.bkp @@ -377,7 +377,7 @@ class block } $this->sql_where_auth = '('; - $this->sql_where_auth .= ((!empty($this->auth_view)) ? '(' . $this->db->sql_in_set('image_album_id', $this->auth_view) . ' AND image_status <> ' . $this->gallery_image->get_status_unaproved() . ((!empty($this->users)) ? ' AND image_contest = ' . $this->gallery_image->get_no_contest() : '') . ')' : ''); + $this->sql_where_auth .= ((!empty($this->auth_view)) ? '(' . $this->db->sql_in_set('image_album_id', $this->auth_view) . ' AND image_status <> ' . $this->gallery_image->get_status_unapproved_image() . ((!empty($this->users)) ? ' AND image_contest = ' . $this->gallery_image->get_no_contest() : '') . ')' : ''); $this->sql_where_auth .= ((!empty($this->auth_moderate)) ? ((!empty($this->auth_view)) ? ' OR ' : '') . '(' . $this->db->sql_in_set('image_album_id', $this->auth_moderate, false, true) . ')' : ''); if ($this->sql_where_auth == '(') diff --git a/core/config/routing.yml b/core/config/routing.yml index 8d10d78a..35091e7f 100644 --- a/core/config/routing.yml +++ b/core/config/routing.yml @@ -230,9 +230,9 @@ phpbbgallery_core_moderate_image_approve: defaults: { _controller: phpbbgallery.core.controller.moderate:approve } requirements: image_id: \d+ -phpbbgallery_core_moderate_image_unapprove: - path: /gallery/moderate/image/{image_id}/unapprove - defaults: { _controller: phpbbgallery.core.controller.moderate:unapprove } +phpbbgallery_core_moderate_image_unapproved: + path: /gallery/moderate/image/{image_id}/unapproved + defaults: { _controller: phpbbgallery.core.controller.moderate:unapproved } requirements: image_id: \d+ phpbbgallery_core_moderate_image_move: diff --git a/core/controller/file.php b/core/controller/file.php index 6cb702e1..a3eb56a9 100644 --- a/core/controller/file.php +++ b/core/controller/file.php @@ -467,13 +467,13 @@ protected function check_hot_link() { if (!$this->config['phpbb_gallery_allow_hotlinking']) { - $haystak = array(); - $haystak = explode(',', $this->config['phpbb_gallery_hotlinking_domains']); + $haystack = array(); + $haystack = explode(',', $this->config['phpbb_gallery_hotlinking_domains']); //add one extra array - current phpbb domain - $haystak[] = $this->config['server_name']; + $haystack[] = $this->config['server_name']; $referrer = $this->request->server('HTTP_REFERER', ''); $not_hl = false; - foreach ($haystak as $var) + foreach ($haystack as $var) { if (!empty($var)) { diff --git a/core/controller/moderate.php b/core/controller/moderate.php index f30b1293..6f2a1d07 100644 --- a/core/controller/moderate.php +++ b/core/controller/moderate.php @@ -238,7 +238,7 @@ public function queue_approve($page, $album_id) $this->url->meta_refresh(3, $back_link); trigger_error($message); } - if ($action == 'disapprove') + if ($action == 'disapproved') { $count = 0; foreach ($approve_ary as $album_id => $delete_array) @@ -248,12 +248,12 @@ public function queue_approve($page, $album_id) // Let's log the action foreach ($filenames as $name) { - $this->gallery_log->add_log('moderator', 'disapprove', $album_id, 0, array('LOG_GALLERY_DISAPPROVED', $name)); + $this->gallery_log->add_log('moderator', 'disapproved', $album_id, 0, array('LOG_GALLERY_DISAPPROVED', $name)); } $this->moderate->delete_images($delete_array); $count = $count + count($delete_array); } - $message = $this->language->lang('WAITING_DISPPROVED_IMAGE', $count); + $message = $this->language->lang('WAITING_DISAPPROVED_IMAGE', $count); $this->url->meta_refresh(3, $back_link); trigger_error($message); } @@ -434,8 +434,8 @@ public function album_overview($album_id, $page) $message = $this->language->lang('WAITING_APPROVED_IMAGE', count($actions_array)); break; - case 'unapprove': - $this->image->unapprove_images($actions_array, $album_id); + case 'unapproved': + $this->image->unapproved_images($actions_array, $album_id); $this->album->update_info($album_id); $message = $this->language->lang('WAITING_UNAPPROVED_IMAGE', count($actions_array)); break; @@ -555,8 +555,8 @@ public function image($image_id) $redirect = new RedirectResponse($route); $redirect->send(); break; - case 'images_unapprove': - $route = $this->helper->route('phpbbgallery_core_moderate_image_unapprove', array('image_id' => $image_id)); + case 'images_unapproved': + $route = $this->helper->route('phpbbgallery_core_moderate_image_unapproved', array('image_id' => $image_id)); $redirect = new RedirectResponse($route); $redirect->send(); break; @@ -624,13 +624,13 @@ public function image($image_id) } else if ($image_data['image_status'] == 1) { - $select_select .= ''; + $select_select .= ''; $select_select .= ''; } else { $select_select .= ''; - $select_select .= ''; + $select_select .= ''; } } if ($this->gallery_auth->acl_check('m_delete', $album_data['album_id'], $album_data['album_user_id'])) @@ -705,7 +705,7 @@ public function approve($image_id) $action_ary = array_keys($action_ary); $action = isset($action_ary[0]) ? $action_ary[0] : 'approve'; - if ($action === 'disapprove') + if ($action === 'disapproved') { $redirect = new RedirectResponse($this->helper->route('phpbbgallery_core_image_delete', ['image_id' => $image_id])); $redirect->send(); @@ -745,12 +745,12 @@ public function approve($image_id) /** * Index Controller - * Route: gallery/moderate/image/{image_id}/unapprove + * Route: gallery/moderate/image/{image_id}/unapproved * * @param $image_id * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object */ - public function unapprove($image_id) + public function unapproved($image_id) { $image_data = $this->image->get_image_data($image_id); $album_data = $this->album->get_info($image_data['image_album_id']); @@ -770,7 +770,7 @@ public function unapprove($image_id) if (confirm_box(true)) { $image_id_ary = array($image_id); - $this->image->unapprove_images($image_id_ary, $album_data['album_id']); + $this->image->unapproved_images($image_id_ary, $album_data['album_id']); // To DO - add notification $message = sprintf($this->language->lang('WAITING_UNAPPROVED_IMAGE', 1)); meta_refresh($meta_refresh_time, $image_backlink); @@ -779,7 +779,7 @@ public function unapprove($image_id) else { $s_hidden_fields = ''; - confirm_box(false, 'QUEUE_A_UNAPPROVE2', $s_hidden_fields); + confirm_box(false, 'QUEUE_A_UNAPPROVED2', $s_hidden_fields); } } diff --git a/core/image/image.php b/core/image/image.php index 721b2960..16e88d1e 100644 --- a/core/image/image.php +++ b/core/image/image.php @@ -511,7 +511,7 @@ public function approve_images($image_id_ary, $album_id) * @param (array) $image_id_ary The image ID array to be unapproved * @param (int) $album_id The album image is approved to (just save some queries for log) */ - public function unapprove_images($image_id_ary, $album_id) + public function unapproved_images($image_id_ary, $album_id) { self::handle_counter($image_id_ary, false); @@ -528,7 +528,7 @@ public function unapprove_images($image_id_ary, $album_id) $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - $this->gallery_log->add_log('moderator', 'unapprove', $album_id, $row['image_id'], array('LOG_GALLERY_UNAPPROVED', $row['image_name'])); + $this->gallery_log->add_log('moderator', 'unapproved', $album_id, $row['image_id'], array('LOG_GALLERY_UNAPPROVED', $row['image_name'])); } $this->db->sql_freeresult($result); } diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php index e910351a..c5b51919 100644 --- a/core/language/de/gallery.php +++ b/core/language/de/gallery.php @@ -48,7 +48,7 @@ ), 'ALLOWED_FILETYPES' => 'Erlaubte Dateitypen', 'APPROVE' => 'Freigeben', - 'DISAPPROVE' => 'Sperren', + 'DISAPPROVED' => 'Sperren', 'APPROVE_IMAGE' => 'Bild freischalten', //@todo @@ -118,7 +118,7 @@ 'DESCRIPTION_LENGTH' => 'Gib deine Beschreibung hier ein. Sie darf nicht mehr als %d Zeichen enthalten.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'Diese Bilderweiterung ist nicht erlaubt', - 'DONT_RATE_IMAGE' => 'Bild nicht bewerten', + 'DO_NOT_RATE_IMAGE' => 'Bild nicht bewerten', 'EDIT_COMMENT' => 'Kommentar ändern', 'EDIT_IMAGE' => 'Bearbeiten', diff --git a/core/styles/prosilver/template/gallery/comment_body.html b/core/styles/prosilver/template/gallery/comment_body.html index d815c843..e4497302 100644 --- a/core/styles/prosilver/template/gallery/comment_body.html +++ b/core/styles/prosilver/template/gallery/comment_body.html @@ -31,7 +31,7 @@

{L_POST_COMMENT}

diff --git a/tests/functional/phpbbgallery_beta_test.php b/tests/functional/phpbbgallery_beta_test.php index dc3dc530..879fe103 100644 --- a/tests/functional/phpbbgallery_beta_test.php +++ b/tests/functional/phpbbgallery_beta_test.php @@ -526,7 +526,7 @@ public function test_max_rating() $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->assertEquals(11, $crawler->filter('select:contains("'.$this->lang('DO_NOT_RATE_IMAGE').'")')->filter('option')->count()); $this->logout(); $this->login(); @@ -555,7 +555,7 @@ public function test_max_rating() $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->assertEquals(21, $crawler->filter('select:contains("'.$this->lang('DO_NOT_RATE_IMAGE').'")')->filter('option')->count()); $this->logout(); $this->login(); @@ -581,7 +581,7 @@ public function test_rate() $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 = $crawler->filter('select:contains("'.$this->lang('DO_NOT_RATE_IMAGE').'")')->parents()->parents()->parents()->form(); $form['rating'] = 5; $crawler = self::submit($form); From 15b328771306d9231efa641f763aeb9893af2698 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sat, 2 Aug 2025 09:30:14 +0100 Subject: [PATCH 074/138] Revert last 2 commits --- core/block.bkp | 2 +- core/config/routing.yml | 6 ++-- core/controller/file.php | 8 +++--- core/controller/moderate.php | 28 +++++++++---------- core/image/image.php | 4 +-- core/language/bg/gallery.php | 4 +-- core/language/bg/gallery_mcp.php | 16 +++++------ core/language/de/gallery.php | 4 +-- core/language/de/gallery_mcp.php | 16 +++++------ core/language/en/gallery.php | 4 +-- core/language/en/gallery_acp.php | 2 +- core/language/en/gallery_mcp.php | 16 +++++------ core/language/es/gallery.php | 4 +-- core/language/es/gallery_mcp.php | 16 +++++------ core/language/fr/gallery.php | 4 +-- core/language/fr/gallery_mcp.php | 16 +++++------ core/language/it/gallery.php | 4 +-- core/language/it/gallery_mcp.php | 16 +++++------ core/language/nl/gallery.php | 4 +-- core/language/nl/gallery_mcp.php | 16 +++++------ core/language/ru/gallery.php | 4 +-- core/language/ru/gallery_mcp.php | 16 +++++------ core/moderate.php | 4 +-- .../template/gallery/comment_body.html | 2 +- .../template/gallery/imageblock_polaroid.html | 2 +- .../template/gallery/mcp_approve.html | 4 +-- .../prosilver/template/gallery/mcp_body.html | 6 ++-- .../gallery/moderate_approve_queue.html | 24 ++++++++-------- .../template/gallery/search_results.html | 2 +- .../template/gallery/viewimage_body.html | 4 +-- tests/controller/gallery_album_test.php | 2 +- tests/core/core_image_test.php | 2 +- tests/functional/phpbbgallery_alpha_test.php | 2 +- tests/functional/phpbbgallery_beta_test.php | 6 ++-- 34 files changed, 135 insertions(+), 135 deletions(-) diff --git a/core/block.bkp b/core/block.bkp index 32ebb637..976dad7c 100644 --- a/core/block.bkp +++ b/core/block.bkp @@ -377,7 +377,7 @@ class block } $this->sql_where_auth = '('; - $this->sql_where_auth .= ((!empty($this->auth_view)) ? '(' . $this->db->sql_in_set('image_album_id', $this->auth_view) . ' AND image_status <> ' . $this->gallery_image->get_status_unapproved_image() . ((!empty($this->users)) ? ' AND image_contest = ' . $this->gallery_image->get_no_contest() : '') . ')' : ''); + $this->sql_where_auth .= ((!empty($this->auth_view)) ? '(' . $this->db->sql_in_set('image_album_id', $this->auth_view) . ' AND image_status <> ' . $this->gallery_image->get_status_unaproved() . ((!empty($this->users)) ? ' AND image_contest = ' . $this->gallery_image->get_no_contest() : '') . ')' : ''); $this->sql_where_auth .= ((!empty($this->auth_moderate)) ? ((!empty($this->auth_view)) ? ' OR ' : '') . '(' . $this->db->sql_in_set('image_album_id', $this->auth_moderate, false, true) . ')' : ''); if ($this->sql_where_auth == '(') diff --git a/core/config/routing.yml b/core/config/routing.yml index 35091e7f..8d10d78a 100644 --- a/core/config/routing.yml +++ b/core/config/routing.yml @@ -230,9 +230,9 @@ phpbbgallery_core_moderate_image_approve: defaults: { _controller: phpbbgallery.core.controller.moderate:approve } requirements: image_id: \d+ -phpbbgallery_core_moderate_image_unapproved: - path: /gallery/moderate/image/{image_id}/unapproved - defaults: { _controller: phpbbgallery.core.controller.moderate:unapproved } +phpbbgallery_core_moderate_image_unapprove: + path: /gallery/moderate/image/{image_id}/unapprove + defaults: { _controller: phpbbgallery.core.controller.moderate:unapprove } requirements: image_id: \d+ phpbbgallery_core_moderate_image_move: diff --git a/core/controller/file.php b/core/controller/file.php index a3eb56a9..6cb702e1 100644 --- a/core/controller/file.php +++ b/core/controller/file.php @@ -467,13 +467,13 @@ protected function check_hot_link() { if (!$this->config['phpbb_gallery_allow_hotlinking']) { - $haystack = array(); - $haystack = explode(',', $this->config['phpbb_gallery_hotlinking_domains']); + $haystak = array(); + $haystak = explode(',', $this->config['phpbb_gallery_hotlinking_domains']); //add one extra array - current phpbb domain - $haystack[] = $this->config['server_name']; + $haystak[] = $this->config['server_name']; $referrer = $this->request->server('HTTP_REFERER', ''); $not_hl = false; - foreach ($haystack as $var) + foreach ($haystak as $var) { if (!empty($var)) { diff --git a/core/controller/moderate.php b/core/controller/moderate.php index 6f2a1d07..f30b1293 100644 --- a/core/controller/moderate.php +++ b/core/controller/moderate.php @@ -238,7 +238,7 @@ public function queue_approve($page, $album_id) $this->url->meta_refresh(3, $back_link); trigger_error($message); } - if ($action == 'disapproved') + if ($action == 'disapprove') { $count = 0; foreach ($approve_ary as $album_id => $delete_array) @@ -248,12 +248,12 @@ public function queue_approve($page, $album_id) // Let's log the action foreach ($filenames as $name) { - $this->gallery_log->add_log('moderator', 'disapproved', $album_id, 0, array('LOG_GALLERY_DISAPPROVED', $name)); + $this->gallery_log->add_log('moderator', 'disapprove', $album_id, 0, array('LOG_GALLERY_DISAPPROVED', $name)); } $this->moderate->delete_images($delete_array); $count = $count + count($delete_array); } - $message = $this->language->lang('WAITING_DISAPPROVED_IMAGE', $count); + $message = $this->language->lang('WAITING_DISPPROVED_IMAGE', $count); $this->url->meta_refresh(3, $back_link); trigger_error($message); } @@ -434,8 +434,8 @@ public function album_overview($album_id, $page) $message = $this->language->lang('WAITING_APPROVED_IMAGE', count($actions_array)); break; - case 'unapproved': - $this->image->unapproved_images($actions_array, $album_id); + 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)); break; @@ -555,8 +555,8 @@ public function image($image_id) $redirect = new RedirectResponse($route); $redirect->send(); break; - case 'images_unapproved': - $route = $this->helper->route('phpbbgallery_core_moderate_image_unapproved', array('image_id' => $image_id)); + case 'images_unapprove': + $route = $this->helper->route('phpbbgallery_core_moderate_image_unapprove', array('image_id' => $image_id)); $redirect = new RedirectResponse($route); $redirect->send(); break; @@ -624,13 +624,13 @@ public function image($image_id) } else if ($image_data['image_status'] == 1) { - $select_select .= ''; + $select_select .= ''; $select_select .= ''; } else { $select_select .= ''; - $select_select .= ''; + $select_select .= ''; } } if ($this->gallery_auth->acl_check('m_delete', $album_data['album_id'], $album_data['album_user_id'])) @@ -705,7 +705,7 @@ public function approve($image_id) $action_ary = array_keys($action_ary); $action = isset($action_ary[0]) ? $action_ary[0] : 'approve'; - if ($action === 'disapproved') + if ($action === 'disapprove') { $redirect = new RedirectResponse($this->helper->route('phpbbgallery_core_image_delete', ['image_id' => $image_id])); $redirect->send(); @@ -745,12 +745,12 @@ public function approve($image_id) /** * Index Controller - * Route: gallery/moderate/image/{image_id}/unapproved + * Route: gallery/moderate/image/{image_id}/unapprove * * @param $image_id * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object */ - public function unapproved($image_id) + public function unapprove($image_id) { $image_data = $this->image->get_image_data($image_id); $album_data = $this->album->get_info($image_data['image_album_id']); @@ -770,7 +770,7 @@ public function unapproved($image_id) if (confirm_box(true)) { $image_id_ary = array($image_id); - $this->image->unapproved_images($image_id_ary, $album_data['album_id']); + $this->image->unapprove_images($image_id_ary, $album_data['album_id']); // To DO - add notification $message = sprintf($this->language->lang('WAITING_UNAPPROVED_IMAGE', 1)); meta_refresh($meta_refresh_time, $image_backlink); @@ -779,7 +779,7 @@ public function unapproved($image_id) else { $s_hidden_fields = ''; - confirm_box(false, 'QUEUE_A_UNAPPROVED2', $s_hidden_fields); + confirm_box(false, 'QUEUE_A_UNAPPROVE2', $s_hidden_fields); } } diff --git a/core/image/image.php b/core/image/image.php index 16e88d1e..721b2960 100644 --- a/core/image/image.php +++ b/core/image/image.php @@ -511,7 +511,7 @@ public function approve_images($image_id_ary, $album_id) * @param (array) $image_id_ary The image ID array to be unapproved * @param (int) $album_id The album image is approved to (just save some queries for log) */ - public function unapproved_images($image_id_ary, $album_id) + public function unapprove_images($image_id_ary, $album_id) { self::handle_counter($image_id_ary, false); @@ -528,7 +528,7 @@ public function unapproved_images($image_id_ary, $album_id) $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - $this->gallery_log->add_log('moderator', 'unapproved', $album_id, $row['image_id'], array('LOG_GALLERY_UNAPPROVED', $row['image_name'])); + $this->gallery_log->add_log('moderator', 'unapprove', $album_id, $row['image_id'], array('LOG_GALLERY_UNAPPROVED', $row['image_name'])); } $this->db->sql_freeresult($result); } diff --git a/core/language/bg/gallery.php b/core/language/bg/gallery.php index cb273394..ee889fd1 100644 --- a/core/language/bg/gallery.php +++ b/core/language/bg/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Позволени типове', 'APPROVE' => 'Одобри', - 'DISAPPROVED' => 'Отхвърли', + 'DISAPPROVE' => 'Отхвърли', 'APPROVE_IMAGE' => 'Одобри изображение', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Enter your descriptions here, it may contain no more than %d characters.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'Не разрешено разширение на изборажението', - 'DO_NOT_RATE_IMAGE' => 'Don’t rate image', + 'DONT_RATE_IMAGE' => 'Don’t rate image', 'EDIT_COMMENT' => 'Edit comment', 'EDIT_IMAGE' => 'Edit', diff --git a/core/language/bg/gallery_mcp.php b/core/language/bg/gallery_mcp.php index 03813a89..6058b498 100644 --- a/core/language/bg/gallery_mcp.php +++ b/core/language/bg/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => 'Заключи изображение?', 'QUEUE_A_LOCK2_CONFIRM' => 'Сигурен ли сте, че искате да заключите това изображение?', 'QUEUE_A_MOVE' => 'Премести изображение', - 'QUEUE_A_UNAPPROVED' => 'Махни одобрение на изборажение', - 'QUEUE_A_UNAPPROVED2' => 'Махни одобрение на изборажение?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Сиигирен ли сте, че искате да махнете одобрението на това изборажение?', + 'QUEUE_A_UNAPPROVE' => 'Махни одобрение на изборажение', + 'QUEUE_A_UNAPPROVE2' => 'Махни одобрение на изборажение?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Сиигирен ли сте, че искате да махнете одобрението на това изборажение?', 'QUEUE_STATUS_0' => 'Изображението чака одобрение.', 'QUEUE_STATUS_1' => 'Изображението е одобрено.', @@ -76,10 +76,10 @@ 'QUEUES_A_LOCK2' => 'Заключи избораженията?', 'QUEUES_A_LOCK2_CONFIRM' => 'Сигурни ли сте, че искате да заключите тези изображения?', 'QUEUES_A_MOVE' => 'Премести избораженията', - 'QUEUES_A_UNAPPROVED' => 'Махни одобрението на изборажения', - 'QUEUES_A_UNAPPROVED2' => 'Махни одобрението на изборажения?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', + 'QUEUES_A_UNAPPROVE' => 'Махни одобрението на изборажения', + 'QUEUES_A_UNAPPROVE2' => 'Махни одобрението на изборажения?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Сигурни ли сте, че искате да премахнете одобрението на тези избражения?', 'REPORT_A_CLOSE' => 'Затвори доклад', 'REPORT_A_CLOSE2' => 'Затвори доклад?', @@ -116,7 +116,7 @@ 1 => 'Общо 1 изображение беше одобрено.', 2 => 'Общо %s изображения бяха одобрени.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Не са отхвърлени изображения.', 1 => 'Общо 1 изображение е отхвърлено.', 2 => 'Общо %s изображения са отхвърлени.', diff --git a/core/language/de/gallery.php b/core/language/de/gallery.php index c5b51919..e910351a 100644 --- a/core/language/de/gallery.php +++ b/core/language/de/gallery.php @@ -48,7 +48,7 @@ ), 'ALLOWED_FILETYPES' => 'Erlaubte Dateitypen', 'APPROVE' => 'Freigeben', - 'DISAPPROVED' => 'Sperren', + 'DISAPPROVE' => 'Sperren', 'APPROVE_IMAGE' => 'Bild freischalten', //@todo @@ -118,7 +118,7 @@ 'DESCRIPTION_LENGTH' => 'Gib deine Beschreibung hier ein. Sie darf nicht mehr als %d Zeichen enthalten.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'Diese Bilderweiterung ist nicht erlaubt', - 'DO_NOT_RATE_IMAGE' => 'Bild nicht bewerten', + 'DONT_RATE_IMAGE' => 'Bild nicht bewerten', 'EDIT_COMMENT' => 'Kommentar ändern', 'EDIT_IMAGE' => 'Bearbeiten', diff --git a/core/language/de/gallery_mcp.php b/core/language/de/gallery_mcp.php index ef84c1b8..ac2a0ffa 100644 --- a/core/language/de/gallery_mcp.php +++ b/core/language/de/gallery_mcp.php @@ -59,9 +59,9 @@ 'QUEUE_A_LOCK2' => 'Bild sperren?', 'QUEUE_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass du das Bild sperren möchtest?', 'QUEUE_A_MOVE' => 'Bild verschieben', - 'QUEUE_A_UNAPPROVED' => 'erneute Freischaltung erzwingen', - 'QUEUE_A_UNAPPROVED2' => 'erneute Freischaltung erzwingen?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUE_A_UNAPPROVE' => 'erneute Freischaltung erzwingen', + 'QUEUE_A_UNAPPROVE2' => 'erneute Freischaltung erzwingen?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', 'QUEUE_STATUS_0' => 'Das Bild wartet auf Freigabe.', 'QUEUE_STATUS_1' => 'Das Bild ist freigeschaltet.', @@ -77,10 +77,10 @@ 'QUEUES_A_LOCK2' => 'Bilder sperren?', 'QUEUES_A_LOCK2_CONFIRM' => 'Bist du dir sicher, dass du die Bilder sperren möchtest?', 'QUEUES_A_MOVE' => 'Bilder verschieben', - 'QUEUES_A_UNAPPROVED' => 'erneute Freischaltung erzwingen', - 'QUEUES_A_UNAPPROVED2' => 'erneute Freischaltung erzwingen?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUES_A_UNAPPROVE' => 'erneute Freischaltung erzwingen', + 'QUEUES_A_UNAPPROVE2' => 'erneute Freischaltung erzwingen?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Bist du dir sicher, dass eine erneute Freischaltung erzwungen werden soll?', 'REPORT_A_CLOSE' => 'Meldung schliessen', 'REPORT_A_CLOSE2' => 'Meldung schliessen?', @@ -117,7 +117,7 @@ 1 => 'Insgesamt ist 1 Bild freigeschaltet.', 2 => 'Insgesamt sind %s Bilder freigeschaltet.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Keine Bilder abgelehnt.', 1 => 'Insgesamt ist 1 Bild abgelehnt.', 2 => 'Insgesamt sind %s Bilder abgelehnt.', diff --git a/core/language/en/gallery.php b/core/language/en/gallery.php index 125e465e..a644f09b 100644 --- a/core/language/en/gallery.php +++ b/core/language/en/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Allowed filetypes', 'APPROVE' => 'Approve', - 'DISAPPROVED' => 'Disapproved', + 'DISAPPROVE' => 'Dissaprove', 'APPROVE_IMAGE' => 'Approve image', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Enter your descriptions here, it may contain no more than %d characters.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'This image extension is not allowed', - 'DO_NOT_RATE_IMAGE' => 'Don’t rate image', + 'DONT_RATE_IMAGE' => 'Don’t rate image', 'EDIT_COMMENT' => 'Edit comment', 'EDIT_IMAGE' => 'Edit', diff --git a/core/language/en/gallery_acp.php b/core/language/en/gallery_acp.php index f0a5c15d..190c2b5f 100644 --- a/core/language/en/gallery_acp.php +++ b/core/language/en/gallery_acp.php @@ -270,7 +270,7 @@ 'PERMISSIONS_EXPLAIN' => 'Here you can alter which users and groups can access which albums.', 'PERMISSIONS_STORED' => 'Permissions were stored successful.', 'PERSONAL_ALBUM_INDEX' => 'View personal albums as album on the index', - 'PERSONAL_ALBUM_INDEX_EXP' => 'If chosen “No“, there will be the link, right beneath.', + 'PERSONAL_ALBUM_INDEX_EXP' => 'If choosen “No“, there will be the link, right beneath.', 'PEGA_CREATED' => 'Created personal gallery for %s.', 'PEGA_ALREADY_EXISTS' => '%s already has a personal gallery.', 'PGALLERIES_PER_PAGE' => 'Number of personal galleries per page', diff --git a/core/language/en/gallery_mcp.php b/core/language/en/gallery_mcp.php index d26e66e8..ed00ec76 100644 --- a/core/language/en/gallery_mcp.php +++ b/core/language/en/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => 'Lock image?', 'QUEUE_A_LOCK2_CONFIRM' => 'Are you sure, you want to lock this image?', 'QUEUE_A_MOVE' => 'Move image', - 'QUEUE_A_UNAPPROVED' => 'Unapprove image', - 'QUEUE_A_UNAPPROVED2' => 'Unapprove image?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove this image?', + 'QUEUE_A_UNAPPROVE' => 'Unapprove image', + 'QUEUE_A_UNAPPROVE2' => 'Unapprove image?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove this image?', 'QUEUE_STATUS_0' => 'The image is waiting for approval.', 'QUEUE_STATUS_1' => 'The image is approved.', @@ -76,10 +76,10 @@ 'QUEUES_A_LOCK2' => 'Lock images?', 'QUEUES_A_LOCK2_CONFIRM' => 'Are you sure, you want to lock these images?', 'QUEUES_A_MOVE' => 'Move images', - 'QUEUES_A_UNAPPROVED' => 'Unapprove images', - 'QUEUES_A_UNAPPROVED2' => 'Unapprove images?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove these images?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Are you sure, you want to unapprove these images?', + 'QUEUES_A_UNAPPROVE' => 'Unapprove images', + 'QUEUES_A_UNAPPROVE2' => 'Unapprove images?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove these images?', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Are you sure, you want to unapprove these images?', 'REPORT_A_CLOSE' => 'Close report', 'REPORT_A_CLOSE2' => 'Close report?', @@ -116,7 +116,7 @@ 1 => 'In total there is 1 image approved.', 2 => 'In total there are %s images approved.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'No images disapproved.', 1 => 'In total there is 1 image disapproved.', 2 => 'In total there are %s images disapproved.', diff --git a/core/language/es/gallery.php b/core/language/es/gallery.php index 3ef44b61..efaf61e8 100644 --- a/core/language/es/gallery.php +++ b/core/language/es/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Tipo de archivo permitido', 'APPROVE' => 'Aprobar', - 'DISAPPROVED' => 'Desaprobar', + 'DISAPPROVE' => 'Desaprobar', 'APPROVE_IMAGE' => 'Aprobar imagen', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Introduzca sus descripciones aquí, puede contener no más de %d caracteres.', 'DETAILS' => 'Detalles', 'DISALLOWED_EXTENSION' => 'Esta extensión de imagen no está permitida', - 'DO_NOT_RATE_IMAGE' => 'No valorar la imagen', + 'DONT_RATE_IMAGE' => 'No valorar la imagen', 'EDIT_COMMENT' => 'Editar comentario', 'EDIT_IMAGE' => 'Editar', diff --git a/core/language/es/gallery_mcp.php b/core/language/es/gallery_mcp.php index 0515f6f7..f9d97260 100644 --- a/core/language/es/gallery_mcp.php +++ b/core/language/es/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => '¿Bloquear imagen?', 'QUEUE_A_LOCK2_CONFIRM' => '¿Seguro que quieres bloquear esta imagen?', 'QUEUE_A_MOVE' => 'Mover imagen', - 'QUEUE_A_UNAPPROVED' => 'No aprobar imagen', - 'QUEUE_A_UNAPPROVED2' => '¿Aprobar la imagen?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => '¿Está seguro de que desea suprimir esta imagen?', + '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.', @@ -76,10 +76,10 @@ '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_UNAPPROVED' => 'No aprobar imágenes', - 'QUEUES_A_UNAPPROVED2' => '¿Aprobar imágenes?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => '¿Estás seguro de que quieres desautorizar estas imágenes?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => '¿Está seguro de que desea desautorizar estas imágenes?', + 'QUEUES_A_UNAPPROVE' => 'No aprobar imágenes', + 'QUEUES_A_UNAPPROVE2' => '¿Aprobar 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', 'REPORT_A_CLOSE2' => 'Cerrar informe?', @@ -116,7 +116,7 @@ 1 => 'En total hay 1 imagen aprobada.', 2 => 'En total se han aprobado %s imágenes aprobadas.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'No hay imágenes rechazadas.', 1 => 'En total hay 1 imagen rechazada.', 2 => 'En total hay %s imágenes rechazadas.', diff --git a/core/language/fr/gallery.php b/core/language/fr/gallery.php index ee02d312..58f208b6 100644 --- a/core/language/fr/gallery.php +++ b/core/language/fr/gallery.php @@ -62,7 +62,7 @@ ), 'ALLOWED_FILETYPES' => 'Types de fichiers autorisés', 'APPROVE' => 'Valider', - 'DISAPPROVED' => 'Refuser', + 'DISAPPROVE' => 'Refuser', 'APPROVE_IMAGE' => 'Valider l’image', //@todo @@ -132,7 +132,7 @@ 'DESCRIPTION_LENGTH' => 'Saisissez votre description ici. Elle ne peut pas contenir plus de %d caractères.', 'DETAILS' => 'Détails', 'DISALLOWED_EXTENSION' => 'L’extension de cette image n’est pas autorisée.', - 'DO_NOT_RATE_IMAGE' => 'Ne pas noter l’image', + 'DONT_RATE_IMAGE' => 'Ne pas noter l’image', 'EDIT_COMMENT' => 'Modifier le commentaire', 'EDIT_IMAGE' => 'Modifier', diff --git a/core/language/fr/gallery_mcp.php b/core/language/fr/gallery_mcp.php index 5719a7be..1b0a2eec 100644 --- a/core/language/fr/gallery_mcp.php +++ b/core/language/fr/gallery_mcp.php @@ -73,9 +73,9 @@ 'QUEUE_A_LOCK2' => 'Verrouiller l’image ?', 'QUEUE_A_LOCK2_CONFIRM' => 'Êtes-vous sûr de vouloir verrouiller cette image ?', 'QUEUE_A_MOVE' => 'Déplacer l’image', - 'QUEUE_A_UNAPPROVED' => 'Refuser l’image', - 'QUEUE_A_UNAPPROVED2' => 'Refuser l’image ?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser cette image ?', + 'QUEUE_A_UNAPPROVE' => 'Refuser l’image', + 'QUEUE_A_UNAPPROVE2' => 'Refuser l’image ?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser cette image ?', 'QUEUE_STATUS_0' => 'L’image est attente de validation.', 'QUEUE_STATUS_1' => 'L’image est validée.', @@ -91,10 +91,10 @@ 'QUEUES_A_LOCK2' => 'Verrouiller les images ?', 'QUEUES_A_LOCK2_CONFIRM' => 'Êtes-vous sûr de vouloir verrouiller ces images ?', 'QUEUES_A_MOVE' => 'Déplacer les images', - 'QUEUES_A_UNAPPROVED' => 'Refuser les images', - 'QUEUES_A_UNAPPROVED2' => 'Refuser les images ?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', + 'QUEUES_A_UNAPPROVE' => 'Refuser les images', + 'QUEUES_A_UNAPPROVE2' => 'Refuser les images ?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Êtes-vous sûr de vouloir refuser ces images ?', 'REPORT_A_CLOSE' => 'Fermer le rapport', 'REPORT_A_CLOSE2' => 'Fermer le rapport ?', @@ -131,7 +131,7 @@ 1 => 'Il y a au total 1 image validée.', 2 => 'Il y a au total %s images approved.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Aucune image désapprouvé.', 1 => 'Il y a au total 1 image désapprouvée.', 2 => 'Il y a au total %s images désapprouvées.', diff --git a/core/language/it/gallery.php b/core/language/it/gallery.php index c9c919ec..78b70ab6 100644 --- a/core/language/it/gallery.php +++ b/core/language/it/gallery.php @@ -47,7 +47,7 @@ ), 'ALLOWED_FILETYPES' => 'Tipi di file permessi', 'APPROVE' => 'Approva', - 'DISAPPROVED' => 'Dissaprova', + 'DISAPPROVE' => 'Dissaprova', 'APPROVE_IMAGE' => 'Approva immagine', //@todo @@ -117,7 +117,7 @@ 'DESCRIPTION_LENGTH' => 'Inserisci qui la tua descrizione, non può contenere più di %d caratteri.', 'DETAILS' => 'Dettagli', 'DISALLOWED_EXTENSION' => 'Quest’estensione di immagine non è permessa', - 'DO_NOT_RATE_IMAGE' => 'Non valutare immagine', + 'DONT_RATE_IMAGE' => 'Non valutare immagine', 'EDIT_COMMENT' => 'Modifica commento', 'EDIT_IMAGE' => 'Modifica', diff --git a/core/language/it/gallery_mcp.php b/core/language/it/gallery_mcp.php index 2fd97406..11b3a1f7 100644 --- a/core/language/it/gallery_mcp.php +++ b/core/language/it/gallery_mcp.php @@ -58,9 +58,9 @@ 'QUEUE_A_LOCK2' => 'Blocca immagine?', 'QUEUE_A_LOCK2_CONFIRM' => 'Sei sicuro di voler bloccare questa immagine?', 'QUEUE_A_MOVE' => 'Sposta immagine', - 'QUEUE_A_UNAPPROVED' => 'Disapprova immagine', - 'QUEUE_A_UNAPPROVED2' => 'Disapprova immagine?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare questa 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.', @@ -76,10 +76,10 @@ 'QUEUES_A_LOCK2' => 'Blocca immagini?', 'QUEUES_A_LOCK2_CONFIRM' => 'Sei sicuro di voler bloccare queste immagini?', 'QUEUES_A_MOVE' => 'Sposta immagini', - 'QUEUES_A_UNAPPROVED' => 'Disapprova immagini', - 'QUEUES_A_UNAPPROVED2' => 'Disapprova immagini?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare queste immagini?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Sei sicuro di voler disapprovare queste 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?', @@ -116,7 +116,7 @@ 1 => 'In totale c’è 1 immagine approvata.', 2 => 'In totale ci sono %s imamagini approvate.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Nessuna immagine disapprovata.', 1 => 'In totale c’è 1 immagine disapprovata.', 2 => 'In totale ci sono %s immagini disapprovate.', diff --git a/core/language/nl/gallery.php b/core/language/nl/gallery.php index 156ac89a..9417ee5e 100644 --- a/core/language/nl/gallery.php +++ b/core/language/nl/gallery.php @@ -48,7 +48,7 @@ ), 'ALLOWED_FILETYPES' => 'Toegestane bestandsformaten', 'APPROVE' => 'Goedkeuren', - 'DISAPPROVED' => 'Afkeuren', + 'DISAPPROVE' => 'Afkeuren', 'APPROVE_IMAGE' => 'Afbeelding goedkeuren', //@todo @@ -118,7 +118,7 @@ 'DESCRIPTION_LENGTH' => 'Je kan hier een omschrijving invoeren, deze mag niet meer dan %d karakters bevatten.', 'DETAILS' => 'Details', 'DISALLOWED_EXTENSION' => 'De afbeeldingsextensie is niet toegestaan', - 'DO_NOT_RATE_IMAGE' => 'Beoordeel afbeeldingen niet', + 'DONT_RATE_IMAGE' => 'Beoordeel afbeeldingen niet', 'EDIT_COMMENT' => 'Wijzig reactie', 'EDIT_IMAGE' => 'Wijzig', diff --git a/core/language/nl/gallery_mcp.php b/core/language/nl/gallery_mcp.php index 9fd7c034..6d891cd3 100644 --- a/core/language/nl/gallery_mcp.php +++ b/core/language/nl/gallery_mcp.php @@ -59,9 +59,9 @@ 'QUEUE_A_LOCK2' => 'Afbeelding sluiten?', 'QUEUE_A_LOCK2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt sluiten?', 'QUEUE_A_MOVE' => 'Verplaats afbeelding', - 'QUEUE_A_UNAPPROVED' => 'Afbeelding afkeuren', - 'QUEUE_A_UNAPPROVED2' => 'Afbeelding afkeuren?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt afkeuren?', + 'QUEUE_A_UNAPPROVE' => 'Afbeelding afkeuren', + 'QUEUE_A_UNAPPROVE2' => 'Afbeelding afkeuren?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeelding wilt afkeuren?', 'QUEUE_STATUS_0' => 'De afbeelding wacht op goedkeuring.', 'QUEUE_STATUS_1' => 'De afbeelding is goedgekeurd.', @@ -77,10 +77,10 @@ 'QUEUES_A_LOCK2' => 'Afbeeldingen sluiten?', 'QUEUES_A_LOCK2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt sluiten?', 'QUEUES_A_MOVE' => 'Verplaats afbeeldingen', - 'QUEUES_A_UNAPPROVED' => 'Afbeeldingen afkeuren', - 'QUEUES_A_UNAPPROVED2' => 'Afbeeldingen afkeuren?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', + 'QUEUES_A_UNAPPROVE' => 'Afbeeldingen afkeuren', + 'QUEUES_A_UNAPPROVE2' => 'Afbeeldingen afkeuren?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Weet je zeker dat je deze afbeeldingen wilt afkeuren?', 'REPORT_A_CLOSE' => 'Sluit melding', 'REPORT_A_CLOSE2' => 'Melding sluiten?', @@ -117,7 +117,7 @@ 1 => 'In totaal is er 1 afbeelding goedgekeurd.', 2 => 'In totaal zijn er %s afbeeldingen goedgekeurd.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Geen afgekeurde afbeeldingen.', 1 => 'In totaal is er 1 afbeelding afgekleurd.', 2 => 'In totaal zijn er %s afbeeldingen afgekeurd.', diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php index 09f00739..ef19ef94 100644 --- a/core/language/ru/gallery.php +++ b/core/language/ru/gallery.php @@ -44,7 +44,7 @@ ), 'ALLOWED_FILETYPES' => 'Разрешённые типы файлов', 'APPROVE' => 'Одобрить', - 'DISAPPROVED' => 'Не одобрять', + 'DISAPPROVE' => 'Не одобрять', 'APPROVE_IMAGE' => 'Одобрить фото', //@todo 'ALBUM_COMMENT_CAN' => 'Вы можете оставлять комментарии', @@ -110,7 +110,7 @@ 'DESCRIPTION_LENGTH' => 'Введите описание (не более %d символов).', 'DETAILS' => 'Информация', 'DISALLOWED_EXTENSION' => 'Изображение с таким расширением не разрешено', - 'DO_NOT_RATE_IMAGE' => 'Нет оценки', + 'DONT_RATE_IMAGE' => 'Нет оценки', 'EDIT_COMMENT' => 'Редактировать комментарий', 'EDIT_IMAGE' => 'Редактировать', diff --git a/core/language/ru/gallery_mcp.php b/core/language/ru/gallery_mcp.php index 46908d86..08aa5b41 100644 --- a/core/language/ru/gallery_mcp.php +++ b/core/language/ru/gallery_mcp.php @@ -50,9 +50,9 @@ 'QUEUE_A_LOCK2' => 'Блокировать фотографию?', 'QUEUE_A_LOCK2_CONFIRM' => 'Подтвердите блокировку фотографии.', 'QUEUE_A_MOVE' => 'Переместить фотографию', - 'QUEUE_A_UNAPPROVED' => 'Отклонить фотографию', - 'QUEUE_A_UNAPPROVED2' => 'Отклонить фотографию?', - 'QUEUE_A_UNAPPROVED2_CONFIRM' => 'Подтвердите, что хотите отклонить эту фотографию.', + 'QUEUE_A_UNAPPROVE' => 'Отклонить фотографию', + 'QUEUE_A_UNAPPROVE2' => 'Отклонить фотографию?', + 'QUEUE_A_UNAPPROVE2_CONFIRM' => 'Подтвердите, что хотите отклонить эту фотографию.', 'QUEUE_STATUS_0' => 'Это фото ожидает одобрения.', 'QUEUE_STATUS_1' => 'Это фото одобрено.', 'QUEUE_STATUS_2' => 'Это фото блокировано.', @@ -66,10 +66,10 @@ 'QUEUES_A_LOCK2' => 'Заблокировать фотографии?', 'QUEUES_A_LOCK2_CONFIRM' => 'Подтвердите блокировку фотографий.', 'QUEUES_A_MOVE' => 'Переместить фотографии', - 'QUEUES_A_UNAPPROVED' => 'Отклонить фотографии', - 'QUEUES_A_UNAPPROVED2' => 'Отклонить фотографии?', - 'QUEUES_A_UNAPPROVED2_CONFIRM' => 'Подтвердите, что хотите отклонить эти фотографии.', - 'QUEUES_A_DISAPPROVED2_CONFIRM' => 'Вы действительно хотите не одобрять фотографии?', + 'QUEUES_A_UNAPPROVE' => 'Отклонить фотографии', + 'QUEUES_A_UNAPPROVE2' => 'Отклонить фотографии?', + 'QUEUES_A_UNAPPROVE2_CONFIRM' => 'Подтвердите, что хотите отклонить эти фотографии.', + 'QUEUES_A_DISAPPROVE2_CONFIRM' => 'Вы действительно хотите не одобрять фотографии?', 'REPORT_A_CLOSE' => 'Закрыть жалобу', 'REPORT_A_CLOSE2' => 'Закрыть жалобу?', 'REPORT_A_CLOSE2_CONFIRM' => 'Подтвердите закрытие жалобы.', @@ -101,7 +101,7 @@ 1 => 'Всего 1 фотография одобрена.', 2 => 'Всего %s фотографий одобрено.', ), - 'WAITING_DISAPPROVED_IMAGE' => array( + 'WAITING_DISPPROVED_IMAGE' => array( 0 => 'Нет фотографий, которые не были одобренны.', 1 => 'Всего 1 фотография не одобрена.', 2 => 'Всего %s фото нуждающиеся в одобрении.', diff --git a/core/moderate.php b/core/moderate.php index bccbfdd3..61d9c817 100644 --- a/core/moderate.php +++ b/core/moderate.php @@ -209,7 +209,7 @@ public function build_list($album, $page = 1, $per_page = 0) foreach ($waiting_images as $VAR) { $album_tmp = $this->album->get_info($VAR['image_album_id']); - $this->template->assign_block_vars('unapproved_image', array( + $this->template->assign_block_vars('unaproved', array( 'U_IMAGE_ID' => $VAR['image_id'], 'U_IMAGE' => $this->helper->route('phpbbgallery_core_image_file_mini', array('image_id' => $VAR['image_id'])), 'U_IMAGE_URL' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $VAR['image_id'])), @@ -291,7 +291,7 @@ public function album_overview($album_id, $page = 1, $per_page = 0) $status[] = 0; $status[] = 2; $actions['approve'] = 'QUEUES_A_APPROVE'; - $actions['unapproved'] = 'QUEUES_A_UNAPPROVED'; + $actions['unapprove'] = 'QUEUES_A_UNAPPROVE'; $actions['lock'] = 'QUEUES_A_LOCK'; } if ($this->gallery_auth->acl_check('m_delete', $album['album_id'], $album['album_user_id'])) diff --git a/core/styles/prosilver/template/gallery/comment_body.html b/core/styles/prosilver/template/gallery/comment_body.html index e4497302..d815c843 100644 --- a/core/styles/prosilver/template/gallery/comment_body.html +++ b/core/styles/prosilver/template/gallery/comment_body.html @@ -31,7 +31,7 @@

{L_POST_COMMENT}

diff --git a/core/styles/prosilver/template/gallery/imageblock_polaroid.html b/core/styles/prosilver/template/gallery/imageblock_polaroid.html index f131cbb5..f6fb9dc9 100644 --- a/core/styles/prosilver/template/gallery/imageblock_polaroid.html +++ b/core/styles/prosilver/template/gallery/imageblock_polaroid.html @@ -26,7 +26,7 @@
{imageblock.image.UC_IMAGE_NAME}

- +

diff --git a/core/styles/prosilver/template/gallery/mcp_approve.html b/core/styles/prosilver/template/gallery/mcp_approve.html index 0e699021..14472bcf 100644 --- a/core/styles/prosilver/template/gallery/mcp_approve.html +++ b/core/styles/prosilver/template/gallery/mcp_approve.html @@ -8,7 +8,7 @@

{MESSAGE_TITLE}

-