Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #2

Open
wants to merge 47 commits into
base: develop-3.2.x
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
82693c0
Add version check. Closes #68.
rxu Jul 15, 2018
3dce150
Temporarily allow master branch to fail because of the tests framewor…
rxu Jul 15, 2018
cd76971
Update thanks_mod.php
SiavaRu Nov 9, 2018
bd4e39c
Merge pull request #102 from SiavaRu/patch-2
rxu Nov 9, 2018
ffef971
Fix possible incorrect topics rating displaying issue in template.
rxu Jun 12, 2019
74528b8
Update Tracis-CI config.
rxu Jun 14, 2019
9832a80
Fix pt_br translation, add Turkish (thanks to awr).
rxu Nov 25, 2019
10dfe47
Fix custom rating images displaying in posts. Adjust testing.
rxu Jan 12, 2020
046f9e6
Fix thankslist bug and tests.
rxu Jan 12, 2020
1a309f7
fix czech subject
stanley89 Jan 9, 2019
9b2ad27
Use language service instead of deprecated add_lang on user
JulienTant May 31, 2018
e663394
Merge branch 'JulienTant-develop-3.2.x' into develop-3.2.x
rxu Feb 7, 2020
9b0ea08
Cache thanks toplist on index page for 24 hours
rxu Apr 16, 2020
f2ec095
Use native FontAwesome thumbs icons. Remove unused custom theme files.
rxu Apr 20, 2020
f119843
Add more type casting.
rxu Apr 29, 2020
f4411b4
Adjust migrations effectively_installed methods to ensure correct run…
rxu Apr 29, 2020
0ff9a44
General code cleanup
rxu Apr 30, 2020
156bc3d
Add ACP tests
rxu Apr 30, 2020
5431e0f
Add user profile test
rxu Apr 30, 2020
eedbd75
Fix minor flaws
rxu Apr 30, 2020
67d1def
Restore thanks counting in user profile thanks list
rxu May 1, 2020
e64077c
Fix 'and more' received and given thanks count info in user profile t…
rxu May 1, 2020
1e4b813
Fix thankslist sorting regression
rxu May 2, 2020
f4c227d
Add thankslist sorting tests
rxu May 3, 2020
097c92d
Fix toplist displaying titles with no toplists
rxu May 3, 2020
14dddb0
Fix extension validation issues.
rxu Jul 12, 2020
9d4a36c
Fix v_1_2_8 migration SQL error for MS SQL server.
rxu Dec 12, 2020
e36c7f4
Fix #111.
rxu Dec 16, 2020
ffec3f2
Add PHP 8.0 test build.
rxu Dec 16, 2020
fab0860
Migrate to Github Actions testing
rxu Feb 6, 2021
e1fc078
Update info_acp_thanks.php - typo fix
Scanialady Feb 6, 2021
53ce324
Merge branch 'Scanialady-develop-3.2.x' into develop-3.2.x
rxu Feb 6, 2021
8d67bbe
Temporarily disable PHP 8.1 builds as unstable
rxu Apr 4, 2021
2f6e695
Fixes and new event
Tatiana5 Apr 2, 2021
a333285
Merge branch 'develop-3.2.x-tatiana5' into develop-3.2.x
rxu Apr 4, 2021
40169ac
Update indexes to better filter thanks by user and forum
JoshyPHP Dec 18, 2021
248a45d
Merge branch 'JoshyPHP-develop-3.2.x' into develop-3.2.x
rxu Dec 18, 2021
b0e48cc
Made danish translation and the same time changed "Thanks" to "Like" …
rudibr Nov 4, 2022
a1ace21
Rename language folder in according to Danish ISO code (da)
rxu Nov 7, 2022
0276da5
Merge branch 'rudibr-develop-3.2.x' into develop-3.2.x
rxu Nov 7, 2022
9cb17c4
Add Slovak translation by msc@msc.sk
rxu Apr 18, 2023
1807fd1
Update tests env
rxu Apr 18, 2023
09e87df
Optimize thankslist code, fix MSSQL errors.
rxu Oct 8, 2023
398aa61
Optimize toplist code, fix MSSQL errors.
rxu Oct 8, 2023
13216d0
Improve toplist on index code
rxu Oct 8, 2023
6e331c8
Fix SQL syntax for user profile thanks lists.
rxu Oct 8, 2023
7b1e773
Adjust toplist controller code.
rxu Oct 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acp/acp_thanks_module.php
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ function main($id, $mode)

if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
$phpbb_container->get('language')->add_lang($display_vars['lang']);
}

$this->new_config = $config;
2 changes: 1 addition & 1 deletion acp/acp_thanks_reput_module.php
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ function main($id, $mode)

if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
$phpbb_container->get('language')->add_lang($display_vars['lang']);
}

$this->new_config = $config;
2 changes: 2 additions & 0 deletions config/services.yml
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ services:
- '@auth'
- '@template'
- '@user'
- '@language'
- '@cache.driver'
- '@pagination'
- '@profilefields.manager'
@@ -63,6 +64,7 @@ services:
- '@auth'
- '@template'
- '@user'
- '@language'
- '@cache.driver'
- '%core.root_path%'
- '%core.php_ext%'
47 changes: 26 additions & 21 deletions controller/thankslist.php
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ class thankslist
/** @var \phpbb\user */
protected $user;

/** @var \phpbb\language\language */
protected $language;

/** @var \phpbb\cache\driver\driver_interface */
protected $cache;

@@ -55,31 +58,33 @@ class thankslist
protected $php_ext;

/**
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param \phpbb\pagination $pagination Pagination object
* @param \phpbb\profilefields\manager $profilefields_manager Profile fields manager object
* @param \phpbb\request\request_interface $request Request object
* @param \phpbb\controller\helper $controller_helper Controller helper object
* @param string $thanks_table THANKS_TABLE
* @param string $users_table USERS_TABLE
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @access public
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache, \phpbb\pagination $pagination, \phpbb\profilefields\manager $profilefields_manager, \phpbb\request\request_interface $request, \phpbb\controller\helper $controller_helper, $thanks_table, $users_table, $phpbb_root_path, $php_ext)
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\language\language $language Language object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param \phpbb\pagination $pagination Pagination object
* @param \phpbb\profilefields\manager $profilefields_manager Profile fields manager object
* @param \phpbb\request\request_interface $request Request object
* @param \phpbb\controller\helper $controller_helper Controller helper object
* @param string $thanks_table THANKS_TABLE
* @param string $users_table USERS_TABLE
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @access public
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, \phpbb\language\language $language, \phpbb\cache\driver\driver_interface $cache, \phpbb\pagination $pagination, \phpbb\profilefields\manager $profilefields_manager, \phpbb\request\request_interface $request, \phpbb\controller\helper $controller_helper, $thanks_table, $users_table, $phpbb_root_path, $php_ext)
{
$this->config = $config;
$this->db = $db;
$this->auth = $auth;
$this->template = $template;
$this->user = $user;
$this->language = $language;
$this->cache = $cache;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
@@ -93,8 +98,8 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive

public function main($mode, $author_id, $give)
{
$this->user->add_lang(array('memberlist', 'groups', 'search'));
$this->user->add_lang_ext('gfksx/thanksforposts', 'thanks_mod');
$this->language->add_lang(['memberlist', 'groups', 'search']);
$this->language->add_lang('thanks_mod', 'gfksx/thanksforposts');

// Grab data
$row_number = $total_users = 0;
49 changes: 27 additions & 22 deletions controller/toplist.php
Original file line number Diff line number Diff line change
@@ -26,6 +26,9 @@ class toplist
/** @var \phpbb\user */
protected $user;

/** @var \phpbb\language\language $language */
protected $language;

/** @var \phpbb\cache\driver\driver_interface */
protected $cache;

@@ -57,32 +60,34 @@ class toplist
protected $posts_table;

/**
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @param \phpbb\pagination $pagination Pagination object
* @param \gfksx\thanksforposts\core\helper $gfksx_helper Helper object
* @param \phpbb\request\request_interface $request Request object
* @param \phpbb\controller\helper $controller_helper Controller helper object
* @param string $thanks_table THANKS_TABLE
* @param string $users_table USERS_TABLE
* @param string $posts_table POSTS_TABLE
* @access public
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache, $phpbb_root_path, $php_ext, \phpbb\pagination $pagination, \gfksx\thanksforposts\core\helper $gfksx_helper, \phpbb\request\request_interface $request, \phpbb\controller\helper $controller_helper, $thanks_table, $users_table, $posts_table)
* Constructor
*
* @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db DBAL object
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\language\language $language Language object
* @param \phpbb\cache\driver\driver_interface $cache Cache driver object
* @param string $phpbb_root_path phpbb_root_path
* @param string $php_ext phpEx
* @param \phpbb\pagination $pagination Pagination object
* @param \gfksx\thanksforposts\core\helper $gfksx_helper Helper object
* @param \phpbb\request\request_interface $request Request object
* @param \phpbb\controller\helper $controller_helper Controller helper object
* @param string $thanks_table THANKS_TABLE
* @param string $users_table USERS_TABLE
* @param string $posts_table POSTS_TABLE
* @access public
*/
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, \phpbb\language\language $language, \phpbb\cache\driver\driver_interface $cache, $phpbb_root_path, $php_ext, \phpbb\pagination $pagination, \gfksx\thanksforposts\core\helper $gfksx_helper, \phpbb\request\request_interface $request, \phpbb\controller\helper $controller_helper, $thanks_table, $users_table, $posts_table)
{
$this->config = $config;
$this->db = $db;
$this->auth = $auth;
$this->template = $template;
$this->user = $user;
$this->language = $language;
$this->cache = $cache;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
@@ -97,8 +102,8 @@ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\drive

public function main()
{
$this->user->add_lang(array('memberlist', 'groups', 'search'));
$this->user->add_lang_ext('gfksx/thanksforposts', 'thanks_mod');
$this->language->add_lang(['memberlist', 'groups', 'search']);
$this->language->add_lang('thanks_mod', 'gfksx/thanksforposts');

// Grab data
$mode = $this->request->variable('mode', '');