Skip to content

Commit 235a462

Browse files
authored
Merge branch '5.0-dev' into captcha-event2
2 parents de94e15 + 32ae2b4 commit 235a462

File tree

1,510 files changed

+18067
-8271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,510 files changed

+18067
-8271
lines changed

.git-blame-ignore-revs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Short array syntax change https://github.com/joomla/joomla-cms/pull/39616
2+
10f250f418851674c2e4104b6b39b9b665496544
3+
4+
# Code style fixes from PHP CS fixer https://github.com/joomla/joomla-cms/pull/39745
5+
1e7527b60ec42032abe7bfb9c000bacf38f65845
6+
7+
# PSR 12
8+
dd91072a956a19a43798515239892edd2b49ac7b
9+
e7f5cc182bb1cd39c7f085d529888ac4fa6fc77e

.github/workflows/create-translation-pull-request-v4.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
git remote add upstream https://github.com/joomla/joomla-cms.git
3838
git fetch upstream
3939
git checkout --progress --force -B translation refs/remotes/origin/translation
40-
git merge upstream/4.2-dev
40+
git merge upstream/4.3-dev
4141
4242
- name: Fetch and extract translations
4343
run: |
@@ -74,4 +74,4 @@ jobs:
7474
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
7575
run: |
7676
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
77-
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.2-dev
77+
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev

administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ public static function loadTranslationFiles($extension)
155155
*
156156
* @since 3.9.0
157157
*
158-
* @deprecated 5.0 Use the action log config model instead
158+
* @deprecated 4.3 will be removed in 6.0
159+
* Use the action log config model instead
160+
* Example: Factory::getApplication()->bootComponent('actionlogs')->getMVCFactory()
161+
* ->createModel('ActionlogConfig', 'Administrator')->getLogContentTypeParams($context);
159162
*/
160163
public static function getLogContentTypeParams($context)
161164
{
@@ -316,7 +319,7 @@ public static function loadActionLogPluginsLanguage()
316319
}
317320

318321
$lang->load($extension, JPATH_ADMINISTRATOR)
319-
|| $lang->load($extension, JPATH_PLUGINS . '/' . $type . '/' . $name);
322+
|| $lang->load($extension, JPATH_PLUGINS . '/' . $type . '/' . $name);
320323
}
321324

322325
// Load plg_system_actionlogs too

administrator/components/com_actionlogs/src/Model/ActionlogModel.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use Joomla\CMS\Mail\Exception\MailDisabledException;
1818
use Joomla\CMS\Mail\MailTemplate;
1919
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
20+
use Joomla\CMS\User\UserFactoryAwareInterface;
21+
use Joomla\CMS\User\UserFactoryAwareTrait;
2022
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
2123
use Joomla\Utilities\IpHelper;
2224
use PHPMailer\PHPMailer\Exception as phpMailerException;
@@ -30,8 +32,10 @@
3032
*
3133
* @since 3.9.0
3234
*/
33-
class ActionlogModel extends BaseDatabaseModel
35+
class ActionlogModel extends BaseDatabaseModel implements UserFactoryAwareInterface
3436
{
37+
use UserFactoryAwareTrait;
38+
3539
/**
3640
* Function to add logs to the database
3741
* This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
@@ -45,9 +49,13 @@ class ActionlogModel extends BaseDatabaseModel
4549
*
4650
* @since 3.9.0
4751
*/
48-
public function addLog($messages, $messageLanguageKey, $context, $userId = null)
52+
public function addLog($messages, $messageLanguageKey, $context, $userId = 0)
4953
{
50-
$user = Factory::getUser($userId);
54+
if (!is_numeric($userId)) {
55+
@trigger_error(sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
56+
}
57+
58+
$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();
5159
$db = $this->getDatabase();
5260
$date = Factory::getDate();
5361
$params = ComponentHelper::getComponent('com_actionlogs')->getParams();

administrator/components/com_actionlogs/src/Plugin/ActionLogPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ abstract class ActionLogPlugin extends CMSPlugin
6464
*/
6565
protected function addLog($messages, $messageLanguageKey, $context, $userId = null)
6666
{
67-
$user = Factory::getUser();
67+
$user = $this->app->getIdentity();
6868

6969
foreach ($messages as $index => $message) {
7070
if (!\array_key_exists('userid', $message)) {

administrator/components/com_admin/postinstall/behindproxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
*/
1010

1111
use Joomla\CMS\Factory;
12-
use Joomla\CMS\Filesystem\File;
1312
use Joomla\CMS\Filesystem\Path;
1413
use Joomla\CMS\Language\Text;
14+
use Joomla\Filesystem\File;
1515
use Joomla\Registry\Registry;
1616
use Joomla\Utilities\ArrayHelper;
1717

administrator/components/com_admin/script.php

Lines changed: 136 additions & 66 deletions
Large diffs are not rendered by default.

administrator/components/com_admin/src/Extension/AdminComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Psr\Container\ContainerInterface;
2121

2222
// phpcs:disable PSR1.Files.SideEffects
23-
\defined('JPATH_PLATFORM') or die;
23+
\defined('_JEXEC') or die;
2424
// phpcs:enable PSR1.Files.SideEffects
2525

2626
/**

administrator/components/com_admin/src/Model/HelpModel.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class HelpModel extends BaseDatabaseModel
5858
* @var array
5959
* @since 1.6
6060
*/
61-
protected $toc = null;
61+
protected $toc = [];
6262

6363
/**
6464
* URL for the latest version check
@@ -128,7 +128,7 @@ public function getLangTag()
128128
*/
129129
public function &getToc()
130130
{
131-
if (!\is_null($this->toc)) {
131+
if (\count($this->toc)) {
132132
return $this->toc;
133133
}
134134

@@ -152,8 +152,7 @@ public function &getToc()
152152
}
153153

154154
// Get Help files
155-
$files = Folder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
156-
$this->toc = [];
155+
$files = Folder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
157156

158157
foreach ($files as $file) {
159158
$buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/' . $file);

administrator/components/com_admin/src/Model/SysinfoModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ public function &getInfo(): array
336336
*/
337337
public function phpinfoEnabled(): bool
338338
{
339-
return !\in_array('phpinfo', explode(',', ini_get('disable_functions')));
339+
// remove any spaces from the ini value before exploding it
340+
$disabledFunctions = str_replace(' ', '', ini_get('disable_functions'));
341+
return !\in_array('phpinfo', explode(',', $disabledFunctions));
340342
}
341343

342344
/**

0 commit comments

Comments
 (0)